Skip to contentSkip to conversation

mac80211: fix update_tkip_key() documentation about the context

PATCH In review Kalle Valo 1 participant 2 messages Jan 24, 2010 mac80211

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

PATCH 1/1 mac80211: fix update_tkip_key() documentation about the context

Johannes noticed that I had incorrectly documented the context of update_tkip_key() driver operation. It must be atomic because all RX code is run inside rcu critical section.

---
 include/net/mac80211.h    |    2 +-
 net/mac80211/driver-ops.h |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)
include/net/mac80211.h +1 -1
index f56d6f4..f64402f 100644
@@ -1489,7 +1489,7 @@ enum ieee80211_ampdu_mlme_action {
  * @update_tkip_key: See the section "Hardware crypto acceleration"
  * 	This callback will be called in the context of Rx. Called for drivers
  * 	which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY.
- *	The callback can sleep.
+ *	The callback must be atomic.
  *
  * @hw_scan: Ask the hardware to service the scan request, no need to start
  *	the scan state machine in stack. The scan must honour the channel
net/mac80211/driver-ops.h +0 -2
index 40c6e9a..6c31f38 100644
@@ -144,8 +144,6 @@ static inline void drv_update_tkip_key(struct ieee80211_local *local,
 {
 	struct ieee80211_sta *ista = NULL;
 
-	might_sleep();
-
 	if (sta)
 		ista = &sta->sta;
 
author
#1 lore raw
Quoted 6 lines · Kalle Valo

Johannes noticed that I had incorrectly documented the context of update_tkip_key() driver operation. It must be atomic because all RX code is run inside rcu critical section.

John, I forgot to mention that this might fix some false warnings caused by my patch "mac80211: annotate sleeping driver ops". I haven't seen any reports, yet. Forturnately the patch is not in 2.6.33 AFAIK.

Signature · 1 line
Kalle Valo