Skip to content

Commit 1347775

Browse files
committed
Merge tag 'wireless-2024-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Kalle Valo says: ==================== wireless fixes for v6.8-rc2 The most visible fix here is the ath11k crash fix which was introduced in v6.7. We also have a fix for iwlwifi memory corruption and few smaller fixes in the stack. * tag 'wireless-2024-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: fix race condition on enabling fast-xmit wifi: iwlwifi: fix a memory corruption wifi: mac80211: fix potential sta-link leak wifi: cfg80211/mac80211: remove dependency on non-existing option wifi: cfg80211: fix missing interfaces when dumping wifi: ath11k: rely on mac80211 debugfs handling for vif wifi: p54: fix GCC format truncation warning with wiphy->fw_version ==================== Link: https://lore.kernel.org/r/20240122153434.E0254C433C7@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 435e202 + bcbc84a commit 1347775

File tree

11 files changed

+24
-47
lines changed

11 files changed

+24
-47
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,6 @@ struct ath11k_vif {
368368
struct ieee80211_chanctx_conf chanctx;
369369
struct ath11k_arp_ns_offload arp_ns_offload;
370370
struct ath11k_rekey_data rekey_data;
371-
372-
#ifdef CONFIG_ATH11K_DEBUGFS
373-
struct dentry *debugfs_twt;
374-
#endif /* CONFIG_ATH11K_DEBUGFS */
375371
};
376372

