diff options
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r-- | net/mac80211/sta_info.h | 68 |
1 files changed, 39 insertions, 29 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 3ef06a26b9cb..d77ff7090630 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -220,6 +220,25 @@ struct sta_ampdu_mlme { | |||
220 | u8 dialog_token_allocator; | 220 | u8 dialog_token_allocator; |
221 | }; | 221 | }; |
222 | 222 | ||
223 | /* | ||
224 | * struct ieee80211_tx_latency_stat - Tx latency statistics | ||
225 | * | ||
226 | * Measures TX latency and jitter for a station per TID. | ||
227 | * | ||
228 | * @max: worst case latency | ||
229 | * @sum: sum of all latencies | ||
230 | * @counter: amount of Tx frames sent from interface | ||
231 | * @bins: each bin counts how many frames transmitted within a certain | ||
232 | * latency range. when disabled it is NULL. | ||
233 | * @bin_count: amount of bins. | ||
234 | */ | ||
235 | struct ieee80211_tx_latency_stat { | ||
236 | u32 max; | ||
237 | u32 sum; | ||
238 | u32 counter; | ||
239 | u32 *bins; | ||
240 | u32 bin_count; | ||
241 | }; | ||
223 | 242 | ||
224 | /** | 243 | /** |
225 | * struct sta_info - STA information | 244 | * struct sta_info - STA information |
@@ -228,11 +247,14 @@ struct sta_ampdu_mlme { | |||
228 | * mac80211 is communicating with. | 247 | * mac80211 is communicating with. |
229 | * | 248 | * |
230 | * @list: global linked list entry | 249 | * @list: global linked list entry |
250 | * @free_list: list entry for keeping track of stations to free | ||
231 | * @hnext: hash table linked list pointer | 251 | * @hnext: hash table linked list pointer |
232 | * @local: pointer to the global information | 252 | * @local: pointer to the global information |
233 | * @sdata: virtual interface this station belongs to | 253 | * @sdata: virtual interface this station belongs to |
234 | * @ptk: peer key negotiated with this station, if any | 254 | * @ptk: peer keys negotiated with this station, if any |
255 | * @ptk_idx: last installed peer key index | ||
235 | * @gtk: group keys negotiated with this station, if any | 256 | * @gtk: group keys negotiated with this station, if any |
257 | * @gtk_idx: last installed group key index | ||
236 | * @rate_ctrl: rate control algorithm reference | 258 | * @rate_ctrl: rate control algorithm reference |
237 | * @rate_ctrl_priv: rate control private per-STA pointer | 259 | * @rate_ctrl_priv: rate control private per-STA pointer |
238 | * @last_tx_rate: rate used for last transmit, to report to userspace as | 260 | * @last_tx_rate: rate used for last transmit, to report to userspace as |
@@ -274,6 +296,7 @@ struct sta_ampdu_mlme { | |||
274 | * @tid_seq: per-TID sequence numbers for sending to this STA | 296 | * @tid_seq: per-TID sequence numbers for sending to this STA |
275 | * @ampdu_mlme: A-MPDU state machine state | 297 | * @ampdu_mlme: A-MPDU state machine state |
276 | * @timer_to_tid: identity mapping to ID timers | 298 | * @timer_to_tid: identity mapping to ID timers |
299 | * @tx_lat: Tx latency statistics | ||
277 | * @llid: Local link ID | 300 | * @llid: Local link ID |
278 | * @plid: Peer link ID | 301 | * @plid: Peer link ID |
279 | * @reason: Cancel reason on PLINK_HOLDING state | 302 | * @reason: Cancel reason on PLINK_HOLDING state |
@@ -303,16 +326,19 @@ struct sta_ampdu_mlme { | |||
303 | * @chain_signal_avg: signal average (per chain) | 326 | * @chain_signal_avg: signal average (per chain) |
304 | * @known_smps_mode: the smps_mode the client thinks we are in. Relevant for | 327 | * @known_smps_mode: the smps_mode the client thinks we are in. Relevant for |
305 | * AP only. | 328 | * AP only. |
329 | * @cipher_scheme: optional cipher scheme for this station | ||
306 | */ | 330 | */ |
307 | struct sta_info { | 331 | struct sta_info { |
308 | /* General information, mostly static */ | 332 | /* General information, mostly static */ |
309 | struct list_head list; | 333 | struct list_head list, free_list; |
310 | struct rcu_head rcu_head; | 334 | struct rcu_head rcu_head; |
311 | struct sta_info __rcu *hnext; | 335 | struct sta_info __rcu *hnext; |
312 | struct ieee80211_local *local; | 336 | struct ieee80211_local *local; |
313 | struct ieee80211_sub_if_data *sdata; | 337 | struct ieee80211_sub_if_data *sdata; |
314 | struct ieee80211_key __rcu *gtk[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]; | 338 | struct ieee80211_key __rcu *gtk[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]; |
315 | struct ieee80211_key __rcu *ptk; | 339 | struct ieee80211_key __rcu *ptk[NUM_DEFAULT_KEYS]; |
340 | u8 gtk_idx; | ||
341 | u8 ptk_idx; | ||
316 | struct rate_control_ref *rate_ctrl; | 342 | struct rate_control_ref *rate_ctrl; |
317 | void *rate_ctrl_priv; | 343 | void *rate_ctrl_priv; |
318 | spinlock_t lock; | 344 | spinlock_t lock; |
@@ -380,14 +406,16 @@ struct sta_info { | |||
380 | struct sta_ampdu_mlme ampdu_mlme; | 406 | struct sta_ampdu_mlme ampdu_mlme; |
381 | u8 timer_to_tid[IEEE80211_NUM_TIDS]; | 407 | u8 timer_to_tid[IEEE80211_NUM_TIDS]; |
382 | 408 | ||
409 | struct ieee80211_tx_latency_stat *tx_lat; | ||
410 | |||
383 | #ifdef CONFIG_MAC80211_MESH | 411 | #ifdef CONFIG_MAC80211_MESH |
384 | /* | 412 | /* |
385 | * Mesh peer link attributes | 413 | * Mesh peer link attributes |
386 | * TODO: move to a sub-structure that is referenced with pointer? | 414 | * TODO: move to a sub-structure that is referenced with pointer? |
387 | */ | 415 | */ |
388 | __le16 llid; | 416 | u16 llid; |
389 | __le16 plid; | 417 | u16 plid; |
390 | __le16 reason; | 418 | u16 reason; |
391 | u8 plink_retries; | 419 | u8 plink_retries; |
392 | bool ignore_plink_timer; | 420 | bool ignore_plink_timer; |
393 | enum nl80211_plink_state plink_state; | 421 | enum nl80211_plink_state plink_state; |
@@ -414,6 +442,7 @@ struct sta_info { | |||
414 | unsigned int beacon_loss_count; | 442 | unsigned int beacon_loss_count; |
415 | 443 | ||
416 | enum ieee80211_smps_mode known_smps_mode; | 444 | enum ieee80211_smps_mode known_smps_mode; |
445 | const struct ieee80211_cipher_scheme *cipher_scheme; | ||
417 | 446 | ||
418 | /* keep last! */ | 447 | /* keep last! */ |
419 | struct ieee80211_sta sta; | 448 | struct ieee80211_sta sta; |
@@ -577,21 +606,6 @@ void sta_info_recalc_tim(struct sta_info *sta); | |||
577 | 606 | ||
578 | void sta_info_init(struct ieee80211_local *local); | 607 | void sta_info_init(struct ieee80211_local *local); |
579 | void sta_info_stop(struct ieee80211_local *local); | 608 | void sta_info_stop(struct ieee80211_local *local); |
580 | int sta_info_flush_defer(struct ieee80211_sub_if_data *sdata); | ||
581 | |||
582 | /** | ||
583 | * sta_info_flush_cleanup - flush the sta_info cleanup queue | ||
584 | * @sdata: the interface | ||
585 | * | ||
586 | * Flushes the sta_info cleanup queue for a given interface; | ||
587 | * this is necessary before the interface is removed or, for | ||
588 | * AP/mesh interfaces, before it is deconfigured. | ||
589 | * | ||
590 | * Note an rcu_barrier() must precede the function, after all | ||
591 | * stations have been flushed/removed to ensure the call_rcu() | ||
592 | * calls that add stations to the cleanup queue have completed. | ||
593 | */ | ||
594 | void sta_info_flush_cleanup(struct ieee80211_sub_if_data *sdata); | ||
595 | 609 | ||
596 | /** | 610 | /** |
597 | * sta_info_flush - flush matching STA entries from the STA table | 611 | * sta_info_flush - flush matching STA entries from the STA table |
@@ -599,15 +613,13 @@ void sta_info_flush_cleanup(struct ieee80211_sub_if_data *sdata); | |||
599 | * Returns the number of removed STA entries. | 613 | * Returns the number of removed STA entries. |
600 | * | 614 | * |
601 | * @sdata: sdata to remove all stations from | 615 | * @sdata: sdata to remove all stations from |
616 | * @vlans: if the given interface is an AP interface, also flush VLANs | ||
602 | */ | 617 | */ |
618 | int __sta_info_flush(struct ieee80211_sub_if_data *sdata, bool vlans); | ||
619 | |||
603 | static inline int sta_info_flush(struct ieee80211_sub_if_data *sdata) | 620 | static inline int sta_info_flush(struct ieee80211_sub_if_data *sdata) |
604 | { | 621 | { |
605 | int ret = sta_info_flush_defer(sdata); | 622 | return __sta_info_flush(sdata, false); |
606 | |||
607 | rcu_barrier(); | ||
608 | sta_info_flush_cleanup(sdata); | ||
609 | |||
610 | return ret; | ||
611 | } | 623 | } |
612 | 624 | ||
613 | void sta_set_rate_info_tx(struct sta_info *sta, | 625 | void sta_set_rate_info_tx(struct sta_info *sta, |
@@ -623,6 +635,4 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta); | |||
623 | void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta); | 635 | void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta); |
624 | void ieee80211_sta_ps_deliver_uapsd(struct sta_info *sta); | 636 | void ieee80211_sta_ps_deliver_uapsd(struct sta_info *sta); |
625 | 637 | ||
626 | void ieee80211_cleanup_sdata_stas(struct ieee80211_sub_if_data *sdata); | ||
627 | |||
628 | #endif /* STA_INFO_H */ | 638 | #endif /* STA_INFO_H */ |