aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 9265acadef32..bbdd2a86a94b 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -13,6 +13,7 @@
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/if_ether.h> 14#include <linux/if_ether.h>
15#include <linux/workqueue.h> 15#include <linux/workqueue.h>
16#include <linux/average.h>
16#include "key.h" 17#include "key.h"
17 18
18/** 19/**
@@ -77,23 +78,26 @@ enum ieee80211_sta_info_flags {
77 * @addba_resp_timer: timer for peer's response to addba request 78 * @addba_resp_timer: timer for peer's response to addba request
78 * @pending: pending frames queue -- use sta's spinlock to protect 79 * @pending: pending frames queue -- use sta's spinlock to protect
79 * @dialog_token: dialog token for aggregation session 80 * @dialog_token: dialog token for aggregation session
81 * @timeout: session timeout value to be filled in ADDBA requests
80 * @state: session state (see above) 82 * @state: session state (see above)
81 * @stop_initiator: initiator of a session stop 83 * @stop_initiator: initiator of a session stop
82 * @tx_stop: TX DelBA frame when stopping 84 * @tx_stop: TX DelBA frame when stopping
83 * 85 *
84 * This structure is protected by RCU and the per-station 86 * This structure's lifetime is managed by RCU, assignments to
85 * spinlock. Assignments to the array holding it must hold 87 * the array holding it must hold the aggregation mutex.
86 * the spinlock, only the TX path can access it under RCU 88 *
87 * lock-free if, and only if, the state has the flag 89 * The TX path can access it under RCU lock-free if, and
88 * %HT_AGG_STATE_OPERATIONAL set. Otherwise, the TX path 90 * only if, the state has the flag %HT_AGG_STATE_OPERATIONAL
89 * must also acquire the spinlock and re-check the state, 91 * set. Otherwise, the TX path must also acquire the spinlock
90 * see comments in the tx code touching it. 92 * and re-check the state, see comments in the tx code
93 * touching it.
91 */ 94 */
92struct tid_ampdu_tx { 95struct tid_ampdu_tx {
93 struct rcu_head rcu_head; 96 struct rcu_head rcu_head;
94 struct timer_list addba_resp_timer; 97 struct timer_list addba_resp_timer;
95 struct sk_buff_head pending; 98 struct sk_buff_head pending;
96 unsigned long state; 99 unsigned long state;
100 u16 timeout;
97 u8 dialog_token; 101 u8 dialog_token;
98 u8 stop_initiator; 102 u8 stop_initiator;
99 bool tx_stop; 103 bool tx_stop;
@@ -115,15 +119,13 @@ struct tid_ampdu_tx {
115 * @rcu_head: RCU head used for freeing this struct 119 * @rcu_head: RCU head used for freeing this struct
116 * @reorder_lock: serializes access to reorder buffer, see below. 120 * @reorder_lock: serializes access to reorder buffer, see below.
117 * 121 *
118 * This structure is protected by RCU and the per-station 122 * This structure's lifetime is managed by RCU, assignments to
119 * spinlock. Assignments to the array holding it must hold 123 * the array holding it must hold the aggregation mutex.
120 * the spinlock.
121 * 124 *
122 * The @reorder_lock is used to protect the variables and 125 * The @reorder_lock is used to protect the members of this
123 * arrays such as @reorder_buf, @reorder_time, @head_seq_num, 126 * struct, except for @timeout, @buf_size and @dialog_token,
124 * @stored_mpdu_num and @reorder_time from being corrupted by 127 * which are constant across the lifetime of the struct (the
125 * concurrent access of the RX path and the expired frame 128 * dialog token being used only for debugging).
126 * release timer.
127 */ 129 */
128struct tid_ampdu_rx { 130struct tid_ampdu_rx {
129 struct rcu_head rcu_head; 131 struct rcu_head rcu_head;
@@ -224,6 +226,7 @@ enum plink_state {
224 * @rx_fragments: number of received MPDUs 226 * @rx_fragments: number of received MPDUs
225 * @rx_dropped: number of dropped MPDUs from this STA 227 * @rx_dropped: number of dropped MPDUs from this STA
226 * @last_signal: signal of last received frame from this STA 228 * @last_signal: signal of last received frame from this STA
229 * @avg_signal: moving average of signal of received frames from this STA
227 * @last_seq_ctrl: last received seq/frag number from this STA (per RX queue) 230 * @last_seq_ctrl: last received seq/frag number from this STA (per RX queue)
228 * @tx_filtered_count: number of frames the hardware filtered for this STA 231 * @tx_filtered_count: number of frames the hardware filtered for this STA
229 * @tx_retry_failed: number of frames that failed retry 232 * @tx_retry_failed: number of frames that failed retry
@@ -248,6 +251,7 @@ enum plink_state {
248 * @sta: station information we share with the driver 251 * @sta: station information we share with the driver
249 * @dead: set to true when sta is unlinked 252 * @dead: set to true when sta is unlinked
250 * @uploaded: set to true when sta is uploaded to the driver 253 * @uploaded: set to true when sta is uploaded to the driver
254 * @lost_packets: number of consecutive lost packets
251 */ 255 */
252struct sta_info { 256struct sta_info {
253 /* General information, mostly static */ 257 /* General information, mostly static */
@@ -291,6 +295,7 @@ struct sta_info {
291 unsigned long rx_fragments; 295 unsigned long rx_fragments;
292 unsigned long rx_dropped; 296 unsigned long rx_dropped;
293 int last_signal; 297 int last_signal;
298 struct ewma avg_signal;
294 __le16 last_seq_ctrl[NUM_RX_DATA_QUEUES]; 299 __le16 last_seq_ctrl[NUM_RX_DATA_QUEUES];
295 300
296 /* Updated from TX status path only, no locking requirements */ 301 /* Updated from TX status path only, no locking requirements */
@@ -335,6 +340,8 @@ struct sta_info {
335 } debugfs; 340 } debugfs;
336#endif 341#endif
337 342
343 unsigned int lost_packets;
344
338 /* keep last! */ 345 /* keep last! */
339 struct ieee80211_sta sta; 346 struct ieee80211_sta sta;
340}; 347};