diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2015-01-30 03:40:06 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-02-03 08:28:54 -0500 |
commit | 0ea3186ce03cfa9b1c5cb8677ac3ffcd19695cd7 (patch) | |
tree | a93049d12699089e8c5acaa06598592bd191bfb8 /drivers/net/wireless/mwifiex | |
parent | 7a1f4e61eb6417aecd20822a5f15e72d21c7f3f9 (diff) |
mwifiex: fix NULL packet downloading issues
This patch makes sure that skb is freed after downloading
NULL packet in error cases. Also, USB chipsets return
-EINPROGRESS after downloading packets, they are freed in
USB completion handler later. We will add missing change
to set tx_lock_flag for USB which blocks further packets.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_tx.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_tx.c b/drivers/net/wireless/mwifiex/sta_tx.c index 1debe76017b1..5ce2d9a4f919 100644 --- a/drivers/net/wireless/mwifiex/sta_tx.c +++ b/drivers/net/wireless/mwifiex/sta_tx.c | |||
@@ -183,9 +183,13 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags) | |||
183 | } | 183 | } |
184 | switch (ret) { | 184 | switch (ret) { |
185 | case -EBUSY: | 185 | case -EBUSY: |
186 | adapter->data_sent = true; | 186 | dev_kfree_skb_any(skb); |
187 | /* Fall through FAILURE handling */ | 187 | dev_err(adapter->dev, "%s: host_to_card failed: ret=%d\n", |
188 | __func__, ret); | ||
189 | adapter->dbg.num_tx_host_to_card_failure++; | ||
190 | break; | ||
188 | case -1: | 191 | case -1: |
192 | adapter->data_sent = false; | ||
189 | dev_kfree_skb_any(skb); | 193 | dev_kfree_skb_any(skb); |
190 | dev_err(adapter->dev, "%s: host_to_card failed: ret=%d\n", | 194 | dev_err(adapter->dev, "%s: host_to_card failed: ret=%d\n", |
191 | __func__, ret); | 195 | __func__, ret); |
@@ -198,6 +202,7 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags) | |||
198 | adapter->tx_lock_flag = true; | 202 | adapter->tx_lock_flag = true; |
199 | break; | 203 | break; |
200 | case -EINPROGRESS: | 204 | case -EINPROGRESS: |
205 | adapter->tx_lock_flag = true; | ||
201 | break; | 206 | break; |
202 | default: | 207 | default: |
203 | break; | 208 | break; |