mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: David Brownell <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
9c264521a9
commit
ff3495052a
1 changed files with 1 additions and 1 deletions
|
|
@ -302,7 +302,7 @@ static void rndis_response_available(void *_rndis)
|
|||
__le32 *data = req->buf;
|
||||
int status;
|
||||
|
||||
if (atomic_inc_return(&rndis->notify_count))
|
||||
if (atomic_inc_return(&rndis->notify_count) != 1)
|
||||
return;
|
||||
|
||||
/* Send RNDIS RESPONSE_AVAILABLE notification; a
|
||||
|
|
|
|||
Loading…
Reference in a new issue