usb: gadget: f_mbim: Use notify_req_queued instead of notify_count
Driver currently relies on notify_count to figure out whether
notification on interrupt endpoint has to be sent or not. This
counter is increased when response is received and decreased on
notify_complete. As subsequent notifications are supposed to
be sent on response_complete, it becomes difficult to make the
decision of queuing based on notify_count. Simplify this logic
by keeping track of notify_request_queued and using that to
submit pending notifications. Also, don't queue any response
from mbim_write if responses are already present and let
response_complete queue it.
Change-Id: I59277e241b471e7ad34854b673548554fd237f1f
Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment