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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'wireless-next-2025-10-30' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next

Johannes Berg says:

====================
Not that many changes this time:

- mac80211:
- improved VHT radiotap reporting
- S1G improvements
- multi-radio monitor improvements
- HT action frame handling on 6 GHz
- mesh rate tracking improvements
- CSA handling improvements
- cfg80211: multi-radio debugfs
- rt2x00: improvements for embedded platforms

* tag 'wireless-next-2025-10-30' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next:
wifi: mac80211: Allow HT Action frame processing on 6 GHz when HE is supported
wifi: rt2x00: add nvmem eeprom support
wifi: mac80211: add RX flag to report radiotap VHT information
net: wireless: Remove redundant pm_runtime_mark_last_busy() calls
wifi: cfg80211: Add parameters to radio-specific debugfs directories
wifi: cfg80211: Add debugfs support for multi-radio wiphy
wifi: mac80211: fix missing RX bitrate update for mesh forwarding path
wifi: cfg80211: default S1G chandef width to 1MHz
wifi: mac80211: get probe response chan via ieee80211_get_channel_khz
wifi: mac80211: reset CRC valid after CSA
wifi: mac80211_hwsim: advertise puncturing feature support
wifi: cfg80211/mac80211: validate radio frequency range for monitor mode
wifi: rt2x00: check retval for of_get_mac_address
====================

