summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/mlme.c2
-rw-r--r--net/mac80211/rx.c3
-rw-r--r--net/mac80211/sta_info.c13
-rw-r--r--net/mac80211/util.c7
5 files changed, 20 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 42d194a04e1a..b4e2b6cf4099 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -84,6 +84,8 @@ struct ieee80211_local;
84#define IEEE80211_DEFAULT_MAX_SP_LEN \ 84#define IEEE80211_DEFAULT_MAX_SP_LEN \
85 IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 85 IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
86 86
87extern const u8 ieee80211_ac_to_qos_mask[IEEE80211_NUM_ACS];
88
87#define IEEE80211_DEAUTH_FRAME_LEN (24 /* hdr */ + 2 /* reason */) 89#define IEEE80211_DEAUTH_FRAME_LEN (24 /* hdr */ + 2 /* reason */)
88 90
89#define IEEE80211_MAX_NAN_INSTANCE_ID 255 91#define IEEE80211_MAX_NAN_INSTANCE_ID 255
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7486f2dab4ba..c8d3a9b02fb6 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3193,7 +3193,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
3193 uapsd_queues = 0; 3193 uapsd_queues = 0;
3194 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) 3194 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
3195 if (sdata->tx_conf[ac].uapsd) 3195 if (sdata->tx_conf[ac].uapsd)
3196 uapsd_queues |= BIT(ac); 3196 uapsd_queues |= ieee80211_ac_to_qos_mask[ac];
3197 } 3197 }
3198 3198
3199 cfg80211_rx_assoc_resp(sdata->dev, bss, (u8 *)mgmt, len, uapsd_queues); 3199 cfg80211_rx_assoc_resp(sdata->dev, bss, (u8 *)mgmt, len, uapsd_queues);
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 837d56261bb2..21a8947651e1 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1401,7 +1401,8 @@ void ieee80211_sta_uapsd_trigger(struct ieee80211_sta *pubsta, u8 tid)
1401 * enabled queues, but for now we only implement uAPSD w/o 1401 * enabled queues, but for now we only implement uAPSD w/o
1402 * TSPEC changes to the ACs, so they're always the same. 1402 * TSPEC changes to the ACs, so they're always the same.
1403 */ 1403 */
1404 if (!(sta->sta.uapsd_queues & BIT(ac)) && tid != IEEE80211_NUM_TIDS) 1404 if (!(sta->sta.uapsd_queues & ieee80211_ac_to_qos_mask[ac]) &&
1405 tid != IEEE80211_NUM_TIDS)
1405 return; 1406 return;
1406 1407
1407 /* if we are in a service period, do nothing */ 1408 /* if we are in a service period, do nothing */
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index ab91e1e1b8ec..236d47e76ced 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -709,7 +709,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, bool ignore_pending)
709 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { 709 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
710 unsigned long tids; 710 unsigned long tids;
711 711
712 if (ignore_for_tim & BIT(ac)) 712 if (ignore_for_tim & ieee80211_ac_to_qos_mask[ac])
713 continue; 713 continue;
714 714
715 indicate_tim |= !skb_queue_empty(&sta->tx_filtered[ac]) || 715 indicate_tim |= !skb_queue_empty(&sta->tx_filtered[ac]) ||
@@ -1389,7 +1389,7 @@ ieee80211_sta_ps_more_data(struct sta_info *sta, u8 ignored_acs,
1389 return true; 1389 return true;
1390 1390
1391 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { 1391 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
1392 if (ignored_acs & BIT(ac)) 1392 if (ignored_acs & ieee80211_ac_to_qos_mask[ac])
1393 continue; 1393 continue;
1394 1394
1395 if (!skb_queue_empty(&sta->tx_filtered[ac]) || 1395 if (!skb_queue_empty(&sta->tx_filtered[ac]) ||
@@ -1414,7 +1414,7 @@ ieee80211_sta_ps_get_frames(struct sta_info *sta, int n_frames, u8 ignored_acs,
1414 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { 1414 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
1415 unsigned long tids; 1415 unsigned long tids;
1416 1416
1417 if (ignored_acs & BIT(ac)) 1417 if (ignored_acs & ieee80211_ac_to_qos_mask[ac])
1418 continue; 1418 continue;
1419 1419
1420 tids = ieee80211_tids_for_ac(ac); 1420 tids = ieee80211_tids_for_ac(ac);
@@ -1482,7 +1482,7 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
1482 BIT(find_highest_prio_tid(driver_release_tids)); 1482 BIT(find_highest_prio_tid(driver_release_tids));
1483 1483
1484 if (skb_queue_empty(&frames) && !driver_release_tids) { 1484 if (skb_queue_empty(&frames) && !driver_release_tids) {
1485 int tid; 1485 int tid, ac;
1486 1486
1487 /* 1487 /*
1488 * For PS-Poll, this can only happen due to a race condition 1488 * For PS-Poll, this can only happen due to a race condition
@@ -1500,7 +1500,10 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
1500 */ 1500 */
1501 1501
1502 /* This will evaluate to 1, 3, 5 or 7. */ 1502 /* This will evaluate to 1, 3, 5 or 7. */
1503 tid = 7 - ((ffs(~ignored_acs) - 1) << 1); 1503 for (ac = IEEE80211_AC_VO; ac < IEEE80211_NUM_ACS; ac++)
1504 if (ignored_acs & BIT(ac))
1505 continue;
1506 tid = 7 - 2 * ac;
1504 1507
1505 ieee80211_send_null_response(sta, tid, reason, true, false); 1508 ieee80211_send_null_response(sta, tid, reason, true, false);
1506 } else if (!driver_release_tids) { 1509 } else if (!driver_release_tids) {
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 031273a61d27..7f24bdc68f71 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -3452,3 +3452,10 @@ void ieee80211_txq_get_depth(struct ieee80211_txq *txq,
3452 *byte_cnt = txqi->tin.backlog_bytes + frag_bytes; 3452 *byte_cnt = txqi->tin.backlog_bytes + frag_bytes;
3453} 3453}
3454EXPORT_SYMBOL(ieee80211_txq_get_depth); 3454EXPORT_SYMBOL(ieee80211_txq_get_depth);
3455
3456const u8 ieee80211_ac_to_qos_mask[IEEE80211_NUM_ACS] = {
3457 IEEE80211_WMM_IE_STA_QOSINFO_AC_VO,
3458 IEEE80211_WMM_IE_STA_QOSINFO_AC_VI,
3459 IEEE80211_WMM_IE_STA_QOSINFO_AC_BE,
3460 IEEE80211_WMM_IE_STA_QOSINFO_AC_BK
3461};