Skip to content

Commit d630180

Browse files
committed
Merge tag 'wireless-2024-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Kalle Valo says: ==================== wireless fixes for v6.10-rc3 The first fixes for v6.10. And we have a big one, I suspect the biggest wireless pull request we ever had. There are fixes all over, both in stack and drivers. Likely the most important here are mt76 not working on mt7615 devices, ath11k not being able to connect to 6 GHz networks and rtlwifi suffering from packet loss. But of course there's much more. * tag 'wireless-2024-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (37 commits) wifi: rtlwifi: Ignore IEEE80211_CONF_CHANGE_RETRY_LIMITS wifi: mt76: mt7615: add missing chanctx ops wifi: wilc1000: document SRCU usage instead of SRCU Revert "wifi: wilc1000: set atomic flag on kmemdup in srcu critical section" Revert "wifi: wilc1000: convert list management to RCU" wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan() wifi: mac80211: correctly parse Spatial Reuse Parameter Set element wifi: mac80211: fix Spatial Reuse element size check wifi: iwlwifi: mvm: don't read past the mfuart notifcation wifi: iwlwifi: mvm: Fix scan abort handling with HW rfkill wifi: iwlwifi: mvm: check n_ssids before accessing the ssids wifi: iwlwifi: mvm: properly set 6 GHz channel direct probe option wifi: iwlwifi: mvm: handle BA session teardown in RF-kill wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd wifi: iwlwifi: mvm: remove stale STA link data during restart wifi: iwlwifi: dbg_ini: move iwl_dbg_tlv_free outside of debugfs ifdef wifi: iwlwifi: mvm: set properly mac header wifi: iwlwifi: mvm: revert gen2 TX A-MPDU size to 64 wifi: iwlwifi: mvm: d3: fix WoWLAN command version lookup wifi: iwlwifi: mvm: fix a crash on 7265 ... ==================== Link: https://lore.kernel.org/r/20240603115129.9494CC2BD10@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents c6cab01 + 819bda5 commit d630180

41 files changed

Lines changed: 322 additions & 166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/net/wireless/ath/ath10k/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ config ATH10K_SNOC
4545
depends on ATH10K
4646
depends on ARCH_QCOM || COMPILE_TEST
4747
depends on QCOM_SMEM
48+
depends on QCOM_RPROC_COMMON || QCOM_RPROC_COMMON=n
4849
select QCOM_SCM
4950
select QCOM_QMI_HELPERS
5051
help

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
604604
.coldboot_cal_ftm = true,
605605
.cbcal_restart_fw = false,
606606
.fw_mem_mode = 0,
607-
.num_vdevs = 16 + 1,
607+
.num_vdevs = 3,
608608
.num_peers = 512,
609609
.supports_suspend = false,
610610
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),

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

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7988,8 +7988,6 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
79887988
struct ath11k_base *ab = ar->ab;
79897989
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
79907990
int ret;
7991-
struct cur_regulatory_info *reg_info;
7992-
enum ieee80211_ap_reg_power power_type;
79937991

79947992
mutex_lock(&ar->conf_mutex);
79957993

@@ -8000,17 +7998,6 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
80007998
if (ath11k_wmi_supports_6ghz_cc_ext(ar) &&
80017999
ctx->def.chan->band == NL80211_BAND_6GHZ &&
80028000
arvif->vdev_type == WMI_VDEV_TYPE_STA) {
8003-
reg_info = &ab->reg_info_store[ar->pdev_idx];
8004-
power_type = vif->bss_conf.power_type;
8005-
8006-
ath11k_dbg(ab, ATH11K_DBG_MAC, "chanctx power type %d\n", power_type);
8007-
8008-
if (power_type == IEEE80211_REG_UNSET_AP) {
8009-
ret = -EINVAL;
8010-
goto out;
8011-
}
8012-
8013-
ath11k_reg_handle_chan_list(ab, reg_info, power_type);
80148001
arvif->chanctx = *ctx;
80158002
ath11k_mac_parse_tx_pwr_env(ar, vif, ctx);
80168003
}
@@ -9626,6 +9613,8 @@ static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw,
96269613
struct ath11k *ar = hw->priv;
96279614
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
96289615
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
9616+
enum ieee80211_ap_reg_power power_type;
9617+
struct cur_regulatory_info *reg_info;
96299618
struct ath11k_peer *peer;
96309619
int ret = 0;
96319620

