Commit 82d7aba7 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by Kalle Valo

ath10k: fix kernel panic while shutting down AP

Based on GFP flag given to DMA coherent allocation, the behaviour of
dma_free_coherent is changed. This behavioural diffrence is noticeable
in ARM platform. If DMA memory is allocated with GFP_KERNEL, free
coherent can not be called inside spin lock. This is causing kernel
crash in ARM platforms. Fix this by changing GFP flag to atomic.

This is most likely a regression from commit 64badcb6 ("ath10k: workaround
fw beaconing bug").

Cc: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 9b57f88f
...@@ -2839,7 +2839,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, ...@@ -2839,7 +2839,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
arvif->beacon_buf = dma_zalloc_coherent(ar->dev, arvif->beacon_buf = dma_zalloc_coherent(ar->dev,
IEEE80211_MAX_FRAME_LEN, IEEE80211_MAX_FRAME_LEN,
&arvif->beacon_paddr, &arvif->beacon_paddr,
GFP_KERNEL); GFP_ATOMIC);
if (!arvif->beacon_buf) { if (!arvif->beacon_buf) {
ret = -ENOMEM; ret = -ENOMEM;
ath10k_warn(ar, "failed to allocate beacon buffer: %d\n", ath10k_warn(ar, "failed to allocate beacon buffer: %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment