diff options
author | Zhaoyang Liu <liuzy@marvell.com> | 2015-09-18 15:32:14 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-09-29 09:47:43 +0200 |
commit | d941444321f6b84bdd36d8d24eef10171c9ab981 (patch) | |
tree | 00df6bb23b6c1f2698d5979cb67376ceb637492a /drivers/net/wireless/mwifiex/usb.c | |
parent | mwifiex: fix tx data_sent issue for usb interface (diff) | |
download | linux-d941444321f6b84bdd36d8d24eef10171c9ab981.tar.xz linux-d941444321f6b84bdd36d8d24eef10171c9ab981.zip |
mwifiex: move usb specific data_sent update to usb.c
This patch move data_sent flag update to usb.c file.
>From now all data_sent update cases only happened in specific file:
sdio.c, usb.c, pcie.c. Outside ot these files, it is only allowed
to check the value of data_ent.
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/usb.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/usb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c index 5e789b2e06ea..01438a4e1732 100644 --- a/drivers/net/wireless/mwifiex/usb.c +++ b/drivers/net/wireless/mwifiex/usb.c @@ -277,6 +277,7 @@ static void mwifiex_usb_tx_complete(struct urb *urb) mwifiex_dbg(adapter, DATA, "%s: DATA\n", __func__); atomic_dec(&card->tx_data_urb_pending); + adapter->data_sent = false; mwifiex_write_data_complete(adapter, context->skb, 0, urb->status ? -1 : 0); } @@ -759,6 +760,7 @@ static int mwifiex_usb_host_to_card(struct mwifiex_adapter *adapter, u8 ep, if (ep == card->tx_data_ep && atomic_read(&card->tx_data_urb_pending) >= MWIFIEX_TX_DATA_URB) { + adapter->data_sent = true; return -EBUSY; } @@ -795,6 +797,7 @@ static int mwifiex_usb_host_to_card(struct mwifiex_adapter *adapter, u8 ep, atomic_dec(&card->tx_cmd_urb_pending); } else { atomic_dec(&card->tx_data_urb_pending); + adapter->data_sent = false; if (card->tx_data_ix) card->tx_data_ix--; else @@ -805,8 +808,10 @@ static int mwifiex_usb_host_to_card(struct mwifiex_adapter *adapter, u8 ep, } else { if (ep == card->tx_data_ep && atomic_read(&card->tx_data_urb_pending) == - MWIFIEX_TX_DATA_URB) + MWIFIEX_TX_DATA_URB) { + adapter->data_sent = true; return -ENOSR; + } } return -EINPROGRESS; |