diff options
-rw-r--r-- | net/mac80211/debugfs_sta.c | 2 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 135 |
2 files changed, 83 insertions, 54 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 73cfb4da464d..fc2c1a192ed2 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -67,7 +67,7 @@ STA_FILE(last_rssi, last_rssi, D); | |||
67 | STA_FILE(last_signal, last_signal, D); | 67 | STA_FILE(last_signal, last_signal, D); |
68 | STA_FILE(last_noise, last_noise, D); | 68 | STA_FILE(last_noise, last_noise, D); |
69 | STA_FILE(channel_use, channel_use, D); | 69 | STA_FILE(channel_use, channel_use, D); |
70 | STA_FILE(wep_weak_iv_count, wep_weak_iv_count, D); | 70 | STA_FILE(wep_weak_iv_count, wep_weak_iv_count, LU); |
71 | 71 | ||
72 | static ssize_t sta_flags_read(struct file *file, char __user *userbuf, | 72 | static ssize_t sta_flags_read(struct file *file, char __user *userbuf, |
73 | size_t count, loff_t *ppos) | 73 | size_t count, loff_t *ppos) |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 3f788228eeff..fb5411d01f82 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -139,84 +139,113 @@ struct sta_ampdu_mlme { | |||
139 | #define STA_INFO_PIN_STAT_PINNED 1 | 139 | #define STA_INFO_PIN_STAT_PINNED 1 |
140 | #define STA_INFO_PIN_STAT_DESTROY 2 | 140 | #define STA_INFO_PIN_STAT_DESTROY 2 |
141 | 141 | ||
142 | 142 | /** | |
143 | * struct sta_info - STA information | ||
144 | * | ||
145 | * This structure collects information about a station that | ||
146 | * mac80211 is communicating with. | ||
147 | * | ||
148 | * @list: global linked list entry | ||
149 | * @hnext: hash table linked list pointer | ||
150 | * @local: pointer to the global information | ||
151 | * @addr: MAC address of this STA | ||
152 | * @aid: STA's unique AID (1..2007, 0 = not assigned yet), | ||
153 | * only used in AP (and IBSS?) mode | ||
154 | * @flags: STA flags, see &enum ieee80211_sta_info_flags | ||
155 | * @ps_tx_buf: buffer of frames to transmit to this station | ||
156 | * when it leaves power saving state | ||
157 | * @tx_filtered: buffer of frames we already tried to transmit | ||
158 | * but were filtered by hardware due to STA having entered | ||
159 | * power saving state | ||
160 | * @rx_packets: Number of MSDUs received from this STA | ||
161 | * @rx_bytes: Number of bytes received from this STA | ||
162 | * @supp_rates: Bitmap of supported rates (per band) | ||
163 | * @ht_info: HT capabilities of this STA | ||
164 | */ | ||
143 | struct sta_info { | 165 | struct sta_info { |
166 | /* General information, mostly static */ | ||
144 | struct list_head list; | 167 | struct list_head list; |
145 | struct sta_info *hnext; /* next entry in hash table list */ | 168 | struct sta_info *hnext; |
146 | |||
147 | struct ieee80211_local *local; | 169 | struct ieee80211_local *local; |
148 | |||
149 | u8 addr[ETH_ALEN]; | ||
150 | u16 aid; /* STA's unique AID (1..2007), 0 = not yet assigned */ | ||
151 | u32 flags; /* WLAN_STA_ */ | ||
152 | |||
153 | struct sk_buff_head ps_tx_buf; /* buffer of TX frames for station in | ||
154 | * power saving state */ | ||
155 | struct sk_buff_head tx_filtered; /* buffer of TX frames that were | ||
156 | * already given to low-level driver, | ||
157 | * but were filtered */ | ||
158 | unsigned long rx_packets, tx_packets; /* number of RX/TX MSDUs */ | ||
159 | unsigned long rx_bytes, tx_bytes; | ||
160 | unsigned long tx_retry_failed, tx_retry_count; | ||
161 | unsigned long tx_filtered_count; | ||
162 | /* moving percentage of failed MSDUs */ | ||
163 | unsigned int fail_avg; | ||
164 | |||
165 | unsigned int wep_weak_iv_count; /* number of RX frames with weak IV */ | ||
166 | |||
167 | unsigned long last_rx; | ||
168 | /* bitmap of supported rates per band */ | ||
169 | u64 supp_rates[IEEE80211_NUM_BANDS]; | ||
170 | int txrate_idx; | ||
171 | /* last rates used to send a frame to this STA */ | ||
172 | int last_txrate_idx, last_nonerp_txrate_idx; | ||
173 | |||
174 | /* sub_if_data this sta belongs to */ | ||
175 | struct ieee80211_sub_if_data *sdata; | 170 | struct ieee80211_sub_if_data *sdata; |
176 | |||
177 | struct ieee80211_key *key; | 171 | struct ieee80211_key *key; |
178 | |||
179 | u32 tx_num_consecutive_failures; | ||
180 | u32 tx_num_mpdu_ok; | ||
181 | u32 tx_num_mpdu_fail; | ||
182 | |||
183 | struct rate_control_ref *rate_ctrl; | 172 | struct rate_control_ref *rate_ctrl; |
184 | void *rate_ctrl_priv; | 173 | void *rate_ctrl_priv; |
174 | struct ieee80211_ht_info ht_info; | ||
175 | u64 supp_rates[IEEE80211_NUM_BANDS]; | ||
176 | u8 addr[ETH_ALEN]; | ||
177 | u16 aid; | ||
178 | u16 listen_interval; | ||
185 | 179 | ||
186 | /* last received seq/frag number from this STA (per RX queue) */ | 180 | /* |
187 | __le16 last_seq_ctrl[NUM_RX_DATA_QUEUES]; | 181 | * for use by the internal lifetime management, |
182 | * see __sta_info_unlink | ||
183 | */ | ||
184 | u8 pin_status; | ||
185 | |||
186 | /* frequently updated information, needs locking? */ | ||
187 | u32 flags; | ||
188 | |||
189 | /* | ||
190 | * STA powersave frame queues, no more than the internal | ||
191 | * locking required. | ||
192 | */ | ||
193 | struct sk_buff_head ps_tx_buf; | ||
194 | struct sk_buff_head tx_filtered; | ||
195 | |||
196 | /* Updated from RX path only, no locking requirements */ | ||
197 | unsigned long rx_packets, rx_bytes; | ||
198 | unsigned long wep_weak_iv_count; | ||
199 | unsigned long last_rx; | ||
188 | unsigned long num_duplicates; /* number of duplicate frames received | 200 | unsigned long num_duplicates; /* number of duplicate frames received |
189 | * from this STA */ | 201 | * from this STA */ |
190 | unsigned long tx_fragments; /* number of transmitted MPDUs */ | ||
191 | unsigned long rx_fragments; /* number of received MPDUs */ | 202 | unsigned long rx_fragments; /* number of received MPDUs */ |
192 | unsigned long rx_dropped; /* number of dropped MPDUs from this STA */ | 203 | unsigned long rx_dropped; /* number of dropped MPDUs from this STA */ |
193 | |||
194 | int last_rssi; /* RSSI of last received frame from this STA */ | 204 | int last_rssi; /* RSSI of last received frame from this STA */ |
195 | int last_signal; /* signal of last received frame from this STA */ | 205 | int last_signal; /* signal of last received frame from this STA */ |
196 | int last_noise; /* noise of last received frame from this STA */ | 206 | int last_noise; /* noise of last received frame from this STA */ |
197 | int channel_use; | 207 | /* last received seq/frag number from this STA (per RX queue) */ |
198 | int channel_use_raw; | 208 | __le16 last_seq_ctrl[NUM_RX_DATA_QUEUES]; |
199 | |||
200 | #ifdef CONFIG_MAC80211_DEBUG_COUNTERS | 209 | #ifdef CONFIG_MAC80211_DEBUG_COUNTERS |
201 | unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES]; | 210 | unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES]; |
211 | #endif | ||
212 | |||
213 | /* Updated from TX status path only, no locking requirements */ | ||
214 | unsigned long tx_filtered_count; | ||
215 | unsigned long tx_retry_failed, tx_retry_count; | ||
216 | /* TODO: update in generic code not rate control? */ | ||
217 | u32 tx_num_consecutive_failures; | ||
218 | u32 tx_num_mpdu_ok; | ||
219 | u32 tx_num_mpdu_fail; | ||
220 | /* moving percentage of failed MSDUs */ | ||
221 | unsigned int fail_avg; | ||
222 | |||
223 | /* Updated from TX path only, no locking requirements */ | ||
224 | unsigned long tx_packets; /* number of RX/TX MSDUs */ | ||
225 | unsigned long tx_bytes; | ||
226 | unsigned long tx_fragments; /* number of transmitted MPDUs */ | ||
227 | int txrate_idx; | ||
228 | int last_txrate_idx; | ||
229 | #ifdef CONFIG_MAC80211_DEBUG_COUNTERS | ||
202 | unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES]; | 230 | unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES]; |
203 | #endif /* CONFIG_MAC80211_DEBUG_COUNTERS */ | 231 | #endif |
204 | 232 | ||
205 | u16 listen_interval; | 233 | /* Debug counters, no locking doesn't matter */ |
234 | int channel_use; | ||
235 | int channel_use_raw; | ||
206 | 236 | ||
207 | /* | 237 | /* |
208 | * for use by the internal lifetime management, | 238 | * Aggregation information, comes with own locking. |
209 | * see __sta_info_unlink | ||
210 | */ | 239 | */ |
211 | u8 pin_status; | ||
212 | |||
213 | struct ieee80211_ht_info ht_info; /* 802.11n HT capabilities | ||
214 | of this STA */ | ||
215 | struct sta_ampdu_mlme ampdu_mlme; | 240 | struct sta_ampdu_mlme ampdu_mlme; |
216 | u8 timer_to_tid[STA_TID_NUM]; /* convert timer id to tid */ | 241 | u8 timer_to_tid[STA_TID_NUM]; /* identity mapping to ID timers */ |
217 | u8 tid_to_tx_q[STA_TID_NUM]; /* map tid to tx queue */ | 242 | u8 tid_to_tx_q[STA_TID_NUM]; /* map tid to tx queue */ |
243 | |||
218 | #ifdef CONFIG_MAC80211_MESH | 244 | #ifdef CONFIG_MAC80211_MESH |
219 | /* mesh peer link attributes */ | 245 | /* |
246 | * Mesh peer link attributes | ||
247 | * TODO: move to a sub-structure that is referenced with pointer? | ||
248 | */ | ||
220 | __le16 llid; /* Local link ID */ | 249 | __le16 llid; /* Local link ID */ |
221 | __le16 plid; /* Peer link ID */ | 250 | __le16 plid; /* Peer link ID */ |
222 | __le16 reason; /* Buffer for cancel reason on HOLDING state */ | 251 | __le16 reason; /* Buffer for cancel reason on HOLDING state */ |