@@ -9705,6 +9694,29 @@ static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw,
97059694
ath11k_warn(ar->ab, "Unable to authorize peer %pM vdev %d: %d\n",
97069695
sta->addr, arvif->vdev_id, ret);
97079696
}
9697+
9698+
if (!ret &&
9699+
ath11k_wmi_supports_6ghz_cc_ext(ar) &&
9700+
arvif->vdev_type == WMI_VDEV_TYPE_STA &&
9701+
arvif->chanctx.def.chan &&
9702+
arvif->chanctx.def.chan->band == NL80211_BAND_6GHZ) {
9703+
reg_info = &ar->ab->reg_info_store[ar->pdev_idx];
9704+
power_type = vif->bss_conf.power_type;
9705+
9706+
if (power_type == IEEE80211_REG_UNSET_AP) {
9707+
ath11k_warn(ar->ab, "invalid power type %d\n",
9708+
power_type);
9709+
ret = -EINVAL;
9710+
} else {
9711+
ret = ath11k_reg_handle_chan_list(ar->ab,
9712+
reg_info,
9713+
power_type);
9714+
if (ret)
9715+
ath11k_warn(ar->ab,
9716+
"failed to handle chan list with power type %d\n",
9717+
power_type);
9718+
}
9719+
}
97089720
} else if (old_state == IEEE80211_STA_AUTHORIZED &&
97099721
new_state == IEEE80211_STA_ASSOC) {
97109722
spin_lock_bh(&ar->ab->base_lock);

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,7 @@ static int ath11k_pcic_ext_irq_config(struct ath11k_base *ab)
561561
{
562562
int i, j, n, ret, num_vectors = 0;
563563
u32 user_base_data = 0, base_vector = 0;
564+
struct ath11k_ext_irq_grp *irq_grp;
564565
unsigned long irq_flags;
565566

566567
ret = ath11k_pcic_get_user_msi_assignment(ab, "DP", &num_vectors,
@@ -574,14 +575,16 @@ static int ath11k_pcic_ext_irq_config(struct ath11k_base *ab)
574575
irq_flags |= IRQF_NOBALANCING;
575576

576577
for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
577-
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
578+
irq_grp = &ab->ext_irq_grp[i];
578579
u32 num_irq = 0;
579580

580581
irq_grp->ab = ab;
581582
irq_grp->grp_id = i;
582583
irq_grp->napi_ndev = alloc_netdev_dummy(0);
583-
if (!irq_grp->napi_ndev)
584-
return -ENOMEM;
584+
if (!irq_grp->napi_ndev) {
585+
ret = -ENOMEM;
586+
goto fail_allocate;
587+
}
585588

586589
netif_napi_add(irq_grp->napi_ndev, &irq_grp->napi,
587590
ath11k_pcic_ext_grp_napi_poll);
@@ -606,11 +609,8 @@ static int ath11k_pcic_ext_irq_config(struct ath11k_base *ab)
606609
int irq = ath11k_pcic_get_msi_irq(ab, vector);
607610

608611
if (irq < 0) {
609-
for (n = 0; n <= i; n++) {
610-
irq_grp = &ab->ext_irq_grp[n];
611-
free_netdev(irq_grp->napi_ndev);
612-
}
613-
return irq;
612+
ret = irq;
613+
goto fail_irq;
614614
}
615615

616616
ab->irq_num[irq_idx] = irq;
@@ -635,6 +635,15 @@ static int ath11k_pcic_ext_irq_config(struct ath11k_base *ab)
635635
}
636636

637637
return 0;
638+
fail_irq:
639+
/* i ->napi_ndev was properly allocated. Free it also */
640+
i += 1;
641+
fail_allocate:
642+
for (n = 0; n < i; n++) {
643+
irq_grp = &ab->ext_irq_grp[n];
644+
free_netdev(irq_grp->napi_ndev);
645+
}
646+
return ret;
638647
}
639648

640649
int ath11k_pcic_config_irq(struct ath11k_base *ab)

drivers/net/wireless/intel/iwlwifi/iwl-drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1815,8 +1815,8 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans)
18151815
err_fw:
18161816
#ifdef CONFIG_IWLWIFI_DEBUGFS
18171817
debugfs_remove_recursive(drv->dbgfs_drv);
1818-
iwl_dbg_tlv_free(drv->trans);
18191818
#endif
1819+
iwl_dbg_tlv_free(drv->trans);
18201820
kfree(drv);
18211821
err:
18221822
return ERR_PTR(ret);

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,12 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw,
595595
void *_data)
596596
{
597597
struct wowlan_key_gtk_type_iter *data = _data;
598+
__le32 *cipher = NULL;
599+
600+
if (key->keyidx == 4 || key->keyidx == 5)
601+
cipher = &data->kek_kck_cmd->igtk_cipher;
602+
if (key->keyidx == 6 || key->keyidx == 7)
603+
cipher = &data->kek_kck_cmd->bigtk_cipher;
598604

599605
switch (key->cipher) {
600606
default:
@@ -606,10 +612,13 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw,
606612
return;
607613
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
608614
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
609-
data->kek_kck_cmd->igtk_cipher = cpu_to_le32(STA_KEY_FLG_GCMP);
615+
if (cipher)
616+
*cipher = cpu_to_le32(STA_KEY_FLG_GCMP);
610617
return;
611618
case WLAN_CIPHER_SUITE_AES_CMAC:
612-
data->kek_kck_cmd->igtk_cipher = cpu_to_le32(STA_KEY_FLG_CCM);
619+
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
620+
if (cipher)
621+
*cipher = cpu_to_le32(STA_KEY_FLG_CCM);
613622
return;
614623
case WLAN_CIPHER_SUITE_CCMP:
615624
if (!sta)
@@ -2341,7 +2350,8 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
23412350

23422351
out:
23432352
if (iwl_fw_lookup_notif_ver(mvm->fw, LONG_GROUP,
2344-
WOWLAN_GET_STATUSES, 0) < 10) {
2353+
WOWLAN_GET_STATUSES,
2354+
IWL_FW_CMD_VER_UNKNOWN) < 10) {
23452355
mvmvif->seqno_valid = true;
23462356
/* +0x10 because the set API expects next-to-use, not last-used */
23472357
mvmvif->seqno = status->non_qos_seq_ctr + 0x10;

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,15 @@ static int _iwl_dbgfs_inject_beacon_ie(struct iwl_mvm *mvm, char *bin, int len)
16171617
&beacon_cmd.tim_size,
16181618
beacon->data, beacon->len);
16191619

1620+
if (iwl_fw_lookup_cmd_ver(mvm->fw,
1621+
BEACON_TEMPLATE_CMD, 0) >= 14) {
1622+
u32 offset = iwl_mvm_find_ie_offset(beacon->data,
1623+
WLAN_EID_S1G_TWT,
1624+
beacon->len);
1625+
1626+
beacon_cmd.btwt_offset = cpu_to_le32(offset);
1627+
}
1628+
16201629
iwl_mvm_mac_ctxt_send_beacon_cmd(mvm, beacon, &beacon_cmd,
16211630
sizeof(beacon_cmd));
16221631
}

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,10 @@ void iwl_mvm_mfu_assert_dump_notif(struct iwl_mvm *mvm,
9494
{
9595
struct iwl_rx_packet *pkt = rxb_addr(rxb);
9696
struct iwl_mfu_assert_dump_notif *mfu_dump_notif = (void *)pkt->data;
97-
__le32 *dump_data = mfu_dump_notif->data;
98-
int n_words = le32_to_cpu(mfu_dump_notif->data_size) / sizeof(__le32);
99-
int i;
10097

10198
if (mfu_dump_notif->index_num == 0)
10299
IWL_INFO(mvm, "MFUART assert id 0x%x occurred\n",
103100
le32_to_cpu(mfu_dump_notif->assert_id));
104-
105-
for (i = 0; i < n_words; i++)
106-
IWL_DEBUG_INFO(mvm,
107-
"MFUART assert dump, dword %u: 0x%08x\n",
108-
le16_to_cpu(mfu_dump_notif->index_num) *
109-
n_words + i,
110-
le32_to_cpu(dump_data[i]));
111101
}
112102

113103
static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
@@ -895,8 +885,8 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
895885
int ret;
896886
u16 len = 0;
897887
u32 n_subbands;
898-
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id,
899-
IWL_FW_CMD_VER_UNKNOWN);
888+
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3);
889+
900890
if (cmd_ver >= 7) {
901891
len = sizeof(cmd.v7);
902892
n_subbands = IWL_NUM_SUB_BANDS_V2;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ void iwl_mvm_mac_ctxt_set_tim(struct iwl_mvm *mvm,
873873
}
874874
}
875875

