aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorLuis Carlos Cobo <luisca@cozybit.com>2008-02-23 09:17:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-06 15:30:41 -0500
commitee3858551ae6d044578f598f8001db5f1a9fd52e (patch)
tree5a9b61aecccb65210e29850c34801f3cfe6259a9 /net/mac80211/sta_info.h
parent33b64eb2b1b1759cbdafbe5c59df652f1e7c746e (diff)
mac80211: mesh data structures and first mesh changes
Includes integration in struct sta_info of mesh peer link elements, previously on their own mesh peer link table. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 86eed40ada78..9d1d7a0e3114 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -107,6 +107,18 @@ struct tid_ampdu_rx {
107 struct timer_list session_timer; 107 struct timer_list session_timer;
108}; 108};
109 109
110#ifdef CONFIG_MAC80211_MESH
111enum plink_state {
112 LISTEN,
113 OPN_SNT,
114 OPN_RCVD,
115 CNF_RCVD,
116 ESTAB,
117 HOLDING,
118 BLOCKED
119};
120#endif
121
110/** 122/**
111 * struct sta_ampdu_mlme - STA aggregation information. 123 * struct sta_ampdu_mlme - STA aggregation information.
112 * 124 *
@@ -144,6 +156,8 @@ struct sta_info {
144 unsigned long rx_bytes, tx_bytes; 156 unsigned long rx_bytes, tx_bytes;
145 unsigned long tx_retry_failed, tx_retry_count; 157 unsigned long tx_retry_failed, tx_retry_count;
146 unsigned long tx_filtered_count; 158 unsigned long tx_filtered_count;
159 /* moving percentage of failed MSDUs */
160 unsigned int fail_avg;
147 161
148 unsigned int wep_weak_iv_count; /* number of RX frames with weak IV */ 162 unsigned int wep_weak_iv_count; /* number of RX frames with weak IV */
149 163
@@ -192,6 +206,20 @@ struct sta_info {
192 struct sta_ampdu_mlme ampdu_mlme; 206 struct sta_ampdu_mlme ampdu_mlme;
193 u8 timer_to_tid[STA_TID_NUM]; /* convert timer id to tid */ 207 u8 timer_to_tid[STA_TID_NUM]; /* convert timer id to tid */
194 u8 tid_to_tx_q[STA_TID_NUM]; /* map tid to tx queue */ 208 u8 tid_to_tx_q[STA_TID_NUM]; /* map tid to tx queue */
209#ifdef CONFIG_MAC80211_MESH
210 /* mesh peer link attributes */
211 __le16 llid; /* Local link ID */
212 __le16 plid; /* Peer link ID */
213 __le16 reason; /* Buffer for cancel reason on HOLDING state */
214 enum plink_state plink_state;
215 u32 plink_timeout;
216 struct timer_list plink_timer;
217 u8 plink_retries; /* Retries in establishment */
218 bool ignore_plink_timer;
219 spinlock_t plink_lock; /* For peer_state reads / updates and other
220 updates in the structure. Ensures robust
221 transitions for the peerlink FSM */
222#endif
195 223
196#ifdef CONFIG_MAC80211_DEBUGFS 224#ifdef CONFIG_MAC80211_DEBUGFS
197 struct sta_info_debugfsdentries { 225 struct sta_info_debugfsdentries {
@@ -234,6 +262,8 @@ static inline void __sta_info_get(struct sta_info *sta)
234} 262}
235 263
236struct sta_info * sta_info_get(struct ieee80211_local *local, u8 *addr); 264struct sta_info * sta_info_get(struct ieee80211_local *local, u8 *addr);
265struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
266 struct net_device *dev);
237void sta_info_put(struct sta_info *sta); 267void sta_info_put(struct sta_info *sta);
238struct sta_info *sta_info_add(struct ieee80211_local *local, 268struct sta_info *sta_info_add(struct ieee80211_local *local,
239 struct net_device *dev, u8 *addr, gfp_t gfp); 269 struct net_device *dev, u8 *addr, gfp_t gfp);