Skip to contentSkip to conversation

ath9k_htc: avoid scheduling while atomic on sta_rc_update

PATCH New Stanislaw Gruszka 1 participant 1 message Feb 3, 2014 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k_htc: avoid scheduling while atomic on sta_rc_update

mac80211 ->sta_rc_update() callback must be atomic. Since we have to take mutex and do other operations that can sleep when sending fimrware commands to device, the only option to satisfy atomicity requirement of ->sta_rc_update(), that I can see, is introduce work_struct and defer uploading new rates to that work.

---
This is on top of my previous patch:
"ath9k_htc: make ->sta_rc_update atomic for most calls"

 drivers/net/wireless/ath/ath9k/htc.h          |  2 +
 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 60 +++++++++++++++++----------
 2 files changed, 40 insertions(+), 22 deletions(-)
drivers/net/wireless/ath/ath9k/htc.h +2 -0
index 58da346..99a2031 100644
@@ -262,6 +262,8 @@ enum tid_aggr_state {
 struct ath9k_htc_sta {
 	u8 index;
 	enum tid_aggr_state tid_state[ATH9K_HTC_MAX_TID];
+	struct work_struct rc_update_work;
+	struct ath9k_htc_priv *htc_priv;
 };
 
 #define ATH9K_HTC_RXBUF 256
drivers/net/wireless/ath/ath9k/htc_drv_main.c +38 -22

97 lines not on this page · raw message

Signature · 1 line
1.7.11.7