USB: gadget rndis: send notifications
authorRichard Röjfors <richard.rojfors@endian.se>
Sun, 16 Nov 2008 03:53:24 +0000 (19:53 -0800)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 15 Feb 2009 15:28:19 +0000 (17:28 +0200)
commit6090e284ab3bb39ce5bc0913f68737222c552bf2
tree4f8bb278567d8792a1a78ab3db1c18f56f6dd7b3
parent86f4831829db0c5dcacadf23e53d41c9e3de6ff7
USB: gadget rndis: send notifications

It turns out that atomic_inc_return() returns the *new* value
not the original one, so the logic in rndis_response_available()
kept the first RNDIS response notification from getting out.
This prevented interoperation with MS-Windows (but not Linux).

Fix this to make RNDIS behave again.

Signed-off-by: Richard Röjfors <richard.rojfors@endian.se>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_rndis.c