summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/cfg80211.h3
-rw-r--r--include/net/mac80211.h3
-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
7 files changed, 24 insertions, 9 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 5000ec758eb3..10a26f0fbafe 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4574,7 +4574,8 @@ void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr);
4574 * moves to cfg80211 in this call 4574 * moves to cfg80211 in this call
4575 * @buf: authentication frame (header + body) 4575 * @buf: authentication frame (header + body)
4576 * @len: length of the frame data 4576 * @len: length of the frame data
4577 * @uapsd_queues: bitmap of ACs configured to uapsd. -1 if n/a. 4577 * @uapsd_queues: bitmap of queues configured for uapsd. Same format
4578 * as the AC bitmap in the QoS info field
4578 * 4579 *
4579 * After being asked to associate via cfg80211_ops::assoc() the driver must 4580 * After being asked to associate via cfg80211_ops::assoc() the driver must
4580 * call either this function or cfg80211_auth_timeout(). 4581 * call either this function or cfg80211_auth_timeout().
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a1a27021f452..b9b24abd9103 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1745,7 +1745,8 @@ struct ieee80211_sta_rates {
1745 * @drv_priv: data area for driver use, will always be aligned to 1745 * @drv_priv: data area for driver use, will always be aligned to
1746 * sizeof(void *), size is determined in hw information. 1746 * sizeof(void *), size is determined in hw information.
1747 * @uapsd_queues: bitmap of queues configured for uapsd. Only valid 1747 * @uapsd_queues: bitmap of queues configured for uapsd. Only valid
1748 * if wme is supported. 1748 * if wme is supported. The bits order is like in
1749 * IEEE80211_WMM_IE_STA_QOSINFO_AC_*.
1749 * @max_sp: max Service Period. Only valid if wme is supported. 1750 * @max_sp: max Service Period. Only valid if wme is supported.
1750 * @bandwidth: current bandwidth the station can receive with 1751 * @bandwidth: current bandwidth the station can receive with
1751 * @rx_nss: in HT/VHT, the maximum number of spatial streams the 1752 * @rx_nss: in HT/VHT, the maximum number of spatial streams the
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};