aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-29 10:04:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:12 -0400
commit948d887dec1042a7d78ae311908113e26502062f (patch)
treee4240d0f45c0200d3625693bd6d543d243859d0a /net/mac80211/sta_info.h
parent60750397122fe0fb81a6e52fd790b3f749b6e010 (diff)
mac80211: split PS buffers into ACs
For uAPSD support we'll need to have per-AC PS buffers. As this is a major undertaking, split the buffers before really adding support for uAPSD. This already makes some reference to the uapsd_queues variable, but for now that will never be non-zero. Since book-keeping is complicated, also change the logic for keeping a maximum of frames only and allow 64 frames per AC (up from 128 for a station). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index c9ffb7ce636..8589afad329 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -43,8 +43,6 @@
43 * be in the queues 43 * be in the queues
44 * @WLAN_STA_PSPOLL: Station sent PS-poll while driver was keeping 44 * @WLAN_STA_PSPOLL: Station sent PS-poll while driver was keeping
45 * station in power-save mode, reply when the driver unblocks. 45 * station in power-save mode, reply when the driver unblocks.
46 * @WLAN_STA_PS_DRIVER_BUF: Station has frames pending in driver internal
47 * buffers. Automatically cleared on station wake-up.
48 * @WLAN_STA_TDLS_PEER: Station is a TDLS peer. 46 * @WLAN_STA_TDLS_PEER: Station is a TDLS peer.
49 * @WLAN_STA_TDLS_PEER_AUTH: This TDLS peer is authorized to send direct 47 * @WLAN_STA_TDLS_PEER_AUTH: This TDLS peer is authorized to send direct
50 * packets. This means the link is enabled. 48 * packets. This means the link is enabled.
@@ -63,7 +61,6 @@ enum ieee80211_sta_info_flags {
63 WLAN_STA_BLOCK_BA = 1<<11, 61 WLAN_STA_BLOCK_BA = 1<<11,
64 WLAN_STA_PS_DRIVER = 1<<12, 62 WLAN_STA_PS_DRIVER = 1<<12,
65 WLAN_STA_PSPOLL = 1<<13, 63 WLAN_STA_PSPOLL = 1<<13,
66 WLAN_STA_PS_DRIVER_BUF = 1<<14,
67 WLAN_STA_TDLS_PEER = 1<<15, 64 WLAN_STA_TDLS_PEER = 1<<15,
68 WLAN_STA_TDLS_PEER_AUTH = 1<<16, 65 WLAN_STA_TDLS_PEER_AUTH = 1<<16,
69}; 66};
@@ -212,11 +209,13 @@ struct sta_ampdu_mlme {
212 * @drv_unblock_wk: used for driver PS unblocking 209 * @drv_unblock_wk: used for driver PS unblocking
213 * @listen_interval: listen interval of this station, when we're acting as AP 210 * @listen_interval: listen interval of this station, when we're acting as AP
214 * @flags: STA flags, see &enum ieee80211_sta_info_flags 211 * @flags: STA flags, see &enum ieee80211_sta_info_flags
215 * @ps_tx_buf: buffer of frames to transmit to this station 212 * @ps_tx_buf: buffers (per AC) of frames to transmit to this station
216 * when it leaves power saving state 213 * when it leaves power saving state or polls
217 * @tx_filtered: buffer of frames we already tried to transmit 214 * @tx_filtered: buffers (per AC) of frames we already tried to
218 * but were filtered by hardware due to STA having entered 215 * transmit but were filtered by hardware due to STA having
219 * power saving state 216 * entered power saving state, these are also delivered to
217 * the station when it leaves powersave or polls for frames
218 * @driver_buffered_tids: bitmap of TIDs the driver has data buffered on
220 * @rx_packets: Number of MSDUs received from this STA 219 * @rx_packets: Number of MSDUs received from this STA
221 * @rx_bytes: Number of bytes received from this STA 220 * @rx_bytes: Number of bytes received from this STA
222 * @wep_weak_iv_count: number of weak WEP IVs received from this station 221 * @wep_weak_iv_count: number of weak WEP IVs received from this station
@@ -286,8 +285,9 @@ struct sta_info {
286 * STA powersave frame queues, no more than the internal 285 * STA powersave frame queues, no more than the internal
287 * locking required. 286 * locking required.
288 */ 287 */
289 struct sk_buff_head ps_tx_buf; 288 struct sk_buff_head ps_tx_buf[IEEE80211_NUM_ACS];
290 struct sk_buff_head tx_filtered; 289 struct sk_buff_head tx_filtered[IEEE80211_NUM_ACS];
290 unsigned long driver_buffered_tids;
291 291
292 /* Updated from RX path only, no locking requirements */ 292 /* Updated from RX path only, no locking requirements */
293 unsigned long rx_packets, rx_bytes; 293 unsigned long rx_packets, rx_bytes;
@@ -434,8 +434,8 @@ rcu_dereference_protected_tid_tx(struct sta_info *sta, int tid)
434#define STA_HASH(sta) (sta[5]) 434#define STA_HASH(sta) (sta[5])
435 435
436 436
437/* Maximum number of frames to buffer per power saving station */ 437/* Maximum number of frames to buffer per power saving station per AC */
438#define STA_MAX_TX_BUFFER 128 438#define STA_MAX_TX_BUFFER 64
439 439
440/* Minimum buffered frame expiry time. If STA uses listen interval that is 440/* Minimum buffered frame expiry time. If STA uses listen interval that is
441 * smaller than this value, the minimum value here is used instead. */ 441 * smaller than this value, the minimum value here is used instead. */