mac80211: use helper function to access ieee802_1d_to_ac[]

cleanup patch to make use of ieee80211_ac_from_tid() to retrieve ac from
ieee802_1d_to_ac[]

Signed-off-by: Amadeusz Sławiński <amadeusz.slawinski@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Amadeusz Sławiński 2017-01-24 16:42:10 +01:00 committed by Johannes Berg
parent 42f82e2e62
commit 731977e97b
3 changed files with 4 additions and 4 deletions

View File

@ -1391,7 +1391,7 @@ EXPORT_SYMBOL(ieee80211_sta_pspoll);
void ieee80211_sta_uapsd_trigger(struct ieee80211_sta *pubsta, u8 tid) void ieee80211_sta_uapsd_trigger(struct ieee80211_sta *pubsta, u8 tid)
{ {
struct sta_info *sta = container_of(pubsta, struct sta_info, sta); struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
u8 ac = ieee802_1d_to_ac[tid & 7]; int ac = ieee80211_ac_from_tid(tid);
/* /*
* If this AC is not trigger-enabled do nothing unless the * If this AC is not trigger-enabled do nothing unless the

View File

@ -95,7 +95,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
*/ */
if (*p & IEEE80211_QOS_CTL_EOSP) if (*p & IEEE80211_QOS_CTL_EOSP)
*p &= ~IEEE80211_QOS_CTL_EOSP; *p &= ~IEEE80211_QOS_CTL_EOSP;
ac = ieee802_1d_to_ac[tid & 7]; ac = ieee80211_ac_from_tid(tid);
} else { } else {
ac = IEEE80211_AC_BE; ac = IEEE80211_AC_BE;
} }

View File

@ -1414,7 +1414,7 @@ void ieee80211_txq_init(struct ieee80211_sub_if_data *sdata,
txqi->txq.sta = &sta->sta; txqi->txq.sta = &sta->sta;
sta->sta.txq[tid] = &txqi->txq; sta->sta.txq[tid] = &txqi->txq;
txqi->txq.tid = tid; txqi->txq.tid = tid;
txqi->txq.ac = ieee802_1d_to_ac[tid & 7]; txqi->txq.ac = ieee80211_ac_from_tid(tid);
} else { } else {
sdata->vif.txq = &txqi->txq; sdata->vif.txq = &txqi->txq;
txqi->txq.tid = 0; txqi->txq.tid = 0;
@ -4659,7 +4659,7 @@ void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, int tid, struct sk_buff *skb, int tid,
enum nl80211_band band) enum nl80211_band band)
{ {
int ac = ieee802_1d_to_ac[tid & 7]; int ac = ieee80211_ac_from_tid(tid);
skb_reset_mac_header(skb); skb_reset_mac_header(skb);
skb_set_queue_mapping(skb, ac); skb_set_queue_mapping(skb, ac);