USB: gadget rndis: send notifications
authorRichard Röjfors <richard.rojfors@endian.se>
Sun, 16 Nov 2008 03:53:24 +0000 (19:53 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Dec 2008 18:55:08 +0000 (10:55 -0800)
commit2ab3bef821648fb04dec72b240da8f572ec597db
tree13787f0ee928e282e40293c311e7349a1288e917
parent7e35c8503968979d55c71de29445c66eeb024284
USB: gadget rndis: send notifications

commit ff3495052af48f7a2bf7961b131dc9e161dae19c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_rndis.c