diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2015-01-29 14:29:52 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-02-04 09:17:06 +0200 |
commit | af21319fcda4c43aa89186e0d6001432c5d6000e (patch) | |
tree | fe9b5cb9253eb4be726929027e83d4addae7fd1e /drivers/net/wireless/ath/ath10k/mac.c | |
parent | 9ad501827bd153dc2865dd60a456e3e43283b507 (diff) | |
download | linux-af21319fcda4c43aa89186e0d6001432c5d6000e.tar.bz2 |
ath10k: fix beacon deadlock
This should fix a very rare occurrence of the following deadlock:
[<ffffffffa018265e>] ath10k_wmi_tx_beacons_nowait+0x1e/0x50 [ath10k_core]
[<ffffffffa01829b6>] ath10k_wmi_op_ep_tx_credits+0x16/0x40 [ath10k_core]
[<ffffffffa017d685>] ath10k_htc_send+0x285/0x3d0 [ath10k_core]
[<ffffffffa0184b81>] ath10k_wmi_cmd_send_nowait+0x81/0x110 [ath10k_core]
[<ffffffffa0184c61>] ath10k_wmi_tx_beacon_nowait.part.33+0x51/0x90 [ath10k_core]
[<ffffffffa0184cd0>] ath10k_wmi_tx_beacons_iter+0x30/0x40 [ath10k_core]
[<ffffffff81882246>] __iterate_active_interfaces+0xa6/0x100
[<ffffffffa0184ca0>] ? ath10k_wmi_tx_beacon_nowait.part.33+0x90/0x90 [ath10k_core]
[<ffffffff818822ae>] ieee80211_iterate_active_interfaces_atomic+0xe/0x10
[<ffffffffa0182676>] ath10k_wmi_tx_beacons_nowait+0x36/0x50 [ath10k_core]
[<ffffffffa01829b6>] ath10k_wmi_op_ep_tx_credits+0x16/0x40 [ath10k_core]
[<ffffffffa017d140>] ath10k_htc_rx+0x280/0x410 [ath10k_core]
[<ffffffffa01bcbf0>] ? ath10k_ce_completed_recv_next+0x60/0x80 [ath10k_pci]
[<ffffffffa01bc6ab>] ath10k_pci_ce_recv_data+0x11b/0x1d0 [ath10k_pci]
[<ffffffffa01bcf44>] ath10k_ce_per_engine_service+0x64/0xc0 [ath10k_pci]
[<ffffffffa01bcfc2>] ath10k_ce_per_engine_service_any+0x22/0x50 [ath10k_pci]
[<ffffffffa01bc4d0>] ath10k_pci_tasklet+0x30/0x90 [ath10k_pci]
[<ffffffff81055a55>] tasklet_action+0xc5/0x100
To prevent this make sure to release ar->data_lock
while calling to ath10k_wmi_beacon_send_ref_nowait().
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d3fe1a378e8b..d0d882d632d1 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -531,10 +531,14 @@ void ath10k_mac_vif_beacon_free(struct ath10k_vif *arvif) dma_unmap_single(ar->dev, ATH10K_SKB_CB(arvif->beacon)->paddr, arvif->beacon->len, DMA_TO_DEVICE); + if (WARN_ON(arvif->beacon_state != ATH10K_BEACON_SCHEDULED && + arvif->beacon_state != ATH10K_BEACON_SENT)) + return; + dev_kfree_skb_any(arvif->beacon); arvif->beacon = NULL; - arvif->beacon_sent = false; + arvif->beacon_state = ATH10K_BEACON_SCHEDULED; } static void ath10k_mac_vif_beacon_cleanup(struct ath10k_vif *arvif) |