diff options
author | Raja Mani <rmani@qca.qualcomm.com> | 2012-03-07 11:35:04 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-07 09:34:14 +0200 |
commit | 390a8c8fae2e7072579198414e631984a61c485e (patch) | |
tree | dfda63cd5afc603317b1f3c07508fd896a036c8d /drivers/net/wireless/ath/ath6kl/txrx.c | |
parent | 1e9a905d9afd289bf19f02092a56660c2bcc50db (diff) | |
download | linux-390a8c8fae2e7072579198414e631984a61c485e.tar.bz2 |
ath6kl: Check wow state before sending control and data pkt
Below two scenarios are taken care in this patch which helped
to fix the firmware crash during wow suspend/resume.
* TX operation (ctrl tx and data tx) has to be controlled based
on suspend state. i.e, with respect to WOW mode, control packets
are allowed to send from the host until the suspend state goes
ATH6KL_STATE_WOW and the data packets are allowed until WOW
suspend operation starts.
* Similarly, wow resume is NOT allowed if WOW suspend is in progress.
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/txrx.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 6754441105ef..b05f3537cfd9 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -285,6 +285,9 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb, int status = 0; struct ath6kl_cookie *cookie = NULL; + if (WARN_ON_ONCE(ar->state == ATH6KL_STATE_WOW)) + return -EACCES; + spin_lock_bh(&ar->lock); ath6kl_dbg(ATH6KL_DBG_WLAN_TX, @@ -360,6 +363,11 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) return 0; } + if (WARN_ON_ONCE(ar->state != ATH6KL_STATE_ON)) { + dev_kfree_skb(skb); + return 0; + } + if (!test_bit(WMI_READY, &ar->flag)) goto fail_tx; |