aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-14 17:22:21 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-19 09:44:00 -0500
commit5a306f5887d5fd840beb8ea872897fa89e8fcdef (patch)
treedadc13f05e360f8f35c15acb36a860056f4848fe /net/mac80211/sta_info.c
parent0f92732344e88023807342fef4c566e0660c2fd9 (diff)
mac80211: introduce IEEE80211_NUM_TIDS and use it
Introduce IEEE80211_NUM_TIDS in the generic 802.11 header file and use it in place of STA_TID_NUM and NUM_RX_DATA_QUEUES which are both really the number of TIDs. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index f7bb54f9ab72..a0836d7187c1 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -142,7 +142,7 @@ static void free_sta_work(struct work_struct *wk)
142 * drivers have to handle aggregation stop being requested, followed 142 * drivers have to handle aggregation stop being requested, followed
143 * directly by station destruction. 143 * directly by station destruction.
144 */ 144 */
145 for (i = 0; i < STA_TID_NUM; i++) { 145 for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
146 tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); 146 tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]);
147 if (!tid_tx) 147 if (!tid_tx)
148 continue; 148 continue;
@@ -330,7 +330,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
330 return NULL; 330 return NULL;
331 } 331 }
332 332
333 for (i = 0; i < STA_TID_NUM; i++) { 333 for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
334 /* 334 /*
335 * timer_to_tid must be initialized with identity mapping 335 * timer_to_tid must be initialized with identity mapping
336 * to enable session_timer's data differentiation. See 336 * to enable session_timer's data differentiation. See
@@ -343,7 +343,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
343 skb_queue_head_init(&sta->tx_filtered[i]); 343 skb_queue_head_init(&sta->tx_filtered[i]);
344 } 344 }
345 345
346 for (i = 0; i < NUM_RX_DATA_QUEUES; i++) 346 for (i = 0; i < IEEE80211_NUM_TIDS; i++)
347 sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX); 347 sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX);
348 348
349 sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr); 349 sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr);
@@ -985,7 +985,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)
985 985
986 clear_sta_flag(sta, WLAN_STA_SP); 986 clear_sta_flag(sta, WLAN_STA_SP);
987 987
988 BUILD_BUG_ON(BITS_TO_LONGS(STA_TID_NUM) > 1); 988 BUILD_BUG_ON(BITS_TO_LONGS(IEEE80211_NUM_TIDS) > 1);
989 sta->driver_buffered_tids = 0; 989 sta->driver_buffered_tids = 0;
990 990
991 if (!(local->hw.flags & IEEE80211_HW_AP_LINK_PS)) 991 if (!(local->hw.flags & IEEE80211_HW_AP_LINK_PS))
@@ -1369,7 +1369,7 @@ void ieee80211_sta_set_buffered(struct ieee80211_sta *pubsta,
1369{ 1369{
1370 struct sta_info *sta = container_of(pubsta, struct sta_info, sta); 1370 struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
1371 1371
1372 if (WARN_ON(tid >= STA_TID_NUM)) 1372 if (WARN_ON(tid >= IEEE80211_NUM_TIDS))
1373 return; 1373 return;
1374 1374
1375 if (buffered) 1375 if (buffered)