Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+24 -47
-4
drivers/net/wireless/ath/ath11k/core.h
··· 368 368 struct ieee80211_chanctx_conf chanctx; 369 369 struct ath11k_arp_ns_offload arp_ns_offload; 370 370 struct ath11k_rekey_data rekey_data; 371 - 372 - #ifdef CONFIG_ATH11K_DEBUGFS 373 - struct dentry *debugfs_twt; 374 - #endif /* CONFIG_ATH11K_DEBUGFS */ 375 371 }; 376 372 377 373 struct ath11k_vif_iter {
+10 -15
drivers/net/wireless/ath/ath11k/debugfs.c
··· 1894 1894 .open = simple_open 1895 1895 }; 1896 1896 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) 1898 1899 { 1900 + struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); 1899 1901 struct ath11k_base *ab = arvif->ar->ab; 1902 + struct dentry *debugfs_twt; 1900 1903 1901 1904 if (arvif->vif->type != NL80211_IFTYPE_AP && 1902 1905 !(arvif->vif->type == NL80211_IFTYPE_STATION && 1903 1906 test_bit(WMI_TLV_SERVICE_STA_TWT, ab->wmi_ab.svc_map))) 1904 1907 return; 1905 1908 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, 1909 1912 arvif, &ath11k_fops_twt_add_dialog); 1910 1913 1911 - debugfs_create_file("del_dialog", 0200, arvif->debugfs_twt, 1914 + debugfs_create_file("del_dialog", 0200, debugfs_twt, 1912 1915 arvif, &ath11k_fops_twt_del_dialog); 1913 1916 1914 - debugfs_create_file("pause_dialog", 0200, arvif->debugfs_twt, 1917 + debugfs_create_file("pause_dialog", 0200, debugfs_twt, 1915 1918 arvif, &ath11k_fops_twt_pause_dialog); 1916 1919 1917 - debugfs_create_file("resume_dialog", 0200, arvif->debugfs_twt, 1920 + debugfs_create_file("resume_dialog", 0200, debugfs_twt, 1918 1921 arvif, &ath11k_fops_twt_resume_dialog); 1919 1922 } 1920 1923 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 - }
+2 -10
drivers/net/wireless/ath/ath11k/debugfs.h
··· 307 307 return ar->debug.rx_filter; 308 308 } 309 309 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); 312 312 void ath11k_debugfs_add_dbring_entry(struct ath11k *ar, 313 313 enum wmi_direct_buffer_module id, 314 314 enum ath11k_dbg_dbr_event event, ··· 385 385 u32 pdev_id, u32 vdev_id, u32 stats_id) 386 386 { 387 387 return 0; 388 - } 389 - 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 388 } 397 389 398 390 static inline void
+1 -11
drivers/net/wireless/ath/ath11k/mac.c
··· 6756 6756 goto err; 6757 6757 } 6758 6758 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 - 6766 6759 memset(arvif, 0, sizeof(*arvif)); 6767 6760 6768 6761 arvif->ar = ar; ··· 6932 6939 6933 6940 ath11k_dp_vdev_tx_attach(ar, arvif); 6934 6941 6935 - ath11k_debugfs_add_interface(arvif); 6936 - 6937 6942 if (vif->type != NL80211_IFTYPE_MONITOR && 6938 6943 test_bit(ATH11K_FLAG_MONITOR_CONF_ENABLED, &ar->monitor_flags)) { 6939 6944 ret = ath11k_mac_monitor_vdev_create(ar); ··· 7046 7055 7047 7056 /* Recalc txpower for remaining vdev */ 7048 7057 ath11k_mac_txpower_recalc(ar); 7049 - 7050 - ath11k_debugfs_remove_interface(arvif); 7051 7058 7052 7059 /* TODO: recal traffic pause state based on the available vdevs */ 7053 7060 ··· 9142 9153 #endif 9143 9154 9144 9155 #ifdef CONFIG_ATH11K_DEBUGFS 9156 + .vif_add_debugfs = ath11k_debugfs_op_vif_add, 9145 9157 .sta_add_debugfs = ath11k_debugfs_sta_op_add, 9146 9158 #endif 9147 9159
+2 -2
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 2 /* 3 - * Copyright (C) 2018-2023 Intel Corporation 3 + * Copyright (C) 2018-2024 Intel Corporation 4 4 */ 5 5 #include <linux/firmware.h> 6 6 #include "iwl-drv.h" ··· 1096 1096 node_trig = (void *)node_tlv->data; 1097 1097 } 1098 1098 1099 - memcpy(node_trig->data + offset, trig->data, trig_data_len); 1099 + memcpy((u8 *)node_trig->data + offset, trig->data, trig_data_len); 1100 1100 node_tlv->length = cpu_to_le32(size); 1101 1101 1102 1102 if (policy & IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG) {
+1 -1
drivers/net/wireless/intersil/p54/fwio.c
··· 125 125 "FW rev %s - Softmac protocol %x.%x\n", 126 126 fw_version, priv->fw_var >> 8, priv->fw_var & 0xff); 127 127 snprintf(dev->wiphy->fw_version, sizeof(dev->wiphy->fw_version), 128 - "%s - %x.%x", fw_version, 128 + "%.19s - %x.%x", fw_version, 129 129 priv->fw_var >> 8, priv->fw_var & 0xff); 130 130 } 131 131
-1
net/mac80211/Kconfig
··· 62 62 depends on KUNIT 63 63 depends on MAC80211 64 64 default KUNIT_ALL_TESTS 65 - depends on !KERNEL_6_2 66 65 help 67 66 Enable this option to test mac80211 internals with kunit. 68 67
+6 -1
net/mac80211/sta_info.c
··· 404 404 int i; 405 405 406 406 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) 408 411 continue; 409 412 410 413 sta_remove_link(sta, i, false); ··· 912 909 913 910 if (ieee80211_vif_is_mesh(&sdata->vif)) 914 911 mesh_accept_plinks_update(sdata); 912 + 913 + ieee80211_check_fast_xmit(sta); 915 914 916 915 return 0; 917 916 out_remove:
+1 -1
net/mac80211/tx.c
··· 3048 3048 sdata->vif.type == NL80211_IFTYPE_STATION) 3049 3049 goto out; 3050 3050 3051 - if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED)) 3051 + if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED) || !sta->uploaded) 3052 3052 goto out; 3053 3053 3054 3054 if (test_sta_flag(sta, WLAN_STA_PS_STA) ||
-1
net/wireless/Kconfig
··· 206 206 depends on KUNIT 207 207 depends on CFG80211 208 208 default KUNIT_ALL_TESTS 209 - depends on !KERNEL_6_2 210 209 help 211 210 Enable this option to test cfg80211 functions with kunit. 212 211
+1
net/wireless/nl80211.c
··· 4020 4020 } 4021 4021 wiphy_unlock(&rdev->wiphy); 4022 4022 4023 + if_start = 0; 4023 4024 wp_idx++; 4024 4025 } 4025 4026 out: