diff options
author | Maya Erez <qca_merez@qca.qualcomm.com> | 2016-01-17 05:39:08 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-01-26 09:47:38 -0500 |
commit | 640751ac30b2ddfbe06ad712aa7d57a8d89a7eef (patch) | |
tree | 7948931c373c12b5d8ee3d689433504c0732658f /drivers/net/wireless/ath/wil6210/netdev.c | |
parent | c100c883e785802ab333604237928a65ae62c6bc (diff) |
wil6210: handle tx completions only if vring tx data is enabled
wil_vring_fini_tx is called in disconnect in order to free the
allocated vrings.
wil_vring_fini_tx is disabling the vring_tx_data before napi_synchronize
is called in order to avoid the tx handling of this vring, while
wil_vring_free is called only after napi finished the current handling
of the tx completed packets.
Due to that, in case of disconnect, wil6210_netdev_poll_tx can be called
when vring->va is not NULL but vring_tx_data[i]->enabled is already
disabled.
This patch checks vring_tx_data[i]->enabled in wil6210_netdev_poll_tx
to prevent handling of disabled vrings.
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/netdev.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/netdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c index 56aaa2d4fb0e..ecc3c1bdae4b 100644 --- a/drivers/net/wireless/ath/wil6210/netdev.c +++ b/drivers/net/wireless/ath/wil6210/netdev.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2012-2015 Qualcomm Atheros, Inc. | 2 | * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. |
3 | * | 3 | * |
4 | * Permission to use, copy, modify, and/or distribute this software for any | 4 | * Permission to use, copy, modify, and/or distribute this software for any |
5 | * purpose with or without fee is hereby granted, provided that the above | 5 | * purpose with or without fee is hereby granted, provided that the above |
@@ -108,8 +108,9 @@ static int wil6210_netdev_poll_tx(struct napi_struct *napi, int budget) | |||
108 | /* always process ALL Tx complete, regardless budget - it is fast */ | 108 | /* always process ALL Tx complete, regardless budget - it is fast */ |
109 | for (i = 0; i < WIL6210_MAX_TX_RINGS; i++) { | 109 | for (i = 0; i < WIL6210_MAX_TX_RINGS; i++) { |
110 | struct vring *vring = &wil->vring_tx[i]; | 110 | struct vring *vring = &wil->vring_tx[i]; |
111 | struct vring_tx_data *txdata = &wil->vring_tx_data[i]; | ||
111 | 112 | ||
112 | if (!vring->va) | 113 | if (!vring->va || !txdata->enabled) |
113 | continue; | 114 | continue; |
114 | 115 | ||
115 | tx_done += wil_tx_complete(wil, i); | 116 | tx_done += wil_tx_complete(wil, i); |