mac80211: add PLINK_ prefix and kernel doc to enum plink_state
PATCH 8/10 mac80211: add PLINK_ prefix and kernel doc to enum plink_state
Signed-off-by Luis Carlos Cobo <[email protected]>
--- net/mac80211/mesh.c | 6 ++-- net/mac80211/mesh_pathtbl.c | 6 ++-- net/mac80211/mesh_plink.c | 69 ++++++++++++++++++++++--------------------- net/mac80211/rx.c | 2 +- net/mac80211/sta_info.c | 2 +- net/mac80211/sta_info.h | 31 +++++++++++++----- 6 files changed, 65 insertions(+), 51 deletions(-)
net/mac80211/mesh.c +3 -3
@@ -91,9 +91,9 @@ void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata)/* In case mesh_plink_free_count > 0 and mesh_plinktbl_capacity == 0, * the mesh interface might be able to establish plinks with peers that -* are already on the table but are not on ESTAB state. However, in -* general the mesh interface is not accepting peer link requests from -* new peers, and that must be reflected in the beacon +* are already on the table but are not on PLINK_ESTAB state. However, +* in general the mesh interface is not accepting peer link requests +* from new peers, and that must be reflected in the beacon */ free_plinks =mesh_plink_availables (sdata);
net/mac80211/mesh_pathtbl.c +3 -3
@@ -261,9 +261,9 @@ EXPORT_SYMBOL(mesh_plink_broken);* * @sta - mesh peer to match * -* RCU notes: this function is called when a mesh plink transitions from ESTAB -* to any other state, since ESTAB state is the only one that allows path -* creation. This will happen before the sta can be freed (because +* RCU notes: this function is called when a mesh plink transitions from +* PLINK_ESTAB to any other state, since PLINK_ESTAB state is the only one that +* allows path creation. This will happen before the sta can be freed (because * sta_info_destroy() calls this) so any reader in a rcu read block will be * protected against the plink disappearing. */
net/mac80211/mesh_plink.c +35 -34
245 lines not on this page · raw message
net/mac80211/rx.c +1 -1
@@ -411,7 +411,7 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)* establisment frame, beacon or probe, drop the frame. */ -if (!rx->sta ||sta_plink_state (rx->sta) !=ESTAB ) { +if (!rx->sta ||sta_plink_state (rx->sta) !=PLINK_ESTAB ) {struct ieee80211_mgmt *mgmt;if ((rx->fc &IEEE80211_FCTL_FTYPE ) !=IEEE80211_FTYPE_MGMT )
net/mac80211/sta_info.c +1 -1
@@ -248,7 +248,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ #ifdef CONFIG_MAC80211_MESH - sta->plink_state =LISTEN ; + sta->plink_state =PLINK_LISTEN ;spin_lock_init (&sta->plink_lock);init_timer (&sta->plink_timer);#endif
net/mac80211/sta_info.h +22 -9
@@ -106,14 +106,27 @@ struct tid_ampdu_rx {struct timer_list session_timer; }; +/** +* enum plink_state - state of a mesh peer link finite state machine +* +* @PLINK_LISTEN: initial state, considered the implicit state of non existant +* mesh peer links +* @PLINK_OPN_SNT: mesh plink open frame has been sent to this mesh peer +* @PLINK_OPN_RCVD: mesh plink open frame has been received from this mesh peer +* @PLINK_CNF_RCVD: mesh plink confirm frame has been received from this mesh +* peer +* @PLINK_ESTAB: mesh peer link is established +* @PLINK_HOLDING: mesh peer link is being closed or cancelled +* @PLINK_BLOCKED: all frames transmitted from this mesh plink are discarded +*/ enum plink_state { -LISTEN , -OPN_SNT , -OPN_RCVD , -CNF_RCVD , -ESTAB , -HOLDING , -BLOCKED +PLINK_LISTEN , +PLINK_OPN_SNT , +PLINK_OPN_RCVD , +PLINK_CNF_RCVD , +PLINK_ESTAB , +PLINK_HOLDING , +PLINK_BLOCKED };/**
@@ -248,7 +261,7 @@ struct sta_info {*/ __le16 llid;/* Local link ID */ __le16 plid;/* Peer link ID */ -__le16 reason;/* Buffer for cancel reason on HOLDING state */ +__le16 reason;/* Cancel reason on PLINK_HOLDING state */ u8 plink_retries;/* Retries in establishment */ bool ignore_plink_timer;enum plink_state plink_state;
@@ -280,7 +293,7 @@ static inline enum plink_state sta_plink_state(struct sta_info *sta)#ifdef CONFIG_MAC80211_MESH return sta->plink_state;#endif -return LISTEN ; +return PLINK_LISTEN ; }
Signature · 1 line
1.5.2.5