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>


authored by Richard Röjfors and committed by Greg Kroah-Hartman ff349505 9c264521

+1 -1
+1 -1
drivers/usb/gadget/f_rndis.c
··· 302 302 __le32 *data = req->buf; 303 303 int status; 304 304 305 - if (atomic_inc_return(&rndis->notify_count)) 305 + if (atomic_inc_return(&rndis->notify_count) != 1) 306 306 return; 307 307 308 308 /* Send RNDIS RESPONSE_AVAILABLE notification; a