876-
static u32 iwl_mvm_find_ie_offset(u8 *beacon, u8 eid, u32 frame_size)
876+
u32 iwl_mvm_find_ie_offset(u8 *beacon, u8 eid, u32 frame_size)
877877
{
878878
struct ieee80211_mgmt *mgmt = (void *)beacon;
879879
const u8 *ie;

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

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,39 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac,
11281128
RCU_INIT_POINTER(mvmvif->deflink.probe_resp_data, NULL);
11291129
}
11301130

1131+
static void iwl_mvm_cleanup_sta_iterator(void *data, struct ieee80211_sta *sta)
1132+
{
1133+
struct iwl_mvm *mvm = data;
1134+
struct iwl_mvm_sta *mvm_sta;
1135+
struct ieee80211_vif *vif;
1136+
int link_id;
1137+
1138+
mvm_sta = iwl_mvm_sta_from_mac80211(sta);
1139+
vif = mvm_sta->vif;
1140+
1141+
if (!sta->valid_links)
1142+
return;
1143+
1144+
for (link_id = 0; link_id < ARRAY_SIZE((sta)->link); link_id++) {
1145+
struct iwl_mvm_link_sta *mvm_link_sta;
1146+
1147+
mvm_link_sta =
1148+
rcu_dereference_check(mvm_sta->link[link_id],
1149+
lockdep_is_held(&mvm->mutex));
1150+
if (mvm_link_sta && !(vif->active_links & BIT(link_id))) {
1151+
/*
1152+
* We have a link STA but the link is inactive in
1153+
* mac80211. This will happen if we failed to
1154+
* deactivate the link but mac80211 roll back the
1155+
* deactivation of the link.
1156+
* Delete the stale data to avoid issues later on.
1157+
*/
1158+
iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_link_sta,
1159+
link_id, false);
1160+
}
1161+
}
1162+
}
1163+
11311164
static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)
11321165
{
11331166
iwl_mvm_stop_device(mvm);
@@ -1150,6 +1183,10 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)
11501183
*/
11511184
ieee80211_iterate_interfaces(mvm->hw, 0, iwl_mvm_cleanup_iterator, mvm);
11521185

1186+
/* cleanup stations as links may be gone after restart */
1187+
ieee80211_iterate_stations_atomic(mvm->hw,
1188+
iwl_mvm_cleanup_sta_iterator, mvm);
1189+
11531190
mvm->p2p_device_vif = NULL;
11541191

11551192
iwl_mvm_reset_phy_ctxts(mvm);
@@ -6348,7 +6385,7 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm,
63486385
.len[0] = sizeof(cmd),
63496386
.data[1] = data,
63506387
.len[1] = size,
6351-
.flags = sync ? 0 : CMD_ASYNC,
6388+
.flags = CMD_SEND_IN_RFKILL | (sync ? 0 : CMD_ASYNC),
63526389
};
63536390
int ret;
63546391

0 commit comments

Comments
 (0)