377373
struct ath11k_vif_iter {

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

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,35 +1894,30 @@ static const struct file_operations ath11k_fops_twt_resume_dialog = {
18941894
.open = simple_open
18951895
};
18961896

1897-
void ath11k_debugfs_add_interface(struct ath11k_vif *arvif)
1897+
void ath11k_debugfs_op_vif_add(struct ieee80211_hw *hw,
1898+
struct ieee80211_vif *vif)
18981899
{
1900+
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
18991901
struct ath11k_base *ab = arvif->ar->ab;
1902+
struct dentry *debugfs_twt;
19001903

19011904
if (arvif->vif->type != NL80211_IFTYPE_AP &&
19021905
!(arvif->vif->type == NL80211_IFTYPE_STATION &&
19031906
test_bit(WMI_TLV_SERVICE_STA_TWT, ab->wmi_ab.svc_map)))
19041907
return;
19051908

1906-
arvif->debugfs_twt = debugfs_create_dir("twt",
1907-
arvif->vif->debugfs_dir);
1908-
debugfs_create_file("add_dialog", 0200, arvif->debugfs_twt,
1909+
debugfs_twt = debugfs_create_dir("twt",
1910+
arvif->vif->debugfs_dir);
1911+
debugfs_create_file("add_dialog", 0200, debugfs_twt,
19091912
arvif, &ath11k_fops_twt_add_dialog);
19101913

1911-
debugfs_create_file("del_dialog", 0200, arvif->debugfs_twt,
1914+
debugfs_create_file("del_dialog", 0200, debugfs_twt,
19121915
arvif, &ath11k_fops_twt_del_dialog);
19131916

1914-
debugfs_create_file("pause_dialog", 0200, arvif->debugfs_twt,
1917+
debugfs_create_file("pause_dialog", 0200, debugfs_twt,
19151918
arvif, &ath11k_fops_twt_pause_dialog);
19161919

1917-
debugfs_create_file("resume_dialog", 0200, arvif->debugfs_twt,
1920+
debugfs_create_file("resume_dialog", 0200, debugfs_twt,
19181921
arvif, &ath11k_fops_twt_resume_dialog);
19191922
}
19201923

1921-
void ath11k_debugfs_remove_interface(struct ath11k_vif *arvif)
1922-
{
1923-
if (!arvif->debugfs_twt)
1924-
return;
1925-
1926-
debugfs_remove_recursive(arvif->debugfs_twt);
1927-
arvif->debugfs_twt = NULL;
1928-
}

drivers/net/wireless/ath/ath11k/debugfs.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ static inline int ath11k_debugfs_rx_filter(struct ath11k *ar)
307307
return ar->debug.rx_filter;
308308
}
309309

310-
void ath11k_debugfs_add_interface(struct ath11k_vif *arvif);
311-
void ath11k_debugfs_remove_interface(struct ath11k_vif *arvif);
310+
void ath11k_debugfs_op_vif_add(struct ieee80211_hw *hw,
311+
struct ieee80211_vif *vif);
312312
void ath11k_debugfs_add_dbring_entry(struct ath11k *ar,
313313
enum wmi_direct_buffer_module id,
314314
enum ath11k_dbg_dbr_event event,
@@ -387,14 +387,6 @@ static inline int ath11k_debugfs_get_fw_stats(struct ath11k *ar,
387387
return 0;
388388
}
389389

390-
static inline void ath11k_debugfs_add_interface(struct ath11k_vif *arvif)
391-
{
392-
}
393-
394-
static inline void ath11k_debugfs_remove_interface(struct ath11k_vif *arvif)
395-
{
396-
}
397-
398390
static inline void
399391
ath11k_debugfs_add_dbring_entry(struct ath11k *ar,
400392
enum wmi_direct_buffer_module id,

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6756,13 +6756,6 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
67566756
goto err;
67576757
}
67586758

6759-
/* In the case of hardware recovery, debugfs files are
6760-
* not deleted since ieee80211_ops.remove_interface() is
6761-
* not invoked. In such cases, try to delete the files.
6762-
* These will be re-created later.
6763-
*/
6764-
ath11k_debugfs_remove_interface(arvif);
6765-
67666759
memset(arvif, 0, sizeof(*arvif));
67676760

67686761
arvif->ar = ar;
@@ -6939,8 +6932,6 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
69396932

69406933
ath11k_dp_vdev_tx_attach(ar, arvif);
69416934

6942-
ath11k_debugfs_add_interface(arvif);
6943-
69446935
if (vif->type != NL80211_IFTYPE_MONITOR &&
69456936
test_bit(ATH11K_FLAG_MONITOR_CONF_ENABLED, &ar->monitor_flags)) {
69466937
ret = ath11k_mac_monitor_vdev_create(ar);
@@ -7056,8 +7047,6 @@ static void ath11k_mac_op_remove_interface(struct ieee80211_hw *hw,
70567047
/* Recalc txpower for remaining vdev */
70577048
ath11k_mac_txpower_recalc(ar);
70587049

7059-
ath11k_debugfs_remove_interface(arvif);
7060-
70617050
/* TODO: recal traffic pause state based on the available vdevs */
70627051

70637052
mutex_unlock(&ar->conf_mutex);
@@ -9153,6 +9142,7 @@ static const struct ieee80211_ops ath11k_ops = {
91539142
#endif
91549143

91559144
#ifdef CONFIG_ATH11K_DEBUGFS
9145+
.vif_add_debugfs = ath11k_debugfs_op_vif_add,
91569146
.sta_add_debugfs = ath11k_debugfs_sta_op_add,
91579147
#endif
91589148

drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22
/*
3-
* Copyright (C) 2018-2023 Intel Corporation
3+
* Copyright (C) 2018-2024 Intel Corporation
44
*/
55
#include <linux/firmware.h>
66
#include "iwl-drv.h"
@@ -1096,7 +1096,7 @@ static int iwl_dbg_tlv_override_trig_node(struct iwl_fw_runtime *fwrt,
10961096
node_trig = (void *)node_tlv->data;
10971097
}
10981098

1099-
memcpy(node_trig->data + offset, trig->data, trig_data_len);
1099+
memcpy((u8 *)node_trig->data + offset, trig->data, trig_data_len);
11001100
node_tlv->length = cpu_to_le32(size);
11011101

11021102
if (policy & IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG) {

drivers/net/wireless/intersil/p54/fwio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
125125
"FW rev %s - Softmac protocol %x.%x\n",
126126
fw_version, priv->fw_var >> 8, priv->fw_var & 0xff);
127127
snprintf(dev->wiphy->fw_version, sizeof(dev->wiphy->fw_version),
128-
"%s - %x.%x", fw_version,
128+
"%.19s - %x.%x", fw_version,
129129
priv->fw_var >> 8, priv->fw_var & 0xff);
130130
}
131131

net/mac80211/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ config MAC80211_KUNIT_TEST
6262
depends on KUNIT
6363
depends on MAC80211
6464
default KUNIT_ALL_TESTS
65-
depends on !KERNEL_6_2
6665
help
6766
Enable this option to test mac80211 internals with kunit.
6867

net/mac80211/sta_info.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,10 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
404404
int i;
405405

406406
for (i = 0; i < ARRAY_SIZE(sta->link); i++) {
407-
if (!(sta->sta.valid_links & BIT(i)))
407+
struct link_sta_info *link_sta;
408+
409+
link_sta = rcu_access_pointer(sta->link[i]);
410+
if (!link_sta)
408411
continue;
409412

410413
sta_remove_link(sta, i, false);
@@ -910,6 +913,8 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
910913
if (ieee80211_vif_is_mesh(&sdata->vif))
911914
mesh_accept_plinks_update(sdata);
912915

916+
ieee80211_check_fast_xmit(sta);
917+
913918
return 0;
914919
out_remove:
915920
if (sta->sta.valid_links)

net/mac80211/tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3048,7 +3048,7 @@ void ieee80211_check_fast_xmit(struct sta_info *sta)
30483048
sdata->vif.type == NL80211_IFTYPE_STATION)
30493049
goto out;
30503050

3051-
if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED))
3051+
if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED) || !sta->uploaded)
30523052
goto out;
30533053

30543054
if (test_sta_flag(sta, WLAN_STA_PS_STA) ||

net/wireless/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ config CFG80211_KUNIT_TEST
206206
depends on KUNIT
207207
depends on CFG80211
208208
default KUNIT_ALL_TESTS
209-
depends on !KERNEL_6_2
210209
help
211210
Enable this option to test cfg80211 functions with kunit.
212211

0 commit comments

Comments
 (0)