Link: https://patch.msgid.link/20251030105355.13216-3-johannes@sipsolutions.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+288 -114
-1
drivers/net/wireless/ath/wil6210/pm.c
··· 458 458 { 459 459 struct device *dev = wil_to_dev(wil); 460 460 461 - pm_runtime_mark_last_busy(dev); 462 461 pm_runtime_put_autosuspend(dev); 463 462 }
+34 -1
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
··· 24 24 #include <linux/crc-ccitt.h> 25 25 #include <linux/kernel.h> 26 26 #include <linux/module.h> 27 + #include <linux/nvmem-consumer.h> 27 28 #include <linux/slab.h> 28 29 29 30 #include "rt2x00.h" ··· 10963 10962 } 10964 10963 EXPORT_SYMBOL_GPL(rt2800_read_eeprom_efuse); 10965 10964 10965 + int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev) 10966 + { 10967 + struct device_node *np = rt2x00dev->dev->of_node; 10968 + unsigned int len = rt2x00dev->ops->eeprom_size; 10969 + struct nvmem_cell *cell; 10970 + const void *data; 10971 + size_t retlen; 10972 + 10973 + cell = of_nvmem_cell_get(np, "eeprom"); 10974 + if (IS_ERR(cell)) 10975 + return PTR_ERR(cell); 10976 + 10977 + data = nvmem_cell_read(cell, &retlen); 10978 + nvmem_cell_put(cell); 10979 + 10980 + if (IS_ERR(data)) 10981 + return PTR_ERR(data); 10982 + 10983 + if (retlen != len) { 10984 + dev_err(rt2x00dev->dev, "invalid eeprom size, required: 0x%04x\n", len); 10985 + kfree(data); 10986 + return -EINVAL; 10987 + } 10988 + 10989 + memcpy(rt2x00dev->eeprom, data, len); 10990 + kfree(data); 10991 + return 0; 10992 + } 10993 + EXPORT_SYMBOL_GPL(rt2800_read_eeprom_nvmem); 10994 + 10966 10995 static u8 rt2800_get_txmixer_gain_24g(struct rt2x00_dev *rt2x00dev) 10967 10996 { 10968 10997 u16 word; ··· 11042 11011 * Start validation of the data that has been read. 11043 11012 */ 11044 11013 mac = rt2800_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 11045 - rt2x00lib_set_mac_address(rt2x00dev, mac); 11014 + retval = rt2x00lib_set_mac_address(rt2x00dev, mac); 11015 + if (retval) 11016 + return retval; 11046 11017 11047 11018 word = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0); 11048 11019 if (word == 0xffff) {
+2
drivers/net/wireless/ralink/rt2x00/rt2800lib.h
··· 248 248 int rt2800_efuse_detect(struct rt2x00_dev *rt2x00dev); 249 249 int rt2800_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev); 250 250 251 + int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev); 252 + 251 253 int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev); 252 254 253 255 void rt2800_get_key_seq(struct ieee80211_hw *hw,
+3
drivers/net/wireless/ralink/rt2x00/rt2800pci.c
··· 278 278 { 279 279 int retval; 280 280 281 + if (!rt2800_read_eeprom_nvmem(rt2x00dev)) 282 + return 0; 283 + 281 284 if (rt2800pci_efuse_detect(rt2x00dev)) 282 285 retval = rt2800pci_read_eeprom_efuse(rt2x00dev); 283 286 else
+5 -1
drivers/net/wireless/ralink/rt2x00/rt2800soc.c
··· 92 92 93 93 static int rt2800soc_read_eeprom(struct rt2x00_dev *rt2x00dev) 94 94 { 95 - void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE); 95 + void __iomem *base_addr; 96 96 97 + if (!rt2800_read_eeprom_nvmem(rt2x00dev)) 98 + return 0; 99 + 100 + base_addr = ioremap(0x1F040000, EEPROM_SIZE); 97 101 if (!base_addr) 98 102 return -ENOMEM; 99 103
+1 -1
drivers/net/wireless/ralink/rt2x00/rt2x00.h
··· 1427 1427 */ 1428 1428 u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev, 1429 1429 struct ieee80211_vif *vif); 1430 - void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr); 1430 + int rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr); 1431 1431 1432 1432 /* 1433 1433 * Interrupt context handlers.
+8 -2
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
··· 988 988 entry->flags |= IEEE80211_RATE_SHORT_PREAMBLE; 989 989 } 990 990 991 - void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr) 991 + int rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr) 992 992 { 993 - of_get_mac_address(rt2x00dev->dev->of_node, eeprom_mac_addr); 993 + int ret; 994 + 995 + ret = of_get_mac_address(rt2x00dev->dev->of_node, eeprom_mac_addr); 996 + if (ret == -EPROBE_DEFER) 997 + return ret; 994 998 995 999 if (!is_valid_ether_addr(eeprom_mac_addr)) { 996 1000 eth_random_addr(eeprom_mac_addr); 997 1001 rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", eeprom_mac_addr); 998 1002 } 1003 + 1004 + return 0; 999 1005 } 1000 1006 EXPORT_SYMBOL_GPL(rt2x00lib_set_mac_address); 1001 1007
-3
drivers/net/wireless/ti/wl18xx/debugfs.c
··· 272 272 if (ret < 0) 273 273 count = ret; 274 274 275 - pm_runtime_mark_last_busy(wl->dev); 276 275 pm_runtime_put_autosuspend(wl->dev); 277 276 out: 278 277 mutex_unlock(&wl->mutex); ··· 311 312 if (ret < 0) 312 313 count = ret; 313 314 314 - pm_runtime_mark_last_busy(wl->dev); 315 315 pm_runtime_put_autosuspend(wl->dev); 316 316 out: 317 317 mutex_unlock(&wl->mutex); ··· 372 374 wl->radar_debug_mode, 0); 373 375 } 374 376 375 - pm_runtime_mark_last_busy(wl->dev); 376 377 pm_runtime_put_autosuspend(wl->dev); 377 378 out: 378 379 mutex_unlock(&wl->mutex);
-1
drivers/net/wireless/ti/wlcore/cmd.c
··· 213 213 } while (!event); 214 214 215 215 out: 216 - pm_runtime_mark_last_busy(wl->dev); 217 216 pm_runtime_put_autosuspend(wl->dev); 218 217 free_vector: 219 218 kfree(events_vector);
-11
drivers/net/wireless/ti/wlcore/debugfs.c
··· 63 63 wl->stats.fw_stats_update = jiffies; 64 64 } 65 65 66 - pm_runtime_mark_last_busy(wl->dev); 67 66 pm_runtime_put_autosuspend(wl->dev); 68 67 69 68 out: ··· 112 113 chip_op = arg; 113 114 chip_op(wl); 114 115 115 - pm_runtime_mark_last_busy(wl->dev); 116 116 pm_runtime_put_autosuspend(wl->dev); 117 117 } 118 118 ··· 285 287 wl1271_ps_set_mode(wl, wlvif, STATION_AUTO_PS_MODE); 286 288 } 287 289 288 - pm_runtime_mark_last_busy(wl->dev); 289 290 pm_runtime_put_autosuspend(wl->dev); 290 291 291 292 out: ··· 354 357 wl1271_ps_set_mode(wl, wlvif, ps_mode); 355 358 } 356 359 357 - pm_runtime_mark_last_busy(wl->dev); 358 360 pm_runtime_put_autosuspend(wl->dev); 359 361 360 362 out: ··· 826 830 wl1271_recalc_rx_streaming(wl, wlvif); 827 831 } 828 832 829 - pm_runtime_mark_last_busy(wl->dev); 830 833 pm_runtime_put_autosuspend(wl->dev); 831 834 out: 832 835 mutex_unlock(&wl->mutex); ··· 881 886 wl1271_recalc_rx_streaming(wl, wlvif); 882 887 } 883 888 884 - pm_runtime_mark_last_busy(wl->dev); 885 889 pm_runtime_put_autosuspend(wl->dev); 886 890 out: 887 891 mutex_unlock(&wl->mutex); ··· 928 934 ret = wl1271_acx_beacon_filter_opt(wl, wlvif, !!value); 929 935 } 930 936 931 - pm_runtime_mark_last_busy(wl->dev); 932 937 pm_runtime_put_autosuspend(wl->dev); 933 938 out: 934 939 mutex_unlock(&wl->mutex); ··· 1008 1015 goto out_sleep; 1009 1016 1010 1017 out_sleep: 1011 - pm_runtime_mark_last_busy(wl->dev); 1012 1018 pm_runtime_put_autosuspend(wl->dev); 1013 1019 out: 1014 1020 mutex_unlock(&wl->mutex); ··· 1082 1090 goto part_err; 1083 1091 1084 1092 part_err: 1085 - pm_runtime_mark_last_busy(wl->dev); 1086 1093 pm_runtime_put_autosuspend(wl->dev); 1087 1094 1088 1095 skip_read: ··· 1163 1172 goto part_err; 1164 1173 1165 1174 part_err: 1166 - pm_runtime_mark_last_busy(wl->dev); 1167 1175 pm_runtime_put_autosuspend(wl->dev); 1168 1176 1169 1177 skip_write: ··· 1237 1247 1238 1248 ret = wl12xx_cmd_config_fwlog(wl); 1239 1249 1240 - pm_runtime_mark_last_busy(wl->dev); 1241 1250 pm_runtime_put_autosuspend(wl->dev); 1242 1251 1243 1252 out:
-36
drivers/net/wireless/ti/wlcore/main.c
··· 154 154 jiffies + msecs_to_jiffies(wl->conf.rx_streaming.duration)); 155 155 156 156 out_sleep: 157 - pm_runtime_mark_last_busy(wl->dev); 158 157 pm_runtime_put_autosuspend(wl->dev); 159 158 out: 160 159 mutex_unlock(&wl->mutex); ··· 180 181 goto out_sleep; 181 182 182 183 out_sleep: 183 - pm_runtime_mark_last_busy(wl->dev); 184 184 pm_runtime_put_autosuspend(wl->dev); 185 185 out: 186 186 mutex_unlock(&wl->mutex); ··· 232 234 } 233 235 234 236 out_sleep: 235 - pm_runtime_mark_last_busy(wl->dev); 236 237 pm_runtime_put_autosuspend(wl->dev); 237 238 out: 238 239 mutex_unlock(&wl->mutex); ··· 708 711 } 709 712 710 713 err_ret: 711 - pm_runtime_mark_last_busy(wl->dev); 712 714 pm_runtime_put_autosuspend(wl->dev); 713 715 714 716 out: ··· 1043 1047 } 1044 1048 1045 1049 wlcore_op_stop_locked(wl); 1046 - pm_runtime_mark_last_busy(wl->dev); 1047 1050 pm_runtime_put_autosuspend(wl->dev); 1048 1051 1049 1052 ieee80211_restart_hw(wl->hw); ··· 1938 1943 goto out_sleep; 1939 1944 1940 1945 out_sleep: 1941 - pm_runtime_mark_last_busy(wl->dev); 1942 1946 pm_runtime_put_autosuspend(wl->dev); 1943 1947 1944 1948 out: ··· 2125 2131 2126 2132 wl12xx_cmd_stop_channel_switch(wl, wlvif); 2127 2133 2128 - pm_runtime_mark_last_busy(wl->dev); 2129 2134 pm_runtime_put_autosuspend(wl->dev); 2130 2135 out: 2131 2136 mutex_unlock(&wl->mutex); ··· 2194 2201 /* cancel the ROC if active */ 2195 2202 wlcore_update_inconn_sta(wl, wlvif, NULL, false); 2196 2203 2197 - pm_runtime_mark_last_busy(wl->dev); 2198 2204 pm_runtime_put_autosuspend(wl->dev); 2199 2205 out: 2200 2206 mutex_unlock(&wl->mutex); ··· 2686 2694 else 2687 2695 wl->sta_count++; 2688 2696 out: 2689 - pm_runtime_mark_last_busy(wl->dev); 2690 2697 pm_runtime_put_autosuspend(wl->dev); 2691 2698 out_unlock: 2692 2699 mutex_unlock(&wl->mutex); ··· 2765 2774 } 2766 2775 } 2767 2776 2768 - pm_runtime_mark_last_busy(wl->dev); 2769 2777 pm_runtime_put_autosuspend(wl->dev); 2770 2778 } 2771 2779 deinit: ··· 3190 3200 } 3191 3201 3192 3202 out_sleep: 3193 - pm_runtime_mark_last_busy(wl->dev); 3194 3203 pm_runtime_put_autosuspend(wl->dev); 3195 3204 3196 3205 out: ··· 3304 3315 */ 3305 3316 3306 3317 out_sleep: 3307 - pm_runtime_mark_last_busy(wl->dev); 3308 3318 pm_runtime_put_autosuspend(wl->dev); 3309 3319 3310 3320 out: ··· 3519 3531 3520 3532 ret = wlcore_hw_set_key(wl, cmd, vif, sta, key_conf); 3521 3533 3522 - pm_runtime_mark_last_busy(wl->dev); 3523 3534 pm_runtime_put_autosuspend(wl->dev); 3524 3535 3525 3536 out_wake_queues: ··· 3682 3695 } 3683 3696 3684 3697 out_sleep: 3685 - pm_runtime_mark_last_busy(wl->dev); 3686 3698 pm_runtime_put_autosuspend(wl->dev); 3687 3699 3688 3700 out_unlock: ··· 3710 3724 goto out; 3711 3725 } 3712 3726 3713 - pm_runtime_mark_last_busy(wl->dev); 3714 3727 pm_runtime_put_autosuspend(wl->dev); 3715 3728 out: 3716 3729 mutex_unlock(&wl->mutex); ··· 3757 3772 3758 3773 ret = wlcore_scan(hw->priv, vif, ssid, len, req); 3759 3774 out_sleep: 3760 - pm_runtime_mark_last_busy(wl->dev); 3761 3775 pm_runtime_put_autosuspend(wl->dev); 3762 3776 out: 3763 3777 mutex_unlock(&wl->mutex); ··· 3807 3823 ieee80211_scan_completed(wl->hw, &info); 3808 3824 3809 3825 out_sleep: 3810 - pm_runtime_mark_last_busy(wl->dev); 3811 3826 pm_runtime_put_autosuspend(wl->dev); 3812 3827 out: 3813 3828 mutex_unlock(&wl->mutex); ··· 3843 3860 wl->sched_vif = wlvif; 3844 3861 3845 3862 out_sleep: 3846 - pm_runtime_mark_last_busy(wl->dev); 3847 3863 pm_runtime_put_autosuspend(wl->dev); 3848 3864 out: 3849 3865 mutex_unlock(&wl->mutex); ··· 3869 3887 3870 3888 wl->ops->sched_scan_stop(wl, wlvif); 3871 3889 3872 - pm_runtime_mark_last_busy(wl->dev); 3873 3890 pm_runtime_put_autosuspend(wl->dev); 3874 3891 out: 3875 3892 mutex_unlock(&wl->mutex); ··· 3897 3916 if (ret < 0) 3898 3917 wl1271_warning("wl1271_op_set_frag_threshold failed: %d", ret); 3899 3918 3900 - pm_runtime_mark_last_busy(wl->dev); 3901 3919 pm_runtime_put_autosuspend(wl->dev); 3902 3920 3903 3921 out: ··· 3928 3948 if (ret < 0) 3929 3949 wl1271_warning("set rts threshold failed: %d", ret); 3930 3950 } 3931 - pm_runtime_mark_last_busy(wl->dev); 3932 3951 pm_runtime_put_autosuspend(wl->dev); 3933 3952 3934 3953 out: ··· 4693 4714 else 4694 4715 wl1271_bss_info_changed_sta(wl, vif, bss_conf, changed); 4695 4716 4696 - pm_runtime_mark_last_busy(wl->dev); 4697 4717 pm_runtime_put_autosuspend(wl->dev); 4698 4718 4699 4719 out: ··· 4757 4779 } 4758 4780 } 4759 4781 4760 - pm_runtime_mark_last_busy(wl->dev); 4761 4782 pm_runtime_put_autosuspend(wl->dev); 4762 4783 out: 4763 4784 mutex_unlock(&wl->mutex); ··· 4805 4828 wlvif->radar_enabled = true; 4806 4829 } 4807 4830 4808 - pm_runtime_mark_last_busy(wl->dev); 4809 4831 pm_runtime_put_autosuspend(wl->dev); 4810 4832 out: 4811 4833 mutex_unlock(&wl->mutex); ··· 4847 4871 wlvif->radar_enabled = false; 4848 4872 } 4849 4873 4850 - pm_runtime_mark_last_busy(wl->dev); 4851 4874 pm_runtime_put_autosuspend(wl->dev); 4852 4875 out: 4853 4876 mutex_unlock(&wl->mutex); ··· 4916 4941 goto out_sleep; 4917 4942 } 4918 4943 out_sleep: 4919 - pm_runtime_mark_last_busy(wl->dev); 4920 4944 pm_runtime_put_autosuspend(wl->dev); 4921 4945 out: 4922 4946 mutex_unlock(&wl->mutex); ··· 4969 4995 0, 0); 4970 4996 4971 4997 out_sleep: 4972 - pm_runtime_mark_last_busy(wl->dev); 4973 4998 pm_runtime_put_autosuspend(wl->dev); 4974 4999 4975 5000 out: ··· 5002 5029 goto out_sleep; 5003 5030 5004 5031 out_sleep: 5005 - pm_runtime_mark_last_busy(wl->dev); 5006 5032 pm_runtime_put_autosuspend(wl->dev); 5007 5033 5008 5034 out: ··· 5314 5342 5315 5343 ret = wl12xx_update_sta_state(wl, wlvif, sta, old_state, new_state); 5316 5344 5317 - pm_runtime_mark_last_busy(wl->dev); 5318 5345 pm_runtime_put_autosuspend(wl->dev); 5319 5346 out: 5320 5347 mutex_unlock(&wl->mutex); ··· 5438 5467 ret = -EINVAL; 5439 5468 } 5440 5469 5441 - pm_runtime_mark_last_busy(wl->dev); 5442 5470 pm_runtime_put_autosuspend(wl->dev); 5443 5471 5444 5472 out: ··· 5481 5511 wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set); 5482 5512 ret = wl1271_acx_sta_rate_policies(wl, wlvif); 5483 5513 5484 - pm_runtime_mark_last_busy(wl->dev); 5485 5514 pm_runtime_put_autosuspend(wl->dev); 5486 5515 } 5487 5516 out: ··· 5535 5566 } 5536 5567 5537 5568 out_sleep: 5538 - pm_runtime_mark_last_busy(wl->dev); 5539 5569 pm_runtime_put_autosuspend(wl->dev); 5540 5570 5541 5571 out: ··· 5613 5645 set_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags); 5614 5646 5615 5647 out_sleep: 5616 - pm_runtime_mark_last_busy(wl->dev); 5617 5648 pm_runtime_put_autosuspend(wl->dev); 5618 5649 out: 5619 5650 mutex_unlock(&wl->mutex); ··· 5666 5699 ieee80211_queue_delayed_work(hw, &wl->roc_complete_work, 5667 5700 msecs_to_jiffies(duration)); 5668 5701 out_sleep: 5669 - pm_runtime_mark_last_busy(wl->dev); 5670 5702 pm_runtime_put_autosuspend(wl->dev); 5671 5703 out: 5672 5704 mutex_unlock(&wl->mutex); ··· 5714 5748 5715 5749 ret = __wlcore_roc_completed(wl); 5716 5750 5717 - pm_runtime_mark_last_busy(wl->dev); 5718 5751 pm_runtime_put_autosuspend(wl->dev); 5719 5752 out: 5720 5753 mutex_unlock(&wl->mutex); ··· 5804 5839 sinfo->signal = rssi_dbm; 5805 5840 5806 5841 out_sleep: 5807 - pm_runtime_mark_last_busy(wl->dev); 5808 5842 pm_runtime_put_autosuspend(wl->dev); 5809 5843 5810 5844 out:
-1
drivers/net/wireless/ti/wlcore/scan.c
··· 69 69 70 70 wlcore_cmd_regdomain_config_locked(wl); 71 71 72 - pm_runtime_mark_last_busy(wl->dev); 73 72 pm_runtime_put_autosuspend(wl->dev); 74 73 75 74 ieee80211_scan_completed(wl->hw, &info);
-1
drivers/net/wireless/ti/wlcore/sysfs.c
··· 58 58 goto out; 59 59 60 60 wl1271_acx_sg_enable(wl, wl->sg_enabled); 61 - pm_runtime_mark_last_busy(wl->dev); 62 61 pm_runtime_put_autosuspend(wl->dev); 63 62 64 63 out:
-2
drivers/net/wireless/ti/wlcore/testmode.c
··· 127 127 } 128 128 129 129 out_sleep: 130 - pm_runtime_mark_last_busy(wl->dev); 131 130 pm_runtime_put_autosuspend(wl->dev); 132 131 out: 133 132 mutex_unlock(&wl->mutex); ··· 191 192 out_free: 192 193 kfree(cmd); 193 194 out_sleep: 194 - pm_runtime_mark_last_busy(wl->dev); 195 195 pm_runtime_put_autosuspend(wl->dev); 196 196 out: 197 197 mutex_unlock(&wl->mutex);
-1
drivers/net/wireless/ti/wlcore/tx.c
··· 863 863 goto out; 864 864 } 865 865 866 - pm_runtime_mark_last_busy(wl->dev); 867 866 pm_runtime_put_autosuspend(wl->dev); 868 867 out: 869 868 mutex_unlock(&wl->mutex);
-3
drivers/net/wireless/ti/wlcore/vendor_cmd.c
··· 60 60 ret = wlcore_smart_config_start(wl, 61 61 nla_get_u32(tb[WLCORE_VENDOR_ATTR_GROUP_ID])); 62 62 63 - pm_runtime_mark_last_busy(wl->dev); 64 63 pm_runtime_put_autosuspend(wl->dev); 65 64 out: 66 65 mutex_unlock(&wl->mutex); ··· 91 92 92 93 ret = wlcore_smart_config_stop(wl); 93 94 94 - pm_runtime_mark_last_busy(wl->dev); 95 95 pm_runtime_put_autosuspend(wl->dev); 96 96 out: 97 97 mutex_unlock(&wl->mutex); ··· 138 140 nla_len(tb[WLCORE_VENDOR_ATTR_GROUP_KEY]), 139 141 nla_data(tb[WLCORE_VENDOR_ATTR_GROUP_KEY])); 140 142 141 - pm_runtime_mark_last_busy(wl->dev); 142 143 pm_runtime_put_autosuspend(wl->dev); 143 144 out: 144 145 mutex_unlock(&wl->mutex);
+1
drivers/net/wireless/virtual/mac80211_hwsim.c
··· 5793 5793 ieee80211_hw_set(hw, NO_AUTO_VIF); 5794 5794 5795 5795 wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 5796 + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_PUNCT); 5796 5797 5797 5798 for (i = 0; i < ARRAY_SIZE(data->link_data); i++) { 5798 5799 hrtimer_setup(&data->link_data[i].beacon_timer, mac80211_hwsim_beacon,
+18
include/net/cfg80211.h
··· 1015 1015 cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1, 1016 1016 const struct cfg80211_chan_def *chandef2); 1017 1017 1018 + 1018 1019 /** 1019 1020 * nl80211_chan_width_to_mhz - get the channel width in MHz 1020 1021 * @chan_width: the channel width from &enum nl80211_chan_width ··· 5684 5683 * 5685 5684 * @rts_threshold: RTS threshold (dot11RTSThreshold); 5686 5685 * -1 (default) = RTS/CTS disabled 5686 + * @radio_debugfsdir: Pointer to debugfs directory containing the radio- 5687 + * specific parameters. 5688 + * NULL (default) = Debugfs directory not created 5687 5689 */ 5688 5690 struct wiphy_radio_cfg { 5689 5691 u32 rts_threshold; 5692 + struct dentry *radio_debugfsdir; 5690 5693 }; 5691 5694 5692 5695 /** ··· 6886 6881 6887 6882 return ieee80211_frequency_to_channel(chan->center_freq) % 16 == 5; 6888 6883 } 6884 + 6885 + /** 6886 + * ieee80211_radio_freq_range_valid - Check if the radio supports the 6887 + * specified frequency range 6888 + * 6889 + * @radio: wiphy radio 6890 + * @freq: the frequency (in KHz) to be queried 6891 + * @width: the bandwidth (in KHz) to be queried 6892 + * 6893 + * Return: whether or not the given frequency range is valid for the given radio 6894 + */ 6895 + bool ieee80211_radio_freq_range_valid(const struct wiphy_radio *radio, 6896 + u32 freq, u32 width); 6889 6897 6890 6898 /** 6891 6899 * cfg80211_radio_chandef_valid - Check if the radio supports the chandef
+19 -1
include/net/ieee80211_radiotap.h
··· 1 1 /* 2 2 * Copyright (c) 2017 Intel Deutschland GmbH 3 - * Copyright (c) 2018-2019, 2021-2022 Intel Corporation 3 + * Copyright (c) 2018-2019, 2021-2022, 2025 Intel Corporation 4 4 * 5 5 * Permission to use, copy, modify, and/or distribute this software for any 6 6 * purpose with or without fee is hereby granted, provided that the above ··· 201 201 IEEE80211_RADIOTAP_CODING_LDPC_USER2 = 0x04, 202 202 IEEE80211_RADIOTAP_CODING_LDPC_USER3 = 0x08, 203 203 }; 204 + 205 + enum ieee80211_radiotap_vht_bandwidth { 206 + /* Note: more values are defined but can't really be used */ 207 + IEEE80211_RADIOTAP_VHT_BW_20 = 0, 208 + IEEE80211_RADIOTAP_VHT_BW_40 = 1, 209 + IEEE80211_RADIOTAP_VHT_BW_80 = 4, 210 + IEEE80211_RADIOTAP_VHT_BW_160 = 11, 211 + }; 212 + 213 + struct ieee80211_radiotap_vht { 214 + __le16 known; 215 + u8 flags; 216 + u8 bandwidth; 217 + u8 mcs_nss[4]; 218 + u8 coding; 219 + u8 group_id; 220 + __le16 partial_aid; 221 + } __packed; 204 222 205 223 /* for IEEE80211_RADIOTAP_TIMESTAMP */ 206 224 enum ieee80211_radiotap_timestamp_unit_spos {
+2
include/net/mac80211.h
··· 1529 1529 * known the frame shouldn't be reported. 1530 1530 * @RX_FLAG_8023: the frame has an 802.3 header (decap offload performed by 1531 1531 * hardware or driver) 1532 + * @RX_FLAG_RADIOTAP_VHT: VHT radiotap data is present 1532 1533 */ 1533 1534 enum mac80211_rx_flags { 1534 1535 RX_FLAG_MMIC_ERROR = BIT(0), ··· 1565 1564 RX_FLAG_RADIOTAP_LSIG = BIT(28), 1566 1565 RX_FLAG_NO_PSDU = BIT(29), 1567 1566 RX_FLAG_8023 = BIT(30), 1567 + RX_FLAG_RADIOTAP_VHT = BIT(31), 1568 1568 }; 1569 1569 1570 1570 /**
+12 -2
net/mac80211/mlme.c
··· 2508 2508 2509 2509 link->u.mgd.csa.waiting_bcn = true; 2510 2510 2511 + /* 2512 + * The next beacon really should always be different, so this should 2513 + * have no effect whatsoever. However, some APs (we observed this in 2514 + * an Asus AXE11000), the beacon after the CSA might be identical to 2515 + * the last beacon on the old channel - in this case we'd ignore it. 2516 + * Resetting the CRC will lead us to handle it better (albeit with a 2517 + * disconnect, but clearly the AP is broken.) 2518 + */ 2519 + link->u.mgd.beacon_crc_valid = false; 2520 + 2511 2521 /* apply new TPE restrictions immediately on the new channel */ 2512 2522 if (link->u.mgd.csa.ap_chandef.chan->band == NL80211_BAND_6GHZ && 2513 2523 link->u.mgd.conn.mode >= IEEE80211_CONN_MODE_HE) { ··· 6620 6610 * Response frame shall be set to the broadcast address [..]" 6621 6611 * So, on 6GHz band we should also accept broadcast responses. 6622 6612 */ 6623 - channel = ieee80211_get_channel(sdata->local->hw.wiphy, 6624 - rx_status->freq); 6613 + channel = ieee80211_get_channel_khz(sdata->local->hw.wiphy, 6614 + ieee80211_rx_status_to_khz(rx_status)); 6625 6615 if (!channel) 6626 6616 return; 6627 6617
+129 -43
net/mac80211/rx.c
··· 59 59 status->flag &= ~(RX_FLAG_RADIOTAP_TLV_AT_END | 60 60 RX_FLAG_RADIOTAP_LSIG | 61 61 RX_FLAG_RADIOTAP_HE_MU | 62 - RX_FLAG_RADIOTAP_HE); 62 + RX_FLAG_RADIOTAP_HE | 63 + RX_FLAG_RADIOTAP_VHT); 63 64 64 65 hdr = (void *)skb->data; 65 66 fc = hdr->frame_control; ··· 152 151 } 153 152 154 153 if (status->encoding == RX_ENC_VHT) { 154 + /* Included even if RX_FLAG_RADIOTAP_VHT is not set */ 155 155 len = ALIGN(len, 2); 156 156 len += 12; 157 + BUILD_BUG_ON(sizeof(struct ieee80211_radiotap_vht) != 12); 157 158 } 158 159 159 160 if (local->hw.radiotap_timestamp.units_pos >= 0) { ··· 198 195 * The position to look at depends on the existence (or non- 199 196 * existence) of other elements, so take that into account... 200 197 */ 198 + if (status->flag & RX_FLAG_RADIOTAP_VHT) 199 + tlv_offset += 200 + sizeof(struct ieee80211_radiotap_vht); 201 201 if (status->flag & RX_FLAG_RADIOTAP_HE) 202 202 tlv_offset += 203 203 sizeof(struct ieee80211_radiotap_he); ··· 325 319 u32 tlvs_len = 0; 326 320 int mpdulen, chain; 327 321 unsigned long chains = status->chains; 322 + struct ieee80211_radiotap_vht vht = {}; 328 323 struct ieee80211_radiotap_he he = {}; 329 324 struct ieee80211_radiotap_he_mu he_mu = {}; 330 325 struct ieee80211_radiotap_lsig lsig = {}; 326 + 327 + if (status->flag & RX_FLAG_RADIOTAP_VHT) { 328 + vht = *(struct ieee80211_radiotap_vht *)skb->data; 329 + skb_pull(skb, sizeof(vht)); 330 + WARN_ON_ONCE(status->encoding != RX_ENC_VHT); 331 + } 331 332 332 333 if (status->flag & RX_FLAG_RADIOTAP_HE) { 333 334 he = *(struct ieee80211_radiotap_he *)skb->data; ··· 543 530 } 544 531 545 532 if (status->encoding == RX_ENC_VHT) { 546 - u16 known = local->hw.radiotap_vht_details; 533 + u16 fill = local->hw.radiotap_vht_details; 547 534 548 - rthdr->it_present |= cpu_to_le32(BIT(IEEE80211_RADIOTAP_VHT)); 549 - put_unaligned_le16(known, pos); 550 - pos += 2; 551 - /* flags */ 552 - if (status->enc_flags & RX_ENC_FLAG_SHORT_GI) 553 - *pos |= IEEE80211_RADIOTAP_VHT_FLAG_SGI; 535 + /* Leave driver filled fields alone */ 536 + fill &= ~le16_to_cpu(vht.known); 537 + vht.known |= cpu_to_le16(fill); 538 + 539 + if (fill & IEEE80211_RADIOTAP_VHT_KNOWN_GI && 540 + status->enc_flags & RX_ENC_FLAG_SHORT_GI) 541 + vht.flags |= IEEE80211_RADIOTAP_VHT_FLAG_SGI; 554 542 /* in VHT, STBC is binary */ 555 - if (status->enc_flags & RX_ENC_FLAG_STBC_MASK) 556 - *pos |= IEEE80211_RADIOTAP_VHT_FLAG_STBC; 557 - if (status->enc_flags & RX_ENC_FLAG_BF) 543 + if (fill & IEEE80211_RADIOTAP_VHT_KNOWN_STBC && 544 + status->enc_flags & RX_ENC_FLAG_STBC_MASK) 545 + vht.flags |= IEEE80211_RADIOTAP_VHT_FLAG_STBC; 546 + if (fill & IEEE80211_RADIOTAP_VHT_KNOWN_BEAMFORMED && 547 + status->enc_flags & RX_ENC_FLAG_BF) 558 548 *pos |= IEEE80211_RADIOTAP_VHT_FLAG_BEAMFORMED; 559 - pos++; 560 - /* bandwidth */ 561 - switch (status->bw) { 562 - case RATE_INFO_BW_80: 563 - *pos++ = 4; 564 - break; 565 - case RATE_INFO_BW_160: 566 - *pos++ = 11; 567 - break; 568 - case RATE_INFO_BW_40: 569 - *pos++ = 1; 570 - break; 571 - default: 572 - *pos++ = 0; 549 + 550 + if (fill & IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH) { 551 + switch (status->bw) { 552 + case RATE_INFO_BW_40: 553 + vht.bandwidth = IEEE80211_RADIOTAP_VHT_BW_40; 554 + break; 555 + case RATE_INFO_BW_80: 556 + vht.bandwidth = IEEE80211_RADIOTAP_VHT_BW_80; 557 + break; 558 + case RATE_INFO_BW_160: 559 + vht.bandwidth = IEEE80211_RADIOTAP_VHT_BW_160; 560 + break; 561 + default: 562 + vht.bandwidth = IEEE80211_RADIOTAP_VHT_BW_20; 563 + break; 564 + } 573 565 } 574 - /* MCS/NSS */ 575 - *pos = (status->rate_idx << 4) | status->nss; 576 - pos += 4; 577 - /* coding field */ 578 - if (status->enc_flags & RX_ENC_FLAG_LDPC) 579 - *pos |= IEEE80211_RADIOTAP_CODING_LDPC_USER0; 580 - pos++; 581 - /* group ID */ 582 - pos++; 583 - /* partial_aid */ 584 - pos += 2; 566 + 567 + /* 568 + * If the driver filled in mcs_nss[0], then do not touch it. 569 + * 570 + * Otherwise, put some information about MCS/NSS into the 571 + * user 0 field. Note that this is not technically correct for 572 + * an MU frame as we might have decoded a different user. 573 + */ 574 + if (!vht.mcs_nss[0]) { 575 + vht.mcs_nss[0] = (status->rate_idx << 4) | status->nss; 576 + 577 + /* coding field */ 578 + if (status->enc_flags & RX_ENC_FLAG_LDPC) 579 + vht.coding |= IEEE80211_RADIOTAP_CODING_LDPC_USER0; 580 + } 581 + 582 + /* ensure 2 byte alignment */ 583 + while ((pos - (u8 *)rthdr) & 1) 584 + pos++; 585 + rthdr->it_present |= cpu_to_le32(BIT(IEEE80211_RADIOTAP_VHT)); 586 + memcpy(pos, &vht, sizeof(vht)); 587 + pos += sizeof(vht); 585 588 } 586 589 587 590 if (local->hw.radiotap_timestamp.units_pos >= 0) { ··· 792 763 return skb; 793 764 } 794 765 766 + static bool 767 + ieee80211_validate_monitor_radio(struct ieee80211_sub_if_data *sdata, 768 + struct ieee80211_local *local, 769 + struct ieee80211_rx_status *status) 770 + { 771 + struct wiphy *wiphy = local->hw.wiphy; 772 + int i, freq, bw; 773 + 774 + if (!wiphy->n_radio) 775 + return true; 776 + 777 + switch (status->bw) { 778 + case RATE_INFO_BW_20: 779 + bw = 20000; 780 + break; 781 + case RATE_INFO_BW_40: 782 + bw = 40000; 783 + break; 784 + case RATE_INFO_BW_80: 785 + bw = 80000; 786 + break; 787 + case RATE_INFO_BW_160: 788 + bw = 160000; 789 + break; 790 + case RATE_INFO_BW_320: 791 + bw = 320000; 792 + break; 793 + default: 794 + return false; 795 + } 796 + 797 + freq = MHZ_TO_KHZ(status->freq); 798 + 799 + for (i = 0; i < wiphy->n_radio; i++) { 800 + if (!(sdata->wdev.radio_mask & BIT(i))) 801 + continue; 802 + 803 + if (!ieee80211_radio_freq_range_valid(&wiphy->radio[i], freq, bw)) 804 + continue; 805 + 806 + return true; 807 + } 808 + return false; 809 + } 810 + 795 811 /* 796 812 * This function copies a received frame to all monitor interfaces and 797 813 * returns a cleaned-up SKB that no longer includes the FCS nor the ··· 862 788 dev_kfree_skb(origskb); 863 789 return NULL; 864 790 } 791 + 792 + if (status->flag & RX_FLAG_RADIOTAP_VHT) 793 + rtap_space += sizeof(struct ieee80211_radiotap_vht); 865 794 866 795 if (status->flag & RX_FLAG_RADIOTAP_HE) 867 796 rtap_space += sizeof(struct ieee80211_radiotap_he); ··· 930 853 chandef = &sdata->vif.bss_conf.chanreq.oper; 931 854 if (chandef->chan && 932 855 chandef->chan->center_freq != status->freq) 856 + continue; 857 + 858 + if (ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR) && 859 + !ieee80211_validate_monitor_radio(sdata, local, status)) 933 860 continue; 934 861 935 862 if (!prev_sdata) { ··· 3602 3521 3603 3522 switch (mgmt->u.action.category) { 3604 3523 case WLAN_CATEGORY_HT: 3605 - /* reject HT action frames from stations not supporting HT */ 3606 - if (!rx->link_sta->pub->ht_cap.ht_supported) 3524 + /* reject HT action frames from stations not supporting HT 3525 + * or not HE Capable 3526 + */ 3527 + if (!rx->link_sta->pub->ht_cap.ht_supported && 3528 + !rx->link_sta->pub->he_cap.has_he) 3607 3529 goto invalid; 3608 3530 3609 3531 if (sdata->vif.type != NL80211_IFTYPE_STATION && ··· 4987 4903 4988 4904 /* after this point, don't punt to the slowpath! */ 4989 4905 4906 + if (fast_rx->uses_rss) 4907 + stats = this_cpu_ptr(rx->link_sta->pcpu_rx_stats); 4908 + else 4909 + stats = &rx->link_sta->rx_stats; 4910 + 4990 4911 if (rx->key && !(status->flag & RX_FLAG_MIC_STRIPPED) && 4991 4912 pskb_trim(skb, skb->len - fast_rx->icv_len)) 4992 4913 goto drop; ··· 5026 4937 res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb); 5027 4938 switch (res) { 5028 4939 case RX_QUEUED: 4940 + stats->last_rx = jiffies; 4941 + stats->last_rate = sta_stats_encode_rate(status); 5029 4942 return true; 5030 4943 case RX_CONTINUE: 5031 4944 break; ··· 5040 4949 return true; 5041 4950 drop: 5042 4951 dev_kfree_skb(skb); 5043 - 5044 - if (fast_rx->uses_rss) 5045 - stats = this_cpu_ptr(rx->link_sta->pcpu_rx_stats); 5046 - else 5047 - stats = &rx->link_sta->rx_stats; 5048 4952 5049 4953 stats->dropped++; 5050 4954 return true;
+15
net/wireless/core.c
··· 34 34 /* name for sysfs, %d is appended */ 35 35 #define PHY_NAME "phy" 36 36 37 + /* maximum length of radio debugfs directory name */ 38 + #define RADIO_DEBUGFSDIR_MAX_LEN 8 39 + 37 40 MODULE_AUTHOR("Johannes Berg"); 38 41 MODULE_LICENSE("GPL"); 39 42 MODULE_DESCRIPTION("wireless configuration support"); ··· 1045 1042 /* add to debugfs */ 1046 1043 rdev->wiphy.debugfsdir = debugfs_create_dir(wiphy_name(&rdev->wiphy), 1047 1044 ieee80211_debugfs_dir); 1045 + if (wiphy->n_radio > 0) { 1046 + int idx; 1047 + char radio_name[RADIO_DEBUGFSDIR_MAX_LEN]; 1048 + 1049 + for (idx = 0; idx < wiphy->n_radio; idx++) { 1050 + scnprintf(radio_name, sizeof(radio_name), "radio%d", 1051 + idx); 1052 + wiphy->radio_cfg[idx].radio_debugfsdir = 1053 + debugfs_create_dir(radio_name, 1054 + rdev->wiphy.debugfsdir); 1055 + } 1056 + } 1048 1057 1049 1058 cfg80211_debugfs_rdev_add(rdev); 1050 1059 nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY);
+33
net/wireless/debugfs.c
··· 29 29 .llseek = generic_file_llseek, \ 30 30 } 31 31 32 + #define DEBUGFS_RADIO_READONLY_FILE(name, buflen, fmt, value...) \ 33 + static ssize_t name## _read(struct file *file, char __user *userbuf, \ 34 + size_t count, loff_t *ppos) \ 35 + { \ 36 + struct wiphy_radio_cfg *radio_cfg = file->private_data; \ 37 + char buf[buflen]; \ 38 + int res; \ 39 + \ 40 + res = scnprintf(buf, buflen, fmt "\n", ##value); \ 41 + return simple_read_from_buffer(userbuf, count, ppos, buf, res); \ 42 + } \ 43 + \ 44 + static const struct file_operations name## _ops = { \ 45 + .read = name## _read, \ 46 + .open = simple_open, \ 47 + .llseek = generic_file_llseek, \ 48 + } 49 + 32 50 DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d", 33 51 wiphy->rts_threshold); 34 52 DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d", ··· 55 37 wiphy->retry_short); 56 38 DEBUGFS_READONLY_FILE(long_retry_limit, 20, "%d", 57 39 wiphy->retry_long); 40 + 41 + DEBUGFS_RADIO_READONLY_FILE(radio_rts_threshold, 20, "%d", 42 + radio_cfg->rts_threshold); 58 43 59 44 static int ht_print_chan(struct ieee80211_channel *chan, 60 45 char *buf, int buf_size, int offset) ··· 121 100 #define DEBUGFS_ADD(name) \ 122 101 debugfs_create_file(#name, 0444, phyd, &rdev->wiphy, &name## _ops) 123 102 103 + #define DEBUGFS_RADIO_ADD(name, radio_idx) \ 104 + debugfs_create_file(#name, 0444, radiod, \ 105 + &rdev->wiphy.radio_cfg[radio_idx], \ 106 + &name## _ops) 107 + 124 108 void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev) 125 109 { 126 110 struct dentry *phyd = rdev->wiphy.debugfsdir; 111 + struct dentry *radiod; 112 + u8 i; 127 113 128 114 DEBUGFS_ADD(rts_threshold); 129 115 DEBUGFS_ADD(fragmentation_threshold); 130 116 DEBUGFS_ADD(short_retry_limit); 131 117 DEBUGFS_ADD(long_retry_limit); 132 118 DEBUGFS_ADD(ht40allow_map); 119 + 120 + for (i = 0; i < rdev->wiphy.n_radio; i++) { 121 + radiod = rdev->wiphy.radio_cfg[i].radio_debugfsdir; 122 + DEBUGFS_RADIO_ADD(radio_rts_threshold, i); 123 + } 133 124 } 134 125 135 126 struct debugfs_read_work {
+3
net/wireless/nl80211.c
··· 3544 3544 return -EINVAL; 3545 3545 } 3546 3546 3547 + if (cfg80211_chandef_is_s1g(chandef)) 3548 + chandef->width = NL80211_CHAN_WIDTH_1; 3549 + 3547 3550 if (attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) { 3548 3551 enum nl80211_channel_type chantype; 3549 3552
+3 -3
net/wireless/util.c
··· 2942 2942 } 2943 2943 EXPORT_SYMBOL(cfg80211_get_iftype_ext_capa); 2944 2944 2945 - static bool 2946 - ieee80211_radio_freq_range_valid(const struct wiphy_radio *radio, 2947 - u32 freq, u32 width) 2945 + bool ieee80211_radio_freq_range_valid(const struct wiphy_radio *radio, 2946 + u32 freq, u32 width) 2948 2947 { 2949 2948 const struct wiphy_radio_freq_range *r; 2950 2949 int i; ··· 2957 2958 2958 2959 return false; 2959 2960 } 2961 + EXPORT_SYMBOL(ieee80211_radio_freq_range_valid); 2960 2962 2961 2963 bool cfg80211_radio_chandef_valid(const struct wiphy_radio *radio, 2962 2964 const struct cfg80211_chan_def *chandef)