Skip to contentSkip to conversation

ath10k: fix scheduling while atomic bug

PATCH In review Kalle Valo 1 participant 2 messages Oct 15, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

PATCH 1/7 ath10k: fix scheduling while atomic bug

From: Michal Kazior <[email protected]>

Recent WMI/HTC changes made it possible for WMI commands to sleep (if there's not enough HTC TX credits to submit a command). TX path is in an atomic context so calling WMI commands in it is wrong.

This simply moves WEP key index update to a worker and fixes the 'scheduling while atomic' bug.

This still leaves multiple WEP key handling laggy, i.e. some frames may be TXed with an old/different key (although recipient should still be able to RX them).

---
 drivers/net/wireless/ath/ath10k/core.h |    4 ++
 drivers/net/wireless/ath/ath10k/mac.c  |   53 ++++++++++++++++++++++----------
 2 files changed, 39 insertions(+), 18 deletions(-)
drivers/net/wireless/ath/ath10k/core.h +3 -1
index ce36daa..cef5455 100644
@@ -215,8 +215,10 @@ struct ath10k_vif {
 	struct ath10k *ar;
 	struct ieee80211_vif *vif;
 
+	struct work_struct wep_key_work;
 	struct ieee80211_key_conf *wep_keys[WMI_MAX_KEY_INDEX + 1];
-	u8 def_wep_key_index;
+	u8 def_wep_key_idx;
+	u8 def_wep_key_newidx;
 
 	u16 tx_seq_no;
 
drivers/net/wireless/ath/ath10k/mac.c +36 -17

97 lines not on this page · raw message

author
#1 lore raw
Quoted 11 lines · Kalle Valo

From: Michal Kazior <[email protected]>

Recent WMI/HTC changes made it possible for WMI commands to sleep (if there's not enough HTC TX credits to submit a command). TX path is in an atomic context so calling WMI commands in it is wrong.

This simply moves WEP key index update to a worker and fixes the 'scheduling while atomic' bug.

Quoted 7 lines

This still leaves multiple WEP key handling laggy, i.e. some frames may be TXed with an old/different key (although recipient should still be able to RX them).

Please ignore, I sent this accidentally too early.

Signature · 1 line
Kalle Valo