path: root/net/mac80211/sta_info.h
diff options
authorBob Copeland <>2015-04-13 17:26:28 -0400
committerJohannes Berg <>2015-04-20 13:05:29 +0200
commit48bf6beddf455b0cb605915081f3428960a6224e (patch)
tree98e652b5c3970a61d6dee510fca33c874370cdcf /net/mac80211/sta_info.h
parent388f997620cb57372c494a194e9698b28cc179b8 (diff)
mac80211: introduce plink lock for plink fields
The mesh plink code uses sta->lock to serialize access to the plink state fields between the peer link state machine and the peer link timer. Some paths (e.g. those involving mps_qos_null_tx()) unfortunately hold this spinlock across frame tx, which is soon to be disallowed. Add a new spinlock just for plink access. Signed-off-by: Bob Copeland <> Signed-off-by: Johannes Berg <>
Diffstat (limited to 'net/mac80211/sta_info.h')
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 5c164fb3f6c5..40ad52e447ec 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -299,6 +299,7 @@ struct sta_ampdu_mlme {
* @tid_seq: per-TID sequence numbers for sending to this STA
* @ampdu_mlme: A-MPDU state machine state
* @timer_to_tid: identity mapping to ID timers
+ * @plink_lock: serialize access to plink fields
* @llid: Local link ID
* @plid: Peer link ID
* @reason: Cancel reason on PLINK_HOLDING state
@@ -422,9 +423,10 @@ struct sta_info {
#ifdef CONFIG_MAC80211_MESH
- * Mesh peer link attributes
+ * Mesh peer link attributes, protected by plink_lock.
* TODO: move to a sub-structure that is referenced with pointer?
+ spinlock_t plink_lock;
u16 llid;
u16 plid;
u16 reason;
@@ -432,6 +434,7 @@ struct sta_info {
enum nl80211_plink_state plink_state;
u32 plink_timeout;
struct timer_list plink_timer;
s64 t_offset;
s64 t_offset_setpoint;
/* mesh power save */