Skip to content

Commit ae9a138

Browse files
committed
Merge tag 'mac80211-next-for-davem-2020-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== This time we have: * some code to support SAE (WPA3) offload in AP mode * many documentation (wording) fixes/updates * netlink policy updates, including the use of NLA_RANGE with binary attributes * regulatory improvements for adjacent frequency bands * and a few other small additions/refactorings/cleanups ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 50aba46 + 2831a63 commit ae9a138

File tree

31 files changed

+561
-275
lines changed

31 files changed

+561
-275
lines changed

drivers/net/wireless/ath/ath10k/mac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,8 +2019,8 @@ static void ath10k_mac_vif_ap_csa_count_down(struct ath10k_vif *arvif)
20192019
if (!arvif->is_up)
20202020
return;
20212021

2022-
if (!ieee80211_csa_is_complete(vif)) {
2023-
ieee80211_csa_update_counter(vif);
2022+
if (!ieee80211_beacon_cntdwn_is_complete(vif)) {
2023+
ieee80211_beacon_update_cntdwn(vif);
20242024

20252025
ret = ath10k_mac_setup_bcn_tmpl(arvif);
20262026
if (ret)

drivers/net/wireless/ath/ath10k/wmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3878,7 +3878,7 @@ void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
38783878
* actual channel switch is done
38793879
*/
38803880
if (arvif->vif->csa_active &&
3881-
ieee80211_csa_is_complete(arvif->vif)) {
3881+
ieee80211_beacon_cntdwn_is_complete(arvif->vif)) {
38823882
ieee80211_csa_finish(arvif->vif);
38833883
continue;
38843884
}

drivers/net/wireless/ath/ath11k/wmi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,8 +1593,8 @@ int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,
15931593
FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
15941594
cmd->vdev_id = vdev_id;
15951595
cmd->tim_ie_offset = offs->tim_offset;
1596-
cmd->csa_switch_count_offset = offs->csa_counter_offs[0];
1597-
cmd->ext_csa_switch_count_offset = offs->csa_counter_offs[1];
1596+
cmd->csa_switch_count_offset = offs->cntdwn_counter_offs[0];
1597+
cmd->ext_csa_switch_count_offset = offs->cntdwn_counter_offs[1];
15981598
cmd->buf_len = bcn->len;
15991599

16001600
ptr = skb->data + sizeof(*cmd);

drivers/net/wireless/ath/ath9k/beacon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ bool ath9k_csa_is_finished(struct ath_softc *sc, struct ieee80211_vif *vif)
365365
if (!vif || !vif->csa_active)
366366
return false;
367367

368-
if (!ieee80211_csa_is_complete(vif))
368+
if (!ieee80211_beacon_cntdwn_is_complete(vif))
369369
return false;
370370

371371
ieee80211_csa_finish(vif);

drivers/net/wireless/ath/ath9k/htc_drv_beacon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ bool ath9k_htc_csa_is_finished(struct ath9k_htc_priv *priv)
514514
if (!vif || !vif->csa_active)
515515
return false;
516516

517-
if (!ieee80211_csa_is_complete(vif))
517+
if (!ieee80211_beacon_cntdwn_is_complete(vif))
518518
return false;
519519

520520
ieee80211_csa_finish(vif);

drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,8 +1300,8 @@ static void iwl_mvm_csa_count_down(struct iwl_mvm *mvm,
13001300

13011301
mvmvif->csa_countdown = true;
13021302

1303-
if (!ieee80211_csa_is_complete(csa_vif)) {
1304-
int c = ieee80211_csa_update_counter(csa_vif);
1303+
if (!ieee80211_beacon_cntdwn_is_complete(csa_vif)) {
1304+
int c = ieee80211_beacon_update_cntdwn(csa_vif);
13051305

13061306
iwl_mvm_mac_ctxt_beacon_changed(mvm, csa_vif);
13071307
if (csa_vif->p2p &&
@@ -1543,7 +1543,7 @@ void iwl_mvm_probe_resp_data_notif(struct iwl_mvm *mvm,
15431543

15441544
if (notif->csa_counter != IWL_PROBE_RESP_DATA_NO_CSA &&
15451545
notif->csa_counter >= 1)
1546-
ieee80211_csa_set_counter(vif, notif->csa_counter);
1546+
ieee80211_beacon_set_cntdwn(vif, notif->csa_counter);
15471547
}
15481548

15491549
void iwl_mvm_channel_switch_noa_notif(struct iwl_mvm *mvm,

drivers/net/wireless/intel/iwlwifi/mvm/time-event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static void iwl_mvm_csa_noa_start(struct iwl_mvm *mvm)
172172
* So we just do nothing here and the switch
173173
* will be performed on the last TBTT.
174174
*/
175-
if (!ieee80211_csa_is_complete(csa_vif)) {
175+
if (!ieee80211_beacon_cntdwn_is_complete(csa_vif)) {
176176
IWL_WARN(mvm, "CSA NOA started too early\n");
177177
goto out_unlock;
178178
}

drivers/net/wireless/mac80211_hwsim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
16991699
rcu_dereference(vif->chanctx_conf)->def.chan);
17001700
}
17011701

1702-
if (vif->csa_active && ieee80211_csa_is_complete(vif))
1702+
if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
17031703
ieee80211_csa_finish(vif);
17041704
}
17051705

drivers/net/wireless/mediatek/mt76/mac80211.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ EXPORT_SYMBOL_GPL(mt76_get_txpower);
10951095
static void
10961096
__mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
10971097
{
1098-
if (vif->csa_active && ieee80211_csa_is_complete(vif))
1098+
if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
10991099
ieee80211_csa_finish(vif);
11001100
}
11011101

@@ -1120,7 +1120,7 @@ __mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif)
11201120
if (!vif->csa_active)
11211121
return;
11221122

1123-
dev->csa_complete |= ieee80211_csa_is_complete(vif);
1123+
dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
11241124
}
11251125

11261126
void mt76_csa_check(struct mt76_dev *dev)

drivers/net/wireless/mediatek/mt76/mt7615/mcu.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -650,12 +650,12 @@ mt7615_mcu_add_beacon_offload(struct mt7615_dev *dev,
650650
memcpy(req.pkt + MT_TXD_SIZE, skb->data, skb->len);
651651
req.pkt_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
652652
req.tim_ie_pos = cpu_to_le16(MT_TXD_SIZE + offs.tim_offset);
653-
if (offs.csa_counter_offs[0]) {
653+
if (offs.cntdwn_counter_offs[0]) {
654654
u16 csa_offs;
655655

656-
csa_offs = MT_TXD_SIZE + offs.csa_counter_offs[0] - 4;
656+
csa_offs = MT_TXD_SIZE + offs.cntdwn_counter_offs[0] - 4;
657657
req.csa_ie_pos = cpu_to_le16(csa_offs);
658-
req.csa_cnt = skb->data[offs.csa_counter_offs[0]];
658+
req.csa_cnt = skb->data[offs.cntdwn_counter_offs[0]];
659659
}
660660
dev_kfree_skb(skb);
661661

@@ -1713,10 +1713,10 @@ mt7615_mcu_uni_add_beacon_offload(struct mt7615_dev *dev,
17131713
req.beacon_tlv.pkt_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
17141714
req.beacon_tlv.tim_ie_pos = cpu_to_le16(MT_TXD_SIZE + offs.tim_offset);
17151715

1716-
if (offs.csa_counter_offs[0]) {
1716+
if (offs.cntdwn_counter_offs[0]) {
17171717
u16 csa_offs;
17181718

1719-
csa_offs = MT_TXD_SIZE + offs.csa_counter_offs[0] - 4;
1719+
csa_offs = MT_TXD_SIZE + offs.cntdwn_counter_offs[0] - 4;
17201720
req.beacon_tlv.csa_ie_pos = cpu_to_le16(csa_offs);
17211721
}
17221722
dev_kfree_skb(skb);

drivers/net/wireless/mediatek/mt76/mt7915/mcu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,15 +2282,15 @@ mt7915_mcu_beacon_csa(struct sk_buff *rskb, struct sk_buff *skb,
22822282
struct bss_info_bcn *bcn,
22832283
struct ieee80211_mutable_offsets *offs)
22842284
{
2285-
if (offs->csa_counter_offs[0]) {
2285+
if (offs->cntdwn_counter_offs[0]) {
22862286
struct tlv *tlv;
22872287
struct bss_info_bcn_csa *csa;
22882288

22892289
tlv = mt7915_mcu_add_nested_subtlv(rskb, BSS_INFO_BCN_CSA,
22902290
sizeof(*csa), &bcn->sub_ntlv,
22912291
&bcn->len);
22922292
csa = (struct bss_info_bcn_csa *)tlv;
2293-
csa->cnt = skb->data[offs->csa_counter_offs[0]];
2293+
csa->cnt = skb->data[offs->cntdwn_counter_offs[0]];
22942294
}
22952295
}
22962296

@@ -2312,8 +2312,8 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct sk_buff *rskb,
23122312
cont->pkt_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
23132313
cont->tim_ofs = cpu_to_le16(offs->tim_offset);
23142314

2315-
if (offs->csa_counter_offs[0])
2316-
cont->csa_ofs = cpu_to_le16(offs->csa_counter_offs[0] - 4);
2315+
if (offs->cntdwn_counter_offs[0])
2316+
cont->csa_ofs = cpu_to_le16(offs->cntdwn_counter_offs[0] - 4);
23172317

23182318
buf = (u8 *)tlv + sizeof(*cont);
23192319
mt7915_mac_write_txwi(dev, (__le32 *)buf, skb, wcid, NULL,

include/net/cfg80211.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,10 @@ struct cfg80211_bitrate_mask {
678678
u32 legacy;
679679
u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
680680
u16 vht_mcs[NL80211_VHT_NSS_MAX];
681+
u16 he_mcs[NL80211_HE_NSS_MAX];
681682
enum nl80211_txrate_gi gi;
683+
enum nl80211_he_gi he_gi;
684+
enum nl80211_he_ltf he_ltf;
682685
} control[NUM_NL80211_BANDS];
683686
};
684687

include/net/mac80211.h

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3736,7 +3736,7 @@ enum ieee80211_reconfig_type {
37363736
* decremented, and when they reach 1 the driver must call
37373737
* ieee80211_csa_finish(). Drivers which use ieee80211_beacon_get()
37383738
* get the csa counter decremented by mac80211, but must check if it is
3739-
* 1 using ieee80211_csa_is_complete() after the beacon has been
3739+
* 1 using ieee80211_beacon_counter_is_complete() after the beacon has been
37403740
* transmitted and then call ieee80211_csa_finish().
37413741
* If the CSA count starts as zero or 1, this function will not be called,
37423742
* since there won't be any time to beacon before the switch anyway.
@@ -4763,21 +4763,21 @@ void ieee80211_tx_status_8023(struct ieee80211_hw *hw,
47634763
*/
47644764
void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
47654765

4766-
#define IEEE80211_MAX_CSA_COUNTERS_NUM 2
4766+
#define IEEE80211_MAX_CNTDWN_COUNTERS_NUM 2
47674767

47684768
/**
47694769
* struct ieee80211_mutable_offsets - mutable beacon offsets
47704770
* @tim_offset: position of TIM element
47714771
* @tim_length: size of TIM element
4772-
* @csa_counter_offs: array of IEEE80211_MAX_CSA_COUNTERS_NUM offsets
4773-
* to CSA counters. This array can contain zero values which
4772+
* @cntdwn_counter_offs: array of IEEE80211_MAX_CNTDWN_COUNTERS_NUM offsets
4773+
* to countdown counters. This array can contain zero values which
47744774
* should be ignored.
47754775
*/
47764776
struct ieee80211_mutable_offsets {
47774777
u16 tim_offset;
47784778
u16 tim_length;
47794779

4780-
u16 csa_counter_offs[IEEE80211_MAX_CSA_COUNTERS_NUM];
4780+
u16 cntdwn_counter_offs[IEEE80211_MAX_CNTDWN_COUNTERS_NUM];
47814781
};
47824782

47834783
/**
@@ -4846,31 +4846,31 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
48464846
}
48474847

48484848
/**
4849-
* ieee80211_csa_update_counter - request mac80211 to decrement the csa counter
4849+
* ieee80211_beacon_update_cntdwn - request mac80211 to decrement the beacon countdown
48504850
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
48514851
*
4852-
* The csa counter should be updated after each beacon transmission.
4852+
* The beacon counter should be updated after each beacon transmission.
48534853
* This function is called implicitly when
48544854
* ieee80211_beacon_get/ieee80211_beacon_get_tim are called, however if the
48554855
* beacon frames are generated by the device, the driver should call this
4856-
* function after each beacon transmission to sync mac80211's csa counters.
4856+
* function after each beacon transmission to sync mac80211's beacon countdown.
48574857
*
4858-
* Return: new csa counter value
4858+
* Return: new countdown value
48594859
*/
4860-
u8 ieee80211_csa_update_counter(struct ieee80211_vif *vif);
4860+
u8 ieee80211_beacon_update_cntdwn(struct ieee80211_vif *vif);
48614861

48624862
/**
4863-
* ieee80211_csa_set_counter - request mac80211 to set csa counter
4863+
* ieee80211_beacon_set_cntdwn - request mac80211 to set beacon countdown
48644864
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
48654865
* @counter: the new value for the counter
48664866
*
4867-
* The csa counter can be changed by the device, this API should be
4867+
* The beacon countdown can be changed by the device, this API should be
48684868
* used by the device driver to update csa counter in mac80211.
48694869
*
4870-
* It should never be used together with ieee80211_csa_update_counter(),
4870+
* It should never be used together with ieee80211_beacon_update_cntdwn(),
48714871
* as it will cause a race condition around the counter value.
48724872
*/
4873-
void ieee80211_csa_set_counter(struct ieee80211_vif *vif, u8 counter);
4873+
void ieee80211_beacon_set_cntdwn(struct ieee80211_vif *vif, u8 counter);
48744874

48754875
/**
48764876
* ieee80211_csa_finish - notify mac80211 about channel switch
@@ -4883,13 +4883,12 @@ void ieee80211_csa_set_counter(struct ieee80211_vif *vif, u8 counter);
48834883
void ieee80211_csa_finish(struct ieee80211_vif *vif);
48844884

48854885
/**
4886-
* ieee80211_csa_is_complete - find out if counters reached 1
4886+
* ieee80211_beacon_cntdwn_is_complete - find out if countdown reached 1
48874887
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
48884888
*
4889-
* This function returns whether the channel switch counters reached zero.
4889+
* This function returns whether the countdown reached zero.
48904890
*/
4891-
bool ieee80211_csa_is_complete(struct ieee80211_vif *vif);
4892-
4891+
bool ieee80211_beacon_cntdwn_is_complete(struct ieee80211_vif *vif);
48934892

48944893
/**
48954894
* ieee80211_proberesp_get - retrieve a Probe Response template

0 commit comments

Comments
 (0)