Skip to content

Commit 46bf0c9

Browse files
committed
Merge tag 'wireless-2024-04-23' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Johannes berg says: ==================== Fixes for the current cycle: * ath11k: convert to correct RCU iteration of IPv6 addresses * iwlwifi: link ID, FW API version, scanning and PASN fixes * cfg80211: NULL-deref and tracing fixes * mac80211: connection mode, mesh fast-TX, multi-link and various other small fixes ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 6c9cd59 + 91112fc commit 46bf0c9

File tree

19 files changed

+152
-44
lines changed

19 files changed

+152
-44
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9020,6 +9020,7 @@ static void ath11k_mac_op_ipv6_changed(struct ieee80211_hw *hw,
90209020
offload = &arvif->arp_ns_offload;
90219021
count = 0;
90229022

9023+
/* Note: read_lock_bh() calls rcu_read_lock() */
90239024
read_lock_bh(&idev->lock);
90249025

90259026
memset(offload->ipv6_addr, 0, sizeof(offload->ipv6_addr));
@@ -9050,7 +9051,8 @@ static void ath11k_mac_op_ipv6_changed(struct ieee80211_hw *hw,
90509051
}
90519052

90529053
/* get anycast address */
9053-
for (ifaca6 = idev->ac_list; ifaca6; ifaca6 = ifaca6->aca_next) {
9054+
for (ifaca6 = rcu_dereference(idev->ac_list); ifaca6;
9055+
ifaca6 = rcu_dereference(ifaca6->aca_next)) {
90549056
if (count >= ATH11K_IPV6_MAX_COUNT)
90559057
goto generate;
90569058

drivers/net/wireless/intel/iwlwifi/cfg/bz.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "fw/api/txq.h"
1111

1212
/* Highest firmware API version supported */
13-
#define IWL_BZ_UCODE_API_MAX 90
13+
#define IWL_BZ_UCODE_API_MAX 89
1414

1515
/* Lowest firmware API version supported */
1616
#define IWL_BZ_UCODE_API_MIN 80

drivers/net/wireless/intel/iwlwifi/cfg/sc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "fw/api/txq.h"
1111

1212
/* Highest firmware API version supported */
13-
#define IWL_SC_UCODE_API_MAX 90
13+
#define IWL_SC_UCODE_API_MAX 89
1414

1515
/* Lowest firmware API version supported */
1616
#define IWL_SC_UCODE_API_MIN 82

drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ int iwl_mvm_ftm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
5353
if (!pasn)
5454
return -ENOBUFS;
5555

56+
iwl_mvm_ftm_remove_pasn_sta(mvm, addr);
57+
5658
pasn->cipher = iwl_mvm_cipher_to_location_cipher(cipher);
5759

5860
switch (pasn->cipher) {

drivers/net/wireless/intel/iwlwifi/mvm/link.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
279279

280280
RCU_INIT_POINTER(mvm->link_id_to_link_conf[link_info->fw_link_id],
281281
NULL);
282+
iwl_mvm_release_fw_link_id(mvm, link_info->fw_link_id);
282283
return 0;
283284
}
284285

@@ -296,7 +297,6 @@ int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
296297
return 0;
297298

298299
cmd.link_id = cpu_to_le32(link_info->fw_link_id);
299-
iwl_mvm_release_fw_link_id(mvm, link_info->fw_link_id);
300300
link_info->fw_link_id = IWL_MVM_FW_LINK_ID_INVALID;
301301
cmd.spec_link_id = link_conf->link_id;
302302
cmd.phy_id = cpu_to_le32(FW_CTXT_INVALID);

drivers/net/wireless/intel/iwlwifi/mvm/scan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2813,7 +2813,8 @@ static int iwl_mvm_build_scan_cmd(struct iwl_mvm *mvm,
28132813
if (ver_handler->version != scan_ver)
28142814
continue;
28152815

2816-
return ver_handler->handler(mvm, vif, params, type, uid);
2816+
err = ver_handler->handler(mvm, vif, params, type, uid);
2817+
return err ? : uid;
28172818
}
28182819

28192820
err = iwl_mvm_scan_umac(mvm, vif, params, type, uid);

drivers/net/wireless/virtual/mac80211_hwsim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3899,7 +3899,7 @@ static int hwsim_pmsr_report_nl(struct sk_buff *msg, struct genl_info *info)
38993899
}
39003900

39013901
nla_for_each_nested(peer, peers, rem) {
3902-
struct cfg80211_pmsr_result result;
3902+
struct cfg80211_pmsr_result result = {};
39033903

39043904
err = mac80211_hwsim_parse_pmsr_result(peer, &result, info);
39053905
if (err)

include/net/mac80211.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,8 @@ enum mac80211_tx_info_flags {
953953
* of their QoS TID or other priority field values.
954954
* @IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX: first MLO TX, used mostly internally
955955
* for sequence number assignment
956+
* @IEEE80211_TX_CTRL_SCAN_TX: Indicates that this frame is transmitted
957+
* due to scanning, not in normal operation on the interface.
956958
* @IEEE80211_TX_CTRL_MLO_LINK: If not @IEEE80211_LINK_UNSPECIFIED, this
957959
* frame should be transmitted on the specific link. This really is
958960
* only relevant for frames that do not have data present, and is
@@ -973,6 +975,7 @@ enum mac80211_tx_control_flags {
973975
IEEE80211_TX_CTRL_NO_SEQNO = BIT(7),
974976
IEEE80211_TX_CTRL_DONT_REORDER = BIT(8),
975977
IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX = BIT(9),
978+
IEEE80211_TX_CTRL_SCAN_TX = BIT(10),
976979
IEEE80211_TX_CTRL_MLO_LINK = 0xf0000000,
977980
};
978981

net/mac80211/chan.c

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ static int ieee80211_assign_link_chanctx(struct ieee80211_link_data *link,
797797
struct ieee80211_local *local = sdata->local;
798798
struct ieee80211_chanctx_conf *conf;
799799
struct ieee80211_chanctx *curr_ctx = NULL;
800+
bool new_idle;
800801
int ret = 0;
801802

802803
if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_NAN))
@@ -829,8 +830,6 @@ static int ieee80211_assign_link_chanctx(struct ieee80211_link_data *link,
829830
out:
830831
rcu_assign_pointer(link->conf->chanctx_conf, conf);
831832

832-
sdata->vif.cfg.idle = !conf;
833-
834833
if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) {
835834
ieee80211_recalc_chanctx_chantype(local, curr_ctx);
836835
ieee80211_recalc_smps_chanctx(local, curr_ctx);
@@ -843,9 +842,27 @@ static int ieee80211_assign_link_chanctx(struct ieee80211_link_data *link,
843842
ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL);
844843
}
845844

846-
if (sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE &&
847-
sdata->vif.type != NL80211_IFTYPE_MONITOR)
848-
ieee80211_vif_cfg_change_notify(sdata, BSS_CHANGED_IDLE);
845+
if (conf) {
846+
new_idle = false;
847+
} else {
848+
struct ieee80211_link_data *tmp;
849+
850+
new_idle = true;
851+
for_each_sdata_link(local, tmp) {
852+
if (rcu_access_pointer(tmp->conf->chanctx_conf)) {
853+
new_idle = false;
854+
break;
855+
}
856+
}
857+
}
858+
859+
if (new_idle != sdata->vif.cfg.idle) {
860+
sdata->vif.cfg.idle = new_idle;
861+
862+
if (sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE &&
863+
sdata->vif.type != NL80211_IFTYPE_MONITOR)
864+
ieee80211_vif_cfg_change_notify(sdata, BSS_CHANGED_IDLE);
865+
}
849866

850867
ieee80211_check_fast_xmit_iface(sdata);
851868

net/mac80211/mesh.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,9 @@ bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata,
747747
struct sk_buff *skb, u32 ctrl_flags)
748748
{
749749
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
750+
struct ieee80211_mesh_fast_tx_key key = {
751+
.type = MESH_FAST_TX_TYPE_LOCAL
752+
};
750753
struct ieee80211_mesh_fast_tx *entry;
751754
struct ieee80211s_hdr *meshhdr;
752755
u8 sa[ETH_ALEN] __aligned(2);
@@ -782,7 +785,10 @@ bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata,
782785
return false;
783786
}
784787

785-
entry = mesh_fast_tx_get(sdata, skb->data);
788+
ether_addr_copy(key.addr, skb->data);
789+
if (!ether_addr_equal(skb->data + ETH_ALEN, sdata->vif.addr))
790+
key.type = MESH_FAST_TX_TYPE_PROXIED;
791+
entry = mesh_fast_tx_get(sdata, &key);
786792
if (!entry)
787793
return false;
788794

0 commit comments

Comments
 (0)