From bf44cb5fb0f510b89e7a651e650dbf71062441d9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 16 Aug 2026 17:36:39 +0000 Subject: [PATCH] mac80211: update to version 7.2 Refresh all patches. Drop the ones that are upstream now. Adapt the ath9k channel bandwidth debugfs patch to the removal of WIPHY_FLAG_SUPPORTS_5_10_MHZ, and the ath11k QCN6122 hw params to .max_tx_ring moving into struct ath11k_hw_hal_params as .num_tx_rings. Add build fixes for mwlwifi and mt76: the action code moved out of the per-type action frame structs into the common part of struct ieee80211_mgmt and the union lost its 'u' name, ieee80211_get_fils_discovery_tmpl() and ieee80211_get_unsol_bcast_probe_resp_tmpl() take a link id, and the EML capability defines were renamed. Signed-off-by: Felix Fietkau --- package/kernel/mac80211/Makefile | 6 +- .../patches/ath/402-ath_regd_optional.patch | 2 +- .../patches/ath/404-regd_no_assoc_hints.patch | 4 +- .../ath10k/080-ath10k_thermal_config.patch | 4 +- ...21-ath10k_init_devices_synchronously.patch | 2 +- .../930-ath10k_add_tpt_led_trigger.patch | 4 +- ...75-ath10k-use-tpt-trigger-by-default.patch | 7 +- ...h10k-Try-to-get-mac-address-from-dts.patch | 2 +- ...k-always-use-mac80211-loss-detection.patch | 2 +- .../ath10k/990-ath10k-small-buffers.patch | 8 +- .../991-ath10k-support-flush_sta-method.patch | 6 +- ...i-ath11k-use-unique-QRTR-instance-ID.patch | 8 +- ...wrong-usage-of-resource_size-causing.patch | 4 +- ...ort-setting-bdf-addr-and-caldb-addr-.patch | 10 +- ...k_mac_op_flush_sta-to-properly-flush.patch | 4 +- ...k-control-thermal-support-via-symbol.patch | 13 +- ...upport-setting-FW-memory-mode-via-DT.patch | 6 +- ...tersection-support-for-regulatory-ru.patch | 18 +- ...-ath11k-disable-coldboot-for-ipq6018.patch | 2 +- ...ble-coldboot-calibration-for-ipq5018.patch | 4 +- ...apped-ce-accessing-issue-on-64bit-OS.patch | 6 +- ...ifi-ath11k-add-hw-params-for-QCN6122.patch | 13 +- ...wifi-ath11k-add-hal-regs-for-QCN6122.patch | 8 +- ...-ath11k-add-hw-ring-mask-for-QCN6122.patch | 4 +- ...k-update-hif_and-pci_ops-for-QCN6122.patch | 4 +- ...h11k-add-multipd-support-for-QCN6122.patch | 14 +- ...fi-ath11k-add-QCN6122-device-support.patch | 2 +- ...11k-Support-to-assign-m3-dump-memory.patch | 2 +- ...8-wifi-ath11k-Fix-the-WMM-param-type.patch | 2 +- ...49-wifi-ath11k-fix-monitor-rx-pktlen.patch | 6 +- ...dd-basic-hwmon-temperature-reporting.patch | 380 ---------------- ...0-ath12k-prevent-ltssm-startup-crash.patch | 2 +- ...k-limit-WMI_SCAN_CHAN_LIST_CMDID-arg.patch | 8 +- ...k-fix-5GHz-operation-on-wideband-QCN.patch | 2 +- ...2k-convert-tasklet-to-BH-workqueue-f.patch | 14 +- ...k-control-thermal-support-via-symbol.patch | 10 +- ...12k-read-calibration-variant-from-dt.patch | 4 +- .../341-wifi-ath9k-obtain-system-gpios.patch | 273 ------------ ...erpret-requested-txpower-in-EIRP-dom.patch | 4 +- ...power-reduction-for-US-regulatory-do.patch | 2 +- .../ath9k/410-ath9k_allow_adhoc_and_ap.patch | 2 +- ...abled-MFP-capability-unconditionally.patch | 4 +- .../patches/ath9k/501-ath9k_ahb_init.patch | 2 +- .../ath9k/512-ath9k_channelbw_debugfs.patch | 5 +- .../patches/ath9k/530-ath9k_extra_leds.patch | 2 +- .../ath9k/542-ath9k_debugfs_diag.patch | 2 +- .../mac80211/patches/ath9k/550-ath9k-of.patch | 6 +- .../ath9k/551-ath9k_ubnt_uap_plus_hsr.patch | 2 +- ...Clear-DMA-descriptors-without-memset.patch | 108 ----- ...9k-remove-TX99-power-array-zero-init.patch | 34 -- .../810-b43-gpio-mask-module-option.patch | 2 +- .../patches/brcm/811-b43_no_pio.patch | 2 +- .../brcm/812-b43-add-antenna-control.patch | 16 +- .../814-b43-only-use-gpio-0-1-for-led.patch | 2 +- ...fer-a-ccode-from-OTP-over-nvram-file.patch | 2 +- ...ac-Increase-power-saving-delay-to-2s.patch | 2 +- ...upport-DS1-exit-firmware-re-download.patch | 18 +- ...eroperating-DPP-and-other-encryption.patch | 4 +- ...mfmac-disable-dump_survey-on-bcm2835.patch | 6 +- .../patches/build/006-crypto_aes.patch | 61 +++ .../100-backports-drop-QRTR-and-MHI.patch | 6 +- .../patches/build/140-trace_backport.patch | 2 +- .../patches/build/150-sysfs-backport.patch | 24 + .../210-wireless_netns_local_backport.patch | 6 +- .../220-brcmfmac_usb_driver_backport.patch | 2 +- ...x-init_vqs-build-error-on-kernel-6.6.patch | 30 -- .../240-realtek-rtw88-BH-workqueue.patch | 14 - .../build/400-restore-old-debugfs_fops.patch | 4 +- ...-convert-short-fops-to-debugfs-files.patch | 12 +- .../patches/build/500-fix_build_on_6_18.patch | 15 - ...01-wifi-mt7601u-update-firmware-path.patch | 2 +- ...-freeze-for-60-seconds-caused-by-req.patch | 66 --- ...lace-one-element-arrays-with-flexibl.patch | 131 ------ ...i-rt2800-add-support-for-eeprom-file.patch | 89 ++++ ...support-for-loading-EEPROM-from-user.patch | 225 ---------- ...-wifi-rt2x00-add-eeprom-data-binding.patch | 63 +++ ...-support-for-loading-EEPROM-from-MTD.patch | 75 ++-- ...port-loading-eeprom-from-NVMEM-cells.patch | 81 ---- ...EEPROM-from-devicetree-embedded-data.patch | 76 ---- ...00-allow_disabling_bands_through_dts.patch | 2 +- ...0-rt2x00-change-led-polarity-from-OF.patch | 8 +- .../611-rt2x00-add-AP+STA-support.patch | 2 +- ...spect-rt2800-hardware-TX-queue-index.patch | 12 +- ...ease-the-watchdog-sampling-frequency.patch | 2 +- ...librate-MT7620-when-switching-channe.patch | 8 +- ...-rt2x00-rework-link-tuner-for-MT7620.patch | 6 +- ...rrect-MT7620-SDM-mode-register-value.patch | 2 +- ...gister-operation-on-RXIQ-calibration.patch | 2 +- ...FCSR-register-init-values-for-RT5592.patch | 18 +- ...-BBP-register-init-values-for-RT5592.patch | 18 +- ...t-support-for-external-LNA-on-MT7620.patch | 16 +- ...duce-accessors-for-CHIP_VER-register.patch | 8 +- ...-differentiate-based-on-SoC-CHIP_VER.patch | 22 +- .../110-mac80211_keep_keys_on_stop_ap.patch | 8 +- .../patches/subsys/130-disable_auto_vif.patch | 2 +- .../mac80211/patches/subsys/210-ap_scan.patch | 2 +- .../patches/subsys/220-allow-ibss-mixed.patch | 2 +- .../230-avoid-crashing-missing-band.patch | 2 +- ...domize-BA-session-dialog-token-alloc.patch | 4 +- ...crease-quantum-for-airtime-scheduler.patch | 8 +- ...race-period-for-DFS-available-after-.patch | 26 +- ...oncurrent-AP-operation-on-DFS-channe.patch | 12 +- ...dd-AQL-support-for-broadcast-packets.patch | 26 +- ...c80211-add-ieee80211_txq_aql_pending.patch | 4 +- ...llow-scanning-while-on-radar-channel.patch | 399 ----------------- ...out-part-of-ieee80211_calc_expected_.patch | 2 +- ...e-expected-throughput-if-not-provide.patch | 4 +- ...prove-interface-iteration-ergonomics.patch | 148 ------ ...improve-station-iteration-ergonomics.patch | 102 ----- ...d-MLO-support-to-ieee80211_probe_cli.patch | 64 --- ...d-eMLSR-eMLMR-action-frame-parsing-s.patch | 421 ------------------ ...assoc_link_id-in-station-info-for-no.patch | 33 -- ...tify-driver-on-airtime-weight-change.patch | 14 +- ...-mac80211-support-kernel-version-7.1.patch | 91 ++++ ...-mac80211-support-kernel-version-7.1.patch | 42 ++ 115 files changed, 705 insertions(+), 2918 deletions(-) delete mode 100644 package/kernel/mac80211/patches/ath12k/001-v7.1-wifi-ath12k-add-basic-hwmon-temperature-reporting.patch delete mode 100644 package/kernel/mac80211/patches/ath9k/341-wifi-ath9k-obtain-system-gpios.patch delete mode 100644 package/kernel/mac80211/patches/ath9k/600-wifi-ath9k-Clear-DMA-descriptors-without-memset.patch delete mode 100644 package/kernel/mac80211/patches/ath9k/601-wifi-ath9k-remove-TX99-power-array-zero-init.patch create mode 100644 package/kernel/mac80211/patches/build/006-crypto_aes.patch create mode 100644 package/kernel/mac80211/patches/build/150-sysfs-backport.patch delete mode 100644 package/kernel/mac80211/patches/build/230-fix-init_vqs-build-error-on-kernel-6.6.patch delete mode 100644 package/kernel/mac80211/patches/build/240-realtek-rtw88-BH-workqueue.patch delete mode 100644 package/kernel/mac80211/patches/build/500-fix_build_on_6_18.patch delete mode 100644 package/kernel/mac80211/patches/mwl/110-wifi-mwifiex-fix-freeze-for-60-seconds-caused-by-req.patch delete mode 100644 package/kernel/mac80211/patches/mwl/111-wifi-mwifiex-replace-one-element-arrays-with-flexibl.patch create mode 100644 package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2800-add-support-for-eeprom-file.patch delete mode 100644 package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch create mode 100644 package/kernel/mac80211/patches/rt2x00/602-02-wifi-rt2x00-add-eeprom-data-binding.patch delete mode 100644 package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch delete mode 100644 package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch delete mode 100644 package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch delete mode 100644 package/kernel/mac80211/patches/subsys/362-wifi-mac80211-improve-interface-iteration-ergonomics.patch delete mode 100644 package/kernel/mac80211/patches/subsys/363-wifi-mac80211-improve-station-iteration-ergonomics.patch delete mode 100644 package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch delete mode 100644 package/kernel/mac80211/patches/subsys/371-wifi-mac80211-Add-eMLSR-eMLMR-action-frame-parsing-s.patch delete mode 100644 package/kernel/mac80211/patches/subsys/380-mac80211-report-assoc_link_id-in-station-info-for-no.patch create mode 100644 package/kernel/mt76/patches/100-mac80211-support-kernel-version-7.1.patch create mode 100644 package/kernel/mwlwifi/patches/101-mac80211-support-kernel-version-7.1.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 61943b4a089..fae8ee72b92 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=6.18.39 -PKG_RELEASE:=3 +PKG_VERSION:=7.2 +PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING PKG_SOURCE_URL:=https://github.com/openwrt/backports/releases/download/backports-v$(PKG_VERSION) -PKG_HASH:=8951c1e270d7c311432377bd50951cd1d5dee2b5fedf33d30db41aa8e428aeb0 +PKG_HASH:=6ec76a4cb0988b5382b2fc5053610a56ada90b8ef6a5a4f2807cd433badb9454 PKG_SOURCE:=backports-$(PKG_VERSION).tar.zst PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch index 1d7ccdcaea1..dabb9978d93 100644 --- a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch +++ b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch @@ -82,7 +82,7 @@ help --- a/local-symbols +++ b/local-symbols -@@ -91,6 +91,7 @@ ADM8211= +@@ -93,6 +93,7 @@ ADM8211= ATH_COMMON= WLAN_VENDOR_ATH= ATH_DEBUG= diff --git a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch index a82021af315..c5b9a8a6379 100644 --- a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch +++ b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch @@ -1,6 +1,6 @@ --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -3336,6 +3336,8 @@ void regulatory_hint_country_ie(struct w +@@ -3352,6 +3352,8 @@ void regulatory_hint_country_ie(struct w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request = NULL, *lr; @@ -9,7 +9,7 @@ /* IE len must be evenly divisible by 2 */ if (country_ie_len & 0x01) return; -@@ -3585,6 +3587,7 @@ static bool is_wiphy_all_set_reg_flag(en +@@ -3601,6 +3603,7 @@ static bool is_wiphy_all_set_reg_flag(en void regulatory_hint_disconnect(void) { diff --git a/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch b/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch index fbba682877c..a037b3e9281 100644 --- a/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch +++ b/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/Kconfig +++ b/drivers/net/wireless/ath/ath10k/Kconfig -@@ -94,6 +94,12 @@ config ATH10K_TRACING +@@ -95,6 +95,12 @@ config ATH10K_TRACING help Select this to ath10k use tracing infrastructure. @@ -37,7 +37,7 @@ void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature); --- a/local-symbols +++ b/local-symbols -@@ -151,6 +151,7 @@ ATH10K_DEBUG= +@@ -153,6 +153,7 @@ ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_LEDS= ATH10K_SPECTRAL= diff --git a/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch b/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch index 217901cc001..c3bdd7d79d9 100644 --- a/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch +++ b/package/kernel/mac80211/patches/ath10k/921-ath10k_init_devices_synchronously.patch @@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -3583,6 +3583,16 @@ int ath10k_core_register(struct ath10k * +@@ -3579,6 +3579,16 @@ int ath10k_core_register(struct ath10k * queue_work(ar->workqueue, &ar->register_work); diff --git a/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch index 66883bf13b2..a27dbd43169 100644 --- a/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/ath10k/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -9970,6 +9970,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -9968,6 +9968,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -10332,6 +10347,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -10330,6 +10345,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; diff --git a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch index ce4196689bb..d6b0e0f3574 100644 --- a/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath10k/975-ath10k-use-tpt-trigger-by-default.patch @@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -1320,6 +1320,10 @@ struct ath10k { +@@ -1323,6 +1323,10 @@ struct ath10k { s32 tx_power_2g_limit; s32 tx_power_5g_limit; @@ -29,18 +29,17 @@ Signed-off-by: Mathias Kresin }; --- a/drivers/net/wireless/ath/ath10k/leds.c +++ b/drivers/net/wireless/ath/ath10k/leds.c -@@ -69,7 +69,7 @@ int ath10k_leds_register(struct ath10k * +@@ -64,6 +64,7 @@ int ath10k_leds_register(struct ath10k * ar->leds.cdev.name = ar->leds.label; ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; -- ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; + ar->leds.cdev.default_trigger = ar->led_default_trigger; ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -10348,7 +10348,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10346,7 +10346,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/mac80211/patches/ath10k/984-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/mac80211/patches/ath10k/984-ath10k-Try-to-get-mac-address-from-dts.patch index 5f59ac20ffc..7e3efdeb20a 100644 --- a/package/kernel/mac80211/patches/ath10k/984-ath10k-Try-to-get-mac-address-from-dts.patch +++ b/package/kernel/mac80211/patches/ath10k/984-ath10k-Try-to-get-mac-address-from-dts.patch @@ -26,7 +26,7 @@ Signed-off-by: Ansuel Smith #include #include #include -@@ -3455,6 +3456,8 @@ static int ath10k_core_probe_fw(struct a +@@ -3451,6 +3452,8 @@ static int ath10k_core_probe_fw(struct a device_get_mac_address(ar->dev, ar->mac_addr); diff --git a/package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch b/package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch index eabab8cb81e..8901ec93570 100644 --- a/package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch +++ b/package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch @@ -18,7 +18,7 @@ Signed-off-by: David Bauer --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -10140,7 +10140,6 @@ int ath10k_mac_register(struct ath10k *a +@@ -10138,7 +10138,6 @@ int ath10k_mac_register(struct ath10k *a ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); ieee80211_hw_set(ar->hw, QUEUE_CONTROL); ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); diff --git a/package/kernel/mac80211/patches/ath10k/990-ath10k-small-buffers.patch b/package/kernel/mac80211/patches/ath10k/990-ath10k-small-buffers.patch index a65e5525c2e..755982a7d5f 100644 --- a/package/kernel/mac80211/patches/ath10k/990-ath10k-small-buffers.patch +++ b/package/kernel/mac80211/patches/ath10k/990-ath10k-small-buffers.patch @@ -14,7 +14,7 @@ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1) --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c -@@ -133,7 +133,11 @@ static const struct ce_attr pci_host_ce_ +@@ -132,7 +132,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, @@ -26,7 +26,7 @@ .recv_cb = ath10k_pci_htt_htc_rx_cb, }, -@@ -142,7 +146,11 @@ static const struct ce_attr pci_host_ce_ +@@ -141,7 +145,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, @@ -38,7 +38,7 @@ .recv_cb = ath10k_pci_htc_rx_cb, }, -@@ -169,7 +177,11 @@ static const struct ce_attr pci_host_ce_ +@@ -168,7 +176,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 512, @@ -50,7 +50,7 @@ .recv_cb = ath10k_pci_htt_rx_cb, }, -@@ -194,7 +206,11 @@ static const struct ce_attr pci_host_ce_ +@@ -193,7 +205,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, diff --git a/package/kernel/mac80211/patches/ath10k/991-ath10k-support-flush_sta-method.patch b/package/kernel/mac80211/patches/ath10k/991-ath10k-support-flush_sta-method.patch index 1d368a1114c..2af56eefc0e 100644 --- a/package/kernel/mac80211/patches/ath10k/991-ath10k-support-flush_sta-method.patch +++ b/package/kernel/mac80211/patches/ath10k/991-ath10k-support-flush_sta-method.patch @@ -29,7 +29,7 @@ Tested-by: Florian Maurer --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -8180,6 +8180,20 @@ static void ath10k_flush(struct ieee8021 +@@ -8179,6 +8179,20 @@ static void ath10k_flush(struct ieee8021 mutex_unlock(&ar->conf_mutex); } @@ -50,7 +50,7 @@ Tested-by: Florian Maurer /* TODO: Implement this function properly * For now it is needed to reply to Probe Requests in IBSS mode. * Probably we need this information from FW. -@@ -9532,6 +9546,7 @@ static const struct ieee80211_ops ath10k +@@ -9530,6 +9544,7 @@ static const struct ieee80211_ops ath10k .set_rts_threshold = ath10k_set_rts_threshold, .set_frag_threshold = ath10k_mac_op_set_frag_threshold, .flush = ath10k_flush, @@ -58,7 +58,7 @@ Tested-by: Florian Maurer .tx_last_beacon = ath10k_tx_last_beacon, .set_antenna = ath10k_set_antenna, .get_antenna = ath10k_get_antenna, -@@ -10353,6 +10368,9 @@ int ath10k_mac_register(struct ath10k *a +@@ -10351,6 +10366,9 @@ int ath10k_mac_register(struct ath10k *a if (!ar->hw_params.hw_ops->set_coverage_class) ar->ops->set_coverage_class = NULL; diff --git a/package/kernel/mac80211/patches/ath11k/100-wifi-ath11k-use-unique-QRTR-instance-ID.patch b/package/kernel/mac80211/patches/ath11k/100-wifi-ath11k-use-unique-QRTR-instance-ID.patch index 99fdfcddfa4..72c1bd52203 100644 --- a/package/kernel/mac80211/patches/ath11k/100-wifi-ath11k-use-unique-QRTR-instance-ID.patch +++ b/package/kernel/mac80211/patches/ath11k/100-wifi-ath11k-use-unique-QRTR-instance-ID.patch @@ -93,8 +93,8 @@ Signed-off-by: Robert Marko default: return "UNKNOWN"; } -@@ -286,6 +316,9 @@ static void ath11k_mhi_op_status_cb(stru - queue_work(ab->workqueue_aux, &ab->reset_work); +@@ -288,6 +318,9 @@ static void ath11k_mhi_op_status_cb(stru + spin_unlock_bh(&ab->base_lock); break; + case MHI_CB_EE_SBL_MODE: @@ -103,7 +103,7 @@ Signed-off-by: Robert Marko default: break; } -@@ -293,22 +326,6 @@ static void ath11k_mhi_op_status_cb(stru +@@ -295,22 +328,6 @@ static void ath11k_mhi_op_status_cb(stru ab_pci->mhi_pre_cb = cb; } @@ -140,7 +140,7 @@ Signed-off-by: Robert Marko int ath11k_mhi_register(struct ath11k_pci *ar_pci); --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -394,13 +394,20 @@ static void ath11k_pci_sw_reset(struct a +@@ -398,13 +398,20 @@ static void ath11k_pci_sw_reset(struct a static void ath11k_pci_init_qmi_ce_config(struct ath11k_base *ab) { struct ath11k_qmi_ce_cfg *cfg = &ab->qmi.ce_cfg; diff --git a/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-fix-wrong-usage-of-resource_size-causing.patch b/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-fix-wrong-usage-of-resource_size-causing.patch index ea3f64cbc49..5278688132f 100644 --- a/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-fix-wrong-usage-of-resource_size-causing.patch +++ b/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-fix-wrong-usage-of-resource_size-causing.patch @@ -48,7 +48,7 @@ Signed-off-by: Christian Marangi --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c -@@ -2039,8 +2039,8 @@ static int ath11k_qmi_alloc_target_mem_c +@@ -2038,8 +2038,8 @@ static int ath11k_qmi_alloc_target_mem_c static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab) { @@ -58,7 +58,7 @@ Signed-off-by: Christian Marangi u32 host_ddr_sz; int i, idx, ret; -@@ -2086,7 +2086,7 @@ static int ath11k_qmi_assign_target_mem_ +@@ -2085,7 +2085,7 @@ static int ath11k_qmi_assign_target_mem_ } if (ath11k_core_coldboot_cal_support(ab)) { diff --git a/package/kernel/mac80211/patches/ath11k/201-wifi-ath11k-Support-setting-bdf-addr-and-caldb-addr-.patch b/package/kernel/mac80211/patches/ath11k/201-wifi-ath11k-Support-setting-bdf-addr-and-caldb-addr-.patch index 721b521887f..ec1905e0b8d 100644 --- a/package/kernel/mac80211/patches/ath11k/201-wifi-ath11k-Support-setting-bdf-addr-and-caldb-addr-.patch +++ b/package/kernel/mac80211/patches/ath11k/201-wifi-ath11k-Support-setting-bdf-addr-and-caldb-addr-.patch @@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c -@@ -2042,6 +2042,7 @@ static int ath11k_qmi_assign_target_mem_ +@@ -2041,6 +2041,7 @@ static int ath11k_qmi_assign_target_mem_ struct resource res = DEFINE_RES_NAMED(0, 0, NULL, IORESOURCE_UNSET); struct device *dev = ab->dev; u32 host_ddr_sz; @@ -18,7 +18,7 @@ Signed-off-by: Ziyang Huang int i, idx, ret; for (i = 0, idx = 0; i < ab->qmi.mem_seg_count; i++) { -@@ -2073,7 +2074,9 @@ static int ath11k_qmi_assign_target_mem_ +@@ -2072,7 +2073,9 @@ static int ath11k_qmi_assign_target_mem_ idx++; break; case BDF_MEM_REGION_TYPE: @@ -29,7 +29,7 @@ Signed-off-by: Ziyang Huang ab->qmi.target_mem[idx].iaddr = NULL; ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size; ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type; -@@ -2095,8 +2098,9 @@ static int ath11k_qmi_assign_target_mem_ +@@ -2094,8 +2097,9 @@ static int ath11k_qmi_assign_target_mem_ if (!ab->qmi.target_mem[idx].iaddr) return -EIO; } else { @@ -41,7 +41,7 @@ Signed-off-by: Ziyang Huang ab->qmi.target_mem[idx].iaddr = NULL; } } else { -@@ -2302,6 +2306,7 @@ static int ath11k_qmi_load_file_target_m +@@ -2301,6 +2305,7 @@ static int ath11k_qmi_load_file_target_m struct qmi_wlanfw_bdf_download_resp_msg_v01 resp; struct qmi_txn txn; const u8 *temp = data; @@ -49,7 +49,7 @@ Signed-off-by: Ziyang Huang void __iomem *bdf_addr = NULL; int ret = 0; u32 remaining = len; -@@ -2313,7 +2318,9 @@ static int ath11k_qmi_load_file_target_m +@@ -2312,7 +2317,9 @@ static int ath11k_qmi_load_file_target_m memset(&resp, 0, sizeof(resp)); if (ab->hw_params.fixed_bdf_addr) { diff --git a/package/kernel/mac80211/patches/ath11k/453-ath11k-add-ath11k_mac_op_flush_sta-to-properly-flush.patch b/package/kernel/mac80211/patches/ath11k/453-ath11k-add-ath11k_mac_op_flush_sta-to-properly-flush.patch index c198fad1bc5..bcb43829a14 100644 --- a/package/kernel/mac80211/patches/ath11k/453-ath11k-add-ath11k_mac_op_flush_sta-to-properly-flush.patch +++ b/package/kernel/mac80211/patches/ath11k/453-ath11k-add-ath11k_mac_op_flush_sta-to-properly-flush.patch @@ -31,7 +31,7 @@ Signed-off-by: Florian Maurer --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -8330,6 +8330,23 @@ static void ath11k_mac_op_flush(struct i +@@ -8650,6 +8650,23 @@ static void ath11k_mac_op_flush(struct i ath11k_mac_flush_tx_complete(ar); } @@ -55,7 +55,7 @@ Signed-off-by: Florian Maurer static bool ath11k_mac_has_single_legacy_rate(struct ath11k *ar, enum nl80211_band band, -@@ -9920,6 +9937,7 @@ static const struct ieee80211_ops ath11k +@@ -10100,6 +10117,7 @@ static const struct ieee80211_ops ath11k .set_bitrate_mask = ath11k_mac_op_set_bitrate_mask, .get_survey = ath11k_mac_op_get_survey, .flush = ath11k_mac_op_flush, diff --git a/package/kernel/mac80211/patches/ath11k/900-ath11k-control-thermal-support-via-symbol.patch b/package/kernel/mac80211/patches/ath11k/900-ath11k-control-thermal-support-via-symbol.patch index 0e5d451f9bb..33b2885f94f 100644 --- a/package/kernel/mac80211/patches/ath11k/900-ath11k-control-thermal-support-via-symbol.patch +++ b/package/kernel/mac80211/patches/ath11k/900-ath11k-control-thermal-support-via-symbol.patch @@ -21,17 +21,20 @@ Signed-off-by: Robert Marko --- a/drivers/net/wireless/ath/ath11k/Kconfig +++ b/drivers/net/wireless/ath/ath11k/Kconfig -@@ -62,3 +62,10 @@ config ATH11K_SPECTRAL - Enable ath11k spectral scan support +@@ -62,6 +62,13 @@ config ATH11K_SPECTRAL Say Y to enable access to the FFT/spectral data via debugfs. -+ + +config ATH11K_THERMAL + bool "ath11k thermal sensors and throttling support" + depends on ATH11K + depends on THERMAL + help + Enable ath11k thermal sensors and throttling support. ++ + config ATH11K_CFR + bool "ath11k channel frequency response support" + depends on ATH11K_DEBUGFS --- a/drivers/net/wireless/ath/ath11k/Makefile +++ b/drivers/net/wireless/ath/ath11k/Makefile @@ -24,7 +24,7 @@ ath11k-y += core.o \ @@ -56,11 +59,11 @@ Signed-off-by: Robert Marko int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state); --- a/local-symbols +++ b/local-symbols -@@ -163,6 +163,7 @@ ATH11K_DEBUG= +@@ -165,6 +165,7 @@ ATH11K_DEBUG= ATH11K_DEBUGFS= ATH11K_TRACING= ATH11K_SPECTRAL= +ATH11K_THERMAL= + ATH11K_CFR= ATH12K= ATH12K_AHB= - ATH12K_DEBUG= diff --git a/package/kernel/mac80211/patches/ath11k/903-ath11k-support-setting-FW-memory-mode-via-DT.patch b/package/kernel/mac80211/patches/ath11k/903-ath11k-support-setting-FW-memory-mode-via-DT.patch index c0db0f3091d..cedb0345546 100644 --- a/package/kernel/mac80211/patches/ath11k/903-ath11k-support-setting-FW-memory-mode-via-DT.patch +++ b/package/kernel/mac80211/patches/ath11k/903-ath11k-support-setting-FW-memory-mode-via-DT.patch @@ -22,7 +22,7 @@ Signed-off-by: Robert Marko --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -39,7 +39,7 @@ bool ath11k_ftm_mode; +@@ -38,7 +38,7 @@ bool ath11k_ftm_mode; module_param_named(ftm_mode, ath11k_ftm_mode, bool, 0444); MODULE_PARM_DESC(ftm_mode, "Boots up in factory test mode"); @@ -31,7 +31,7 @@ Signed-off-by: Robert Marko { .hw_rev = ATH11K_HW_IPQ8074, .name = "ipq8074 hw2.0", -@@ -2576,7 +2576,8 @@ static void ath11k_core_reset(struct wor +@@ -2605,7 +2605,8 @@ static void ath11k_core_reset(struct wor static int ath11k_init_hw_params(struct ath11k_base *ab) { const struct ath11k_hw_params *hw_params = NULL; @@ -41,7 +41,7 @@ Signed-off-by: Robert Marko for (i = 0; i < ARRAY_SIZE(ath11k_hw_params); i++) { hw_params = &ath11k_hw_params[i]; -@@ -2592,7 +2593,31 @@ static int ath11k_init_hw_params(struct +@@ -2621,7 +2622,31 @@ static int ath11k_init_hw_params(struct ab->hw_params = *hw_params; diff --git a/package/kernel/mac80211/patches/ath11k/905-ath11k-remove-intersection-support-for-regulatory-ru.patch b/package/kernel/mac80211/patches/ath11k/905-ath11k-remove-intersection-support-for-regulatory-ru.patch index 2592a70ce10..40ba0a29654 100644 --- a/package/kernel/mac80211/patches/ath11k/905-ath11k-remove-intersection-support-for-regulatory-ru.patch +++ b/package/kernel/mac80211/patches/ath11k/905-ath11k-remove-intersection-support-for-regulatory-ru.patch @@ -23,7 +23,7 @@ Signed-off-by: Aditya Kumar Singh --- a/drivers/net/wireless/ath/ath11k/reg.c +++ b/drivers/net/wireless/ath/ath11k/reg.c -@@ -353,134 +353,6 @@ static u32 ath11k_map_fw_phy_flags(u32 p +@@ -352,134 +352,6 @@ static u32 ath11k_map_fw_phy_flags(u32 p return flags; } @@ -158,7 +158,7 @@ Signed-off-by: Aditya Kumar Singh static const char * ath11k_reg_get_regdom_str(enum nl80211_dfs_regions dfs_region) { -@@ -631,11 +503,11 @@ ath11k_reg_ap_pwr_convert(enum ieee80211 +@@ -630,11 +502,11 @@ ath11k_reg_ap_pwr_convert(enum ieee80211 struct ieee80211_regdomain * ath11k_reg_build_regd(struct ath11k_base *ab, @@ -172,7 +172,7 @@ Signed-off-by: Aditya Kumar Singh struct cur_reg_rule *reg_rule, *reg_rule_6ghz; u8 i = 0, j = 0, k = 0; u8 num_rules; -@@ -678,26 +550,26 @@ ath11k_reg_build_regd(struct ath11k_base +@@ -677,26 +549,26 @@ ath11k_reg_build_regd(struct ath11k_base } if (!num_rules) @@ -206,7 +206,7 @@ Signed-off-by: Aditya Kumar Singh reg_info->dfs_region, num_rules); /* Update reg_rules[] below. Firmware is expected to * send these rules in order(2 GHz rules first and then 5 GHz) -@@ -736,7 +608,7 @@ ath11k_reg_build_regd(struct ath11k_base +@@ -735,7 +607,7 @@ ath11k_reg_build_regd(struct ath11k_base flags |= ath11k_map_fw_reg_flags(reg_rule->flags); flags |= ath11k_map_fw_phy_flags(reg_info->phybitmap); @@ -215,7 +215,7 @@ Signed-off-by: Aditya Kumar Singh reg_rule->start_freq, reg_rule->end_freq, max_bw, reg_rule->ant_gain, reg_rule->reg_power, -@@ -751,7 +623,7 @@ ath11k_reg_build_regd(struct ath11k_base +@@ -750,7 +622,7 @@ ath11k_reg_build_regd(struct ath11k_base reg_info->dfs_region == ATH11K_DFS_REG_ETSI && (reg_rule->end_freq > ETSI_WEATHER_RADAR_BAND_LOW && reg_rule->start_freq < ETSI_WEATHER_RADAR_BAND_HIGH)){ @@ -224,7 +224,7 @@ Signed-off-by: Aditya Kumar Singh reg_rule, &i, flags, max_bw); continue; -@@ -762,37 +634,20 @@ ath11k_reg_build_regd(struct ath11k_base +@@ -761,37 +633,20 @@ ath11k_reg_build_regd(struct ath11k_base "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d) (%d, %d)\n", i + 1, reg_rule->start_freq, reg_rule->end_freq, max_bw, reg_rule->ant_gain, reg_rule->reg_power, @@ -265,7 +265,7 @@ Signed-off-by: Aditya Kumar Singh return new_regd; } -@@ -844,17 +699,6 @@ void ath11k_regd_update_chan_list_work(s +@@ -843,17 +698,6 @@ void ath11k_regd_update_chan_list_work(s } } @@ -283,7 +283,7 @@ Signed-off-by: Aditya Kumar Singh static enum wmi_vdev_type ath11k_reg_get_ar_vdev_type(struct ath11k *ar) { struct ath11k_vif *arvif; -@@ -877,7 +721,6 @@ int ath11k_reg_handle_chan_list(struct a +@@ -876,7 +720,6 @@ int ath11k_reg_handle_chan_list(struct a enum ieee80211_ap_reg_power power_type) { struct ieee80211_regdomain *regd; @@ -291,7 +291,7 @@ Signed-off-by: Aditya Kumar Singh int pdev_idx; struct ath11k *ar; enum wmi_vdev_type vdev_type; -@@ -932,24 +775,14 @@ int ath11k_reg_handle_chan_list(struct a +@@ -931,24 +774,14 @@ int ath11k_reg_handle_chan_list(struct a return 0; } diff --git a/package/kernel/mac80211/patches/ath11k/906-wifi-ath11k-disable-coldboot-for-ipq6018.patch b/package/kernel/mac80211/patches/ath11k/906-wifi-ath11k-disable-coldboot-for-ipq6018.patch index 003efc3016f..031e6eb94ea 100644 --- a/package/kernel/mac80211/patches/ath11k/906-wifi-ath11k-disable-coldboot-for-ipq6018.patch +++ b/package/kernel/mac80211/patches/ath11k/906-wifi-ath11k-disable-coldboot-for-ipq6018.patch @@ -13,7 +13,7 @@ Signed-off-by: Mantas Pucka --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -173,8 +173,8 @@ static struct ath11k_hw_params ath11k_hw +@@ -174,8 +174,8 @@ static struct ath11k_hw_params ath11k_hw .supports_shadow_regs = false, .idle_ps = false, .supports_sta_ps = false, diff --git a/package/kernel/mac80211/patches/ath11k/907-wifi-ath11k-disable-coldboot-calibration-for-ipq5018.patch b/package/kernel/mac80211/patches/ath11k/907-wifi-ath11k-disable-coldboot-calibration-for-ipq5018.patch index a6449d8d435..f8c3e91a498 100644 --- a/package/kernel/mac80211/patches/ath11k/907-wifi-ath11k-disable-coldboot-calibration-for-ipq5018.patch +++ b/package/kernel/mac80211/patches/ath11k/907-wifi-ath11k-disable-coldboot-calibration-for-ipq5018.patch @@ -14,9 +14,9 @@ Signed-off-by: George Moussalem --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -700,8 +700,8 @@ static struct ath11k_hw_params ath11k_hw +@@ -712,8 +712,8 @@ static struct ath11k_hw_params ath11k_hw .supports_suspend = false, - .hal_params = &ath11k_hw_hal_params_ipq8074, + .hal_params = &ath11k_hw_hal_params_ipq5018, .single_pdev_only = false, - .coldboot_cal_mm = true, - .coldboot_cal_ftm = true, diff --git a/package/kernel/mac80211/patches/ath11k/910-ath11k-fix-remapped-ce-accessing-issue-on-64bit-OS.patch b/package/kernel/mac80211/patches/ath11k/910-ath11k-fix-remapped-ce-accessing-issue-on-64bit-OS.patch index 254b9c438b7..624f324a947 100644 --- a/package/kernel/mac80211/patches/ath11k/910-ath11k-fix-remapped-ce-accessing-issue-on-64bit-OS.patch +++ b/package/kernel/mac80211/patches/ath11k/910-ath11k-fix-remapped-ce-accessing-issue-on-64bit-OS.patch @@ -65,7 +65,7 @@ Signed-off-by: Ziyang Huang if (ce_attr->src_nentries) --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c -@@ -1274,20 +1274,16 @@ static int ath11k_hal_srng_create_config +@@ -1273,20 +1273,16 @@ static int ath11k_hal_srng_create_config s->reg_start[1] = HAL_SEQ_WCSS_UMAC_TCL_REG + HAL_TCL_STATUS_RING_HP; s = &hal->srng_config[HAL_CE_SRC]; @@ -90,7 +90,7 @@ Signed-off-by: Ziyang Huang s->reg_size[0] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) - HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab); s->reg_size[1] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) - -@@ -1295,9 +1291,8 @@ static int ath11k_hal_srng_create_config +@@ -1294,9 +1290,8 @@ static int ath11k_hal_srng_create_config s = &hal->srng_config[HAL_CE_DST_STATUS]; s->reg_start[0] = HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab) + @@ -117,7 +117,7 @@ Signed-off-by: Ziyang Huang }; const struct ce_remap ath11k_ce_remap_ipq5018 = { -@@ -2801,13 +2801,13 @@ const struct ath11k_hw_regs ipq5018_regs +@@ -2809,13 +2809,13 @@ const struct ath11k_hw_regs ipq5018_regs .hal_reo_status_hp = 0x00003070, /* WCSS relative address */ diff --git a/package/kernel/mac80211/patches/ath11k/920-wifi-ath11k-add-hw-params-for-QCN6122.patch b/package/kernel/mac80211/patches/ath11k/920-wifi-ath11k-add-hw-params-for-QCN6122.patch index 4f4cef664e8..76ae6698a8d 100644 --- a/package/kernel/mac80211/patches/ath11k/920-wifi-ath11k-add-hw-params-for-QCN6122.patch +++ b/package/kernel/mac80211/patches/ath11k/920-wifi-ath11k-add-hw-params-for-QCN6122.patch @@ -25,9 +25,9 @@ Signed-off-by: George Moussalem --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -907,6 +907,67 @@ static struct ath11k_hw_params ath11k_hw - .support_dual_stations = true, - .pdev_suspend = false, +@@ -926,6 +926,66 @@ static struct ath11k_hw_params ath11k_hw + .cfr_num_stream_bufs = 255, + .cfr_stream_buf_size = 8200, }, + { + .hw_rev = ATH11K_HW_QCN6122_HW10, @@ -37,7 +37,7 @@ Signed-off-by: George Moussalem + .board_size = 256 * 1024, + .cal_offset = 128 * 1024, + }, -+ .hal_params = &ath11k_hw_hal_params_ipq8074, ++ .hal_params = &ath11k_hw_hal_params_ipq5018, + .max_radios = MAX_RADIOS_5018, + .bdf_addr = 0x4D200000, + .hw_ops = &ipq5018_ops, @@ -54,7 +54,6 @@ Signed-off-by: George Moussalem + .max_fft_bins = 1024, + }, + .credit_flow = false, -+ .max_tx_ring = 1, + .supports_monitor = true, + .supports_shadow_regs = false, + .idle_ps = false, @@ -95,7 +94,7 @@ Signed-off-by: George Moussalem static const struct dmi_system_id ath11k_pm_quirk_table[] = { --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h -@@ -152,6 +152,7 @@ enum ath11k_hw_rev { +@@ -153,6 +153,7 @@ enum ath11k_hw_rev { ATH11K_HW_IPQ5018_HW10, ATH11K_HW_QCA2066_HW21, ATH11K_HW_QCA6698AQ_HW21, @@ -105,7 +104,7 @@ Signed-off-by: George Moussalem enum ath11k_firmware_mode { --- a/drivers/net/wireless/ath/ath11k/qmi.h +++ b/drivers/net/wireless/ath/ath11k/qmi.h -@@ -22,10 +22,11 @@ +@@ -21,10 +21,11 @@ #define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074 0x02 #define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074 0x07 #define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_WCN6750 0x03 diff --git a/package/kernel/mac80211/patches/ath11k/921-wifi-ath11k-add-hal-regs-for-QCN6122.patch b/package/kernel/mac80211/patches/ath11k/921-wifi-ath11k-add-hal-regs-for-QCN6122.patch index dc16385105b..b67bf811ecb 100644 --- a/package/kernel/mac80211/patches/ath11k/921-wifi-ath11k-add-hal-regs-for-QCN6122.patch +++ b/package/kernel/mac80211/patches/ath11k/921-wifi-ath11k-add-hal-regs-for-QCN6122.patch @@ -10,7 +10,7 @@ Signed-off-by: George Moussalem --- --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -920,6 +920,7 @@ static struct ath11k_hw_params ath11k_hw +@@ -939,6 +939,7 @@ static struct ath11k_hw_params ath11k_hw .bdf_addr = 0x4D200000, .hw_ops = &ipq5018_ops, .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074), @@ -20,8 +20,8 @@ Signed-off-by: George Moussalem BIT(NL80211_IFTYPE_AP) | --- a/drivers/net/wireless/ath/ath11k/hw.c +++ b/drivers/net/wireless/ath/ath11k/hw.c -@@ -2822,6 +2822,81 @@ const struct ath11k_hw_regs ipq5018_regs - .hal_wbm1_release_ring_base_lsb = 0x0000097c, +@@ -2836,6 +2836,81 @@ const struct ath11k_hw_hal_params ath11k + .num_tx_rings = ARRAY_SIZE(ath11k_hw_tcl2wbm_rbm_map_ipq5018), }; +const struct ath11k_hw_regs qcn6122_regs = { @@ -104,7 +104,7 @@ Signed-off-by: George Moussalem .tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074, --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h -@@ -426,6 +426,7 @@ extern const struct ath11k_hw_regs qcn90 +@@ -430,6 +430,7 @@ extern const struct ath11k_hw_regs qcn90 extern const struct ath11k_hw_regs wcn6855_regs; extern const struct ath11k_hw_regs wcn6750_regs; extern const struct ath11k_hw_regs ipq5018_regs; diff --git a/package/kernel/mac80211/patches/ath11k/922-wifi-ath11k-add-hw-ring-mask-for-QCN6122.patch b/package/kernel/mac80211/patches/ath11k/922-wifi-ath11k-add-hw-ring-mask-for-QCN6122.patch index 509c27e15c5..57ae8af6138 100644 --- a/package/kernel/mac80211/patches/ath11k/922-wifi-ath11k-add-hw-ring-mask-for-QCN6122.patch +++ b/package/kernel/mac80211/patches/ath11k/922-wifi-ath11k-add-hw-ring-mask-for-QCN6122.patch @@ -8,7 +8,7 @@ Signed-off-by: George Moussalem --- --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -919,6 +919,7 @@ static struct ath11k_hw_params ath11k_hw +@@ -938,6 +938,7 @@ static struct ath11k_hw_params ath11k_hw .max_radios = MAX_RADIOS_5018, .bdf_addr = 0x4D200000, .hw_ops = &ipq5018_ops, @@ -64,7 +64,7 @@ Signed-off-by: George Moussalem /* CE0: host->target HTC control and raw streams */ --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h -@@ -290,6 +290,7 @@ extern const struct ath11k_hw_ring_mask +@@ -293,6 +293,7 @@ extern const struct ath11k_hw_ring_mask extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390; extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074; extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750; diff --git a/package/kernel/mac80211/patches/ath11k/923-wifi-ath11k-update-hif_and-pci_ops-for-QCN6122.patch b/package/kernel/mac80211/patches/ath11k/923-wifi-ath11k-update-hif_and-pci_ops-for-QCN6122.patch index 10648dda9e1..9ae50b9f3d1 100644 --- a/package/kernel/mac80211/patches/ath11k/923-wifi-ath11k-update-hif_and-pci_ops-for-QCN6122.patch +++ b/package/kernel/mac80211/patches/ath11k/923-wifi-ath11k-update-hif_and-pci_ops-for-QCN6122.patch @@ -55,7 +55,7 @@ Signed-off-by: George Moussalem static int ath11k_core_get_rproc(struct ath11k_base *ab) { struct ath11k_ahb *ab_ahb = ath11k_ahb_priv(ab); -@@ -1133,6 +1163,10 @@ static int ath11k_ahb_probe(struct platf +@@ -1132,6 +1162,10 @@ static int ath11k_ahb_probe(struct platf hif_ops = &ath11k_ahb_hif_ops_wcn6750; pci_ops = &ath11k_ahb_pci_ops_wcn6750; break; @@ -91,7 +91,7 @@ Signed-off-by: George Moussalem #endif /* _HIF_H_ */ --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c -@@ -2194,6 +2194,8 @@ static int ath11k_qmi_request_device_inf +@@ -2193,6 +2193,8 @@ static int ath11k_qmi_request_device_inf if (!ab->hw_params.ce_remap) ab->mem_ce = ab->mem; diff --git a/package/kernel/mac80211/patches/ath11k/924-wifi-ath11k-add-multipd-support-for-QCN6122.patch b/package/kernel/mac80211/patches/ath11k/924-wifi-ath11k-add-multipd-support-for-QCN6122.patch index d8a7191c828..c545abc9781 100644 --- a/package/kernel/mac80211/patches/ath11k/924-wifi-ath11k-add-multipd-support-for-QCN6122.patch +++ b/package/kernel/mac80211/patches/ath11k/924-wifi-ath11k-add-multipd-support-for-QCN6122.patch @@ -24,7 +24,7 @@ Signed-off-by: George Moussalem } static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab) -@@ -1107,6 +1108,27 @@ err_unregister: +@@ -1106,6 +1107,27 @@ err_unregister: return ret; } @@ -52,7 +52,7 @@ Signed-off-by: George Moussalem static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab) { struct ath11k_ahb *ab_ahb = ath11k_ahb_priv(ab); -@@ -1148,7 +1170,7 @@ static int ath11k_ahb_probe(struct platf +@@ -1147,7 +1169,7 @@ static int ath11k_ahb_probe(struct platf const struct ath11k_hif_ops *hif_ops; const struct ath11k_pci_ops *pci_ops; enum ath11k_hw_rev hw_rev; @@ -61,7 +61,7 @@ Signed-off-by: George Moussalem hw_rev = (uintptr_t)device_get_match_data(&pdev->dev); -@@ -1172,6 +1194,7 @@ static int ath11k_ahb_probe(struct platf +@@ -1171,6 +1193,7 @@ static int ath11k_ahb_probe(struct platf return -EOPNOTSUPP; } @@ -69,7 +69,7 @@ Signed-off-by: George Moussalem ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) { dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n"); -@@ -1188,6 +1211,7 @@ static int ath11k_ahb_probe(struct platf +@@ -1187,6 +1210,7 @@ static int ath11k_ahb_probe(struct platf ab->hif.ops = hif_ops; ab->pdev = pdev; ab->hw_rev = hw_rev; @@ -79,7 +79,7 @@ Signed-off-by: George Moussalem --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h -@@ -48,6 +48,9 @@ +@@ -49,6 +49,9 @@ #define ATH11K_INVALID_HW_MAC_ID 0xFF #define ATH11K_CONNECTION_LOSS_HZ (3 * HZ) @@ -89,7 +89,7 @@ Signed-off-by: George Moussalem /* SMBIOS type containing Board Data File Name Extension */ #define ATH11K_SMBIOS_BDF_EXT_TYPE 0xF8 -@@ -969,6 +972,7 @@ struct ath11k_base { +@@ -986,6 +989,7 @@ struct ath11k_base { struct list_head peers; wait_queue_head_t peer_mapping_wq; u8 mac_addr[ETH_ALEN]; @@ -99,7 +99,7 @@ Signed-off-by: George Moussalem struct ath11k_targ_cap target_caps; --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -409,6 +409,8 @@ static void ath11k_pci_init_qmi_ce_confi +@@ -413,6 +413,8 @@ static void ath11k_pci_init_qmi_ce_confi } else ab->qmi.service_ins_id = ab->hw_params.qmi_service_ins_id; diff --git a/package/kernel/mac80211/patches/ath11k/925-wifi-ath11k-add-QCN6122-device-support.patch b/package/kernel/mac80211/patches/ath11k/925-wifi-ath11k-add-QCN6122-device-support.patch index 4a35f145d28..06d7e964845 100644 --- a/package/kernel/mac80211/patches/ath11k/925-wifi-ath11k-add-QCN6122-device-support.patch +++ b/package/kernel/mac80211/patches/ath11k/925-wifi-ath11k-add-QCN6122-device-support.patch @@ -37,7 +37,7 @@ Signed-off-by: George Moussalem --- a/drivers/net/wireless/ath/ath11k/pcic.c +++ b/drivers/net/wireless/ath/ath11k/pcic.c -@@ -139,6 +139,15 @@ static const struct ath11k_msi_config at +@@ -138,6 +138,15 @@ static const struct ath11k_msi_config at }, .hw_rev = ATH11K_HW_QCA6698AQ_HW21, }, diff --git a/package/kernel/mac80211/patches/ath11k/931-wifi-ath11k-Support-to-assign-m3-dump-memory.patch b/package/kernel/mac80211/patches/ath11k/931-wifi-ath11k-Support-to-assign-m3-dump-memory.patch index 128ac8105ef..35d2572d660 100644 --- a/package/kernel/mac80211/patches/ath11k/931-wifi-ath11k-Support-to-assign-m3-dump-memory.patch +++ b/package/kernel/mac80211/patches/ath11k/931-wifi-ath11k-Support-to-assign-m3-dump-memory.patch @@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c -@@ -2111,6 +2111,18 @@ static int ath11k_qmi_assign_target_mem_ +@@ -2110,6 +2110,18 @@ static int ath11k_qmi_assign_target_mem_ ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type; idx++; break; diff --git a/package/kernel/mac80211/patches/ath11k/948-wifi-ath11k-Fix-the-WMM-param-type.patch b/package/kernel/mac80211/patches/ath11k/948-wifi-ath11k-Fix-the-WMM-param-type.patch index 174f02be815..a5c03d2bc50 100644 --- a/package/kernel/mac80211/patches/ath11k/948-wifi-ath11k-Fix-the-WMM-param-type.patch +++ b/package/kernel/mac80211/patches/ath11k/948-wifi-ath11k-Fix-the-WMM-param-type.patch @@ -13,7 +13,7 @@ Signed-off-by: Paweł Owoc --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c -@@ -2688,7 +2688,7 @@ int ath11k_wmi_send_wmm_update_cmd_tlv(s +@@ -2700,7 +2700,7 @@ int ath11k_wmi_send_wmm_update_cmd_tlv(s FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE); cmd->vdev_id = vdev_id; diff --git a/package/kernel/mac80211/patches/ath11k/949-wifi-ath11k-fix-monitor-rx-pktlen.patch b/package/kernel/mac80211/patches/ath11k/949-wifi-ath11k-fix-monitor-rx-pktlen.patch index 33f71d28c35..4d4a6f184b3 100644 --- a/package/kernel/mac80211/patches/ath11k/949-wifi-ath11k-fix-monitor-rx-pktlen.patch +++ b/package/kernel/mac80211/patches/ath11k/949-wifi-ath11k-fix-monitor-rx-pktlen.patch @@ -24,7 +24,7 @@ to the monitor RX delivery path. --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c -@@ -4929,8 +4929,13 @@ ath11k_dp_rx_mon_merg_msdus(struct ath11 +@@ -4941,8 +4941,13 @@ ath11k_dp_rx_mon_merg_msdus(struct ath11 } prev_buf->next = NULL; @@ -39,7 +39,7 @@ to the monitor RX delivery path. } else if (decap_format == DP_RX_DECAP_TYPE_NATIVE_WIFI) { u8 qos_pkt = 0; -@@ -4956,10 +4961,13 @@ ath11k_dp_rx_mon_merg_msdus(struct ath11 +@@ -4968,10 +4973,13 @@ ath11k_dp_rx_mon_merg_msdus(struct ath11 prev_buf = msdu; msdu = msdu->next; } @@ -57,7 +57,7 @@ to the monitor RX delivery path. ath11k_dbg(ab, ATH11K_DBG_DATA, "mpdu_buf %p mpdu_buf->len %u", prev_buf, prev_buf->len); -@@ -5084,12 +5092,27 @@ static int ath11k_dp_rx_mon_deliver(stru +@@ -5096,12 +5104,27 @@ static int ath11k_dp_rx_mon_deliver(stru header = mon_skb; diff --git a/package/kernel/mac80211/patches/ath12k/001-v7.1-wifi-ath12k-add-basic-hwmon-temperature-reporting.patch b/package/kernel/mac80211/patches/ath12k/001-v7.1-wifi-ath12k-add-basic-hwmon-temperature-reporting.patch deleted file mode 100644 index 022e332700d..00000000000 --- a/package/kernel/mac80211/patches/ath12k/001-v7.1-wifi-ath12k-add-basic-hwmon-temperature-reporting.patch +++ /dev/null @@ -1,380 +0,0 @@ -From 151322bccdbdb132f5a73cc8ad5d3ab89b90ed52 Mon Sep 17 00:00:00 2001 -From: Maharaja Kennadyrajan -Date: Mon, 23 Feb 2026 18:56:22 +0530 -Subject: wifi: ath12k: add basic hwmon temperature reporting - -Add initial thermal support by wiring up a per-radio (pdev) hwmon temperature -sensor backed by the existing WMI pdev temperature command and event. -When userspace reads the sysfs file temp1_input, the driver sends -WMI_PDEV_GET_TEMPERATURE_CMDID (tag WMI_TAG_PDEV_GET_TEMPERATURE_CMD) and waits -for the corresponding WMI_PDEV_TEMPERATURE_EVENTID -(tag WMI_TAG_PDEV_TEMPERATURE_EVENT) to get the temperature and pdev_id. - -Export the reported value in millidegrees Celsius as required by hwmon. -The temperature reported is per-radio (pdev). In a multi-radio wiphy under a -single phy, a separate hwmon device is created for each radio. - -Sample command and output: -$ cat /sys/devices/pci0000:00/.../ieee80211/phyX/hwmonY/temp1_input -$ 50000 - -Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 -Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3 - -Co-developed-by: Aishwarya R -Signed-off-by: Aishwarya R -Signed-off-by: Maharaja Kennadyrajan -Reviewed-by: Vasanthakumar Thiagarajan -Link: https://patch.msgid.link/20260223132622.43464-1-maharaja.kennadyrajan@oss.qualcomm.com -Signed-off-by: Jeff Johnson ---- - drivers/net/wireless/ath/ath12k/Makefile | 1 + - drivers/net/wireless/ath/ath12k/core.c | 13 ++++ - drivers/net/wireless/ath/ath12k/core.h | 3 + - drivers/net/wireless/ath/ath12k/mac.c | 4 + - drivers/net/wireless/ath/ath12k/thermal.c | 124 ++++++++++++++++++++++++++++++ - drivers/net/wireless/ath/ath12k/thermal.h | 40 ++++++++++ - drivers/net/wireless/ath/ath12k/wmi.c | 57 +++++++------- - 7 files changed, 211 insertions(+), 31 deletions(-) - create mode 100644 drivers/net/wireless/ath/ath12k/thermal.c - create mode 100644 drivers/net/wireless/ath/ath12k/thermal.h - ---- a/drivers/net/wireless/ath/ath12k/core.c -+++ b/drivers/net/wireless/ath/ath12k/core.c -@@ -857,11 +857,22 @@ static int ath12k_core_pdev_create(struc - return ret; - } - -+ ret = ath12k_thermal_register(ab); -+ if (ret) { -+ ath12k_err(ab, "could not register thermal device: %d\n", ret); -+ goto err_dp_pdev_free; -+ } -+ - return 0; -+ -+err_dp_pdev_free: -+ ath12k_dp_pdev_free(ab); -+ return ret; - } - - static void ath12k_core_pdev_destroy(struct ath12k_base *ab) - { -+ ath12k_thermal_unregister(ab); - ath12k_dp_pdev_free(ab); - } - -@@ -1350,6 +1361,7 @@ static int ath12k_core_reconfigure_on_cr - int ret, total_vdev; - - mutex_lock(&ab->core_lock); -+ ath12k_thermal_unregister(ab); - ath12k_dp_pdev_free(ab); - ath12k_ce_cleanup_pipes(ab); - ath12k_wmi_detach(ab); -@@ -1491,6 +1503,7 @@ static void ath12k_core_pre_reconfigure_ - complete(&ar->vdev_delete_done); - complete(&ar->bss_survey_done); - complete_all(&ar->regd_update_completed); -+ complete_all(&ar->thermal.wmi_sync); - - wake_up(&ar->dp.tx_empty_waitq); - idr_for_each(&ar->txmgmt_idr, ---- a/drivers/net/wireless/ath/ath12k/core.h -+++ b/drivers/net/wireless/ath/ath12k/core.h -@@ -34,6 +34,7 @@ - #include "wow.h" - #include "debugfs_htt_stats.h" - #include "coredump.h" -+#include "thermal.h" - - #define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK) - -@@ -846,6 +847,8 @@ struct ath12k { - - s8 max_allowed_tx_power; - struct ath12k_pdev_rssi_offsets rssi_info; -+ -+ struct ath12k_thermal thermal; - }; - - struct ath12k_hw { ---- a/drivers/net/wireless/ath/ath12k/mac.c -+++ b/drivers/net/wireless/ath/ath12k/mac.c -@@ -14063,6 +14063,10 @@ static void ath12k_mac_setup(struct ath1 - init_completion(&ar->mlo_setup_done); - init_completion(&ar->completed_11d_scan); - init_completion(&ar->regd_update_completed); -+ init_completion(&ar->thermal.wmi_sync); -+ -+ ar->thermal.temperature = 0; -+ ar->thermal.hwmon_dev = NULL; - - INIT_DELAYED_WORK(&ar->scan.timeout, ath12k_scan_timeout_work); - wiphy_work_init(&ar->scan.vdev_clean_wk, ath12k_scan_vdev_clean_work); ---- a/drivers/net/wireless/ath/ath12k/Makefile -+++ b/drivers/net/wireless/ath/ath12k/Makefile -@@ -30,6 +30,7 @@ ath12k-$(CPTCFG_ATH12K_TRACING) += trace - ath12k-$(CONFIG_PM) += wow.o - ath12k-$(CPTCFG_ATH12K_COREDUMP) += coredump.o - ath12k-$(CPTCFG_NL80211_TESTMODE) += testmode.o -+ath12k-$(CONFIG_THERMAL) += thermal.o - - # for tracing framework to find trace.h - CFLAGS_trace.o := -I$(src) ---- /dev/null -+++ b/drivers/net/wireless/ath/ath12k/thermal.c -@@ -0,0 +1,124 @@ -+// SPDX-License-Identifier: BSD-3-Clause-Clear -+/* -+ * Copyright (c) 2020 The Linux Foundation. All rights reserved. -+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include "core.h" -+#include "debug.h" -+ -+static ssize_t ath12k_thermal_temp_show(struct device *dev, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ struct ath12k *ar = dev_get_drvdata(dev); -+ unsigned long time_left; -+ int ret, temperature; -+ -+ guard(wiphy)(ath12k_ar_to_hw(ar)->wiphy); -+ -+ if (ar->ah->state != ATH12K_HW_STATE_ON) -+ return -ENETDOWN; -+ -+ reinit_completion(&ar->thermal.wmi_sync); -+ ret = ath12k_wmi_send_pdev_temperature_cmd(ar); -+ if (ret) { -+ ath12k_warn(ar->ab, "failed to read temperature %d\n", ret); -+ return ret; -+ } -+ -+ if (test_bit(ATH12K_FLAG_CRASH_FLUSH, &ar->ab->dev_flags)) -+ return -ESHUTDOWN; -+ -+ time_left = wait_for_completion_timeout(&ar->thermal.wmi_sync, -+ ATH12K_THERMAL_SYNC_TIMEOUT_HZ); -+ if (!time_left) { -+ ath12k_warn(ar->ab, "failed to synchronize thermal read\n"); -+ return -ETIMEDOUT; -+ } -+ -+ spin_lock_bh(&ar->data_lock); -+ temperature = ar->thermal.temperature; -+ spin_unlock_bh(&ar->data_lock); -+ -+ /* display in millidegree celsius */ -+ return sysfs_emit(buf, "%d\n", temperature * 1000); -+} -+ -+void ath12k_thermal_event_temperature(struct ath12k *ar, int temperature) -+{ -+ spin_lock_bh(&ar->data_lock); -+ ar->thermal.temperature = temperature; -+ spin_unlock_bh(&ar->data_lock); -+ complete_all(&ar->thermal.wmi_sync); -+} -+ -+static SENSOR_DEVICE_ATTR_RO(temp1_input, ath12k_thermal_temp, 0); -+ -+static struct attribute *ath12k_hwmon_attrs[] = { -+ &sensor_dev_attr_temp1_input.dev_attr.attr, -+ NULL, -+}; -+ATTRIBUTE_GROUPS(ath12k_hwmon); -+ -+int ath12k_thermal_register(struct ath12k_base *ab) -+{ -+ struct ath12k *ar; -+ int i, j, ret; -+ -+ if (!IS_REACHABLE(CONFIG_HWMON)) -+ return 0; -+ -+ for (i = 0; i < ab->num_radios; i++) { -+ ar = ab->pdevs[i].ar; -+ if (!ar) -+ continue; -+ -+ ar->thermal.hwmon_dev = -+ hwmon_device_register_with_groups(&ar->ah->hw->wiphy->dev, -+ "ath12k_hwmon", ar, -+ ath12k_hwmon_groups); -+ if (IS_ERR(ar->thermal.hwmon_dev)) { -+ ret = PTR_ERR(ar->thermal.hwmon_dev); -+ ar->thermal.hwmon_dev = NULL; -+ ath12k_err(ar->ab, "failed to register hwmon device: %d\n", -+ ret); -+ for (j = i - 1; j >= 0; j--) { -+ ar = ab->pdevs[j].ar; -+ if (!ar) -+ continue; -+ -+ hwmon_device_unregister(ar->thermal.hwmon_dev); -+ ar->thermal.hwmon_dev = NULL; -+ } -+ return ret; -+ } -+ } -+ -+ return 0; -+} -+ -+void ath12k_thermal_unregister(struct ath12k_base *ab) -+{ -+ struct ath12k *ar; -+ int i; -+ -+ if (!IS_REACHABLE(CONFIG_HWMON)) -+ return; -+ -+ for (i = 0; i < ab->num_radios; i++) { -+ ar = ab->pdevs[i].ar; -+ if (!ar) -+ continue; -+ -+ if (ar->thermal.hwmon_dev) { -+ hwmon_device_unregister(ar->thermal.hwmon_dev); -+ ar->thermal.hwmon_dev = NULL; -+ } -+ } -+} ---- /dev/null -+++ b/drivers/net/wireless/ath/ath12k/thermal.h -@@ -0,0 +1,40 @@ -+/* SPDX-License-Identifier: BSD-3-Clause-Clear */ -+/* -+ * Copyright (c) 2020 The Linux Foundation. All rights reserved. -+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. -+ */ -+ -+#ifndef _ATH12K_THERMAL_ -+#define _ATH12K_THERMAL_ -+ -+#define ATH12K_THERMAL_SYNC_TIMEOUT_HZ (5 * HZ) -+ -+struct ath12k_thermal { -+ struct completion wmi_sync; -+ -+ /* temperature value in Celsius degree protected by data_lock. */ -+ int temperature; -+ struct device *hwmon_dev; -+}; -+ -+#if IS_REACHABLE(CONFIG_THERMAL) -+int ath12k_thermal_register(struct ath12k_base *ab); -+void ath12k_thermal_unregister(struct ath12k_base *ab); -+void ath12k_thermal_event_temperature(struct ath12k *ar, int temperature); -+#else -+static inline int ath12k_thermal_register(struct ath12k_base *ab) -+{ -+ return 0; -+} -+ -+static inline void ath12k_thermal_unregister(struct ath12k_base *ab) -+{ -+} -+ -+static inline void ath12k_thermal_event_temperature(struct ath12k *ar, -+ int temperature) -+{ -+} -+ -+#endif -+#endif /* _ATH12K_THERMAL_ */ ---- a/drivers/net/wireless/ath/ath12k/wmi.c -+++ b/drivers/net/wireless/ath/ath12k/wmi.c -@@ -6673,31 +6673,6 @@ static int ath12k_pull_peer_assoc_conf_e - return 0; - } - --static int --ath12k_pull_pdev_temp_ev(struct ath12k_base *ab, struct sk_buff *skb, -- const struct wmi_pdev_temperature_event *ev) --{ -- const void **tb; -- int ret; -- -- tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); -- if (IS_ERR(tb)) { -- ret = PTR_ERR(tb); -- ath12k_warn(ab, "failed to parse tlv: %d\n", ret); -- return ret; -- } -- -- ev = tb[WMI_TAG_PDEV_TEMPERATURE_EVENT]; -- if (!ev) { -- ath12k_warn(ab, "failed to fetch pdev temp ev"); -- kfree(tb); -- return -EPROTO; -- } -- -- kfree(tb); -- return 0; --} -- - static void ath12k_wmi_op_ep_tx_credits(struct ath12k_base *ab) - { - /* try to send pending beacons first. they take priority */ -@@ -8712,25 +8687,45 @@ static void - ath12k_wmi_pdev_temperature_event(struct ath12k_base *ab, - struct sk_buff *skb) - { -+ const struct wmi_pdev_temperature_event *ev; - struct ath12k *ar; -- struct wmi_pdev_temperature_event ev = {}; -+ const void **tb; -+ int temp; -+ u32 pdev_id; - -- if (ath12k_pull_pdev_temp_ev(ab, skb, &ev) != 0) { -- ath12k_warn(ab, "failed to extract pdev temperature event"); -+ tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); -+ if (IS_ERR(tb)) { -+ ath12k_warn(ab, "failed to parse tlv: %ld\n", PTR_ERR(tb)); - return; - } - -+ ev = tb[WMI_TAG_PDEV_TEMPERATURE_EVENT]; -+ if (!ev) { -+ ath12k_warn(ab, "failed to fetch pdev temp ev\n"); -+ kfree(tb); -+ return; -+ } -+ -+ temp = a_sle32_to_cpu(ev->temp); -+ pdev_id = le32_to_cpu(ev->pdev_id); -+ -+ kfree(tb); -+ - ath12k_dbg(ab, ATH12K_DBG_WMI, -- "pdev temperature ev temp %d pdev_id %d\n", ev.temp, ev.pdev_id); -+ "pdev temperature ev temp %d pdev_id %u\n", -+ temp, pdev_id); - - rcu_read_lock(); - -- ar = ath12k_mac_get_ar_by_pdev_id(ab, le32_to_cpu(ev.pdev_id)); -+ ar = ath12k_mac_get_ar_by_pdev_id(ab, pdev_id); - if (!ar) { -- ath12k_warn(ab, "invalid pdev id in pdev temperature ev %d", ev.pdev_id); -+ ath12k_warn(ab, "invalid pdev id %u in pdev temperature ev\n", -+ pdev_id); - goto exit; - } - -+ ath12k_thermal_event_temperature(ar, temp); -+ - exit: - rcu_read_unlock(); - } diff --git a/package/kernel/mac80211/patches/ath12k/100-ath12k-prevent-ltssm-startup-crash.patch b/package/kernel/mac80211/patches/ath12k/100-ath12k-prevent-ltssm-startup-crash.patch index a98c82f8180..0d05a19cba8 100644 --- a/package/kernel/mac80211/patches/ath12k/100-ath12k-prevent-ltssm-startup-crash.patch +++ b/package/kernel/mac80211/patches/ath12k/100-ath12k-prevent-ltssm-startup-crash.patch @@ -5,7 +5,7 @@ But have issues on BPI-Rx boards. --- a/drivers/net/wireless/ath/ath12k/pci.c +++ b/drivers/net/wireless/ath/ath12k/pci.c -@@ -297,6 +297,9 @@ static void ath12k_pci_enable_ltssm(stru +@@ -249,6 +249,9 @@ static void ath12k_pci_enable_ltssm(stru u32 val; int i; diff --git a/package/kernel/mac80211/patches/ath12k/102-wifi-ath12k-limit-WMI_SCAN_CHAN_LIST_CMDID-arg.patch b/package/kernel/mac80211/patches/ath12k/102-wifi-ath12k-limit-WMI_SCAN_CHAN_LIST_CMDID-arg.patch index 85b10713f8a..b2e93bb800a 100644 --- a/package/kernel/mac80211/patches/ath12k/102-wifi-ath12k-limit-WMI_SCAN_CHAN_LIST_CMDID-arg.patch +++ b/package/kernel/mac80211/patches/ath12k/102-wifi-ath12k-limit-WMI_SCAN_CHAN_LIST_CMDID-arg.patch @@ -130,19 +130,19 @@ Best regards, --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c -@@ -2900,6 +2900,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(s +@@ -2872,6 +2872,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(s max_chan_limit = (wmi->wmi_ab->max_msg_len[ar->pdev_idx] - len) / sizeof(*chan_info); + if (max_chan_limit > WMI_MAX_NUM_CHAN_PER_WMI_CMD) + max_chan_limit = WMI_MAX_NUM_CHAN_PER_WMI_CMD; + - num_send_chans = min(arg->nallchans, max_chan_limit); + num_send_chans = min3(arg->nallchans, max_chan_limit, + ATH12K_WMI_MAX_NUM_CHAN_PER_CMD); - arg->nallchans -= num_send_chans; --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h -@@ -4004,6 +4004,8 @@ struct wmi_stop_scan_cmd { +@@ -4035,6 +4035,8 @@ struct wmi_stop_scan_cmd { __le32 pdev_id; } __packed; diff --git a/package/kernel/mac80211/patches/ath12k/103-wifi-ath12k-fix-5GHz-operation-on-wideband-QCN.patch b/package/kernel/mac80211/patches/ath12k/103-wifi-ath12k-fix-5GHz-operation-on-wideband-QCN.patch index 2cb82ae411f..e5d71b47ea5 100644 --- a/package/kernel/mac80211/patches/ath12k/103-wifi-ath12k-fix-5GHz-operation-on-wideband-QCN.patch +++ b/package/kernel/mac80211/patches/ath12k/103-wifi-ath12k-fix-5GHz-operation-on-wideband-QCN.patch @@ -124,7 +124,7 @@ Best regards, --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c -@@ -7727,9 +7727,7 @@ static void ath12k_mac_setup_ht_vht_cap( +@@ -8600,9 +8600,7 @@ static void ath12k_mac_setup_ht_vht_cap( rate_cap_rx_chainmask); } diff --git a/package/kernel/mac80211/patches/ath12k/200-Revert-wifi-ath12k-convert-tasklet-to-BH-workqueue-f.patch b/package/kernel/mac80211/patches/ath12k/200-Revert-wifi-ath12k-convert-tasklet-to-BH-workqueue-f.patch index 6df26e0ddd9..9fbf460b5db 100644 --- a/package/kernel/mac80211/patches/ath12k/200-Revert-wifi-ath12k-convert-tasklet-to-BH-workqueue-f.patch +++ b/package/kernel/mac80211/patches/ath12k/200-Revert-wifi-ath12k-convert-tasklet-to-BH-workqueue-f.patch @@ -12,7 +12,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27. --- a/drivers/net/wireless/ath/ath12k/ce.h +++ b/drivers/net/wireless/ath/ath12k/ce.h -@@ -159,7 +159,7 @@ struct ath12k_ce_pipe { +@@ -165,7 +165,7 @@ struct ath12k_ce_pipe { void (*send_cb)(struct ath12k_ce_pipe *pipe); void (*recv_cb)(struct ath12k_base *ab, struct sk_buff *skb); @@ -23,7 +23,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27. struct ath12k_ce_ring *status_ring; --- a/drivers/net/wireless/ath/ath12k/pci.c +++ b/drivers/net/wireless/ath/ath12k/pci.c -@@ -448,9 +448,9 @@ static void ath12k_pci_sync_ce_irqs(stru +@@ -400,9 +400,9 @@ static void ath12k_pci_sync_ce_irqs(stru } } @@ -35,7 +35,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27. int irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + ce_pipe->pipe_num; ath12k_ce_per_engine_service(ce_pipe->ab, ce_pipe->pipe_num); -@@ -472,7 +472,7 @@ static irqreturn_t ath12k_pci_ce_interru +@@ -424,7 +424,7 @@ static irqreturn_t ath12k_pci_ce_interru disable_irq_nosync(ab->irq_num[irq_idx]); @@ -44,7 +44,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27. return IRQ_HANDLED; } -@@ -702,7 +702,7 @@ static int ath12k_pci_config_irq(struct +@@ -655,7 +655,7 @@ static int ath12k_pci_config_irq(struct irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + i; @@ -53,7 +53,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27. ret = request_irq(irq, ath12k_pci_ce_interrupt_handler, ab_pci->irq_flags, irq_name[irq_idx], -@@ -985,7 +985,7 @@ static void ath12k_pci_aspm_restore(stru +@@ -938,7 +938,7 @@ static void ath12k_pci_aspm_restore(stru PCI_EXP_LNKCTL_ASPMC); } @@ -62,7 +62,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27. { int i; -@@ -995,7 +995,7 @@ static void ath12k_pci_cancel_workqueue( +@@ -948,7 +948,7 @@ static void ath12k_pci_cancel_workqueue( if (ath12k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR) continue; @@ -71,7 +71,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27. } } -@@ -1003,7 +1003,7 @@ static void ath12k_pci_ce_irq_disable_sy +@@ -956,7 +956,7 @@ static void ath12k_pci_ce_irq_disable_sy { ath12k_pci_ce_irqs_disable(ab); ath12k_pci_sync_ce_irqs(ab); diff --git a/package/kernel/mac80211/patches/ath12k/300-ath12k-control-thermal-support-via-symbol.patch b/package/kernel/mac80211/patches/ath12k/300-ath12k-control-thermal-support-via-symbol.patch index 8d7e2d8cc55..be85496f7a7 100644 --- a/package/kernel/mac80211/patches/ath12k/300-ath12k-control-thermal-support-via-symbol.patch +++ b/package/kernel/mac80211/patches/ath12k/300-ath12k-control-thermal-support-via-symbol.patch @@ -17,7 +17,7 @@ Signed-off-by: Matt Merhar --- a/drivers/net/wireless/ath/ath12k/Kconfig +++ b/drivers/net/wireless/ath/ath12k/Kconfig -@@ -61,3 +61,10 @@ config ATH12K_COREDUMP +@@ -60,3 +60,10 @@ config ATH12K_COREDUMP If unsure, say Y to make it easier to debug problems. But if dump collection not required choose N. @@ -30,7 +30,7 @@ Signed-off-by: Matt Merhar + Enable ath12k thermal sensor support. --- a/drivers/net/wireless/ath/ath12k/Makefile +++ b/drivers/net/wireless/ath/ath12k/Makefile -@@ -30,7 +30,7 @@ ath12k-$(CPTCFG_ATH12K_TRACING) += trace +@@ -32,7 +32,7 @@ ath12k-$(CPTCFG_ATH12K_TRACING) += trace ath12k-$(CONFIG_PM) += wow.o ath12k-$(CPTCFG_ATH12K_COREDUMP) += coredump.o ath12k-$(CPTCFG_NL80211_TESTMODE) += testmode.o @@ -41,8 +41,8 @@ Signed-off-by: Matt Merhar CFLAGS_trace.o := -I$(src) --- a/drivers/net/wireless/ath/ath12k/thermal.h +++ b/drivers/net/wireless/ath/ath12k/thermal.h -@@ -17,7 +17,7 @@ struct ath12k_thermal { - struct device *hwmon_dev; +@@ -35,7 +35,7 @@ struct ath12k_thermal { + u32 throttle_state; }; -#if IS_REACHABLE(CONFIG_THERMAL) @@ -52,7 +52,7 @@ Signed-off-by: Matt Merhar void ath12k_thermal_event_temperature(struct ath12k *ar, int temperature); --- a/local-symbols +++ b/local-symbols -@@ -170,6 +170,7 @@ ATH12K_DEBUG= +@@ -173,6 +173,7 @@ ATH12K_DEBUG= ATH12K_DEBUGFS= ATH12K_TRACING= ATH12K_COREDUMP= diff --git a/package/kernel/mac80211/patches/ath12k/700-ath12k-read-calibration-variant-from-dt.patch b/package/kernel/mac80211/patches/ath12k/700-ath12k-read-calibration-variant-from-dt.patch index 9f857301def..6034ae7237b 100644 --- a/package/kernel/mac80211/patches/ath12k/700-ath12k-read-calibration-variant-from-dt.patch +++ b/package/kernel/mac80211/patches/ath12k/700-ath12k-read-calibration-variant-from-dt.patch @@ -32,7 +32,7 @@ Changes in v2: --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c -@@ -806,6 +806,28 @@ int ath12k_core_check_smbios(struct ath1 +@@ -812,6 +812,28 @@ int ath12k_core_check_smbios(struct ath1 return 0; } @@ -63,7 +63,7 @@ Changes in v2: int ret; --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c -@@ -2903,6 +2903,10 @@ int ath12k_qmi_request_target_cap(struct +@@ -2945,6 +2945,10 @@ int ath12k_qmi_request_target_cap(struct if (r) ath12k_dbg(ab, ATH12K_DBG_QMI, "SMBIOS bdf variant name not set.\n"); diff --git a/package/kernel/mac80211/patches/ath9k/341-wifi-ath9k-obtain-system-gpios.patch b/package/kernel/mac80211/patches/ath9k/341-wifi-ath9k-obtain-system-gpios.patch deleted file mode 100644 index 9a235aeeb1d..00000000000 --- a/package/kernel/mac80211/patches/ath9k/341-wifi-ath9k-obtain-system-gpios.patch +++ /dev/null @@ -1,273 +0,0 @@ -From patchwork Tue Apr 23 12:12:33 2024 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Linus Walleij -X-Patchwork-Id: 1926515 -Return-Path: - -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 - header.s=google header.b=qX99TQMM; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org - (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; - envelope-from=linux-gpio+bounces-5755-incoming=patchwork.ozlabs.org@vger.kernel.org; - receiver=patchwork.ozlabs.org) -Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org - [IPv6:2604:1380:45e3:2400::1]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (secp384r1)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4VP1Gc6RZKz1yZP - for ; Tue, 23 Apr 2024 22:12:56 +1000 (AEST) -Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org - [52.25.139.140]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5BB9C28522A - for ; Tue, 23 Apr 2024 12:12:55 +0000 (UTC) -Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) - by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F83B8563D; - Tue, 23 Apr 2024 12:12:41 +0000 (UTC) -Authentication-Results: smtp.subspace.kernel.org; - dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org - header.b="qX99TQMM" -X-Original-To: linux-gpio@vger.kernel.org -Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com - [209.85.208.179]) - (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) - (No client certificate requested) - by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8F3C82865 - for ; Tue, 23 Apr 2024 12:12:37 +0000 (UTC) -Authentication-Results: smtp.subspace.kernel.org; - arc=none smtp.client-ip=209.85.208.179 -ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; - t=1713874361; cv=none; - b=d6RcvcAu8hBYAK8Io489ZHQpJVXPwuokP6iMcAkbvElCerbXD6jAdqdi+RjDlo5C49GHGO4FQ19UwQn/VE//qSwiK1ulTSBp3OkvAmyb7yYAFnDs9AVNWRw+5/NxeFNn3fj5PyvqVymIbaJKabfrOVNwkz/5JMHxEIJtr6Crmog= -ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; - s=arc-20240116; t=1713874361; c=relaxed/simple; - bh=0eXJ5AIjzz1TBGZ8SlshIPrEHZaZwZfYEdof+dSpu4Y=; - h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; - b=EfFtruUxRIGy+jylEiJ2rPEyPCjGCc8ptT9FVxe6s0O/kW38Y6196xVQeiSV2tSKVCEOIO+9HoqmpgdKsJE7gU9++EcrasP96MYpsklYpc2zsWW3b8QEhfxfZ9Ai/idyYihE2u9dQ7a143P/Ij/twDrZTt24wO/mtHDrE5XcCFI= -ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; - dmarc=pass (p=none dis=none) header.from=linaro.org; - spf=pass smtp.mailfrom=linaro.org; - dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org - header.b=qX99TQMM; arc=none smtp.client-ip=209.85.208.179 -Authentication-Results: smtp.subspace.kernel.org; - dmarc=pass (p=none dis=none) header.from=linaro.org -Authentication-Results: smtp.subspace.kernel.org; - spf=pass smtp.mailfrom=linaro.org -Received: by mail-lj1-f179.google.com with SMTP id - 38308e7fff4ca-2dd041acff1so40839131fa.1 - for ; - Tue, 23 Apr 2024 05:12:37 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=linaro.org; s=google; t=1713874356; x=1714479156; - darn=vger.kernel.org; - h=cc:to:message-id:content-transfer-encoding:mime-version:subject - :date:from:from:to:cc:subject:date:message-id:reply-to; - bh=vysJsMiH5IVqdTs4yMwZxZ7nUmt2aG7eBhkn8qm8hvI=; - b=qX99TQMMdHbskFYUaw8c93sIJsUhKmj/WPdyahHcupUhwn5wol4aVoPczkOKYwJZhE - eoInxzjAHIl3UNKyvPPrD4MrbLcSoFT6mTFMsgRQYUghsLattmGcqIebu9XT556dBhsf - DydmpqGgnTOIa+IEknFxg24mo8Xn2LVmDC7LSGEYykUy1xLHd1NSq56YEaYXC7641xeZ - 9TOL0rZszeGld5cCS3013EmEeXQGCC3lAP83Eb48vbFXjPojkN0s40rZ2s8YpVsGT0iP - LeLVtP/E8XJqi4YipKryKSgbgOvQ1Bclle5+s+2qcJQNnSEjekMwR59BIRs3OZH2SRfN - gQdQ== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1713874356; x=1714479156; - h=cc:to:message-id:content-transfer-encoding:mime-version:subject - :date:from:x-gm-message-state:from:to:cc:subject:date:message-id - :reply-to; - bh=vysJsMiH5IVqdTs4yMwZxZ7nUmt2aG7eBhkn8qm8hvI=; - b=jEBH4NQ7SzFi2tnb1lgL06IchnBJoscNgKesjlorvou6X/9wDE/VbgxNFKR0zWwdTk - BEjG/ifFJxLmM9jdaCKu5cJc4yiDNXp7yZd48D71V34zJ4aINAGAx4hcOKqf95neFknx - nsFPpBFnTYFEpCLF0TebVoL6h6ehPzSojmkArzsrMppNvW2cwJ5gDlkqy2y4SezLanmM - 6iU0ksnwE0bb2iLkahhgo00Ejt33yqxwa+3xBfhOe9oYKSSZYnY7qVq055SSwt9IAq+H - REGyJN+GrvupTHagiioYe3LPXDPdOui9ZixXXDllw1t1yGUy+TkJu8xSqtvHEfg81FHP - AxtA== -X-Forwarded-Encrypted: i=1; - AJvYcCUbxzPklfPYrLgyY1I0ycuj7Dh04dcGVonYocA2mzxzlAEV107o0ELlFqr3O9Td+tV/t0eV9ly9YAbTY6n1XPnFXS5dsYYAZw6RHw== -X-Gm-Message-State: AOJu0YxsC7zdakTzntbiRFnN2A7yTrR0x+IpR6ce6eGn5kHeqIBi1km+ - zTVpRulbch3JsmzVDbCbbAAYoBkNgEA568YL6zdjVARnvFwNz1cqatOrR1AXUm0= -X-Google-Smtp-Source: - AGHT+IHBRMGvaJM98f86Z6m/RfVhK2XejjNGF3EvcRq/4x3oGM0DKpd2PbeCJdgmzHjLPVVbdsNzJg== -X-Received: by 2002:a2e:9852:0:b0:2d8:a98d:18e with SMTP id - e18-20020a2e9852000000b002d8a98d018emr7955886ljj.8.1713874355700; - Tue, 23 Apr 2024 05:12:35 -0700 (PDT) -Received: from [192.168.1.140] ([85.235.12.238]) - by smtp.gmail.com with ESMTPSA id - x6-20020a2e7c06000000b002da179d8d25sm1628982ljc.64.2024.04.23.05.12.33 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 23 Apr 2024 05:12:35 -0700 (PDT) -From: Linus Walleij -Date: Tue, 23 Apr 2024 14:12:33 +0200 -Subject: [PATCH v2] wifi: ath9k: Obtain system GPIOS from descriptors -Precedence: bulk -X-Mailing-List: linux-gpio@vger.kernel.org -List-Id: -List-Subscribe: -List-Unsubscribe: -MIME-Version: 1.0 -Message-Id: <20240423-descriptors-wireless-v2-1-6d1d03b30bfa@linaro.org> -X-B4-Tracking: v=1; b=H4sIALClJ2YC/22Nyw6CMBBFf4XM2hpanrLyPwyL0o4wCaFkxqCG9 - N+txKXLc5Nz7g6CTCjQZTswbiQUlgTmlIGb7DKiIp8YTG7KXBujPIpjWh+BRT2JcUYRNbTeXir - v7FBUkNSV8U6vI3vrE08kSXgfL5v+rr9gof8HN61yhdo1rvJ125T1dabFcjgHHqGPMX4Ao4iiN - LkAAAA= -To: Kalle Valo , - Andy Shevchenko , - Arnd Bergmann , Alban Bedel , - Bartosz Golaszewski , =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rg?= - =?utf-8?q?ensen?= -Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, - linux-gpio@vger.kernel.org, Linus Walleij -X-Mailer: b4 0.13.0 - -The ath9k has an odd use of system-wide GPIOs: if the chip -does not have internal GPIO capability, it will try to obtain a -GPIO line from the system GPIO controller: - - if (BIT(gpio) & ah->caps.gpio_mask) - ath9k_hw_gpio_cfg_wmac(...); - else if (AR_SREV_SOC(ah)) - ath9k_hw_gpio_cfg_soc(ah, gpio, out, label); - -Where ath9k_hw_gpio_cfg_soc() will attempt to issue -gpio_request_one() passing the local GPIO number of the controller -(0..31) to gpio_request_one(). - -This is somewhat peculiar and possibly even dangerous: there is -nowadays no guarantee of the numbering of these system-wide -GPIOs, and assuming that GPIO 0..31 as used by ath9k would -correspond to GPIOs 0..31 on the system as a whole seems a bit -wild. - -Register all 32 GPIOs at index 0..31 directly in the ATH79K -GPIO driver and associate with WIFI if and only if we are probing -ATH79K wifi from the AHB bus (used for SoCs). - -Signed-off-by: Linus Walleij ---- -Changes in v2: -- Define all the descriptors directly in the ATH79K - GPIO driver in case the driver want to request them directly. -- Link to v1: https://lore.kernel.org/r/20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org ---- - drivers/net/wireless/ath/ath9k/hw.c | 29 ++++++++++++----------- - drivers/net/wireless/ath/ath9k/hw.h | 3 ++- - 2 files changed, 32 insertions(+), 15 deletions(-) - - ---- -base-commit: 4cece764965020c22cff7665b18a012006359095 -change-id: 20240122-descriptors-wireless-b8da95dcab35 - -Best regards, - ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - - #include "hw.h" -@@ -2719,19 +2719,25 @@ static void ath9k_hw_gpio_cfg_output_mux - static void ath9k_hw_gpio_cfg_soc(struct ath_hw *ah, u32 gpio, bool out, - const char *label) - { -+ enum gpiod_flags flags = out ? GPIOD_OUT_LOW : GPIOD_IN; -+ struct gpio_desc *gpiod; - int err; - -- if (ah->caps.gpio_requested & BIT(gpio)) -+ if (ah->gpiods[gpio]) - return; - -- err = devm_gpio_request_one(ah->dev, gpio, out ? GPIOF_OUT_INIT_LOW : GPIOF_IN, label); -- if (err) { -+ /* Obtains a system specific GPIO descriptor from another GPIO controller */ -+ gpiod = gpiod_get_index(NULL, "ath9k", gpio, flags); -+ -+ if (IS_ERR(gpiod)) { -+ err = PTR_ERR(gpiod); - ath_err(ath9k_hw_common(ah), "request GPIO%d failed:%d\n", - gpio, err); - return; - } - -- ah->caps.gpio_requested |= BIT(gpio); -+ gpiod_set_consumer_name(gpiod, label); -+ ah->gpiods[gpio] = gpiod; - } - - static void ath9k_hw_gpio_cfg_wmac(struct ath_hw *ah, u32 gpio, bool out, -@@ -2793,8 +2799,10 @@ void ath9k_hw_gpio_free(struct ath_hw *a - - WARN_ON(gpio >= ah->caps.num_gpio_pins); - -- if (ah->caps.gpio_requested & BIT(gpio)) -- ah->caps.gpio_requested &= ~BIT(gpio); -+ if (ah->gpiods[gpio]) { -+ gpiod_put(ah->gpiods[gpio]); -+ ah->gpiods[gpio] = NULL; -+ } - } - EXPORT_SYMBOL(ath9k_hw_gpio_free); - -@@ -2822,8 +2830,8 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah, - val = REG_READ(ah, AR_GPIO_IN(ah)) & BIT(gpio); - else - val = MS_REG_READ(AR, gpio); -- } else if (BIT(gpio) & ah->caps.gpio_requested) { -- val = gpio_get_value(gpio) & BIT(gpio); -+ } else if (ah->gpiods[gpio]) { -+ val = gpiod_get_value(ah->gpiods[gpio]); - } else { - WARN_ON(1); - } -@@ -2846,8 +2854,8 @@ void ath9k_hw_set_gpio(struct ath_hw *ah - AR7010_GPIO_OUT : AR_GPIO_IN_OUT(ah); - - REG_RMW(ah, out_addr, val << gpio, BIT(gpio)); -- } else if (BIT(gpio) & ah->caps.gpio_requested) { -- gpio_set_value(gpio, val); -+ } else if (ah->gpiods[gpio]) { -+ gpiod_set_value(ah->gpiods[gpio], val); - } else { - WARN_ON(1); - } ---- a/drivers/net/wireless/ath/ath9k/hw.h -+++ b/drivers/net/wireless/ath/ath9k/hw.h -@@ -19,6 +19,7 @@ - - #include - #include -+#include - #include - #include - -@@ -302,7 +303,6 @@ struct ath9k_hw_capabilities { - u8 max_rxchains; - u8 num_gpio_pins; - u32 gpio_mask; -- u32 gpio_requested; - u8 rx_hp_qdepth; - u8 rx_lp_qdepth; - u8 rx_status_len; -@@ -783,6 +783,7 @@ struct ath_hw { - struct ath9k_hw_capabilities caps; - struct ath9k_channel channels[ATH9K_NUM_CHANNELS]; - struct ath9k_channel *curchan; -+ struct gpio_desc *gpiods[32]; - - union { - struct ar5416_eeprom_def def; diff --git a/package/kernel/mac80211/patches/ath9k/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch b/package/kernel/mac80211/patches/ath9k/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch index 9016da963b3..01b4edafa6c 100644 --- a/package/kernel/mac80211/patches/ath9k/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch +++ b/package/kernel/mac80211/patches/ath9k/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch @@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411. --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -2975,7 +2975,8 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2970,7 +2970,8 @@ void ath9k_hw_apply_txpower(struct ath_h { struct ath_regulatory *reg = ath9k_hw_regulatory(ah); struct ieee80211_channel *channel; @@ -18,7 +18,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411. u16 ctl = NO_CTL; if (!chan) -@@ -2987,9 +2988,14 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2982,9 +2983,14 @@ void ath9k_hw_apply_txpower(struct ath_h channel = chan->chan; chan_pwr = min_t(int, channel->max_power * 2, MAX_COMBINED_POWER); new_pwr = min_t(int, chan_pwr, reg->power_limit); diff --git a/package/kernel/mac80211/patches/ath9k/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch b/package/kernel/mac80211/patches/ath9k/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch index 5e5f3e4f102..184bf45b168 100644 --- a/package/kernel/mac80211/patches/ath9k/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch +++ b/package/kernel/mac80211/patches/ath9k/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -2994,6 +2994,10 @@ void ath9k_hw_apply_txpower(struct ath_h +@@ -2989,6 +2989,10 @@ void ath9k_hw_apply_txpower(struct ath_h if (ant_gain > max_gain) ant_reduction = ant_gain - max_gain; diff --git a/package/kernel/mac80211/patches/ath9k/410-ath9k_allow_adhoc_and_ap.patch b/package/kernel/mac80211/patches/ath9k/410-ath9k_allow_adhoc_and_ap.patch index 978d915c544..c9cc4f9a936 100644 --- a/package/kernel/mac80211/patches/ath9k/410-ath9k_allow_adhoc_and_ap.patch +++ b/package/kernel/mac80211/patches/ath9k/410-ath9k_allow_adhoc_and_ap.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -836,6 +836,7 @@ static const struct ieee80211_iface_limi +@@ -835,6 +835,7 @@ static const struct ieee80211_iface_limi BIT(NL80211_IFTYPE_AP) }, { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) }, diff --git a/package/kernel/mac80211/patches/ath9k/450-ath9k-enabled-MFP-capability-unconditionally.patch b/package/kernel/mac80211/patches/ath9k/450-ath9k-enabled-MFP-capability-unconditionally.patch index dffeb32611a..41517a9c277 100644 --- a/package/kernel/mac80211/patches/ath9k/450-ath9k-enabled-MFP-capability-unconditionally.patch +++ b/package/kernel/mac80211/patches/ath9k/450-ath9k-enabled-MFP-capability-unconditionally.patch @@ -14,7 +14,7 @@ Signed-off-by: David Bauer --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -917,6 +917,7 @@ static void ath9k_set_hw_capab(struct at +@@ -916,6 +916,7 @@ static void ath9k_set_hw_capab(struct at ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); ieee80211_hw_set(hw, SUPPORT_FAST_XMIT); ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS); @@ -22,7 +22,7 @@ Signed-off-by: David Bauer if (ath9k_ps_enable) ieee80211_hw_set(hw, SUPPORTS_PS); -@@ -929,9 +930,6 @@ static void ath9k_set_hw_capab(struct at +@@ -928,9 +929,6 @@ static void ath9k_set_hw_capab(struct at IEEE80211_RADIOTAP_MCS_HAVE_STBC; } diff --git a/package/kernel/mac80211/patches/ath9k/501-ath9k_ahb_init.patch b/package/kernel/mac80211/patches/ath9k/501-ath9k_ahb_init.patch index 2aee171608d..997e9faa707 100644 --- a/package/kernel/mac80211/patches/ath9k/501-ath9k_ahb_init.patch +++ b/package/kernel/mac80211/patches/ath9k/501-ath9k_ahb_init.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -1132,25 +1132,25 @@ static int __init ath9k_init(void) +@@ -1130,25 +1130,25 @@ static int __init ath9k_init(void) { int error; diff --git a/package/kernel/mac80211/patches/ath9k/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/ath9k/512-ath9k_channelbw_debugfs.patch index ebf8297d522..e7ee298662a 100644 --- a/package/kernel/mac80211/patches/ath9k/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/ath9k/512-ath9k_channelbw_debugfs.patch @@ -166,7 +166,7 @@ common->ops = &ah->reg_ops; common->ps_ops = &ath9k_htc_ps_ops; common->bus_ops = &ath9k_usb_bus_ops; -@@ -746,9 +747,9 @@ static void ath9k_set_hw_capab(struct at +@@ -746,9 +747,8 @@ static void ath9k_set_hw_capab(struct at hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | @@ -174,14 +174,13 @@ - - hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; + WIPHY_FLAG_HAS_CHANNEL_SWITCH | -+ WIPHY_FLAG_SUPPORTS_5_10_MHZ | + WIPHY_FLAG_SUPPORTS_TDLS; hw->queues = 4; hw->max_listen_interval = 1; --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -691,6 +691,7 @@ static int ath9k_init_softc(u16 devid, s +@@ -690,6 +690,7 @@ static int ath9k_init_softc(u16 devid, s if (!ath9k_is_chanctx_enabled()) sc->cur_chan->hw_queue_base = 0; diff --git a/package/kernel/mac80211/patches/ath9k/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/ath9k/530-ath9k_extra_leds.patch index ad025b4e081..c7914d96cfd 100644 --- a/package/kernel/mac80211/patches/ath9k/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/ath9k/530-ath9k_extra_leds.patch @@ -183,7 +183,7 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -1043,7 +1043,7 @@ int ath9k_init_device(u16 devid, struct +@@ -1041,7 +1041,7 @@ int ath9k_init_device(u16 devid, struct #ifdef CPTCFG_MAC80211_LEDS /* must be initialized before ieee80211_register_hw */ diff --git a/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch index 19b208a765b..e9bb1dd9af4 100644 --- a/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch @@ -84,7 +84,7 @@ bool reset_power_on; bool htc_reset_init; -@@ -1080,6 +1088,7 @@ void ath9k_hw_check_nav(struct ath_hw *a +@@ -1078,6 +1086,7 @@ void ath9k_hw_check_nav(struct ath_hw *a bool ath9k_hw_check_alive(struct ath_hw *ah); bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode); diff --git a/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch b/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch index 36fc82d335a..0d1b0d2d836 100644 --- a/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch +++ b/package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch @@ -94,7 +94,7 @@ /**************************/ /* Initialization */ /**************************/ -@@ -626,6 +706,7 @@ static int ath9k_of_init(struct ath_soft +@@ -625,6 +705,7 @@ static int ath9k_of_init(struct ath_soft struct ath_common *common = ath9k_hw_common(ah); enum ath_bus_type bus_type = common->bus_ops->ath_bus_type; char eeprom_name[100]; @@ -102,7 +102,7 @@ int ret; if (!of_device_is_available(np)) -@@ -633,6 +714,46 @@ static int ath9k_of_init(struct ath_soft +@@ -632,6 +713,46 @@ static int ath9k_of_init(struct ath_soft ath_dbg(common, CONFIG, "parsing configuration from OF node\n"); @@ -149,7 +149,7 @@ if (of_property_read_bool(np, "qca,no-eeprom")) { /* ath9k-eeprom--.bin */ scnprintf(eeprom_name, sizeof(eeprom_name), -@@ -651,6 +772,17 @@ static int ath9k_of_init(struct ath_soft +@@ -650,6 +771,17 @@ static int ath9k_of_init(struct ath_soft if (ret == -EPROBE_DEFER) return ret; diff --git a/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch index 8f762848ae1..7a27789525f 100644 --- a/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch @@ -374,7 +374,7 @@ --- a/local-symbols +++ b/local-symbols -@@ -118,6 +118,7 @@ ATH9K_WOW= +@@ -120,6 +120,7 @@ ATH9K_WOW= ATH9K_RFKILL= ATH9K_CHANNEL_CONTEXT= ATH9K_PCOEM= diff --git a/package/kernel/mac80211/patches/ath9k/600-wifi-ath9k-Clear-DMA-descriptors-without-memset.patch b/package/kernel/mac80211/patches/ath9k/600-wifi-ath9k-Clear-DMA-descriptors-without-memset.patch deleted file mode 100644 index 9c64ae2c03b..00000000000 --- a/package/kernel/mac80211/patches/ath9k/600-wifi-ath9k-Clear-DMA-descriptors-without-memset.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 3e14d832e30b10478d2b0945ff2651f6784385a7 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Sat, 16 May 2026 16:43:10 -0700 -Subject: [PATCH] wifi: ath9k: Clear DMA descriptors without memset - -Clear ath9k DMA descriptors with explicit status word stores instead of -memset(). The descriptor rings are coherent DMA memory, which may be -mapped uncached on 32-bit powerpc. The optimized memset() path can use -dcbz there and trigger an alignment warning. - -Use WRITE_ONCE() for the descriptor status words so the compiler keeps -the clears as ordinary stores instead of folding them back into bulk -memset(). This covers AR9003 TX status descriptors as well as the RX -status area cleared when setting up RX descriptors. - -Assisted-by: Codex:GPT-5.5 -Signed-off-by: Rosen Penev ---- - drivers/net/wireless/ath/ath9k/ar9002_mac.c | 15 +++++++++++++- - drivers/net/wireless/ath/ath9k/ar9003_mac.c | 23 +++++++++++++++++---- - 2 files changed, 33 insertions(+), 5 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c -+++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c -@@ -403,6 +403,19 @@ static int ar9002_hw_get_duration(struct - } - } - -+static void ath9k_hw_clear_rxdesc_status(struct ar5416_desc *ads) -+{ -+ WRITE_ONCE(ads->u.rx.status0, 0); -+ WRITE_ONCE(ads->u.rx.status1, 0); -+ WRITE_ONCE(ads->u.rx.status2, 0); -+ WRITE_ONCE(ads->u.rx.status3, 0); -+ WRITE_ONCE(ads->u.rx.status4, 0); -+ WRITE_ONCE(ads->u.rx.status5, 0); -+ WRITE_ONCE(ads->u.rx.status6, 0); -+ WRITE_ONCE(ads->u.rx.status7, 0); -+ WRITE_ONCE(ads->u.rx.status8, 0); -+} -+ - void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds, - u32 size, u32 flags) - { -@@ -412,7 +425,7 @@ void ath9k_hw_setuprxdesc(struct ath_hw - if (flags & ATH9K_RXDESC_INTREQ) - ads->ds_ctl1 |= AR_RxIntrReq; - -- memset(&ads->u.rx, 0, sizeof(ads->u.rx)); -+ ath9k_hw_clear_rxdesc_status(ads); - } - EXPORT_SYMBOL(ath9k_hw_setuprxdesc); - ---- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c -@@ -352,6 +352,19 @@ static bool ar9003_hw_get_isr(struct ath - return true; - } - -+static void ath9k_hw_clear_txstatus(struct ar9003_txs *ads) -+{ -+ WRITE_ONCE(ads->ds_info, 0); -+ WRITE_ONCE(ads->status1, 0); -+ WRITE_ONCE(ads->status2, 0); -+ WRITE_ONCE(ads->status3, 0); -+ WRITE_ONCE(ads->status4, 0); -+ WRITE_ONCE(ads->status5, 0); -+ WRITE_ONCE(ads->status6, 0); -+ WRITE_ONCE(ads->status7, 0); -+ WRITE_ONCE(ads->status8, 0); -+} -+ - static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds, - struct ath_tx_status *ts) - { -@@ -370,7 +383,7 @@ static int ar9003_hw_proc_txdesc(struct - (MS(ads->ds_info, AR_TxRxDesc) != 1)) { - ath_dbg(ath9k_hw_common(ah), XMIT, - "Tx Descriptor error %x\n", ads->ds_info); -- memset(ads, 0, sizeof(*ads)); -+ ath9k_hw_clear_txstatus(ads); - return -EIO; - } - -@@ -427,7 +440,7 @@ static int ar9003_hw_proc_txdesc(struct - ts->ts_rssi_ext1 = MS(status, AR_TxRSSIAnt11); - ts->ts_rssi_ext2 = MS(status, AR_TxRSSIAnt12); - -- memset(ads, 0, sizeof(*ads)); -+ ath9k_hw_clear_txstatus(ads); - - return 0; - } -@@ -591,10 +604,12 @@ EXPORT_SYMBOL(ath9k_hw_process_rxdesc_ed - - void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah) - { -+ int i; -+ - ah->ts_tail = 0; - -- memset((void *) ah->ts_ring, 0, -- ah->ts_size * sizeof(struct ar9003_txs)); -+ for (i = 0; i < ah->ts_size; i++) -+ ath9k_hw_clear_txstatus(&ah->ts_ring[i]); - - ath_dbg(ath9k_hw_common(ah), XMIT, - "TS Start 0x%x End 0x%x Virt %p, Size %d\n", diff --git a/package/kernel/mac80211/patches/ath9k/601-wifi-ath9k-remove-TX99-power-array-zero-init.patch b/package/kernel/mac80211/patches/ath9k/601-wifi-ath9k-remove-TX99-power-array-zero-init.patch deleted file mode 100644 index 84c7e67fa94..00000000000 --- a/package/kernel/mac80211/patches/ath9k/601-wifi-ath9k-remove-TX99-power-array-zero-init.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0da0cfb0840f7fe7df34bde4f787d3435e3db674 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Sat, 16 May 2026 20:28:16 -0700 -Subject: [PATCH] wifi: ath9k: remove TX99 power array zero init - -This array is fully initialized in the loop itself. No need to zero -initialize and then overwrite. - -Remove static from the array. This was a holdover from when the array -was a static global variable. It no longer confers any benefit. - -Also add a min() call to avoid the manual if/ternary operation. - -Assisted-by: Codex:GPT-5.5 -Signed-off-by: Rosen Penev ---- - drivers/net/wireless/ath/ath9k/ar9003_phy.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c -@@ -1737,10 +1737,10 @@ static void ar9003_hw_tx99_stop(struct a - - static void ar9003_hw_tx99_set_txpower(struct ath_hw *ah, u8 txpower) - { -- static u8 p_pwr_array[ar9300RateSize] = { 0 }; -+ u8 p_pwr_array[ar9300RateSize]; - unsigned int i; - -- txpower = txpower <= MAX_RATE_POWER ? txpower : MAX_RATE_POWER; -+ txpower = min(txpower, MAX_RATE_POWER); - for (i = 0; i < ar9300RateSize; i++) - p_pwr_array[i] = txpower; - diff --git a/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch b/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch index 295a4cca738..4b6f0d480a1 100644 --- a/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch +++ b/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch @@ -22,7 +22,7 @@ static int modparam_bad_frames_preempt; module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444); MODULE_PARM_DESC(bad_frames_preempt, -@@ -2870,10 +2875,10 @@ static int b43_gpio_init(struct b43_wlde +@@ -2879,10 +2884,10 @@ static int b43_gpio_init(struct b43_wlde u32 mask, set; b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0); diff --git a/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch b/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch index e395d482028..e33df18a862 100644 --- a/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch +++ b/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch @@ -11,7 +11,7 @@ b43-$(CPTCFG_B43_LEDS) += leds.o --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -2001,10 +2001,12 @@ static void b43_do_interrupt_thread(stru +@@ -2002,10 +2002,12 @@ static void b43_do_interrupt_thread(stru dma_reason[0], dma_reason[1], dma_reason[2], dma_reason[3], dma_reason[4], dma_reason[5]); diff --git a/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch b/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch index 70d8f9129d4..92931562d44 100644 --- a/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch +++ b/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -1643,7 +1643,7 @@ static void b43_write_beacon_template(st +@@ -1644,7 +1644,7 @@ static void b43_write_beacon_template(st len, ram_offset, shm_size_offset, rate); /* Write the PHY TX control parameters. */ @@ -9,7 +9,7 @@ antenna = b43_antenna_to_phyctl(antenna); ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL); /* We can't send beacons with short preamble. Would get PHY errors. */ -@@ -3285,8 +3285,8 @@ static int b43_chip_init(struct b43_wlde +@@ -3294,8 +3294,8 @@ static int b43_chip_init(struct b43_wlde /* Select the antennae */ if (phy->ops->set_rx_antenna) @@ -20,7 +20,7 @@ if (phy->type == B43_PHYTYPE_B) { value16 = b43_read16(dev, 0x005E); -@@ -3988,7 +3988,6 @@ static int b43_op_config(struct ieee8021 +@@ -3997,7 +3997,6 @@ static int b43_op_config(struct ieee8021 struct b43_wldev *dev = wl->current_dev; struct b43_phy *phy = &dev->phy; struct ieee80211_conf *conf = &hw->conf; @@ -28,7 +28,7 @@ int err = 0; mutex_lock(&wl->mutex); -@@ -4031,11 +4030,9 @@ static int b43_op_config(struct ieee8021 +@@ -4040,11 +4039,9 @@ static int b43_op_config(struct ieee8021 } /* Antennas for RX and management frame TX. */ @@ -42,7 +42,7 @@ if (wl->radio_enabled != phy->radio_on) { if (wl->radio_enabled) { -@@ -5178,6 +5175,49 @@ static int b43_op_get_survey(struct ieee +@@ -5192,6 +5189,49 @@ static int b43_op_get_survey(struct ieee return 0; } @@ -92,7 +92,7 @@ static const struct ieee80211_ops b43_hw_ops = { .add_chanctx = ieee80211_emulate_add_chanctx, .remove_chanctx = ieee80211_emulate_remove_chanctx, -@@ -5204,6 +5244,8 @@ static const struct ieee80211_ops b43_hw +@@ -5218,6 +5258,8 @@ static const struct ieee80211_ops b43_hw .sw_scan_complete = b43_op_sw_scan_complete_notifier, .get_survey = b43_op_get_survey, .rfkill_poll = b43_rfkill_poll, @@ -101,7 +101,7 @@ }; /* Hard-reset the chip. Do not call this directly. -@@ -5505,6 +5547,8 @@ static int b43_one_core_attach(struct b4 +@@ -5519,6 +5561,8 @@ static int b43_one_core_attach(struct b4 if (!wldev) goto out; @@ -110,7 +110,7 @@ wldev->use_pio = b43_modparam_pio; wldev->dev = dev; wldev->wl = wl; -@@ -5596,6 +5640,9 @@ static struct b43_wl *b43_wireless_init( +@@ -5610,6 +5654,9 @@ static struct b43_wl *b43_wireless_init( wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); diff --git a/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch b/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch index f7aa413208f..b669d8cc81a 100644 --- a/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch +++ b/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -2887,6 +2887,14 @@ static int b43_gpio_init(struct b43_wlde +@@ -2896,6 +2896,14 @@ static int b43_gpio_init(struct b43_wlde } else if (dev->dev->chip_id == 0x5354) { /* Don't allow overtaking buttons GPIOs */ set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */ diff --git a/package/kernel/mac80211/patches/brcm/870-02-rpi-6.12-brcmfmac-Prefer-a-ccode-from-OTP-over-nvram-file.patch b/package/kernel/mac80211/patches/brcm/870-02-rpi-6.12-brcmfmac-Prefer-a-ccode-from-OTP-over-nvram-file.patch index bff8e2dac3b..23e149b8c4e 100644 --- a/package/kernel/mac80211/patches/brcm/870-02-rpi-6.12-brcmfmac-Prefer-a-ccode-from-OTP-over-nvram-file.patch +++ b/package/kernel/mac80211/patches/brcm/870-02-rpi-6.12-brcmfmac-Prefer-a-ccode-from-OTP-over-nvram-file.patch @@ -22,7 +22,7 @@ Signed-off-by: Phil Elwell #include #include #include -@@ -8270,31 +8271,45 @@ static void brcmf_cfg80211_reg_notifier( +@@ -8272,31 +8273,45 @@ static void brcmf_cfg80211_reg_notifier( struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); struct brcmf_pub *drvr = cfg->pub; struct brcmf_fil_country_le ccreq; diff --git a/package/kernel/mac80211/patches/brcm/870-03-rpi-6.12-brcmfmac-Increase-power-saving-delay-to-2s.patch b/package/kernel/mac80211/patches/brcm/870-03-rpi-6.12-brcmfmac-Increase-power-saving-delay-to-2s.patch index 843d134e6b5..a0b63a74a04 100644 --- a/package/kernel/mac80211/patches/brcm/870-03-rpi-6.12-brcmfmac-Increase-power-saving-delay-to-2s.patch +++ b/package/kernel/mac80211/patches/brcm/870-03-rpi-6.12-brcmfmac-Increase-power-saving-delay-to-2s.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -3360,6 +3360,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip +@@ -3361,6 +3361,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip bphy_err(drvr, "error (%d)\n", err); } diff --git a/package/kernel/mac80211/patches/brcm/870-04-rpi-6.12-brcmfmac-non-upstream-support-DS1-exit-firmware-re-download.patch b/package/kernel/mac80211/patches/brcm/870-04-rpi-6.12-brcmfmac-non-upstream-support-DS1-exit-firmware-re-download.patch index 8f6076e4a39..42aacd8354e 100644 --- a/package/kernel/mac80211/patches/brcm/870-04-rpi-6.12-brcmfmac-non-upstream-support-DS1-exit-firmware-re-download.patch +++ b/package/kernel/mac80211/patches/brcm/870-04-rpi-6.12-brcmfmac-non-upstream-support-DS1-exit-firmware-re-download.patch @@ -39,7 +39,7 @@ JIRA: SWWLAN-136577 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h -@@ -298,7 +298,7 @@ void brcmf_rx_event(struct device *dev, +@@ -304,7 +304,7 @@ void brcmf_rx_event(struct device *dev, int brcmf_alloc(struct device *dev, struct brcmf_mp_device *settings); /* Indication from bus module regarding presence/insertion of dongle. */ @@ -59,7 +59,7 @@ JIRA: SWWLAN-136577 MODULE_AUTHOR("Broadcom Corporation"); MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver."); -@@ -274,6 +276,8 @@ int brcmf_c_preinit_dcmds(struct brcmf_i +@@ -273,6 +275,8 @@ int brcmf_c_preinit_dcmds(struct brcmf_i char *clmver; char *ptr; s32 err; @@ -68,7 +68,7 @@ JIRA: SWWLAN-136577 if (is_valid_ether_addr(ifp->mac_addr)) { /* set mac address */ -@@ -433,6 +437,41 @@ int brcmf_c_preinit_dcmds(struct brcmf_i +@@ -432,6 +436,41 @@ int brcmf_c_preinit_dcmds(struct brcmf_i goto done; } @@ -112,7 +112,7 @@ JIRA: SWWLAN-136577 BRCMF_DEFAULT_SCAN_CHANNEL_TIME); --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -1327,7 +1327,7 @@ int brcmf_alloc(struct device *dev, stru +@@ -1356,7 +1356,7 @@ int brcmf_alloc(struct device *dev, stru return 0; } @@ -121,7 +121,7 @@ JIRA: SWWLAN-136577 { struct brcmf_bus *bus_if = dev_get_drvdata(dev); struct brcmf_pub *drvr = bus_if->drvr; -@@ -1370,10 +1370,13 @@ int brcmf_attach(struct device *dev) +@@ -1399,10 +1399,13 @@ int brcmf_attach(struct device *dev) brcmf_fwvid_get_cfg80211_ops(drvr); @@ -205,7 +205,7 @@ JIRA: SWWLAN-136577 void *data); --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -@@ -2214,7 +2214,7 @@ static void brcmf_pcie_setup(struct devi +@@ -2217,7 +2217,7 @@ static void brcmf_pcie_setup(struct devi init_waitqueue_head(&devinfo->mbdata_resp_wait); @@ -518,7 +518,7 @@ JIRA: SWWLAN-136577 /* ready */ return; -@@ -4652,3 +4863,40 @@ int brcmf_sdio_sleep(struct brcmf_sdio * +@@ -4658,3 +4869,40 @@ int brcmf_sdio_sleep(struct brcmf_sdio * return ret; } @@ -606,7 +606,7 @@ JIRA: SWWLAN-136577 }; /* sdio core registers */ -@@ -367,4 +398,83 @@ void brcmf_sdio_wowl_config(struct devic +@@ -368,4 +399,83 @@ void brcmf_sdio_wowl_config(struct devic int brcmf_sdio_sleep(struct brcmf_sdio *bus, bool sleep); void brcmf_sdio_trigger_dpc(struct brcmf_sdio *bus); @@ -701,7 +701,7 @@ JIRA: SWWLAN-136577 if (ret) goto error; -@@ -1288,7 +1288,7 @@ static int brcmf_usb_probe_cb(struct brc +@@ -1289,7 +1289,7 @@ static int brcmf_usb_probe_cb(struct brc ret = brcmf_alloc(devinfo->dev, devinfo->settings); if (ret) goto fail; diff --git a/package/kernel/mac80211/patches/brcm/870-05-rpi-6.12-brcmfmac-Fix-interoperating-DPP-and-other-encryption.patch b/package/kernel/mac80211/patches/brcm/870-05-rpi-6.12-brcmfmac-Fix-interoperating-DPP-and-other-encryption.patch index cc8a842f4e0..e80f5a07116 100644 --- a/package/kernel/mac80211/patches/brcm/870-05-rpi-6.12-brcmfmac-Fix-interoperating-DPP-and-other-encryption.patch +++ b/package/kernel/mac80211/patches/brcm/870-05-rpi-6.12-brcmfmac-Fix-interoperating-DPP-and-other-encryption.patch @@ -108,7 +108,7 @@ Signed-off-by: Chi-hsien Lin */ --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c -@@ -1281,6 +1281,10 @@ static s32 brcmf_p2p_abort_action_frame( +@@ -1283,6 +1283,10 @@ static s32 brcmf_p2p_abort_action_frame( brcmf_dbg(TRACE, "Enter\n"); vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; @@ -119,7 +119,7 @@ Signed-off-by: Chi-hsien Lin err = brcmf_fil_bsscfg_data_set(vif->ifp, "actframe_abort", &int_val, sizeof(s32)); if (err) -@@ -1817,6 +1821,7 @@ bool brcmf_p2p_send_action_frame(struct +@@ -1819,6 +1823,7 @@ bool brcmf_p2p_send_action_frame(struct /* validate channel and p2p ies */ if (config_af_params.search_channel && IS_P2P_SOCIAL_CHANNEL(le32_to_cpu(af_params->channel)) && diff --git a/package/kernel/mac80211/patches/brcm/871-brcmfmac-disable-dump_survey-on-bcm2835.patch b/package/kernel/mac80211/patches/brcm/871-brcmfmac-disable-dump_survey-on-bcm2835.patch index e2c1eb8e23c..a146ad230ce 100644 --- a/package/kernel/mac80211/patches/brcm/871-brcmfmac-disable-dump_survey-on-bcm2835.patch +++ b/package/kernel/mac80211/patches/brcm/871-brcmfmac-disable-dump_survey-on-bcm2835.patch @@ -9,7 +9,7 @@ Signed-off-by: Álvaro Fernández Rojas --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -8049,6 +8049,7 @@ static s32 brcmf_translate_country_code( +@@ -8051,6 +8051,7 @@ static s32 brcmf_translate_country_code( return 0; } @@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas static int brcmf_parse_dump_obss(char *buf, struct brcmf_dump_survey *survey) { -@@ -8271,6 +8272,7 @@ exit: +@@ -8273,6 +8274,7 @@ exit: brcmf_set_mpc(ifp, 1); return err; } @@ -25,7 +25,7 @@ Signed-off-by: Álvaro Fernández Rojas static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, struct regulatory_request *req) -@@ -8437,8 +8439,10 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -8439,8 +8441,10 @@ struct brcmf_cfg80211_info *brcmf_cfg802 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK)) ops->set_rekey_data = brcmf_cfg80211_set_rekey_data; #endif diff --git a/package/kernel/mac80211/patches/build/006-crypto_aes.patch b/package/kernel/mac80211/patches/build/006-crypto_aes.patch new file mode 100644 index 00000000000..fbc515a265d --- /dev/null +++ b/package/kernel/mac80211/patches/build/006-crypto_aes.patch @@ -0,0 +1,61 @@ +--- a/compat/lib-crypto-aes.c ++++ b/compat/lib-crypto-aes.c +@@ -515,7 +515,7 @@ void aes_decrypt(const struct aes_key *k + } + EXPORT_SYMBOL(aes_decrypt); + +-#if IS_ENABLED(CONFIG_CRYPTO_LIB_AES_CBC_MACS) ++#if IS_ENABLED(CPTCFG_BACKPORTED_BPAUTO_CRYPTO_LIB_AES_CBC_MACS) + + #ifndef aes_cbcmac_blocks_arch + static bool aes_cbcmac_blocks_arch(u8 h[AES_BLOCK_SIZE], +@@ -710,49 +710,8 @@ void aes_cbcmac_final(struct aes_cbcmac_ + } + EXPORT_SYMBOL_NS_GPL(aes_cbcmac_final, "CRYPTO_INTERNAL"); + +-/* +- * FIPS cryptographic algorithm self-test for AES-CMAC. As per the FIPS 140-3 +- * Implementation Guidance, a cryptographic algorithm self-test for at least one +- * of AES-GCM, AES-CCM, AES-CMAC, or AES-GMAC is required if any of those modes +- * is implemented. This fulfills that requirement via AES-CMAC. +- * +- * This is just for FIPS. The full tests are in the KUnit test suite. +- */ +-static void __init aes_cmac_fips_test(void) +-{ +- struct aes_cmac_key key; +- u8 mac[AES_BLOCK_SIZE]; +- +- if (aes_cmac_preparekey(&key, fips_test_key, sizeof(fips_test_key)) != +- 0) +- panic("aes: CMAC FIPS self-test failed (preparekey)\n"); +- aes_cmac(&key, fips_test_data, sizeof(fips_test_data), mac); +- if (memcmp(fips_test_aes_cmac_value, mac, sizeof(mac)) != 0) +- panic("aes: CMAC FIPS self-test failed (wrong MAC)\n"); +- memzero_explicit(&key, sizeof(key)); +-} +-#else /* CONFIG_CRYPTO_LIB_AES_CBC_MACS */ +-static inline void aes_cmac_fips_test(void) +-{ +-} + #endif /* !CONFIG_CRYPTO_LIB_AES_CBC_MACS */ + +-static int __init aes_mod_init(void) +-{ +-#ifdef aes_mod_init_arch +- aes_mod_init_arch(); +-#endif +- if (fips_enabled) +- aes_cmac_fips_test(); +- return 0; +-} +-subsys_initcall(aes_mod_init); +- +-static void __exit aes_mod_exit(void) +-{ +-} +-module_exit(aes_mod_exit); +- + MODULE_DESCRIPTION("AES block cipher"); + MODULE_AUTHOR("Ard Biesheuvel "); + MODULE_AUTHOR("Eric Biggers "); diff --git a/package/kernel/mac80211/patches/build/100-backports-drop-QRTR-and-MHI.patch b/package/kernel/mac80211/patches/build/100-backports-drop-QRTR-and-MHI.patch index c9cac8284fc..ce291262d24 100644 --- a/package/kernel/mac80211/patches/build/100-backports-drop-QRTR-and-MHI.patch +++ b/package/kernel/mac80211/patches/build/100-backports-drop-QRTR-and-MHI.patch @@ -32,7 +32,7 @@ Signed-off-by: Robert Marko source "$BACKPORT_DIR/drivers/net/usb/Kconfig" --- a/Makefile.kernel +++ b/Makefile.kernel -@@ -38,9 +38,7 @@ obj-y += compat/ +@@ -43,9 +43,7 @@ obj-y += compat/ obj-$(CPTCFG_CFG80211) += net/wireless/ obj-$(CPTCFG_MAC80211) += net/mac80211/ @@ -44,7 +44,7 @@ Signed-off-by: Robert Marko --- a/drivers/net/wireless/ath/ath11k/Kconfig +++ b/drivers/net/wireless/ath/ath11k/Kconfig -@@ -25,9 +25,9 @@ config ATH11K_PCI +@@ -24,9 +24,9 @@ config ATH11K_PCI tristate "Atheros ath11k PCI support" depends on m depends on ATH11K && PCI @@ -59,7 +59,7 @@ Signed-off-by: Robert Marko This module adds support for PCIE bus --- a/local-symbols +++ b/local-symbols -@@ -53,14 +53,6 @@ MAC80211_MESH_PS_DEBUG= +@@ -55,14 +55,6 @@ MAC80211_MESH_PS_DEBUG= MAC80211_TDLS_DEBUG= MAC80211_DEBUG_COUNTERS= MAC80211_STA_HASH_MAX_SIZE= diff --git a/package/kernel/mac80211/patches/build/140-trace_backport.patch b/package/kernel/mac80211/patches/build/140-trace_backport.patch index 6de40cd6172..7ca0c819002 100644 --- a/package/kernel/mac80211/patches/build/140-trace_backport.patch +++ b/package/kernel/mac80211/patches/build/140-trace_backport.patch @@ -680,7 +680,7 @@ --- a/net/wireless/trace.h +++ b/net/wireless/trace.h -@@ -478,7 +478,11 @@ TRACE_EVENT(rdev_add_virtual_intf, +@@ -488,7 +488,11 @@ TRACE_EVENT(rdev_add_virtual_intf, ), TP_fast_assign( WIPHY_ASSIGN; diff --git a/package/kernel/mac80211/patches/build/150-sysfs-backport.patch b/package/kernel/mac80211/patches/build/150-sysfs-backport.patch new file mode 100644 index 00000000000..877040f6eae --- /dev/null +++ b/package/kernel/mac80211/patches/build/150-sysfs-backport.patch @@ -0,0 +1,24 @@ +--- a/net/wireless/sysfs.c ++++ b/net/wireless/sysfs.c +@@ -160,12 +160,21 @@ static SIMPLE_DEV_PM_OPS(wiphy_pm_ops, w + #define WIPHY_PM_OPS NULL + #endif + ++#if LINUX_VERSION_IS_GEQ(7,0,0) + static const struct ns_common *wiphy_namespace(const struct device *d) + { + struct wiphy *wiphy = container_of(d, struct wiphy, dev); + + return to_ns_common(wiphy_net(wiphy)); + } ++#else ++static const void *wiphy_namespace(const struct device *d) ++{ ++ struct wiphy *wiphy = container_of(d, struct wiphy, dev); ++ ++ return wiphy_net(wiphy); ++} ++#endif + + struct class ieee80211_class = { + .name = "ieee80211", diff --git a/package/kernel/mac80211/patches/build/210-wireless_netns_local_backport.patch b/package/kernel/mac80211/patches/build/210-wireless_netns_local_backport.patch index 222422102e6..30d46d0f982 100644 --- a/package/kernel/mac80211/patches/build/210-wireless_netns_local_backport.patch +++ b/package/kernel/mac80211/patches/build/210-wireless_netns_local_backport.patch @@ -1,6 +1,6 @@ --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -162,11 +162,19 @@ int cfg80211_switch_netns(struct cfg8021 +@@ -165,11 +165,19 @@ int cfg80211_switch_netns(struct cfg8021 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { if (!wdev->netdev) continue; @@ -20,7 +20,7 @@ } if (err) { -@@ -178,11 +186,19 @@ int cfg80211_switch_netns(struct cfg8021 +@@ -181,11 +189,19 @@ int cfg80211_switch_netns(struct cfg8021 list) { if (!wdev->netdev) continue; @@ -40,7 +40,7 @@ } return err; -@@ -1549,7 +1565,11 @@ static int cfg80211_netdev_notifier_call +@@ -1721,7 +1737,11 @@ static int cfg80211_netdev_notifier_call SET_NETDEV_DEVTYPE(dev, &wiphy_type); wdev->netdev = dev; /* can only change netns with wiphy */ diff --git a/package/kernel/mac80211/patches/build/220-brcmfmac_usb_driver_backport.patch b/package/kernel/mac80211/patches/build/220-brcmfmac_usb_driver_backport.patch index f2f4e7bfec2..1453bdaa155 100644 --- a/package/kernel/mac80211/patches/build/220-brcmfmac_usb_driver_backport.patch +++ b/package/kernel/mac80211/patches/build/220-brcmfmac_usb_driver_backport.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c -@@ -1585,7 +1585,11 @@ static int brcmf_usb_reset_device(struct +@@ -1588,7 +1588,11 @@ static int brcmf_usb_reset_device(struct void brcmf_usb_exit(void) { diff --git a/package/kernel/mac80211/patches/build/230-fix-init_vqs-build-error-on-kernel-6.6.patch b/package/kernel/mac80211/patches/build/230-fix-init_vqs-build-error-on-kernel-6.6.patch deleted file mode 100644 index 7948953e269..00000000000 --- a/package/kernel/mac80211/patches/build/230-fix-init_vqs-build-error-on-kernel-6.6.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/drivers/net/wireless/virtual/mac80211_hwsim.c -+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c -@@ -6926,6 +6926,7 @@ static void hwsim_virtio_rx_done(struct - - static int init_vqs(struct virtio_device *vdev) - { -+#if LINUX_VERSION_IS_GEQ(6,11,0) - struct virtqueue_info vqs_info[HWSIM_NUM_VQS] = { - [HWSIM_VQ_TX] = { "tx", hwsim_virtio_tx_done }, - [HWSIM_VQ_RX] = { "rx", hwsim_virtio_rx_done }, -@@ -6933,6 +6934,19 @@ static int init_vqs(struct virtio_device - - return virtio_find_vqs(vdev, HWSIM_NUM_VQS, - hwsim_vqs, vqs_info, NULL); -+#else /* Using the old ABI, copied from kernel 6.6 */ -+ vq_callback_t *callbacks[HWSIM_NUM_VQS] = { -+ [HWSIM_VQ_TX] = hwsim_virtio_tx_done, -+ [HWSIM_VQ_RX] = hwsim_virtio_rx_done, -+ }; -+ const char *names[HWSIM_NUM_VQS] = { -+ [HWSIM_VQ_TX] = "tx", -+ [HWSIM_VQ_RX] = "rx", -+ }; -+ -+ return virtio_find_vqs(vdev, HWSIM_NUM_VQS, -+ hwsim_vqs, callbacks, names, NULL); -+#endif - } - - static int fill_vq(struct virtqueue *vq) diff --git a/package/kernel/mac80211/patches/build/240-realtek-rtw88-BH-workqueue.patch b/package/kernel/mac80211/patches/build/240-realtek-rtw88-BH-workqueue.patch deleted file mode 100644 index f7665af06ee..00000000000 --- a/package/kernel/mac80211/patches/build/240-realtek-rtw88-BH-workqueue.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/drivers/net/wireless/realtek/rtw88/usb.c -+++ b/drivers/net/wireless/realtek/rtw88/usb.c -@@ -974,7 +974,11 @@ static int rtw_usb_init_rx(struct rtw_de - struct sk_buff *rx_skb; - int i; - -+#if LINUX_VERSION_IS_GEQ(6,9,0) - rtwusb->rxwq = alloc_workqueue("rtw88_usb: rx wq", WQ_BH, 0); -+#else -+ rtwusb->rxwq = create_singlethread_workqueue("rtw88_usb: rx wq"); -+#endif - if (!rtwusb->rxwq) { - rtw_err(rtwdev, "failed to create RX work queue\n"); - return -ENOMEM; diff --git a/package/kernel/mac80211/patches/build/400-restore-old-debugfs_fops.patch b/package/kernel/mac80211/patches/build/400-restore-old-debugfs_fops.patch index 85c0bb9d969..ae1f3181432 100644 --- a/package/kernel/mac80211/patches/build/400-restore-old-debugfs_fops.patch +++ b/package/kernel/mac80211/patches/build/400-restore-old-debugfs_fops.patch @@ -124,7 +124,7 @@ struct b43_debugfs_fops { ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize); int (*write)(struct b43_wldev *dev, const char *buf, size_t count); -+#if LINUX_VERSION_IS_GEQ(6,14,0) ++#if LINUX_VERSION_IS_LESS(6,14,0) + struct file_operations fops; +#endif /* Offset of struct b43_dfs_file in struct b43_dfsentry */ @@ -218,7 +218,7 @@ B43_DEBUGFS_FOPS(shm16read, shm16read__read_file, shm16read__write_file); B43_DEBUGFS_FOPS(shm16write, NULL, shm16write__write_file); -@@ -698,12 +737,21 @@ void b43_debugfs_add_device(struct b43_w +@@ -697,12 +736,21 @@ void b43_debugfs_add_device(struct b43_w e->shm32read_routing_next = 0xFFFFFFFF; /* invalid routing */ e->shm32read_addr_next = 0xFFFFFFFF; /* invalid address */ diff --git a/package/kernel/mac80211/patches/build/410-mac80211-convert-short-fops-to-debugfs-files.patch b/package/kernel/mac80211/patches/build/410-mac80211-convert-short-fops-to-debugfs-files.patch index e4e3d6607e5..1eb051311c9 100644 --- a/package/kernel/mac80211/patches/build/410-mac80211-convert-short-fops-to-debugfs-files.patch +++ b/package/kernel/mac80211/patches/build/410-mac80211-convert-short-fops-to-debugfs-files.patch @@ -58,7 +58,7 @@ .llseek = default_llseek, }; -@@ -344,9 +349,10 @@ static ssize_t aql_enable_write(struct f +@@ -335,9 +340,10 @@ static ssize_t aql_enable_write(struct f return count; } @@ -70,7 +70,7 @@ .llseek = default_llseek, }; -@@ -394,9 +400,10 @@ static ssize_t force_tx_status_write(str +@@ -373,9 +379,10 @@ static ssize_t force_tx_status_write(str return count; } @@ -82,7 +82,7 @@ .llseek = default_llseek, }; -@@ -421,8 +428,9 @@ static ssize_t reset_write(struct file * +@@ -400,8 +407,9 @@ static ssize_t reset_write(struct file * return count; } @@ -93,7 +93,7 @@ .llseek = noop_llseek, }; #endif -@@ -649,8 +657,9 @@ static ssize_t stats_ ##name## _read(str +@@ -629,8 +637,9 @@ static ssize_t stats_ ##name## _read(str print_devstats_##name); \ } \ \ @@ -139,7 +139,7 @@ --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c -@@ -221,9 +221,10 @@ static ssize_t ieee80211_if_fmt_##name( +@@ -222,9 +222,10 @@ static ssize_t ieee80211_if_fmt_##name( } #define _IEEE80211_IF_FILE_OPS(name, _read, _write) \ @@ -186,7 +186,7 @@ --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c -@@ -252,8 +252,9 @@ static ssize_t rcname_read(struct file * +@@ -250,8 +250,9 @@ static ssize_t rcname_read(struct file * ref->ops->name, len); } diff --git a/package/kernel/mac80211/patches/build/500-fix_build_on_6_18.patch b/package/kernel/mac80211/patches/build/500-fix_build_on_6_18.patch deleted file mode 100644 index 227d1efc1e4..00000000000 --- a/package/kernel/mac80211/patches/build/500-fix_build_on_6_18.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/backport-include/linux/net.h -+++ b/backport-include/linux/net.h -@@ -3,12 +3,4 @@ - #include_next - #include - -- --#ifndef SOCKWQ_ASYNC_NOSPACE --#define SOCKWQ_ASYNC_NOSPACE SOCK_ASYNC_NOSPACE --#endif --#ifndef SOCKWQ_ASYNC_WAITDATA --#define SOCKWQ_ASYNC_WAITDATA SOCK_ASYNC_WAITDATA --#endif -- - #endif /* __BACKPORT_LINUX_NET_H */ diff --git a/package/kernel/mac80211/patches/mt7601u/001-wifi-mt7601u-update-firmware-path.patch b/package/kernel/mac80211/patches/mt7601u/001-wifi-mt7601u-update-firmware-path.patch index 5d982906c56..bf7309aae1d 100644 --- a/package/kernel/mac80211/patches/mt7601u/001-wifi-mt7601u-update-firmware-path.patch +++ b/package/kernel/mac80211/patches/mt7601u/001-wifi-mt7601u-update-firmware-path.patch @@ -50,6 +50,6 @@ base-commit: 0d9b41daa5907756a31772d8af8ac5ff25cf17c1 -#define MT7601U_FIRMWARE "mt7601u.bin" +#define MT7601U_FIRMWARE "mediatek/mt7601u.bin" + #define MT7601U_FIRMWARE_PATHS ARRAY_SIZE(mt7601u_fw_paths) #define MT_VEND_REQ_MAX_RETRY 10 - #define MT_VEND_REQ_TOUT_MS 300 diff --git a/package/kernel/mac80211/patches/mwl/110-wifi-mwifiex-fix-freeze-for-60-seconds-caused-by-req.patch b/package/kernel/mac80211/patches/mwl/110-wifi-mwifiex-fix-freeze-for-60-seconds-caused-by-req.patch deleted file mode 100644 index a0515c60f57..00000000000 --- a/package/kernel/mac80211/patches/mwl/110-wifi-mwifiex-fix-freeze-for-60-seconds-caused-by-req.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 27882f047c76a7c48988952df5515df13be2fd72 Mon Sep 17 00:00:00 2001 -From: Georgi Valkov -Date: Sat, 11 Jul 2026 01:17:00 +0300 -Subject: [PATCH] wifi: mwifiex: fix freeze for 60 seconds caused by - request_firmware - -Fix regression in rgpower table loading, caused by using -request_firmware(): when the requested firmware does not exist, e.g. -nxp/rgpower_WW.bin does not exist on OpenWRT builds for WRT3200ACM, -request_firmware() falls back to firmware_fallback_sysfs(), which expects -the firmware to be provided by user space using SYSFS. No such utility is -provided in this configuration, so the entire system locks up for 60 -seconds, until the request times out. During this time, no other log -messages are observed, and the device does not respond to commands over -UART. - -The request_firmware() call is performed in the following context: -current->comm kworker/1:2 in_task 1 irqs_disabled 0 in_atomic 0 - -Fixed by using request_firmware_direct(). This prevents fallback to SYSFS, -and avoids delay. The rgpower table is optional. The driver falls back -to the device tree power table if the firmware is not present. - -The error code is printed for debugging and returned to the caller, -which only cares for success or failure, so there are no side effects. - -Fixes: 7b6f16a25806 ("wifi: mwifiex: add rgpower table loading support") -Signed-off-by: Georgi Valkov ---- - drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - ---- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c -+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c -@@ -196,6 +196,7 @@ static int mwifiex_request_rgpower_table - struct mwifiex_adapter *adapter = priv->adapter; - char rgpower_table_name[30]; - char country_code[3]; -+ int ret; - - strscpy(country_code, domain_info->country_code, sizeof(country_code)); - -@@ -214,16 +215,17 @@ static int mwifiex_request_rgpower_table - adapter->rgpower_data = NULL; - } - -- if ((request_firmware(&adapter->rgpower_data, rgpower_table_name, -- adapter->dev))) { -+ ret = request_firmware_direct(&adapter->rgpower_data, rgpower_table_name, -+ adapter->dev); -+ -+ if (ret) { - mwifiex_dbg( - adapter, INFO, -- "info: %s: failed to request regulatory power table\n", -- __func__); -- return -EIO; -+ "info: %s: failed to request regulatory power table: %d\n", -+ __func__, ret); - } - -- return 0; -+ return ret; - } - - static int mwifiex_dnld_rgpower_table(struct mwifiex_private *priv) diff --git a/package/kernel/mac80211/patches/mwl/111-wifi-mwifiex-replace-one-element-arrays-with-flexibl.patch b/package/kernel/mac80211/patches/mwl/111-wifi-mwifiex-replace-one-element-arrays-with-flexibl.patch deleted file mode 100644 index 62c38d7c020..00000000000 --- a/package/kernel/mac80211/patches/mwl/111-wifi-mwifiex-replace-one-element-arrays-with-flexibl.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 1cb5845a58d8e1f85d5766c6fbcbfddf96c212a1 Mon Sep 17 00:00:00 2001 -From: Georgi Valkov -Date: Thu, 16 Jul 2026 03:17:28 +0300 -Subject: [PATCH] wifi: mwifiex: replace one-element arrays with flexible array - members - -Replace deprecated one-element arrays with flexible array members. -CONFIG_FORTIFY_SOURCE reports the following warning when -one-element arrays are used as variable-length buffers: - -sta_cmd.c:1033 mwifiex_sta_prepare_cmd -memcpy: detected field-spanning write (size 84) of single field -"domain->triplet" at .../marvell/mwifiex/sta_cmd.c:1033 (size 3) - -Convert affected structs to use flexible array members. -- Preserve existing wire layouts. -- Use DECLARE_FLEX_ARRAY() for structs inside affected unions. - -Tested-on: WRT3200ACM, OpenWrt -Signed-off-by: Georgi Valkov -Reviewed-by: Francesco Dolcini -Link: https://patch.msgid.link/20260716001728.57799-1-gvalkov@gmail.com -Signed-off-by: Johannes Berg ---- - drivers/net/wireless/marvell/mwifiex/fw.h | 18 +++++++++--------- - drivers/net/wireless/marvell/mwifiex/join.c | 8 ++++---- - drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 2 +- - 3 files changed, 14 insertions(+), 14 deletions(-) - ---- a/drivers/net/wireless/marvell/mwifiex/fw.h -+++ b/drivers/net/wireless/marvell/mwifiex/fw.h -@@ -823,7 +823,7 @@ struct chan_band_param_set { - - struct mwifiex_ie_types_chan_band_list_param_set { - struct mwifiex_ie_types_header header; -- struct chan_band_param_set chan_band_param[1]; -+ struct chan_band_param_set chan_band_param[]; - } __packed; - - struct mwifiex_ie_types_rates_param_set { -@@ -886,7 +886,7 @@ struct mwifiex_ie_types_wildcard_ssid_pa - #define TSF_DATA_SIZE 8 - struct mwifiex_ie_types_tsf_timestamp { - struct mwifiex_ie_types_header header; -- u8 tsf_data[1]; -+ u8 tsf_data[]; - } __packed; - - struct mwifiex_cf_param_set { -@@ -903,8 +903,8 @@ struct mwifiex_ibss_param_set { - struct mwifiex_ie_types_ss_param_set { - struct mwifiex_ie_types_header header; - union { -- struct mwifiex_cf_param_set cf_param_set[1]; -- struct mwifiex_ibss_param_set ibss_param_set[1]; -+ DECLARE_FLEX_ARRAY(struct mwifiex_cf_param_set, cf_param_set); -+ DECLARE_FLEX_ARRAY(struct mwifiex_ibss_param_set, ibss_param_set); - } cf_ibss; - } __packed; - -@@ -922,8 +922,8 @@ struct mwifiex_ds_param_set { - struct mwifiex_ie_types_phy_param_set { - struct mwifiex_ie_types_header header; - union { -- struct mwifiex_fh_param_set fh_param_set[1]; -- struct mwifiex_ds_param_set ds_param_set[1]; -+ DECLARE_FLEX_ARRAY(struct mwifiex_fh_param_set, fh_param_set); -+ DECLARE_FLEX_ARRAY(struct mwifiex_ds_param_set, ds_param_set); - } fh_ds; - } __packed; - -@@ -1383,7 +1383,7 @@ struct host_cmd_ds_802_11_snmp_mib { - __le16 query_type; - __le16 oid; - __le16 buf_size; -- u8 value[1]; -+ u8 value[]; - } __packed; - - struct mwifiex_rate_scope { -@@ -1551,7 +1551,7 @@ struct mwifiex_scan_cmd_config { - * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set - * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set - */ -- u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored -+ u8 tlv_buf[]; /* SSID TLV(s) and ChanList TLVs are stored - here */ - } __packed; - -@@ -1683,7 +1683,7 @@ struct host_cmd_ds_802_11_bg_scan_query_ - struct mwifiex_ietypes_domain_param_set { - struct mwifiex_ie_types_header header; - u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; -- struct ieee80211_country_ie_triplet triplet[1]; -+ struct ieee80211_country_ie_triplet triplet[]; - } __packed; - - struct host_cmd_ds_802_11d_domain_info { ---- a/drivers/net/wireless/marvell/mwifiex/join.c -+++ b/drivers/net/wireless/marvell/mwifiex/join.c -@@ -421,15 +421,15 @@ int mwifiex_cmd_802_11_associate(struct - - phy_tlv = (struct mwifiex_ie_types_phy_param_set *) pos; - phy_tlv->header.type = cpu_to_le16(WLAN_EID_DS_PARAMS); -- phy_tlv->header.len = cpu_to_le16(sizeof(phy_tlv->fh_ds.ds_param_set)); -- memcpy(&phy_tlv->fh_ds.ds_param_set, -+ phy_tlv->header.len = cpu_to_le16(sizeof(*phy_tlv->fh_ds.ds_param_set)); -+ memcpy(phy_tlv->fh_ds.ds_param_set, - &bss_desc->phy_param_set.ds_param_set.current_chan, -- sizeof(phy_tlv->fh_ds.ds_param_set)); -+ sizeof(*phy_tlv->fh_ds.ds_param_set)); - pos += sizeof(phy_tlv->header) + le16_to_cpu(phy_tlv->header.len); - - ss_tlv = (struct mwifiex_ie_types_ss_param_set *) pos; - ss_tlv->header.type = cpu_to_le16(WLAN_EID_CF_PARAMS); -- ss_tlv->header.len = cpu_to_le16(sizeof(ss_tlv->cf_ibss.cf_param_set)); -+ ss_tlv->header.len = cpu_to_le16(sizeof(*ss_tlv->cf_ibss.cf_param_set)); - pos += sizeof(ss_tlv->header) + le16_to_cpu(ss_tlv->header.len); - - /* Get the common rates supported between the driver and the BSS Desc */ ---- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c -+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c -@@ -108,7 +108,7 @@ static int mwifiex_cmd_802_11_snmp_mib(s - "cmd: SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid); - cmd->command = cpu_to_le16(HostCmd_CMD_802_11_SNMP_MIB); - cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_snmp_mib) -- - 1 + S_DS_GEN); -+ + S_DS_GEN); - - snmp_mib->oid = cpu_to_le16((u16)cmd_oid); - if (cmd_action == HostCmd_ACT_GEN_GET) { diff --git a/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2800-add-support-for-eeprom-file.patch b/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2800-add-support-for-eeprom-file.patch new file mode 100644 index 00000000000..cb0c10198c6 --- /dev/null +++ b/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2800-add-support-for-eeprom-file.patch @@ -0,0 +1,89 @@ +From: Rosen Penev +Date: Wed, 18 Feb 2026 16:17:47 -0800 +Subject: [PATCH] wifi: rt2800: add support for eeprom file + +Allows loading through ralink,eeprom. + +Signed-off-by: Rosen Penev +--- + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + + #include "rt2x00.h" +@@ -10963,6 +10964,47 @@ int rt2800_read_eeprom_efuse(struct rt2x + } + EXPORT_SYMBOL_GPL(rt2800_read_eeprom_efuse); + ++int rt2800_read_eeprom_file(struct rt2x00_dev *rt2x00dev) ++{ ++ struct device *dev = rt2x00dev->dev; ++ const struct firmware *ee; ++ const char *ee_name; ++ int retval; ++ ++ if (device_property_read_string(dev, "ralink,eeprom", &ee_name)) { ++ rt2x00_err(rt2x00dev, "Required EEPROM name is missing."); ++ return -EINVAL; ++ } ++ ++ rt2x00_info(rt2x00dev, "Loading EEPROM data from '%s'.\n", ee_name); ++ ++ retval = request_firmware(&ee, ee_name, rt2x00dev->dev); ++ if (retval) { ++ rt2x00_err(rt2x00dev, "Failed to request EEPROM.\n"); ++ return retval; ++ } ++ ++ if (!ee || !ee->size || !ee->data) { ++ rt2x00_err(rt2x00dev, "Failed to read EEPROM file.\n"); ++ return -ENOENT; ++ } ++ ++ if (ee->size != rt2x00dev->ops->eeprom_size) { ++ rt2x00_err(rt2x00dev, ++ "EEPROM file size is invalid, it should be %d bytes\n", ++ rt2x00dev->ops->eeprom_size); ++ retval = -EINVAL; ++ goto err_release_ee; ++ } ++ ++ memcpy(rt2x00dev->eeprom, ee->data, rt2x00dev->ops->eeprom_size); ++ ++err_release_ee: ++ release_firmware(ee); ++ return retval; ++} ++EXPORT_SYMBOL_GPL(rt2800_read_eeprom_file); ++ + int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev) + { + struct device *dev = rt2x00dev->dev; +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h +@@ -248,6 +248,7 @@ void rt2800_disable_radio(struct rt2x00_ + int rt2800_efuse_detect(struct rt2x00_dev *rt2x00dev); + int rt2800_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev); + ++int rt2800_read_eeprom_file(struct rt2x00_dev *rt2x00dev); + int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev); + + int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev); +--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +@@ -97,6 +97,9 @@ static int rt2800soc_read_eeprom(struct + if (!rt2800_read_eeprom_nvmem(rt2x00dev)) + return 0; + ++ if (!rt2800_read_eeprom_file(rt2x00dev)) ++ return 0; ++ + base_addr = ioremap(0x1F040000, EEPROM_SIZE); + if (!base_addr) + return -ENOMEM; diff --git a/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch b/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch deleted file mode 100644 index ac9e2060bb8..00000000000 --- a/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch +++ /dev/null @@ -1,225 +0,0 @@ -From 1046fc9e98936991aeb0b0656c84833d96a63c0f Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Sun, 15 Oct 2023 14:22:49 +0200 -Subject: [PATCH 1/5] wifi: rt2x00: Add support for loading EEPROM from - userspace - -Add support for loading EEPROM from userspace. - -Signed-off-by: Christian Marangi ---- - drivers/net/wireless/ralink/rt2x00/Kconfig | 5 ++ - drivers/net/wireless/ralink/rt2x00/Makefile | 1 + - .../net/wireless/ralink/rt2x00/rt2800soc.c | 15 +--- - drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + - .../net/wireless/ralink/rt2x00/rt2x00dev.c | 9 +++ - .../net/wireless/ralink/rt2x00/rt2x00eeprom.c | 75 +++++++++++++++++++ - .../net/wireless/ralink/rt2x00/rt2800soc.c | 1 + - .../net/wireless/ralink/rt2x00/rt2800soc.h | 9 +++ - 8 files changed, 102 insertions(+), 14 deletions(-) - create mode 100644 drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c - ---- a/local-symbols -+++ b/local-symbols -@@ -337,6 +337,7 @@ RT2X00_LIB_FIRMWARE= - RT2X00_LIB_CRYPTO= - RT2X00_LIB_LEDS= - RT2X00_LIB_DEBUGFS= -+RT2X00_LIB_EEPROM= - RT2X00_DEBUG= - WLAN_VENDOR_REALTEK= - RTL8180= ---- a/drivers/net/wireless/ralink/rt2x00/Kconfig -+++ b/drivers/net/wireless/ralink/rt2x00/Kconfig -@@ -70,6 +70,7 @@ config RT2800PCI - select RT2X00_LIB_MMIO - select RT2X00_LIB_PCI - select RT2X00_LIB_FIRMWARE -+ select RT2X00_LIB_EEPROM - select RT2X00_LIB_CRYPTO - depends on EEPROM_93CX6 - help -@@ -213,6 +214,7 @@ config RT2800SOC - select RT2X00_LIB_MMIO - select RT2X00_LIB_CRYPTO - select RT2X00_LIB_FIRMWARE -+ select RT2X00_LIB_EEPROM - select RT2800_LIB - select RT2800_LIB_MMIO - help -@@ -259,6 +261,9 @@ config RT2X00_LIB_FIRMWARE - config RT2X00_LIB_CRYPTO - bool - -+config RT2X00_LIB_EEPROM -+ bool -+ - config RT2X00_LIB_LEDS - bool - default y if (RT2X00_LIB=y && LEDS_CLASS=y) || (RT2X00_LIB=m && LEDS_CLASS!=n) ---- a/drivers/net/wireless/ralink/rt2x00/Makefile -+++ b/drivers/net/wireless/ralink/rt2x00/Makefile -@@ -8,6 +8,7 @@ rt2x00lib-$(CPTCFG_RT2X00_LIB_DEBUGFS) + - rt2x00lib-$(CPTCFG_RT2X00_LIB_CRYPTO) += rt2x00crypto.o - rt2x00lib-$(CPTCFG_RT2X00_LIB_FIRMWARE) += rt2x00firmware.o - rt2x00lib-$(CPTCFG_RT2X00_LIB_LEDS) += rt2x00leds.o -+rt2x00lib-$(CPTCFG_RT2X00_LIB_EEPROM) += rt2x00eeprom.o - - obj-$(CPTCFG_RT2X00_LIB) += rt2x00lib.o - obj-$(CPTCFG_RT2X00_LIB_MMIO) += rt2x00mmio.o ---- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c -@@ -90,19 +90,6 @@ static int rt2800soc_set_device_state(st - return retval; - } - --static int rt2800soc_read_eeprom(struct rt2x00_dev *rt2x00dev) --{ -- void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE); -- -- if (!base_addr) -- return -ENOMEM; -- -- memcpy_fromio(rt2x00dev->eeprom, base_addr, EEPROM_SIZE); -- -- iounmap(base_addr); -- return 0; --} -- - /* Firmware functions */ - static char *rt2800soc_get_firmware_name(struct rt2x00_dev *rt2x00dev) - { -@@ -190,7 +177,7 @@ static const struct rt2800_ops rt2800soc - .register_multiread = rt2x00mmio_register_multiread, - .register_multiwrite = rt2x00mmio_register_multiwrite, - .regbusy_read = rt2x00mmio_regbusy_read, -- .read_eeprom = rt2800soc_read_eeprom, -+ .read_eeprom = rt2x00lib_read_eeprom, - .hwcrypt_disabled = rt2800soc_hwcrypt_disabled, - .drv_write_firmware = rt2800soc_write_firmware, - .drv_init_registers = rt2800mmio_init_registers, -@@ -304,6 +291,7 @@ static int rt2x00soc_probe(struct platfo - rt2x00dev->name = pdev->dev.driver->name; - rt2x00dev->csr.base = mem; - -+ set_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags); - rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); - - retval = rt2x00lib_probe_dev(rt2x00dev); ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h -@@ -692,6 +692,7 @@ enum rt2x00_capability_flags { - REQUIRE_HT_TX_DESC, - REQUIRE_PS_AUTOWAKE, - REQUIRE_DELAYED_RFKILL, -+ REQUIRE_EEPROM_FILE, - - /* - * Capabilities -@@ -1506,4 +1507,13 @@ void rt2x00lib_remove_dev(struct rt2x00_ - int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev); - int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev); - -+/* -+ * EEPROM file handlers. -+ */ -+#ifdef CPTCFG_RT2X00_LIB_EEPROM -+int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev); -+#else -+#define rt2x00lib_read_eeprom NULL -+#endif /* CPTCFG_RT2X00_LIB_EEPROM */ -+ - #endif /* RT2X00_H */ ---- /dev/null -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c -@@ -0,0 +1,78 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+/* Copyright (C) 2004 - 2009 Ivo van Doorn -+ * Copyright (C) 2004 - 2009 Gertjan van Wingerde -+ * -+ */ -+ -+/* Module: rt2x00lib -+ * Abstract: rt2x00 eeprom file loading routines. -+ */ -+ -+#include -+#include -+#include -+ -+#include "rt2x00.h" -+ -+static const char * -+rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev) -+{ -+ struct device_node *np = rt2x00dev->dev->of_node; -+ const char *eep; -+ -+ if (np && !of_property_read_string(np, "ralink,eeprom", &eep)) -+ return eep; -+ -+ return NULL; -+} -+ -+static int rt2x00lib_read_eeprom_file(struct rt2x00_dev *rt2x00dev) -+{ -+ const struct firmware *ee; -+ const char *ee_name; -+ int retval; -+ -+ ee_name = rt2x00lib_get_eeprom_file_name(rt2x00dev); -+ if (!ee_name && test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags)) { -+ rt2x00_err(rt2x00dev, "Required EEPROM name is missing."); -+ return -EINVAL; -+ } -+ -+ if (!ee_name) -+ return -ENOENT; -+ -+ rt2x00_info(rt2x00dev, "Loading EEPROM data from '%s'.\n", ee_name); -+ -+ retval = request_firmware(&ee, ee_name, rt2x00dev->dev); -+ if (retval) { -+ rt2x00_err(rt2x00dev, "Failed to request EEPROM.\n"); -+ return retval; -+ } -+ -+ if (!ee || !ee->size || !ee->data) { -+ rt2x00_err(rt2x00dev, "Failed to read EEPROM file.\n"); -+ retval = -ENOENT; -+ goto err_exit; -+ } -+ -+ if (ee->size != rt2x00dev->ops->eeprom_size) { -+ rt2x00_err(rt2x00dev, -+ "EEPROM file size is invalid, it should be %d bytes\n", -+ rt2x00dev->ops->eeprom_size); -+ retval = -EINVAL; -+ goto err_release_ee; -+ } -+ -+ memcpy(rt2x00dev->eeprom, ee->data, rt2x00dev->ops->eeprom_size); -+ -+err_release_ee: -+ release_firmware(ee); -+err_exit: -+ return retval; -+} -+ -+int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev) -+{ -+ return rt2x00lib_read_eeprom_file(rt2x00dev); -+} -+EXPORT_SYMBOL_GPL(rt2x00lib_read_eeprom); ---- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c -@@ -278,6 +278,9 @@ static int rt2800pci_read_eeprom(struct - { - int retval; - -+ if (!rt2x00lib_read_eeprom(rt2x00dev)) -+ return 0; -+ - if (rt2800pci_efuse_detect(rt2x00dev)) - retval = rt2800pci_read_eeprom_efuse(rt2x00dev); - else diff --git a/package/kernel/mac80211/patches/rt2x00/602-02-wifi-rt2x00-add-eeprom-data-binding.patch b/package/kernel/mac80211/patches/rt2x00/602-02-wifi-rt2x00-add-eeprom-data-binding.patch new file mode 100644 index 00000000000..c112f8bde64 --- /dev/null +++ b/package/kernel/mac80211/patches/rt2x00/602-02-wifi-rt2x00-add-eeprom-data-binding.patch @@ -0,0 +1,63 @@ +From: Rosen Penev +Date: Wed, 18 Feb 2026 21:23:23 -0800 +Subject: [PATCH] wifi: rt2x00: add eeprom-data binding + +Useful for embedding eeprom data in dts instead of relying on an +external file. + +Signed-off-by: Rosen Penev +--- + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -10953,6 +10953,16 @@ static void rt2800_efuse_read(struct rt2 + mutex_unlock(&rt2x00dev->csr_mutex); + } + ++int rt2800_read_eeprom_data(struct rt2x00_dev *rt2x00dev) ++{ ++ size_t len = rt2x00dev->ops->eeprom_size / sizeof(u16); ++ struct device *dev = rt2x00dev->dev; ++ ++ return device_property_read_u16_array(dev, "ralink,eeprom-data", ++ rt2x00dev->eeprom, len); ++} ++EXPORT_SYMBOL_GPL(rt2800_read_eeprom_data); ++ + int rt2800_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev) + { + unsigned int i; +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h +@@ -248,6 +248,7 @@ void rt2800_disable_radio(struct rt2x00_ + int rt2800_efuse_detect(struct rt2x00_dev *rt2x00dev); + int rt2800_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev); + ++int rt2800_read_eeprom_data(struct rt2x00_dev *rt2x00dev); + int rt2800_read_eeprom_file(struct rt2x00_dev *rt2x00dev); + int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev); + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c +@@ -281,6 +281,9 @@ static int rt2800pci_read_eeprom(struct + if (!rt2800_read_eeprom_nvmem(rt2x00dev)) + return 0; + ++ if (!rt2800_read_eeprom_data(rt2x00dev)) ++ return 0; ++ + if (rt2800pci_efuse_detect(rt2x00dev)) + retval = rt2800pci_read_eeprom_efuse(rt2x00dev); + else +--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +@@ -100,6 +100,9 @@ static int rt2800soc_read_eeprom(struct + if (!rt2800_read_eeprom_file(rt2x00dev)) + return 0; + ++ if (!rt2800_read_eeprom_data(rt2x00dev)) ++ return 0; ++ + base_addr = ioremap(0x1F040000, EEPROM_SIZE); + if (!base_addr) + return -ENOMEM; diff --git a/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch b/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch index 9b64e9c8807..c8235305180 100644 --- a/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch +++ b/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch @@ -14,29 +14,22 @@ Signed-off-by: Christian Marangi --- a/drivers/net/wireless/ralink/rt2x00/Kconfig +++ b/drivers/net/wireless/ralink/rt2x00/Kconfig -@@ -217,6 +217,7 @@ config RT2800SOC - select RT2X00_LIB_EEPROM +@@ -215,6 +215,7 @@ config RT2800SOC + select RT2X00_LIB_FIRMWARE select RT2800_LIB select RT2800_LIB_MMIO + select MTD if SOC_RT288X || SOC_RT305X help This adds support for Ralink WiSoC devices. Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352. ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c -@@ -11,9 +11,65 @@ - #include - #include - #include -+#if IS_ENABLED(CONFIG_MTD) -+#include -+#include -+#endif +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -11015,6 +11015,59 @@ err_release_ee: + } + EXPORT_SYMBOL_GPL(rt2800_read_eeprom_file); - #include "rt2x00.h" - -+#if IS_ENABLED(CONFIG_MTD) -+static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev) ++#if IS_ENABLED(CONFIG_SOC_RT288X) || IS_ENABLED(CONFIG_SOC_RT305X) ++int rt2800_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev) +{ + struct device_node *np = rt2x00dev->dev->of_node, *mtd_np = NULL; + int size, offset = 0; @@ -85,23 +78,47 @@ Signed-off-by: Christian Marangi + + return ret; +} ++EXPORT_SYMBOL_GPL(rt2800_read_eeprom_mtd); +#endif + - static const char * - rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev) + int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev) { -@@ -73,6 +129,14 @@ err_exit: + struct device *dev = rt2x00dev->dev; +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h +@@ -250,6 +250,7 @@ int rt2800_read_eeprom_efuse(struct rt2x - int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev) - { -+ int ret; -+ -+#if IS_ENABLED(CONFIG_MTD) -+ ret = rt2800lib_read_eeprom_mtd(rt2x00dev); -+ if (!ret) + int rt2800_read_eeprom_data(struct rt2x00_dev *rt2x00dev); + int rt2800_read_eeprom_file(struct rt2x00_dev *rt2x00dev); ++int rt2800_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev); + int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev); + + int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev); +--- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c +@@ -281,6 +281,11 @@ static int rt2800pci_read_eeprom(struct + if (!rt2800_read_eeprom_nvmem(rt2x00dev)) + return 0; + ++#if IS_ENABLED(CONFIG_SOC_RT288X) || IS_ENABLED(CONFIG_SOC_RT305X) ++ if (!rt2800_read_eeprom_mtd(rt2x00dev)) + return 0; +#endif + - return rt2x00lib_read_eeprom_file(rt2x00dev); - } - EXPORT_SYMBOL_GPL(rt2x00lib_read_eeprom); + if (!rt2800_read_eeprom_data(rt2x00dev)) + return 0; + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +@@ -97,6 +97,11 @@ static int rt2800soc_read_eeprom(struct + if (!rt2800_read_eeprom_nvmem(rt2x00dev)) + return 0; + ++#if IS_ENABLED(CONFIG_SOC_RT288X) || IS_ENABLED(CONFIG_SOC_RT305X) ++ if (!rt2800_read_eeprom_mtd(rt2x00dev)) ++ return 0; ++#endif ++ + if (!rt2800_read_eeprom_file(rt2x00dev)) + return 0; + diff --git a/package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch b/package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch deleted file mode 100644 index 5dc18c3fc00..00000000000 --- a/package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 9008cdacdc41f8233f4444b86cf3a17201686e2d Mon Sep 17 00:00:00 2001 -From: Shiji Yang -Date: Tue, 18 Jul 2023 20:18:16 +0800 -Subject: [PATCH 5/5] wifi: rt2x00: support loading eeprom from NVMEM cells - -This patch allows rt2x00 to load eeprom from "eeprom" NVMEM cell. - -Example: - -/* load eeprom from NVMEM provider 'eep' */ -&wmac { - nvmem-cells = <&eep>; - nvmem-cell-names = "eeprom"; -}; - -Signed-off-by: Shiji Yang -Signed-off-by: Christian Marangi ---- - .../net/wireless/ralink/rt2x00/rt2x00eeprom.c | 41 ++++++++++++++++++- - 1 file changed, 40 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c -@@ -15,6 +15,7 @@ - #include - #include - #endif -+#include - - #include "rt2x00.h" - -@@ -70,6 +71,38 @@ static int rt2800lib_read_eeprom_mtd(str - } - #endif - -+static int rt2800lib_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev) -+{ -+ struct device_node *np = rt2x00dev->dev->of_node; -+ unsigned int len = rt2x00dev->ops->eeprom_size; -+ struct nvmem_cell *cell; -+ const void *data; -+ size_t retlen; -+ int ret = 0; -+ -+ cell = of_nvmem_cell_get(np, "eeprom"); -+ if (IS_ERR(cell)) -+ return PTR_ERR(cell); -+ -+ data = nvmem_cell_read(cell, &retlen); -+ nvmem_cell_put(cell); -+ -+ if (IS_ERR(data)) -+ return PTR_ERR(data); -+ -+ if (retlen != len) { -+ dev_err(rt2x00dev->dev, "invalid eeprom size, required: 0x%04x\n", len); -+ ret = -EINVAL; -+ goto exit; -+ } -+ -+ memcpy(rt2x00dev->eeprom, data, len); -+ -+exit: -+ kfree(data); -+ return ret; -+} -+ - static const char * - rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev) - { -@@ -137,6 +170,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_ - return 0; - #endif - -+ ret = rt2800lib_read_eeprom_nvmem(rt2x00dev); -+ if (!ret) -+ return 0; -+ - return rt2x00lib_read_eeprom_file(rt2x00dev); - } - EXPORT_SYMBOL_GPL(rt2x00lib_read_eeprom); diff --git a/package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch b/package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch deleted file mode 100644 index fed2f95a51c..00000000000 --- a/package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch +++ /dev/null @@ -1,76 +0,0 @@ -From adf957124a115bdf3e4728e1ea8c70a632648cf0 Mon Sep 17 00:00:00 2001 -From: Coia Prant -Date: Fri, 14 Feb 2025 15:49:55 +0800 -Subject: [PATCH] wifi: rt2x00: Add support for loading EEPROM from devicetree - embedded data - -This patch allows rt2x00 to load eeprom from devicetree embedded data. - -Example: - -/* load eeprom from embedded data 'eeprom-data' */ -&wmac { - ralink,eeprom-data = <0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff - 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff>; -}; - -Signed-off-by: Coia Prant ---- - .../net/wireless/ralink/rt2x00/rt2x00eeprom.c | 25 +++++++++++++++++++ - 1 file changed, 25 insertions(+) - ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c -@@ -19,6 +19,27 @@ - - #include "rt2x00.h" - -+static int rt2800lib_read_eeprom_data(struct rt2x00_dev *rt2x00dev) -+{ -+ struct device_node *np = rt2x00dev->dev->of_node; -+ unsigned int len = rt2x00dev->ops->eeprom_size; -+ const void *data; -+ int size; -+ -+ data = of_get_property(np, "ralink,eeprom-data", &size); -+ if (!data) -+ return -ENOENT; -+ -+ if (size != len) { -+ dev_err(rt2x00dev->dev, "invalid eeprom size, required: 0x%04x\n", len); -+ return -EINVAL; -+ } -+ -+ memcpy(rt2x00dev->eeprom, data, size); -+ -+ return 0; -+} -+ - #if IS_ENABLED(CONFIG_MTD) - static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev) - { -@@ -164,6 +185,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_ - { - int ret; - -+ ret = rt2800lib_read_eeprom_data(rt2x00dev); -+ if (!ret) -+ return 0; -+ - #if IS_ENABLED(CONFIG_MTD) - ret = rt2800lib_read_eeprom_mtd(rt2x00dev); - if (!ret) diff --git a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch index 7a44d1725fb..bbbacfdb6f2 100644 --- a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch +++ b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1007,6 +1007,14 @@ static int rt2x00lib_probe_hw_modes(stru +@@ -1013,6 +1013,14 @@ static int rt2x00lib_probe_hw_modes(stru struct ieee80211_rate *rates; unsigned int num_rates; unsigned int i; diff --git a/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch b/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch index 3adf74faa2d..39d405a8fa8 100644 --- a/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch +++ b/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch @@ -1,14 +1,14 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -25,6 +25,7 @@ - #include - #include +@@ -27,6 +27,7 @@ + #include + #include #include +#include #include "rt2x00.h" #include "rt2800lib.h" -@@ -11276,6 +11277,17 @@ static int rt2800_init_eeprom(struct rt2 +@@ -11414,6 +11415,17 @@ static int rt2800_init_eeprom(struct rt2 rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC); rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY); diff --git a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch index 64291e8f89c..88d6dd559ba 100644 --- a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch +++ b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1338,7 +1338,7 @@ static inline void rt2x00lib_set_if_comb +@@ -1344,7 +1344,7 @@ static inline void rt2x00lib_set_if_comb */ if_limit = &rt2x00dev->if_limits_ap; if_limit->max = rt2x00dev->ops->max_ap_intf; diff --git a/package/kernel/mac80211/patches/rt2x00/620-01-rt2x00-respect-rt2800-hardware-TX-queue-index.patch b/package/kernel/mac80211/patches/rt2x00/620-01-rt2x00-respect-rt2800-hardware-TX-queue-index.patch index 1d88ac7c60c..7b8e9dfb6d3 100644 --- a/package/kernel/mac80211/patches/rt2x00/620-01-rt2x00-respect-rt2800-hardware-TX-queue-index.patch +++ b/package/kernel/mac80211/patches/rt2x00/620-01-rt2x00-respect-rt2800-hardware-TX-queue-index.patch @@ -82,7 +82,7 @@ Signed-off-by: Shiji Yang #define WMM_CWMAX_CFG_CWMAX0 FIELD32(0x0000000f) --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -835,7 +835,8 @@ void rt2800_write_tx_data(struct queue_e +@@ -837,7 +837,8 @@ void rt2800_write_tx_data(struct queue_e txdesc->key_idx : txdesc->u.ht.wcid); rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, txdesc->length); @@ -92,7 +92,7 @@ Signed-off-by: Shiji Yang rt2x00_set_field32(&word, TXWI_W1_PACKETID_ENTRY, (entry->entry_idx % 3) + 1); rt2x00_desc_write(txwi, 1, word); -@@ -1125,6 +1126,12 @@ void rt2800_txdone(struct rt2x00_dev *rt +@@ -1127,6 +1128,12 @@ void rt2800_txdone(struct rt2x00_dev *rt u32 reg; u8 qid; bool match; @@ -105,7 +105,7 @@ Signed-off-by: Shiji Yang while (quota-- > 0 && kfifo_get(&rt2x00dev->txstatus_fifo, ®)) { /* -@@ -1132,6 +1139,8 @@ void rt2800_txdone(struct rt2x00_dev *rt +@@ -1134,6 +1141,8 @@ void rt2800_txdone(struct rt2x00_dev *rt * guaranteed to be one of the TX QIDs . */ qid = rt2x00_get_field32(reg, TX_STA_FIFO_PID_QUEUE); @@ -114,7 +114,7 @@ Signed-off-by: Shiji Yang queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); if (unlikely(rt2x00queue_empty(queue))) { -@@ -12182,8 +12191,9 @@ int rt2800_conf_tx(struct ieee80211_hw * +@@ -12319,8 +12328,9 @@ int rt2800_conf_tx(struct ieee80211_hw * queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx); /* Update WMM TXOP register */ @@ -126,7 +126,7 @@ Signed-off-by: Shiji Yang field.bit_mask = 0xffff << field.bit_offset; reg = rt2800_register_read(rt2x00dev, offset); -@@ -12191,7 +12201,7 @@ int rt2800_conf_tx(struct ieee80211_hw * +@@ -12328,7 +12338,7 @@ int rt2800_conf_tx(struct ieee80211_hw * rt2800_register_write(rt2x00dev, offset, reg); /* Update WMM registers */ @@ -135,7 +135,7 @@ Signed-off-by: Shiji Yang field.bit_mask = 0xf << field.bit_offset; reg = rt2800_register_read(rt2x00dev, WMM_AIFSN_CFG); -@@ -12207,7 +12217,7 @@ int rt2800_conf_tx(struct ieee80211_hw * +@@ -12344,7 +12354,7 @@ int rt2800_conf_tx(struct ieee80211_hw * rt2800_register_write(rt2x00dev, WMM_CWMAX_CFG, reg); /* Update EDCA registers */ diff --git a/package/kernel/mac80211/patches/rt2x00/620-02-rt2x00-increase-the-watchdog-sampling-frequency.patch b/package/kernel/mac80211/patches/rt2x00/620-02-rt2x00-increase-the-watchdog-sampling-frequency.patch index c60d2ad54a9..7f949a7b5f8 100644 --- a/package/kernel/mac80211/patches/rt2x00/620-02-rt2x00-increase-the-watchdog-sampling-frequency.patch +++ b/package/kernel/mac80211/patches/rt2x00/620-02-rt2x00-increase-the-watchdog-sampling-frequency.patch @@ -13,7 +13,7 @@ Signed-off-by: Shiji Yang --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -1320,26 +1320,45 @@ static bool rt2800_watchdog_hung(struct +@@ -1322,26 +1322,45 @@ static bool rt2800_watchdog_hung(struct return true; } diff --git a/package/kernel/mac80211/patches/rt2x00/621-01-rt2x00-always-calibrate-MT7620-when-switching-channe.patch b/package/kernel/mac80211/patches/rt2x00/621-01-rt2x00-always-calibrate-MT7620-when-switching-channe.patch index 01ae04e6e21..6873870adf2 100644 --- a/package/kernel/mac80211/patches/rt2x00/621-01-rt2x00-always-calibrate-MT7620-when-switching-channe.patch +++ b/package/kernel/mac80211/patches/rt2x00/621-01-rt2x00-always-calibrate-MT7620-when-switching-channe.patch @@ -13,7 +13,7 @@ Signed-off-by: Shiji Yang --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -5704,6 +5704,9 @@ static void rt2800_config_ps(struct rt2x +@@ -5706,6 +5706,9 @@ static void rt2800_config_ps(struct rt2x } } @@ -23,7 +23,7 @@ Signed-off-by: Shiji Yang void rt2800_config(struct rt2x00_dev *rt2x00dev, struct rt2x00lib_conf *libconf, const unsigned int flags) -@@ -5718,10 +5721,18 @@ void rt2800_config(struct rt2x00_dev *rt +@@ -5720,10 +5723,18 @@ void rt2800_config(struct rt2x00_dev *rt */ rt2800_update_survey(rt2x00dev); @@ -42,7 +42,7 @@ Signed-off-by: Shiji Yang } if (flags & IEEE80211_CONF_CHANGE_POWER) rt2800_config_txpower(rt2x00dev, libconf->conf->chandef.chan, -@@ -10421,15 +10432,19 @@ static void rt2800_restore_rf_bbp_rt6352 +@@ -10423,15 +10434,19 @@ static void rt2800_restore_rf_bbp_rt6352 } } @@ -65,7 +65,7 @@ Signed-off-by: Shiji Yang rt2800_rf_self_txdc_cal(rt2x00dev); rt2800_rxdcoc_calibration(rt2x00dev); rt2800_bw_filter_calibration(rt2x00dev, true); -@@ -10760,9 +10775,6 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10762,9 +10777,6 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C); diff --git a/package/kernel/mac80211/patches/rt2x00/621-02-rt2x00-rework-link-tuner-for-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/621-02-rt2x00-rework-link-tuner-for-MT7620.patch index f7e7a8e5ffa..708fa3c4a8f 100644 --- a/package/kernel/mac80211/patches/rt2x00/621-02-rt2x00-rework-link-tuner-for-MT7620.patch +++ b/package/kernel/mac80211/patches/rt2x00/621-02-rt2x00-rework-link-tuner-for-MT7620.patch @@ -13,7 +13,7 @@ Signed-off-by: Shiji Yang --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -5561,6 +5561,9 @@ static void rt2800_config_txpower(struct +@@ -5563,6 +5563,9 @@ static void rt2800_config_txpower(struct void rt2800_gain_calibration(struct rt2x00_dev *rt2x00dev) { @@ -23,7 +23,7 @@ Signed-off-by: Shiji Yang rt2800_config_txpower(rt2x00dev, rt2x00dev->hw->conf.chandef.chan, rt2x00dev->tx_power); } -@@ -5773,9 +5776,10 @@ static u8 rt2800_get_default_vgc(struct +@@ -5775,9 +5778,10 @@ static u8 rt2800_get_default_vgc(struct rt2x00_rt(rt2x00dev, RT3593) || rt2x00_rt(rt2x00dev, RT5390) || rt2x00_rt(rt2x00dev, RT5392) || @@ -36,7 +36,7 @@ Signed-off-by: Shiji Yang else vgc = 0x2e + rt2x00dev->lna_gain; } else { /* 5GHZ band */ -@@ -5828,7 +5832,8 @@ void rt2800_link_tuner(struct rt2x00_dev +@@ -5830,7 +5834,8 @@ void rt2800_link_tuner(struct rt2x00_dev { u8 vgc; diff --git a/package/kernel/mac80211/patches/rt2x00/621-03-rt2x00-correct-MT7620-SDM-mode-register-value.patch b/package/kernel/mac80211/patches/rt2x00/621-03-rt2x00-correct-MT7620-SDM-mode-register-value.patch index 7c376df197a..bcd36c7b935 100644 --- a/package/kernel/mac80211/patches/rt2x00/621-03-rt2x00-correct-MT7620-SDM-mode-register-value.patch +++ b/package/kernel/mac80211/patches/rt2x00/621-03-rt2x00-correct-MT7620-SDM-mode-register-value.patch @@ -14,7 +14,7 @@ Signed-off-by: Shiji Yang --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -3848,7 +3848,7 @@ static void rt2800_config_channel_rf7620 +@@ -3850,7 +3850,7 @@ static void rt2800_config_channel_rf7620 /* Default: XO=20MHz , SDM mode */ rfcsr = rt2800_rfcsr_read(rt2x00dev, 16); diff --git a/package/kernel/mac80211/patches/rt2x00/621-04-rt2x00-fix-register-operation-on-RXIQ-calibration.patch b/package/kernel/mac80211/patches/rt2x00/621-04-rt2x00-fix-register-operation-on-RXIQ-calibration.patch index 0e0245e4920..e1533c61ba2 100644 --- a/package/kernel/mac80211/patches/rt2x00/621-04-rt2x00-fix-register-operation-on-RXIQ-calibration.patch +++ b/package/kernel/mac80211/patches/rt2x00/621-04-rt2x00-fix-register-operation-on-RXIQ-calibration.patch @@ -15,7 +15,7 @@ Signed-off-by: Shiji Yang --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -8846,7 +8846,7 @@ static void rt2800_rxiq_calibration(stru +@@ -8848,7 +8848,7 @@ static void rt2800_rxiq_calibration(stru rt2x00_warn(rt2x00dev, "Timeout waiting for MAC status in RXIQ calibration\n"); bbpval = bbp4 & (~0x18); diff --git a/package/kernel/mac80211/patches/rt2x00/622-01-rt2x00-fix-RFCSR-register-init-values-for-RT5592.patch b/package/kernel/mac80211/patches/rt2x00/622-01-rt2x00-fix-RFCSR-register-init-values-for-RT5592.patch index 72a8f0073d2..2019448d6a4 100644 --- a/package/kernel/mac80211/patches/rt2x00/622-01-rt2x00-fix-RFCSR-register-init-values-for-RT5592.patch +++ b/package/kernel/mac80211/patches/rt2x00/622-01-rt2x00-fix-RFCSR-register-init-values-for-RT5592.patch @@ -13,7 +13,7 @@ Signed-off-by: Shiji Yang --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -3576,9 +3576,8 @@ static void rt2800_config_channel_rf55xx +@@ -3578,9 +3578,8 @@ static void rt2800_config_channel_rf55xx /* TODO RF27 <- tssi */ @@ -25,7 +25,7 @@ Signed-off-by: Shiji Yang if (is_11b) { /* CCK */ -@@ -3599,7 +3598,7 @@ static void rt2800_config_channel_rf55xx +@@ -3601,7 +3600,7 @@ static void rt2800_config_channel_rf55xx power_bound = POWER_BOUND; ep_reg = 0x2; } else { @@ -34,7 +34,7 @@ Signed-off-by: Shiji Yang /* FIMXE: RF11 overwrite */ rt2800_rfcsr_write(rt2x00dev, 11, 0x40); rt2800_rfcsr_write(rt2x00dev, 25, 0xBF); -@@ -3608,13 +3607,15 @@ static void rt2800_config_channel_rf55xx +@@ -3610,13 +3609,15 @@ static void rt2800_config_channel_rf55xx rt2800_rfcsr_write(rt2x00dev, 37, 0x04); rt2800_rfcsr_write(rt2x00dev, 38, 0x85); rt2800_rfcsr_write(rt2x00dev, 40, 0x42); @@ -52,7 +52,7 @@ Signed-off-by: Shiji Yang /* TODO RF27 <- tssi */ -@@ -3623,82 +3624,59 @@ static void rt2800_config_channel_rf55xx +@@ -3625,82 +3626,59 @@ static void rt2800_config_channel_rf55xx rt2800_rfcsr_write(rt2x00dev, 12, 0x2E); rt2800_rfcsr_write(rt2x00dev, 13, 0x22); rt2800_rfcsr_write(rt2x00dev, 22, 0x60); @@ -170,7 +170,7 @@ Signed-off-by: Shiji Yang } power_bound = POWER_BOUND_5G; -@@ -3710,7 +3688,7 @@ static void rt2800_config_channel_rf55xx +@@ -3712,7 +3690,7 @@ static void rt2800_config_channel_rf55xx rt2x00_set_field8(&rfcsr, RFCSR49_TX, power_bound); else rt2x00_set_field8(&rfcsr, RFCSR49_TX, info->default_power1); @@ -179,7 +179,7 @@ Signed-off-by: Shiji Yang rt2x00_set_field8(&rfcsr, RFCSR49_EP, ep_reg); rt2800_rfcsr_write(rt2x00dev, 49, rfcsr); -@@ -3719,7 +3697,7 @@ static void rt2800_config_channel_rf55xx +@@ -3721,7 +3699,7 @@ static void rt2800_config_channel_rf55xx rt2x00_set_field8(&rfcsr, RFCSR50_TX, power_bound); else rt2x00_set_field8(&rfcsr, RFCSR50_TX, info->default_power2); @@ -188,7 +188,7 @@ Signed-off-by: Shiji Yang rt2x00_set_field8(&rfcsr, RFCSR50_EP, ep_reg); rt2800_rfcsr_write(rt2x00dev, 50, rfcsr); -@@ -3740,7 +3718,6 @@ static void rt2800_config_channel_rf55xx +@@ -3742,7 +3720,6 @@ static void rt2800_config_channel_rf55xx rt2x00_set_field8(&rfcsr, RFCSR1_RX2_PD, 0); rt2800_rfcsr_write(rt2x00dev, 1, rfcsr); @@ -196,7 +196,7 @@ Signed-off-by: Shiji Yang if (conf_is_ht40(conf)) rt2800_rfcsr_write(rt2x00dev, 30, 0x16); -@@ -8505,12 +8482,15 @@ static void rt2800_init_rfcsr_5392(struc +@@ -8507,12 +8484,15 @@ static void rt2800_init_rfcsr_5392(struc static void rt2800_init_rfcsr_5592(struct rt2x00_dev *rt2x00dev) { @@ -213,7 +213,7 @@ Signed-off-by: Shiji Yang rt2800_rfcsr_write(rt2x00dev, 7, 0x00); rt2800_rfcsr_write(rt2x00dev, 14, 0x00); rt2800_rfcsr_write(rt2x00dev, 15, 0x00); -@@ -8526,9 +8506,13 @@ static void rt2800_init_rfcsr_5592(struc +@@ -8528,9 +8508,13 @@ static void rt2800_init_rfcsr_5592(struc rt2800_rfcsr_write(rt2x00dev, 34, 0x07); rt2800_rfcsr_write(rt2x00dev, 35, 0x12); rt2800_rfcsr_write(rt2x00dev, 47, 0x0C); diff --git a/package/kernel/mac80211/patches/rt2x00/622-02-rt2x00-fix-BBP-register-init-values-for-RT5592.patch b/package/kernel/mac80211/patches/rt2x00/622-02-rt2x00-fix-BBP-register-init-values-for-RT5592.patch index 19d1951b7b5..10146da3822 100644 --- a/package/kernel/mac80211/patches/rt2x00/622-02-rt2x00-fix-BBP-register-init-values-for-RT5592.patch +++ b/package/kernel/mac80211/patches/rt2x00/622-02-rt2x00-fix-BBP-register-init-values-for-RT5592.patch @@ -13,7 +13,7 @@ Signed-off-by: Shiji Yang --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -3746,6 +3746,7 @@ static void rt2800_config_channel_rf55xx +@@ -3748,6 +3748,7 @@ static void rt2800_config_channel_rf55xx rt2800_bbp_write(rt2x00dev, 80, (rf->channel <= 14) ? 0x0E : 0x08); rt2800_bbp_write(rt2x00dev, 81, (rf->channel <= 14) ? 0x3A : 0x38); rt2800_bbp_write(rt2x00dev, 82, (rf->channel <= 14) ? 0x62 : 0x92); @@ -21,7 +21,7 @@ Signed-off-by: Shiji Yang /* GLRT band configuration */ rt2800_bbp_write(rt2x00dev, 195, 128); -@@ -3758,7 +3759,7 @@ static void rt2800_config_channel_rf55xx +@@ -3760,7 +3761,7 @@ static void rt2800_config_channel_rf55xx rt2800_bbp_write(rt2x00dev, 196, (rf->channel <= 14) ? 0x32 : 0x20); rt2800_bbp_write(rt2x00dev, 195, 133); rt2800_bbp_write(rt2x00dev, 196, (rf->channel <= 14) ? 0x28 : 0x7F); @@ -30,7 +30,7 @@ Signed-off-by: Shiji Yang rt2800_bbp_write(rt2x00dev, 196, (rf->channel <= 14) ? 0x19 : 0x7F); } -@@ -4304,7 +4305,8 @@ static void rt2800_config_channel(struct +@@ -4306,7 +4307,8 @@ static void rt2800_config_channel(struct rt2800_bbp_write(rt2x00dev, 62, 0x37 - rt2x00dev->lna_gain); rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain); rt2800_bbp_write(rt2x00dev, 64, 0x37 - rt2x00dev->lna_gain); @@ -40,7 +40,7 @@ Signed-off-by: Shiji Yang rt2800_bbp_write(rt2x00dev, 86, 0x38); else rt2800_bbp_write(rt2x00dev, 86, 0); -@@ -4313,6 +4315,7 @@ static void rt2800_config_channel(struct +@@ -4315,6 +4317,7 @@ static void rt2800_config_channel(struct if (rf->channel <= 14) { if (!rt2x00_rt(rt2x00dev, RT5390) && !rt2x00_rt(rt2x00dev, RT5392) && @@ -48,7 +48,7 @@ Signed-off-by: Shiji Yang !rt2x00_rt(rt2x00dev, RT6352)) { if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) { rt2800_bbp_write(rt2x00dev, 82, 0x62); -@@ -4336,17 +4339,20 @@ static void rt2800_config_channel(struct +@@ -4338,17 +4341,20 @@ static void rt2800_config_channel(struct else if (rt2x00_rt(rt2x00dev, RT3593) || rt2x00_rt(rt2x00dev, RT3883)) rt2800_bbp_write(rt2x00dev, 82, 0x82); @@ -74,7 +74,7 @@ Signed-off-by: Shiji Yang } reg = rt2800_register_read(rt2x00dev, TX_BAND_CFG); -@@ -5783,12 +5789,10 @@ static inline void rt2800_set_vgc(struct +@@ -5785,12 +5791,10 @@ static inline void rt2800_set_vgc(struct if (rt2x00_rt(rt2x00dev, RT3572) || rt2x00_rt(rt2x00dev, RT3593) || rt2x00_rt(rt2x00dev, RT3883) || @@ -88,7 +88,7 @@ Signed-off-by: Shiji Yang } else { rt2800_bbp_write(rt2x00dev, 66, vgc_level); } -@@ -7016,7 +7020,6 @@ static void rt2800_init_bbp_5592(struct +@@ -7018,7 +7022,6 @@ static void rt2800_init_bbp_5592(struct rt2800_bbp_write(rt2x00dev, 88, 0x90); rt2800_bbp_write(rt2x00dev, 91, 0x04); rt2800_bbp_write(rt2x00dev, 92, 0x02); @@ -96,7 +96,7 @@ Signed-off-by: Shiji Yang rt2800_bbp_write(rt2x00dev, 98, 0x12); rt2800_bbp_write(rt2x00dev, 103, 0xC0); rt2800_bbp_write(rt2x00dev, 104, 0x92); -@@ -7027,6 +7030,7 @@ static void rt2800_init_bbp_5592(struct +@@ -7029,6 +7032,7 @@ static void rt2800_init_bbp_5592(struct rt2800_bbp_write(rt2x00dev, 134, 0xD0); rt2800_bbp_write(rt2x00dev, 135, 0xF6); rt2800_bbp_write(rt2x00dev, 137, 0x0F); @@ -104,7 +104,7 @@ Signed-off-by: Shiji Yang /* Initialize GLRT (Generalized Likehood Radio Test) */ rt2800_init_bbp_5592_glrt(rt2x00dev); -@@ -7051,12 +7055,6 @@ static void rt2800_init_bbp_5592(struct +@@ -7053,12 +7057,6 @@ static void rt2800_init_bbp_5592(struct rt2x00_set_field8(&value, BBP254_BIT7, 1); rt2800_bbp_write(rt2x00dev, 254, value); } diff --git a/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch index 0e05491f12f..4452b36a729 100644 --- a/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch +++ b/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch @@ -27,7 +27,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -305,6 +305,24 @@ static void rt2800_rf_write(struct rt2x0 +@@ -307,6 +307,24 @@ static void rt2800_rf_write(struct rt2x0 mutex_unlock(&rt2x00dev->csr_mutex); } @@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle static const unsigned int rt2800_eeprom_map[EEPROM_WORD_COUNT] = { [EEPROM_CHIP_ID] = 0x0000, [EEPROM_VERSION] = 0x0001, -@@ -10422,8 +10440,10 @@ static void rt2800_restore_rf_bbp_rt6352 +@@ -10424,8 +10442,10 @@ static void rt2800_restore_rf_bbp_rt6352 static void rt2800_calibration_rt6352_stage1(struct rt2x00_dev *rt2x00dev) { if (rt2x00_has_cap_external_pa(rt2x00dev) || @@ -64,7 +64,7 @@ Signed-off-by: Daniel Golle rt2800_r_calibration(rt2x00dev); } -@@ -10447,6 +10467,8 @@ static void rt2800_calibration_rt6352_st +@@ -10449,6 +10469,8 @@ static void rt2800_calibration_rt6352_st !rt2x00_has_cap_external_lna_bg(rt2x00dev)) return; @@ -83,21 +83,21 @@ Signed-off-by: Daniel Golle #include -@@ -1015,6 +1016,11 @@ struct rt2x00_dev { - +@@ -1014,6 +1015,11 @@ struct rt2x00_dev { /* Clock for System On Chip devices. */ struct clk *clk; -+ + + /* pinctrl and states for System On Chip devices with PA/LNA. */ + struct pinctrl *pinctrl; + struct pinctrl_state *pins_default; + struct pinctrl_state *pins_pa_gpio; ++ + struct usb_anchor anchor[]; }; - struct rt2x00_bar_list_entry { --- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c -@@ -298,6 +298,21 @@ static int rt2x00soc_probe(struct platfo +@@ -325,6 +325,21 @@ static int rt2x00soc_probe(struct platfo if (retval) goto exit_free_device; diff --git a/package/kernel/mac80211/patches/rt2x00/995-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch b/package/kernel/mac80211/patches/rt2x00/995-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch index 46966c60226..d528566a805 100644 --- a/package/kernel/mac80211/patches/rt2x00/995-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch +++ b/package/kernel/mac80211/patches/rt2x00/995-rt2x00-mt7620-introduce-accessors-for-CHIP_VER-register.patch @@ -40,7 +40,7 @@ const u8 arg0, const u8 arg1); --- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c -@@ -289,6 +289,10 @@ static int rt2800pci_read_eeprom(struct +@@ -297,6 +297,10 @@ static int rt2800pci_read_eeprom(struct return retval; } @@ -51,7 +51,7 @@ static const struct ieee80211_ops rt2800pci_mac80211_ops = { .add_chanctx = ieee80211_emulate_add_chanctx, .remove_chanctx = ieee80211_emulate_remove_chanctx, -@@ -336,6 +340,9 @@ static const struct rt2800_ops rt2800pci +@@ -344,6 +348,9 @@ static const struct rt2800_ops rt2800pci .drv_init_registers = rt2800mmio_init_registers, .drv_get_txwi = rt2800mmio_get_txwi, .drv_get_dma_done = rt2800mmio_get_dma_done, @@ -76,7 +76,7 @@ /* Allow hardware encryption to be disabled. */ static bool modparam_nohwcrypt; module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444); -@@ -136,6 +142,27 @@ static int rt2800soc_resume(struct platf +@@ -164,6 +170,27 @@ static int rt2800soc_resume(struct platf } #endif /* CONFIG_PM */ @@ -104,7 +104,7 @@ static const struct ieee80211_ops rt2800soc_mac80211_ops = { .add_chanctx = ieee80211_emulate_add_chanctx, .remove_chanctx = ieee80211_emulate_remove_chanctx, -@@ -183,6 +210,9 @@ static const struct rt2800_ops rt2800soc +@@ -211,6 +238,9 @@ static const struct rt2800_ops rt2800soc .drv_init_registers = rt2800mmio_init_registers, .drv_get_txwi = rt2800mmio_get_txwi, .drv_get_dma_done = rt2800mmio_get_dma_done, diff --git a/package/kernel/mac80211/patches/rt2x00/996-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch b/package/kernel/mac80211/patches/rt2x00/996-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch index 0b2e7313dd7..0466a23433b 100644 --- a/package/kernel/mac80211/patches/rt2x00/996-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch +++ b/package/kernel/mac80211/patches/rt2x00/996-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch @@ -14,7 +14,7 @@ */ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -3842,14 +3842,16 @@ static void rt2800_config_channel_rf7620 +@@ -3844,14 +3844,16 @@ static void rt2800_config_channel_rf7620 rt2x00_set_field8(&rfcsr, RFCSR19_K, rf->rf4); rt2800_rfcsr_write(rt2x00dev, 19, rfcsr); @@ -39,7 +39,7 @@ rfcsr = rt2800_rfcsr_read(rt2x00dev, 1); rt2x00_set_field8(&rfcsr, RFCSR1_TX2_EN_MT7620, -@@ -3883,18 +3885,23 @@ static void rt2800_config_channel_rf7620 +@@ -3885,18 +3887,23 @@ static void rt2800_config_channel_rf7620 rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x20); } @@ -73,7 +73,7 @@ if (!test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) { if (conf_is_ht40(conf)) { -@@ -4008,25 +4015,29 @@ static void rt2800_config_alc_rt6352(str +@@ -4010,25 +4017,29 @@ static void rt2800_config_alc_rt6352(str if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev, MAC_STATUS_CFG_BBP_RF_BUSY))) rt2x00_warn(rt2x00dev, "RF busy while configuring ALC\n"); @@ -121,7 +121,7 @@ rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, mac_sys_ctrl); rt2800_vco_calibration(rt2x00dev); -@@ -4524,7 +4535,8 @@ static void rt2800_config_channel(struct +@@ -4526,7 +4537,8 @@ static void rt2800_config_channel(struct if (rt2x00_rt(rt2x00dev, RT6352)) { /* BBP for GLRT BW */ bbp = conf_is_ht40(conf) ? @@ -131,7 +131,7 @@ 0x15 : 0x1a; rt2800_bbp_glrt_write(rt2x00dev, 141, bbp); -@@ -6042,18 +6054,34 @@ static int rt2800_init_registers(struct +@@ -6044,18 +6056,34 @@ static int rt2800_init_registers(struct } else if (rt2x00_rt(rt2x00dev, RT5350)) { rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404); } else if (rt2x00_rt(rt2x00dev, RT6352)) { @@ -178,7 +178,7 @@ reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_1); rt2x00_set_field32(®, TX_ALC_CFG_1_ROS_BUSY_EN, 0); rt2800_register_write(rt2x00dev, TX_ALC_CFG_1, reg); -@@ -7160,14 +7188,16 @@ static void rt2800_init_bbp_6352(struct +@@ -7162,14 +7190,16 @@ static void rt2800_init_bbp_6352(struct rt2800_bbp_write(rt2x00dev, 188, 0x00); rt2800_bbp_write(rt2x00dev, 189, 0x00); @@ -203,7 +203,7 @@ /* BBP for G band GLRT function (BBP_128 ~ BBP_221) */ rt2800_bbp_glrt_write(rt2x00dev, 0, 0x00); -@@ -10398,6 +10428,9 @@ static void rt2800_restore_rf_bbp_rt6352 +@@ -10400,6 +10430,9 @@ static void rt2800_restore_rf_bbp_rt6352 rt2800_register_write(rt2x00dev, RF_BYPASS3, 0x0); } @@ -213,7 +213,7 @@ if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) { rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16); rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x23); -@@ -10479,6 +10512,9 @@ static void rt2800_calibration_rt6352_st +@@ -10481,6 +10514,9 @@ static void rt2800_calibration_rt6352_st rt2800_register_write(rt2x00dev, RF_BYPASS3, reg); } @@ -223,7 +223,7 @@ if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) { rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x66); rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x20); -@@ -10569,31 +10605,36 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10571,31 +10607,36 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write(rt2x00dev, 42, 0x5B); rt2800_rfcsr_write(rt2x00dev, 43, 0x00); @@ -285,7 +285,7 @@ /* Initialize RF channel register to default value */ rt2800_rfcsr_write_chanreg(rt2x00dev, 0, 0x03); -@@ -10659,63 +10700,71 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10661,63 +10702,71 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_bank(rt2x00dev, 6, 45, 0xC5); @@ -412,7 +412,7 @@ /* Initialize RF DC calibration register to default value */ rt2800_rfcsr_write_dccal(rt2x00dev, 0, 0x47); -@@ -10778,12 +10827,17 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10780,12 +10829,17 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_dccal(rt2x00dev, 62, 0x00); rt2800_rfcsr_write_dccal(rt2x00dev, 63, 0x00); diff --git a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch index 5c79bf87de8..00f15c7ea23 100644 --- a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch @@ -9,9 +9,9 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnect --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1883,12 +1883,6 @@ static int ieee80211_stop_ap(struct wiph - ieee80211_link_info_change_notify(sdata, link, - BSS_CHANGED_BEACON_ENABLED); +@@ -2101,12 +2101,6 @@ static int ieee80211_stop_ap(struct wiph + clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state); + ieee80211_link_info_change_notify(sdata, link, changes); - ieee80211_remove_link_keys(link, &keys); - if (!list_empty(&keys)) { @@ -21,4 +21,4 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnect - if (sdata->wdev.links[link_id].cac_started) { chandef = link_conf->chanreq.oper; - wiphy_delayed_work_cancel(wiphy, &link->dfs_cac_timer_work); + wiphy_hrtimer_work_cancel(wiphy, &link->dfs_cac_timer_work); diff --git a/package/kernel/mac80211/patches/subsys/130-disable_auto_vif.patch b/package/kernel/mac80211/patches/subsys/130-disable_auto_vif.patch index b08655b174e..84381f9038b 100644 --- a/package/kernel/mac80211/patches/subsys/130-disable_auto_vif.patch +++ b/package/kernel/mac80211/patches/subsys/130-disable_auto_vif.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -1597,24 +1597,6 @@ int ieee80211_register_hw(struct ieee802 +@@ -1633,24 +1633,6 @@ int ieee80211_register_hw(struct ieee802 ieee80211_check_wbrf_support(local); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index 6289334b561..1daee3ae3da 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -8,7 +8,7 @@ Subject: [PATCH] mac80211: allow scans in access point mode (for site survey) --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -3121,6 +3121,8 @@ static int ieee80211_scan(struct wiphy * +@@ -3508,6 +3508,8 @@ static int ieee80211_scan(struct wiphy * */ fallthrough; case NL80211_IFTYPE_AP: diff --git a/package/kernel/mac80211/patches/subsys/220-allow-ibss-mixed.patch b/package/kernel/mac80211/patches/subsys/220-allow-ibss-mixed.patch index 63eeff85ae6..53d224858d0 100644 --- a/package/kernel/mac80211/patches/subsys/220-allow-ibss-mixed.patch +++ b/package/kernel/mac80211/patches/subsys/220-allow-ibss-mixed.patch @@ -16,7 +16,7 @@ and we should ignore this. --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -675,21 +675,6 @@ int wiphy_verify_iface_combinations(stru +@@ -778,21 +778,6 @@ int wiphy_verify_iface_combinations(stru c->limits[j].max > 1)) return -EINVAL; diff --git a/package/kernel/mac80211/patches/subsys/230-avoid-crashing-missing-band.patch b/package/kernel/mac80211/patches/subsys/230-avoid-crashing-missing-band.patch index 5b425bcc208..cd76db29bd7 100644 --- a/package/kernel/mac80211/patches/subsys/230-avoid-crashing-missing-band.patch +++ b/package/kernel/mac80211/patches/subsys/230-avoid-crashing-missing-band.patch @@ -18,7 +18,7 @@ Signed-off-by: David Bauer --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -2527,6 +2527,13 @@ static void sta_stats_decode_rate(struct +@@ -2587,6 +2587,13 @@ static void sta_stats_decode_rate(struct sband = local->hw.wiphy->bands[band]; diff --git a/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch b/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch index 7c840dd809e..2396feb1b73 100644 --- a/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch +++ b/package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch @@ -28,11 +28,11 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -630,6 +630,7 @@ __sta_info_alloc(struct ieee80211_sub_if +@@ -665,6 +665,7 @@ __sta_info_alloc(struct ieee80211_sub_if spin_lock_init(&sta->ps_lock); INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames); wiphy_work_init(&sta->ampdu_mlme.work, ieee80211_ba_session_work); + sta->ampdu_mlme.dialog_token_allocator = get_random_u32_below(U8_MAX); #ifdef CPTCFG_MAC80211_MESH if (ieee80211_vif_is_mesh(&sdata->vif)) { - sta->mesh = kzalloc(sizeof(*sta->mesh), gfp); + sta->mesh = kzalloc_obj(*sta->mesh, gfp); diff --git a/package/kernel/mac80211/patches/subsys/305-mac80211-increase-quantum-for-airtime-scheduler.patch b/package/kernel/mac80211/patches/subsys/305-mac80211-increase-quantum-for-airtime-scheduler.patch index 34c86a7aff3..dac46ac6717 100644 --- a/package/kernel/mac80211/patches/subsys/305-mac80211-increase-quantum-for-airtime-scheduler.patch +++ b/package/kernel/mac80211/patches/subsys/305-mac80211-increase-quantum-for-airtime-scheduler.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -111,6 +111,8 @@ ieee80211_sta_keep_active(struct sta_inf +@@ -112,6 +112,8 @@ ieee80211_sta_keep_active(struct sta_inf return time_before_eq(jiffies, sta->airtime[ac].last_active + HZ / 10); } @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -4090,7 +4090,7 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -4153,7 +4153,7 @@ struct ieee80211_txq *ieee80211_next_txq if (deficit < 0) sta->airtime[txqi->txq.ac].deficit += @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau if (deficit < 0 || !aql_check) { list_move_tail(&txqi->schedule_order, -@@ -4235,7 +4235,8 @@ bool ieee80211_txq_may_transmit(struct i +@@ -4298,7 +4298,8 @@ bool ieee80211_txq_may_transmit(struct i } sta = container_of(iter->txq.sta, struct sta_info, sta); if (ieee80211_sta_deficit(sta, ac) < 0) @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau list_move_tail(&iter->schedule_order, &local->active_txqs[ac]); } -@@ -4243,7 +4244,7 @@ bool ieee80211_txq_may_transmit(struct i +@@ -4306,7 +4307,7 @@ bool ieee80211_txq_may_transmit(struct i if (sta->airtime[ac].deficit >= 0) goto out; diff --git a/package/kernel/mac80211/patches/subsys/310-cfg80211-allow-grace-period-for-DFS-available-after-.patch b/package/kernel/mac80211/patches/subsys/310-cfg80211-allow-grace-period-for-DFS-available-after-.patch index 33715a7eb5f..0bf326f7c74 100644 --- a/package/kernel/mac80211/patches/subsys/310-cfg80211-allow-grace-period-for-DFS-available-after-.patch +++ b/package/kernel/mac80211/patches/subsys/310-cfg80211-allow-grace-period-for-DFS-available-after-.patch @@ -31,23 +31,23 @@ Signed-off-by: Felix Fietkau --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -187,6 +187,8 @@ enum ieee80211_channel_flags { +@@ -189,6 +189,8 @@ enum ieee80211_channel_flags { * @dfs_state: current state of this channel. Only relevant if radar is required * on this channel. * @dfs_state_entered: timestamp (jiffies) when the dfs state was entered. + * @dfs_state_last_available: timestamp (jiffies) of the last time when the + * channel was available. * @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels. - * @psd: power spectral density (in dBm) - */ -@@ -204,6 +206,7 @@ struct ieee80211_channel { + * @cac_start_time: timestamp (CLOCK_BOOTTIME, nanoseconds) when CAC was + * started on this channel. Zero when CAC is not in progress. +@@ -208,6 +210,7 @@ struct ieee80211_channel { int orig_mag, orig_mpwr; enum nl80211_dfs_state dfs_state; unsigned long dfs_state_entered; + unsigned long dfs_state_last_available; unsigned int dfs_cac_ms; + u64 cac_start_time; s8 psd; - }; --- a/net/wireless/ap.c +++ b/net/wireless/ap.c @@ -30,6 +30,9 @@ static int ___cfg80211_stop_ap(struct cf @@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau --- a/net/wireless/chan.c +++ b/net/wireless/chan.c -@@ -639,6 +639,8 @@ void cfg80211_set_dfs_state(struct wiphy +@@ -885,6 +885,8 @@ void cfg80211_set_dfs_state(struct wiphy c->dfs_state = dfs_state; c->dfs_state_entered = jiffies; @@ -81,7 +81,7 @@ Signed-off-by: Felix Fietkau } } -@@ -990,6 +992,28 @@ bool cfg80211_any_wiphy_oper_chan(struct +@@ -1267,6 +1269,28 @@ bool cfg80211_any_wiphy_oper_chan(struct return false; } @@ -112,8 +112,8 @@ Signed-off-by: Felix Fietkau { --- a/net/wireless/core.h +++ b/net/wireless/core.h -@@ -481,6 +481,8 @@ void cfg80211_set_dfs_state(struct wiphy - enum nl80211_dfs_state dfs_state); +@@ -490,6 +490,8 @@ void cfg80211_set_cac_state(struct wiphy + bool cac_ongoing); void cfg80211_dfs_channels_update_work(struct work_struct *work); +void cfg80211_update_last_available(struct wiphy *wiphy, @@ -123,7 +123,7 @@ Signed-off-by: Felix Fietkau --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c -@@ -1056,6 +1056,8 @@ void cfg80211_dfs_channels_update_work(s +@@ -1107,6 +1107,8 @@ void cfg80211_dfs_channels_update_work(s if (c->dfs_state == NL80211_DFS_UNAVAILABLE) { time_dfs_update = IEEE80211_DFS_MIN_NOP_TIME_MS; radar_event = NL80211_RADAR_NOP_FINISHED; @@ -132,7 +132,7 @@ Signed-off-by: Felix Fietkau } else { if (regulatory_pre_cac_allowed(wiphy) || cfg80211_any_wiphy_oper_chan(wiphy, c)) -@@ -1063,11 +1065,10 @@ void cfg80211_dfs_channels_update_work(s +@@ -1114,11 +1116,10 @@ void cfg80211_dfs_channels_update_work(s time_dfs_update = REG_PRE_CAC_EXPIRY_GRACE_MS; radar_event = NL80211_RADAR_PRE_CAC_EXPIRED; @@ -148,7 +148,7 @@ Signed-off-by: Felix Fietkau c->dfs_state_entered = jiffies; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -20970,6 +20970,9 @@ void cfg80211_ch_switch_notify(struct ne +@@ -22372,6 +22372,9 @@ void cfg80211_ch_switch_notify(struct ne break; case NL80211_IFTYPE_AP: case NL80211_IFTYPE_P2P_GO: @@ -160,7 +160,7 @@ Signed-off-by: Felix Fietkau case NL80211_IFTYPE_ADHOC: --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -2954,6 +2954,7 @@ static void reg_copy_dfs_chan_state(stru +@@ -2970,6 +2970,7 @@ static void reg_copy_dfs_chan_state(stru dst_chan->dfs_state == NL80211_DFS_USABLE) { dst_chan->dfs_state = src_chan->dfs_state; dst_chan->dfs_state_entered = src_chan->dfs_state_entered; diff --git a/package/kernel/mac80211/patches/subsys/311-cfg80211-allow-concurrent-AP-operation-on-DFS-channe.patch b/package/kernel/mac80211/patches/subsys/311-cfg80211-allow-concurrent-AP-operation-on-DFS-channe.patch index b75aab21fe2..02966fb7a77 100644 --- a/package/kernel/mac80211/patches/subsys/311-cfg80211-allow-concurrent-AP-operation-on-DFS-channe.patch +++ b/package/kernel/mac80211/patches/subsys/311-cfg80211-allow-concurrent-AP-operation-on-DFS-channe.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau --- a/net/wireless/chan.c +++ b/net/wireless/chan.c -@@ -717,6 +717,44 @@ static bool cfg80211_dfs_permissive_chan +@@ -990,6 +990,44 @@ static bool cfg80211_dfs_permissive_chan return false; } @@ -77,20 +77,20 @@ Signed-off-by: Felix Fietkau enum nl80211_iftype iftype) --- a/net/wireless/core.h +++ b/net/wireless/core.h -@@ -479,6 +479,8 @@ extern struct work_struct cfg80211_disco +@@ -484,6 +484,8 @@ extern struct work_struct cfg80211_disco void cfg80211_set_dfs_state(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef, enum nl80211_dfs_state dfs_state); +void cfg80211_set_dfs_concurrent(struct wiphy *wiphy, + const struct cfg80211_chan_def *chandef); - void cfg80211_dfs_channels_update_work(struct work_struct *work); - void cfg80211_update_last_available(struct wiphy *wiphy, + void cfg80211_set_cac_state(struct wiphy *wiphy, + const struct cfg80211_chan_def *chandef, --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -6744,6 +6744,8 @@ static int nl80211_start_ap(struct sk_bu +@@ -7355,6 +7355,8 @@ static int nl80211_start_ap(struct sk_bu + if (err) goto out; - } + cfg80211_set_dfs_concurrent(&rdev->wiphy, ¶ms->chandef); + diff --git a/package/kernel/mac80211/patches/subsys/320-mac80211-add-AQL-support-for-broadcast-packets.patch b/package/kernel/mac80211/patches/subsys/320-mac80211-add-AQL-support-for-broadcast-packets.patch index a24c5ecfbfb..e3e654007cf 100644 --- a/package/kernel/mac80211/patches/subsys/320-mac80211-add-AQL-support-for-broadcast-packets.patch +++ b/package/kernel/mac80211/patches/subsys/320-mac80211-add-AQL-support-for-broadcast-packets.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3604,6 +3604,7 @@ enum wiphy_params_flags { +@@ -3725,6 +3725,7 @@ enum wiphy_params_flags { /* The per TXQ device queue limit in airtime */ #define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_L 5000 #define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H 12000 @@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1426,10 +1426,12 @@ struct ieee80211_local { +@@ -1466,10 +1466,12 @@ struct ieee80211_local { spinlock_t handle_wake_tx_queue_lock; u16 airtime_flags; @@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau const struct ieee80211_ops *ops; --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -984,6 +984,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -988,6 +988,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ spin_lock_init(&local->rx_path_lock); spin_lock_init(&local->queue_stop_reason_lock); @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau spin_lock_init(&local->active_txq_lock[i]); --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -2432,13 +2432,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre +@@ -2492,13 +2492,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, struct sta_info *sta, u8 ac, @@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau atomic_add(tx_airtime, --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -2560,7 +2560,7 @@ static u16 ieee80211_store_ack_skb(struc +@@ -2589,7 +2589,7 @@ static u16 ieee80211_store_ack_skb(struc spin_lock_irqsave(&local->ack_status_lock, flags); id = idr_alloc(&local->ack_status_frames, ack_skb, @@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau spin_unlock_irqrestore(&local->ack_status_lock, flags); if (id >= 0) { -@@ -3991,20 +3991,20 @@ begin: +@@ -4054,20 +4054,20 @@ begin: encap_out: info->control.vif = vif; @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau } return skb; -@@ -4056,6 +4056,7 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -4119,6 +4119,7 @@ struct ieee80211_txq *ieee80211_next_txq struct ieee80211_txq *ret = NULL; struct txq_info *txqi = NULL, *head = NULL; bool found_eligible_txq = false; @@ -175,7 +175,7 @@ Signed-off-by: Felix Fietkau spin_lock_bh(&local->active_txq_lock[ac]); -@@ -4079,26 +4080,26 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -4142,26 +4143,26 @@ struct ieee80211_txq *ieee80211_next_txq if (!head) head = txqi; @@ -214,7 +214,7 @@ Signed-off-by: Felix Fietkau if (txqi->schedule_round == local->schedule_round[ac]) goto out; -@@ -4165,7 +4166,8 @@ bool ieee80211_txq_airtime_check(struct +@@ -4228,7 +4229,8 @@ bool ieee80211_txq_airtime_check(struct return true; if (!txq->sta) @@ -224,7 +224,7 @@ Signed-off-by: Felix Fietkau if (unlikely(txq->tid == IEEE80211_NUM_TIDS)) return true; -@@ -4214,15 +4216,15 @@ bool ieee80211_txq_may_transmit(struct i +@@ -4277,15 +4279,15 @@ bool ieee80211_txq_may_transmit(struct i spin_lock_bh(&local->active_txq_lock[ac]); @@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau if (iter == txqi) --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1249,8 +1249,8 @@ struct ieee80211_tx_info { +@@ -1354,8 +1354,8 @@ struct ieee80211_tx_info { status_data_idr:1, status_data:13, hw_queue:4, @@ -269,7 +269,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/status.c +++ b/net/mac80211/status.c -@@ -751,7 +751,7 @@ static void ieee80211_report_used_skb(st +@@ -774,7 +774,7 @@ static void ieee80211_report_used_skb(st ieee80211_sta_update_pending_airtime(local, sta, skb_get_queue_mapping(skb), tx_time_est, @@ -278,7 +278,7 @@ Signed-off-by: Felix Fietkau rcu_read_unlock(); } -@@ -1160,10 +1160,11 @@ void ieee80211_tx_status_ext(struct ieee +@@ -1186,10 +1186,11 @@ void ieee80211_tx_status_ext(struct ieee /* Do this here to avoid the expensive lookup of the sta * in ieee80211_report_used_skb(). */ diff --git a/package/kernel/mac80211/patches/subsys/321-wifi-mac80211-add-ieee80211_txq_aql_pending.patch b/package/kernel/mac80211/patches/subsys/321-wifi-mac80211-add-ieee80211_txq_aql_pending.patch index ad7beeaeeee..f76cf085e7d 100644 --- a/package/kernel/mac80211/patches/subsys/321-wifi-mac80211-add-ieee80211_txq_aql_pending.patch +++ b/package/kernel/mac80211/patches/subsys/321-wifi-mac80211-add-ieee80211_txq_aql_pending.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -6603,6 +6603,17 @@ bool +@@ -6877,6 +6877,17 @@ bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw, struct ieee80211_txq *txq); /** @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau * @vif: virtual interface to iterate, may be %NULL for all --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -4187,6 +4187,24 @@ bool ieee80211_txq_airtime_check(struct +@@ -4250,6 +4250,24 @@ bool ieee80211_txq_airtime_check(struct } EXPORT_SYMBOL(ieee80211_txq_airtime_check); diff --git a/package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch b/package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch deleted file mode 100644 index ad716186722..00000000000 --- a/package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch +++ /dev/null @@ -1,399 +0,0 @@ ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -3815,6 +3815,27 @@ static bool ieee80211_is_scan_ongoing(st - return false; - } - -+bool ieee80211_scanning_busy(struct ieee80211_local *local, -+ struct cfg80211_chan_def *chandef) -+{ -+ struct cfg80211_scan_request *scan_req; -+ struct wiphy *wiphy = local->hw.wiphy; -+ u32 mask; -+ -+ if (!ieee80211_is_scan_ongoing(wiphy, local, chandef)) -+ return false; -+ -+ if (!wiphy->n_radio) -+ return true; -+ -+ mask = ieee80211_offchannel_radio_mask(local); -+ scan_req = wiphy_dereference(wiphy, local->scan_req); -+ if (scan_req) -+ mask |= ieee80211_scan_req_radio_mask(local, scan_req); -+ -+ return mask & ieee80211_chandef_radio_mask(local, chandef); -+} -+ - static int ieee80211_start_radar_detection(struct wiphy *wiphy, - struct net_device *dev, - struct cfg80211_chan_def *chandef, -@@ -3828,7 +3849,7 @@ static int ieee80211_start_radar_detecti - - lockdep_assert_wiphy(local->hw.wiphy); - -- if (ieee80211_is_scan_ongoing(wiphy, local, chandef)) -+ if (ieee80211_scanning_busy(local, chandef)) - return -EBUSY; - - link_data = sdata_dereference(sdata->link[link_id], sdata); -@@ -4320,7 +4341,7 @@ __ieee80211_channel_switch(struct wiphy - - lockdep_assert_wiphy(local->hw.wiphy); - -- if (ieee80211_is_scan_ongoing(wiphy, local, ¶ms->chandef)) -+ if (ieee80211_scanning_busy(local, ¶ms->chandef)) - return -EBUSY; - - if (sdata->wdev.links[link_id].cac_started) ---- a/net/mac80211/chan.c -+++ b/net/mac80211/chan.c -@@ -646,10 +646,11 @@ ieee80211_find_chanctx(struct ieee80211_ - return NULL; - } - --bool ieee80211_is_radar_required(struct ieee80211_local *local, -+bool ieee80211_is_radar_required(struct ieee80211_local *local, u32 radio_mask, - struct cfg80211_scan_request *req) - { - struct wiphy *wiphy = local->hw.wiphy; -+ struct ieee80211_chanctx_conf *conf; - struct ieee80211_link_data *link; - struct ieee80211_channel *chan; - int radio_idx; -@@ -660,14 +661,25 @@ bool ieee80211_is_radar_required(struct - return false; - - for_each_sdata_link(local, link) { -- if (link->radar_required) { -- chan = link->conf->chanreq.oper.chan; -- radio_idx = cfg80211_get_radio_idx_by_chan(wiphy, chan); -- -- if (ieee80211_is_radio_idx_in_scan_req(wiphy, req, -- radio_idx)) -- return true; -- } -+ if (!link->radar_required) -+ continue; -+ -+ chan = link->conf->chanreq.oper.chan; -+ radio_idx = cfg80211_get_radio_idx_by_chan(wiphy, chan); -+ -+ if (ieee80211_is_radio_idx_in_scan_req(wiphy, req, -+ radio_idx)) -+ return true; -+ -+ if (!local->hw.wiphy->n_radio) -+ return true; -+ -+ conf = wiphy_dereference(local->hw.wiphy, link->conf->chanctx_conf); -+ if (!conf) -+ continue; -+ -+ if (conf->radio_idx >= 0 && (radio_mask & BIT(conf->radio_idx))) -+ return true; - } - - return false; ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -2020,6 +2020,13 @@ int ieee80211_mesh_finish_csa(struct iee - u64 *changed); - - /* scan/BSS handling */ -+u32 ieee80211_scan_req_radio_mask(struct ieee80211_local *local, -+ struct cfg80211_scan_request *req); -+bool ieee80211_scanning_busy(struct ieee80211_local *local, -+ struct cfg80211_chan_def *chandef); -+u32 ieee80211_can_leave_ch(struct ieee80211_sub_if_data *sdata, -+ struct cfg80211_scan_request *req, -+ u32 radio_mask); - void ieee80211_scan_work(struct wiphy *wiphy, struct wiphy_work *work); - int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, - const u8 *ssid, u8 ssid_len, -@@ -2058,6 +2065,7 @@ void ieee80211_sched_scan_stopped_work(s - /* off-channel/mgmt-tx */ - void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local); - void ieee80211_offchannel_return(struct ieee80211_local *local); -+u32 ieee80211_offchannel_radio_mask(struct ieee80211_local *local); - void ieee80211_roc_setup(struct ieee80211_local *local); - void ieee80211_start_next_roc(struct ieee80211_local *local); - void ieee80211_reconfig_roc(struct ieee80211_local *local); -@@ -2717,6 +2725,8 @@ bool ieee80211_chandef_s1g_oper(struct i - struct cfg80211_chan_def *chandef); - void ieee80211_chandef_downgrade(struct cfg80211_chan_def *chandef, - struct ieee80211_conn_settings *conn); -+u32 ieee80211_chandef_radio_mask(struct ieee80211_local *local, -+ struct cfg80211_chan_def *chandef); - static inline void - ieee80211_chanreq_downgrade(struct ieee80211_chan_req *chanreq, - struct ieee80211_conn_settings *conn) -@@ -2773,7 +2783,7 @@ void ieee80211_recalc_chanctx_min_def(st - struct ieee80211_chanctx *ctx, - struct ieee80211_link_data *rsvd_for, - bool check_reserved); --bool ieee80211_is_radar_required(struct ieee80211_local *local, -+bool ieee80211_is_radar_required(struct ieee80211_local *local, u32 radio_mask, - struct cfg80211_scan_request *req); - bool ieee80211_is_radio_idx_in_scan_req(struct wiphy *wiphy, - struct cfg80211_scan_request *scan_req, ---- a/net/mac80211/offchannel.c -+++ b/net/mac80211/offchannel.c -@@ -168,6 +168,35 @@ void ieee80211_offchannel_return(struct - false); - } - -+u32 ieee80211_offchannel_radio_mask(struct ieee80211_local *local) -+{ -+ const struct wiphy_radio *radio; -+ struct ieee80211_roc_work *roc; -+ u32 mask = 0; -+ int r; -+ -+ for (r = 0; r < local->hw.wiphy->n_radio; r++) { -+ radio = &local->hw.wiphy->radio[r]; -+ -+ list_for_each_entry(roc, &local->roc_list, list) { -+ struct cfg80211_chan_def chandef = {}; -+ -+ if (!roc->started) -+ continue; -+ -+ cfg80211_chandef_create(&chandef, roc->chan, -+ NL80211_CHAN_NO_HT); -+ if (!cfg80211_radio_chandef_valid(radio, &chandef)) -+ continue; -+ -+ mask |= BIT(r); -+ break; -+ } -+ } -+ -+ return mask; -+} -+ - static void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc) - { - /* was never transmitted */ -@@ -566,8 +595,10 @@ static int ieee80211_start_roc_work(stru - enum ieee80211_roc_type type) - { - struct ieee80211_roc_work *roc, *tmp; -+ struct cfg80211_chan_def chandef = {}; - bool queued = false, combine_started = true; - struct cfg80211_scan_request *req; -+ u32 radio_mask; - int ret; - - lockdep_assert_wiphy(local->hw.wiphy); -@@ -579,6 +610,12 @@ static int ieee80211_start_roc_work(stru - if (!local->emulate_chanctx && !local->ops->remain_on_channel) - return -EOPNOTSUPP; - -+ cfg80211_chandef_create(&chandef, channel, NL80211_CHAN_NO_HT); -+ radio_mask = ieee80211_chandef_radio_mask(local, &chandef); -+ if (!ieee80211_can_leave_ch(sdata, req, radio_mask) && -+ !ieee80211_scanning_busy(local, &chandef)) -+ return -EBUSY; -+ - roc = kzalloc(sizeof(*roc), GFP_KERNEL); - if (!roc) - return -ENOMEM; -@@ -616,8 +653,7 @@ static int ieee80211_start_roc_work(stru - req = wiphy_dereference(local->hw.wiphy, local->scan_req); - - /* if there's no need to queue, handle it immediately */ -- if (list_empty(&local->roc_list) && -- !local->scanning && !ieee80211_is_radar_required(local, req)) { -+ if (list_empty(&local->roc_list) && !local->scanning) { - /* if not HW assist, just queue & schedule work */ - if (!local->ops->remain_on_channel) { - list_add_tail(&roc->list, &local->roc_list); ---- a/net/mac80211/scan.c -+++ b/net/mac80211/scan.c -@@ -591,25 +591,72 @@ static int ieee80211_start_sw_scan(struc - return 0; - } - --static bool __ieee80211_can_leave_ch(struct ieee80211_sub_if_data *sdata, -- struct cfg80211_scan_request *req) -+u32 ieee80211_scan_req_radio_mask(struct ieee80211_local *local, -+ struct cfg80211_scan_request *req) -+{ -+ const struct wiphy_radio *radio; -+ u32 mask = 0; -+ int i, r; -+ -+ for (r = 0; r < local->hw.wiphy->n_radio; r++) { -+ radio = &local->hw.wiphy->radio[r]; -+ -+ for (i = 0; i < req->n_channels; i++) { -+ struct cfg80211_chan_def chandef = {}; -+ -+ chandef.chan = req->channels[i]; -+ cfg80211_chandef_create(&chandef, req->channels[i], -+ NL80211_CHAN_NO_HT); -+ if (!cfg80211_radio_chandef_valid(radio, &chandef)) -+ continue; -+ -+ mask |= BIT(r); -+ break; -+ } -+ } -+ -+ return mask; -+} -+ -+u32 ieee80211_can_leave_ch(struct ieee80211_sub_if_data *sdata, -+ struct cfg80211_scan_request *req, -+ u32 radio_mask) - { - struct ieee80211_local *local = sdata->local; - struct ieee80211_sub_if_data *sdata_iter; -+ struct wiphy *wiphy = local->hw.wiphy; -+ struct ieee80211_chanctx_conf *conf; -+ struct ieee80211_link_data *link; - unsigned int link_id; - - lockdep_assert_wiphy(local->hw.wiphy); - -- if (!ieee80211_is_radar_required(local, req)) -+ if (!ieee80211_is_radar_required(local, radio_mask, req)) - return true; - - if (!regulatory_pre_cac_allowed(local->hw.wiphy)) - return false; - - list_for_each_entry(sdata_iter, &local->interfaces, list) { -- for_each_valid_link(&sdata_iter->wdev, link_id) -- if (sdata_iter->wdev.links[link_id].cac_started) -+ for_each_valid_link(&sdata_iter->wdev, link_id) { -+ if (!sdata_iter->wdev.links[link_id].cac_started) -+ continue; -+ -+ if (!wiphy->n_radio) -+ return false; -+ -+ link = sdata_dereference(sdata->link[link_id], sdata); -+ if (!link) -+ continue; -+ -+ conf = wiphy_dereference(wiphy, link->conf->chanctx_conf); -+ if (!conf) -+ continue; -+ -+ if (conf->radio_idx >= 0 && -+ (radio_mask & BIT(conf->radio_idx))) - return false; -+ } - } - - return true; -@@ -617,12 +664,12 @@ static bool __ieee80211_can_leave_ch(str - - static bool ieee80211_can_scan(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, -- struct cfg80211_scan_request *req) -+ struct cfg80211_scan_request *req, -+ u32 radio_mask) - { -- if (!__ieee80211_can_leave_ch(sdata, req)) -- return false; -- -- if (!list_empty(&local->roc_list)) -+ if (!list_empty(&local->roc_list) && -+ (!local->hw.wiphy->n_radio || -+ (radio_mask & ieee80211_offchannel_radio_mask(local)))) - return false; - - if (sdata->vif.type == NL80211_IFTYPE_STATION && -@@ -634,19 +681,22 @@ static bool ieee80211_can_scan(struct ie - - void ieee80211_run_deferred_scan(struct ieee80211_local *local) - { -+ struct ieee80211_sub_if_data *sdata; - struct cfg80211_scan_request *req; -+ u32 radio_mask; - - lockdep_assert_wiphy(local->hw.wiphy); - -- if (!local->scan_req || local->scanning) -+ req = wiphy_dereference(local->hw.wiphy, local->scan_req); -+ if (!req || local->scanning) - return; - -- req = wiphy_dereference(local->hw.wiphy, local->scan_req); -- if (!ieee80211_can_scan(local, -- rcu_dereference_protected( -- local->scan_sdata, -- lockdep_is_held(&local->hw.wiphy->mtx)), -- req)) -+ radio_mask = ieee80211_scan_req_radio_mask(local, req); -+ sdata = wiphy_dereference(local->hw.wiphy, local->scan_sdata); -+ if (!ieee80211_can_leave_ch(sdata, req, radio_mask)) -+ return; -+ -+ if (!ieee80211_can_scan(local, sdata, req, radio_mask)) - return; - - wiphy_delayed_work_queue(local->hw.wiphy, &local->scan_work, -@@ -729,6 +779,7 @@ static int __ieee80211_start_scan(struct - { - struct ieee80211_local *local = sdata->local; - bool hw_scan = local->ops->hw_scan; -+ u32 radio_mask; - int rc; - - lockdep_assert_wiphy(local->hw.wiphy); -@@ -743,10 +794,11 @@ static int __ieee80211_start_scan(struct - !(sdata->vif.active_links & BIT(req->tsf_report_link_id))) - return -EINVAL; - -- if (!__ieee80211_can_leave_ch(sdata, req)) -+ radio_mask = ieee80211_scan_req_radio_mask(local, req); -+ if (!ieee80211_can_leave_ch(sdata, req, radio_mask)) - return -EBUSY; - -- if (!ieee80211_can_scan(local, sdata, req)) { -+ if (!ieee80211_can_scan(local, sdata, req, radio_mask)) { - /* wait for the work to finish/time out */ - rcu_assign_pointer(local->scan_req, req); - rcu_assign_pointer(local->scan_sdata, sdata); ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -877,6 +877,23 @@ struct wireless_dev *ieee80211_vif_to_wd - } - EXPORT_SYMBOL_GPL(ieee80211_vif_to_wdev); - -+u32 ieee80211_chandef_radio_mask(struct ieee80211_local *local, -+ struct cfg80211_chan_def *chandef) -+{ -+ struct wiphy *wiphy = local->hw.wiphy; -+ const struct wiphy_radio *radio; -+ u32 mask = 0; -+ int i; -+ -+ for (i = 0; i < wiphy->n_radio; i++) { -+ radio = &wiphy->radio[i]; -+ if (cfg80211_radio_chandef_valid(radio, chandef)) -+ mask |= BIT(i); -+ } -+ -+ return mask; -+} -+ - /* - * Nothing should have been stuffed into the workqueue during - * the suspend->resume cycle. Since we can't check each caller ---- a/net/wireless/util.c -+++ b/net/wireless/util.c -@@ -2945,6 +2945,9 @@ bool cfg80211_radio_chandef_valid(const - { - u32 freq, width; - -+ if (!cfg80211_chandef_valid(chandef)) -+ return false; -+ - freq = ieee80211_chandef_to_khz(chandef); - width = MHZ_TO_KHZ(cfg80211_chandef_get_width(chandef)); - if (!ieee80211_radio_freq_range_valid(radio, freq, width)) diff --git a/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch b/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch index 7a5bfc4c1dd..f3655b4404d 100644 --- a/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch +++ b/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch @@ -126,7 +126,7 @@ Signed-off-by: Felix Fietkau } --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -2837,6 +2837,11 @@ u8 *ieee80211_get_bssid(struct ieee80211 +@@ -2943,6 +2943,11 @@ u8 *ieee80211_get_bssid(struct ieee80211 extern const struct ethtool_ops ieee80211_ethtool_ops; diff --git a/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch b/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch index 10d945b47fc..953a35e164e 100644 --- a/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch +++ b/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -2980,6 +2980,29 @@ static void sta_set_link_sinfo(struct st +@@ -3058,6 +3058,29 @@ static void sta_set_link_sinfo(struct st } } @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, bool tidstats) { -@@ -3205,6 +3228,8 @@ void sta_set_sinfo(struct sta_info *sta, +@@ -3283,6 +3306,8 @@ void sta_set_sinfo(struct sta_info *sta, sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_TDLS_PEER); thr = sta_get_expected_throughput(sta); diff --git a/package/kernel/mac80211/patches/subsys/362-wifi-mac80211-improve-interface-iteration-ergonomics.patch b/package/kernel/mac80211/patches/subsys/362-wifi-mac80211-improve-interface-iteration-ergonomics.patch deleted file mode 100644 index e7c582f8c6a..00000000000 --- a/package/kernel/mac80211/patches/subsys/362-wifi-mac80211-improve-interface-iteration-ergonomics.patch +++ /dev/null @@ -1,148 +0,0 @@ -From: Johannes Berg -Date: Thu, 8 Jan 2026 14:34:31 +0100 -Subject: [PATCH] wifi: mac80211: improve interface iteration ergonomics - -Right now, the only way to iterate interfaces is to declare an -iterator function, possibly data structure to use, and pass all -that to the iteration helper function. This is annoying, and -there's really no inherent need for it, except it was easier to -implement with the iflist mutex, but that's not used much now. - -Add a new for_each_interface() macro that does the iteration in -a more ergonomic way. To avoid even more exported functions, do -the old ieee80211_iterate_active_interfaces_mtx() as an inline -using the new way, which may also let the compiler optimise it -a bit more, e.g. via inlining the iterator function. - -Also provide for_each_active_interface() for the common case of -just iterating active interfaces. - -Link: https://patch.msgid.link/20260108143431.f2581e0c381a.Ie387227504c975c109c125b3c57f0bb3fdab2835@changeid -Signed-off-by: Johannes Berg ---- - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -6270,6 +6270,30 @@ void ieee80211_iterate_active_interfaces - struct ieee80211_vif *vif), - void *data); - -+struct ieee80211_vif * -+__ieee80211_iterate_interfaces(struct ieee80211_hw *hw, -+ struct ieee80211_vif *prev, -+ u32 iter_flags); -+ -+/** -+ * for_each_interface - iterate interfaces under wiphy mutex -+ * @vif: the iterator variable -+ * @hw: the HW to iterate for -+ * @flags: the iteration flags, see &enum ieee80211_interface_iteration_flags -+ */ -+#define for_each_interface(vif, hw, flags) \ -+ for (vif = __ieee80211_iterate_interfaces(hw, NULL, flags); \ -+ vif; \ -+ vif = __ieee80211_iterate_interfaces(hw, vif, flags)) -+ -+/** -+ * for_each_active_interface - iterate active interfaces under wiphy mutex -+ * @vif: the iterator variable -+ * @hw: the HW to iterate for -+ */ -+#define for_each_active_interface(vif, hw) \ -+ for_each_interface(vif, hw, IEEE80211_IFACE_ITER_ACTIVE) -+ - /** - * ieee80211_iterate_active_interfaces_mtx - iterate active interfaces - * -@@ -6282,12 +6306,18 @@ void ieee80211_iterate_active_interfaces - * @iterator: the iterator function to call, cannot sleep - * @data: first argument of the iterator function - */ --void ieee80211_iterate_active_interfaces_mtx(struct ieee80211_hw *hw, -- u32 iter_flags, -- void (*iterator)(void *data, -- u8 *mac, -- struct ieee80211_vif *vif), -- void *data); -+static inline void -+ieee80211_iterate_active_interfaces_mtx(struct ieee80211_hw *hw, -+ u32 iter_flags, -+ void (*iterator)(void *data, u8 *mac, -+ struct ieee80211_vif *vif), -+ void *data) -+{ -+ struct ieee80211_vif *vif; -+ -+ for_each_interface(vif, hw, iter_flags | IEEE80211_IFACE_ITER_ACTIVE) -+ iterator(data, vif->addr, vif); -+} - - /** - * ieee80211_iterate_stations_atomic - iterate stations ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -800,20 +800,56 @@ void ieee80211_iterate_active_interfaces - } - EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); - --void ieee80211_iterate_active_interfaces_mtx( -- struct ieee80211_hw *hw, u32 iter_flags, -- void (*iterator)(void *data, u8 *mac, -- struct ieee80211_vif *vif), -- void *data) -+struct ieee80211_vif * -+__ieee80211_iterate_interfaces(struct ieee80211_hw *hw, -+ struct ieee80211_vif *prev, -+ u32 iter_flags) - { -+ bool active_only = iter_flags & IEEE80211_IFACE_ITER_ACTIVE; -+ struct ieee80211_sub_if_data *sdata = NULL, *monitor; - struct ieee80211_local *local = hw_to_local(hw); - - lockdep_assert_wiphy(hw->wiphy); - -- __iterate_interfaces(local, iter_flags | IEEE80211_IFACE_ITER_ACTIVE, -- iterator, data); -+ if (prev) -+ sdata = vif_to_sdata(prev); -+ -+ monitor = rcu_dereference_check(local->monitor_sdata, -+ lockdep_is_held(&hw->wiphy->mtx)); -+ if (monitor && monitor == sdata) -+ return NULL; -+ -+ sdata = list_prepare_entry(sdata, &local->interfaces, list); -+ list_for_each_entry_continue(sdata, &local->interfaces, list) { -+ switch (sdata->vif.type) { -+ case NL80211_IFTYPE_MONITOR: -+ if (!(sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE) && -+ !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) -+ continue; -+ break; -+ case NL80211_IFTYPE_AP_VLAN: -+ continue; -+ default: -+ break; -+ } -+ if (!(iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL) && -+ active_only && !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) -+ continue; -+ if ((iter_flags & IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER) && -+ !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) -+ continue; -+ if (ieee80211_sdata_running(sdata) || !active_only) -+ return &sdata->vif; -+ } -+ -+ if (monitor && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF) && -+ (iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL || !active_only || -+ monitor->flags & IEEE80211_SDATA_IN_DRIVER)) -+ return &monitor->vif; -+ -+ return NULL; - } --EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_mtx); -+EXPORT_SYMBOL_GPL(__ieee80211_iterate_interfaces); - - static void __iterate_stations(struct ieee80211_local *local, - void (*iterator)(void *data, diff --git a/package/kernel/mac80211/patches/subsys/363-wifi-mac80211-improve-station-iteration-ergonomics.patch b/package/kernel/mac80211/patches/subsys/363-wifi-mac80211-improve-station-iteration-ergonomics.patch deleted file mode 100644 index c85008c3c1c..00000000000 --- a/package/kernel/mac80211/patches/subsys/363-wifi-mac80211-improve-station-iteration-ergonomics.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Johannes Berg -Date: Thu, 8 Jan 2026 14:34:32 +0100 -Subject: [PATCH] wifi: mac80211: improve station iteration ergonomics - -Right now, the only way to iterate stations is to declare an -iterator function, possibly data structure to use, and pass all -that to the iteration helper function. This is annoying, and -there's really no inherent need for it. - -Add a new for_each_station() macro that does the iteration in -a more ergonomic way. To avoid even more exported functions, do -the old ieee80211_iterate_stations_mtx() as an inline using the -new way, which may also let the compiler optimise it a bit more, -e.g. via inlining the iterator function. - -Link: https://patch.msgid.link/20260108143431.d2b641f6f6af.I4470024f7404446052564b15bcf8b3f1ada33655@changeid -Signed-off-by: Johannes Berg ---- - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -6336,6 +6336,20 @@ void ieee80211_iterate_stations_atomic(s - struct ieee80211_sta *sta), - void *data); - -+struct ieee80211_sta * -+__ieee80211_iterate_stations(struct ieee80211_hw *hw, -+ struct ieee80211_sta *prev); -+ -+/** -+ * for_each_station - iterate stations under wiphy mutex -+ * @sta: the iterator variable -+ * @hw: the HW to iterate for -+ */ -+#define for_each_station(sta, hw) \ -+ for (sta = __ieee80211_iterate_stations(hw, NULL); \ -+ sta; \ -+ sta = __ieee80211_iterate_stations(hw, sta)) -+ - /** - * ieee80211_iterate_stations_mtx - iterate stations - * -@@ -6348,10 +6362,17 @@ void ieee80211_iterate_stations_atomic(s - * @iterator: the iterator function to call - * @data: first argument of the iterator function - */ --void ieee80211_iterate_stations_mtx(struct ieee80211_hw *hw, -- void (*iterator)(void *data, -- struct ieee80211_sta *sta), -- void *data); -+static inline void -+ieee80211_iterate_stations_mtx(struct ieee80211_hw *hw, -+ void (*iterator)(void *data, -+ struct ieee80211_sta *sta), -+ void *data) -+{ -+ struct ieee80211_sta *sta; -+ -+ for_each_station(sta, hw) -+ iterator(data, sta); -+} - - /** - * ieee80211_queue_work - add work onto the mac80211 workqueue ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -880,18 +880,29 @@ void ieee80211_iterate_stations_atomic(s - } - EXPORT_SYMBOL_GPL(ieee80211_iterate_stations_atomic); - --void ieee80211_iterate_stations_mtx(struct ieee80211_hw *hw, -- void (*iterator)(void *data, -- struct ieee80211_sta *sta), -- void *data) -+struct ieee80211_sta * -+__ieee80211_iterate_stations(struct ieee80211_hw *hw, -+ struct ieee80211_sta *prev) - { - struct ieee80211_local *local = hw_to_local(hw); -+ struct sta_info *sta = NULL; - - lockdep_assert_wiphy(local->hw.wiphy); - -- __iterate_stations(local, iterator, data); -+ if (prev) -+ sta = container_of(prev, struct sta_info, sta); -+ -+ sta = list_prepare_entry(sta, &local->sta_list, list); -+ list_for_each_entry_continue(sta, &local->sta_list, list) { -+ if (!sta->uploaded) -+ continue; -+ -+ return &sta->sta; -+ } -+ -+ return NULL; - } --EXPORT_SYMBOL_GPL(ieee80211_iterate_stations_mtx); -+EXPORT_SYMBOL_GPL(__ieee80211_iterate_stations); - - struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev) - { diff --git a/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch b/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch deleted file mode 100644 index f6538694c41..00000000000 --- a/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch +++ /dev/null @@ -1,64 +0,0 @@ -From: Felix Fietkau -Date: Thu, 28 Aug 2025 14:41:57 +0200 -Subject: [PATCH] wifi: mac80211: add MLO support to ieee80211_probe_client - -Use the first available link to probe the client. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -4584,7 +4584,9 @@ static int ieee80211_probe_client(struct - struct ieee80211_tx_info *info; - struct sta_info *sta; - struct ieee80211_chanctx_conf *chanctx_conf; -+ struct ieee80211_bss_conf *link_conf; - enum nl80211_band band; -+ u8 link_id; - int ret; - - /* the lock is needed to assign the cookie later */ -@@ -4599,7 +4601,23 @@ static int ieee80211_probe_client(struct - - qos = sta->sta.wme; - -- chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); -+ if (ieee80211_vif_is_mld(&sdata->vif)) { -+ if (sta->sta.valid_links) -+ link_id = ffs(sta->sta.valid_links) - 1; -+ else -+ link_id = sta->deflink.link_id; -+ -+ link_conf = rcu_dereference(sdata->vif.link_conf[link_id]); -+ if (unlikely(!link_conf)) { -+ ret = -ENOLINK; -+ goto unlock; -+ } -+ } else { -+ link_id = IEEE80211_LINK_UNSPECIFIED; -+ link_conf = &sdata->vif.bss_conf; -+ } -+ -+ chanctx_conf = rcu_dereference(link_conf->chanctx_conf); - if (WARN_ON(!chanctx_conf)) { - ret = -EINVAL; - goto unlock; -@@ -4631,14 +4649,15 @@ static int ieee80211_probe_client(struct - nullfunc->frame_control = fc; - nullfunc->duration_id = 0; - memcpy(nullfunc->addr1, sta->sta.addr, ETH_ALEN); -- memcpy(nullfunc->addr2, sdata->vif.addr, ETH_ALEN); -- memcpy(nullfunc->addr3, sdata->vif.addr, ETH_ALEN); -+ memcpy(nullfunc->addr2, link_conf->addr, ETH_ALEN); -+ memcpy(nullfunc->addr3, link_conf->addr, ETH_ALEN); - nullfunc->seq_ctrl = 0; - - info = IEEE80211_SKB_CB(skb); - - info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS | - IEEE80211_TX_INTFL_NL80211_FRAME_TX; -+ info->control.flags |= u32_encode_bits(link_id, IEEE80211_TX_CTRL_MLO_LINK); - info->band = band; - - skb_set_queue_mapping(skb, IEEE80211_AC_VO); diff --git a/package/kernel/mac80211/patches/subsys/371-wifi-mac80211-Add-eMLSR-eMLMR-action-frame-parsing-s.patch b/package/kernel/mac80211/patches/subsys/371-wifi-mac80211-Add-eMLSR-eMLMR-action-frame-parsing-s.patch deleted file mode 100644 index 9b578a5f0cd..00000000000 --- a/package/kernel/mac80211/patches/subsys/371-wifi-mac80211-Add-eMLSR-eMLMR-action-frame-parsing-s.patch +++ /dev/null @@ -1,421 +0,0 @@ -From 0d95280a2d54ebd3d38adc4ff67808009798978c Mon Sep 17 00:00:00 2001 -From: Lorenzo Bianconi -Date: Thu, 29 Jan 2026 14:15:46 +0100 -Subject: wifi: mac80211: Add eMLSR/eMLMR action frame parsing support - -Introduce support in AP mode for parsing of the Operating Mode Notification -frame sent by the client to enable/disable MLO eMLSR or eMLMR if supported -by both the AP and the client. -Add drv_set_eml_op_mode mac80211 callback in order to configure underlay -driver with eMLSR/eMLMR info. - -Tested-by: Christian Marangi -Signed-off-by: Lorenzo Bianconi -Link: https://patch.msgid.link/20260129-mac80211-emlsr-v4-1-14bdadf57380@kernel.org -Signed-off-by: Johannes Berg ---- - include/linux/ieee80211-eht.h | 11 +++ - include/linux/ieee80211.h | 6 ++ - include/net/mac80211.h | 32 +++++++ - net/mac80211/driver-ops.h | 21 ++++ - net/mac80211/eht.c | 175 ++++++++++++++++++++++++++++++++++ - net/mac80211/ieee80211_i.h | 2 + - net/mac80211/iface.c | 10 +- - net/mac80211/rx.c | 8 ++ - net/mac80211/trace.h | 32 +++++++ - 9 files changed, 296 insertions(+), 1 deletion(-) - ---- a/include/linux/ieee80211-eht.h -+++ b/include/linux/ieee80211-eht.h -@@ -558,6 +558,17 @@ struct ieee80211_mle_tdls_common_info { - - #define IEEE80211_MLC_PRIO_ACCESS_PRES_AP_MLD_MAC_ADDR 0x0010 - -+#define IEEE80211_EML_CTRL_EMLSR_MODE BIT(0) -+#define IEEE80211_EML_CTRL_EMLMR_MODE BIT(1) -+#define IEEE80211_EML_CTRL_EMLSR_PARAM_UPDATE BIT(2) -+#define IEEE80211_EML_CTRL_INDEV_COEX_ACT BIT(3) -+ -+#define IEEE80211_EML_EMLSR_PAD_DELAY 0x07 -+#define IEEE80211_EML_EMLSR_TRANS_DELAY 0x38 -+ -+#define IEEE80211_EML_EMLMR_RX_MCS_MAP 0xf0 -+#define IEEE80211_EML_EMLMR_TX_MCS_MAP 0x0f -+ - /* no fixed fields in PRIO_ACCESS */ - - /** ---- a/include/linux/ieee80211.h -+++ b/include/linux/ieee80211.h -@@ -1367,6 +1367,12 @@ struct ieee80211_mgmt { - u8 action_code; - u8 variable[]; - } __packed epcs; -+ struct { -+ u8 action_code; -+ u8 dialog_token; -+ u8 control; -+ u8 variable[]; -+ } __packed eml_omn; - } u; - } __packed action; - DECLARE_FLEX_ARRAY(u8, body); /* Generic frame body */ ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -1901,6 +1901,31 @@ enum ieee80211_offload_flags { - }; - - /** -+ * struct ieee80211_eml_params - EHT Operating mode notification parameters -+ * -+ * EML Operating mode notification parameters received in the Operating mode -+ * notification frame. This struct is used as a container to pass the info to -+ * the underlay driver. -+ * -+ * @link_id: the link ID where the Operating mode notification frame has been -+ * received. -+ * @control: EML control field defined in P802.11be section 9.4.1.76. -+ * @link_bitmap: eMLSR/eMLMR enabled links defined in P802.11be -+ * section 9.4.1.76. -+ * @emlmr_mcs_map_count: eMLMR number of valid mcs_map_bw fields according to -+ * P802.11be section 9.4.1.76 (valid if eMLMR mode control bit is set). -+ * @emlmr_mcs_map_bw: eMLMR supported MCS and NSS set subfileds defined in -+ * P802.11be section 9.4.1.76 (valid if eMLMR mode control bit is set). -+ */ -+struct ieee80211_eml_params { -+ u8 link_id; -+ u8 control; -+ u16 link_bitmap; -+ u8 emlmr_mcs_map_count; -+ u8 emlmr_mcs_map_bw[9]; -+}; -+ -+/** - * struct ieee80211_vif_cfg - interface configuration - * @assoc: association status - * @ibss_joined: indicates whether this station is part of an IBSS or not -@@ -4509,6 +4534,9 @@ struct ieee80211_prep_tx_info { - * interface with the specified type would be added, and thus drivers that - * implement this callback need to handle such cases. The type is the full - * &enum nl80211_iftype. -+ * @set_eml_op_mode: Configure eMLSR/eMLMR operation mode in the underlay -+ * driver according to the parameter received in the EML Operating mode -+ * notification frame. - */ - struct ieee80211_ops { - void (*tx)(struct ieee80211_hw *hw, -@@ -4904,6 +4932,10 @@ struct ieee80211_ops { - struct ieee80211_neg_ttlm *ttlm); - void (*prep_add_interface)(struct ieee80211_hw *hw, - enum nl80211_iftype type); -+ int (*set_eml_op_mode)(struct ieee80211_hw *hw, -+ struct ieee80211_vif *vif, -+ struct ieee80211_sta *sta, -+ struct ieee80211_eml_params *eml_params); - }; - - /** ---- a/net/mac80211/driver-ops.h -+++ b/net/mac80211/driver-ops.h -@@ -1772,4 +1772,25 @@ drv_prep_add_interface(struct ieee80211_ - trace_drv_return_void(local); - } - -+static inline int drv_set_eml_op_mode(struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_sta *sta, -+ struct ieee80211_eml_params *eml_params) -+{ -+ struct ieee80211_local *local = sdata->local; -+ int ret = -EOPNOTSUPP; -+ -+ might_sleep(); -+ lockdep_assert_wiphy(local->hw.wiphy); -+ -+ trace_drv_set_eml_op_mode(local, sdata, sta, eml_params->link_id, -+ eml_params->control, -+ eml_params->link_bitmap); -+ if (local->ops->set_eml_op_mode) -+ ret = local->ops->set_eml_op_mode(&local->hw, &sdata->vif, -+ sta, eml_params); -+ trace_drv_return_int(local, ret); -+ -+ return ret; -+} -+ - #endif /* __MAC80211_DRIVER_OPS */ ---- a/net/mac80211/eht.c -+++ b/net/mac80211/eht.c -@@ -5,6 +5,7 @@ - * Copyright(c) 2021-2025 Intel Corporation - */ - -+#include "driver-ops.h" - #include "ieee80211_i.h" - - void -@@ -102,3 +103,177 @@ ieee80211_eht_cap_ie_to_sta_eht_cap(stru - - ieee80211_sta_recalc_aggregates(&link_sta->sta->sta); - } -+ -+static void -+ieee80211_send_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_mgmt *req, int opt_len) -+{ -+ int len = offsetofend(struct ieee80211_mgmt, u.action.u.eml_omn); -+ struct ieee80211_local *local = sdata->local; -+ struct ieee80211_mgmt *mgmt; -+ struct sk_buff *skb; -+ -+ len += opt_len; /* optional len */ -+ skb = dev_alloc_skb(local->tx_headroom + len); -+ if (!skb) -+ return; -+ -+ skb_reserve(skb, local->tx_headroom); -+ mgmt = skb_put_zero(skb, len); -+ mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | -+ IEEE80211_STYPE_ACTION); -+ memcpy(mgmt->da, req->sa, ETH_ALEN); -+ memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); -+ memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); -+ -+ mgmt->u.action.category = WLAN_CATEGORY_PROTECTED_EHT; -+ mgmt->u.action.u.eml_omn.action_code = -+ WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF; -+ mgmt->u.action.u.eml_omn.dialog_token = -+ req->u.action.u.eml_omn.dialog_token; -+ mgmt->u.action.u.eml_omn.control = req->u.action.u.eml_omn.control & -+ ~(IEEE80211_EML_CTRL_EMLSR_PARAM_UPDATE | -+ IEEE80211_EML_CTRL_INDEV_COEX_ACT); -+ /* Copy optional fields from the received notification frame */ -+ memcpy(mgmt->u.action.u.eml_omn.variable, -+ req->u.action.u.eml_omn.variable, opt_len); -+ -+ ieee80211_tx_skb(sdata, skb); -+} -+ -+void ieee80211_rx_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata, -+ struct sk_buff *skb) -+{ -+ int len = offsetofend(struct ieee80211_mgmt, u.action.u.eml_omn); -+ enum nl80211_iftype type = ieee80211_vif_type_p2p(&sdata->vif); -+ struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); -+ const struct wiphy_iftype_ext_capab *ift_ext_capa; -+ struct ieee80211_mgmt *mgmt = (void *)skb->data; -+ struct ieee80211_local *local = sdata->local; -+ u8 control = mgmt->u.action.u.eml_omn.control; -+ u8 *ptr = mgmt->u.action.u.eml_omn.variable; -+ struct ieee80211_eml_params eml_params = { -+ .link_id = status->link_id, -+ }; -+ struct sta_info *sta; -+ int opt_len = 0; -+ -+ if (!ieee80211_vif_is_mld(&sdata->vif)) -+ return; -+ -+ /* eMLSR and eMLMR can't be enabled at the same time */ -+ if ((control & IEEE80211_EML_CTRL_EMLSR_MODE) && -+ (control & IEEE80211_EML_CTRL_EMLMR_MODE)) -+ return; -+ -+ if ((control & IEEE80211_EML_CTRL_EMLMR_MODE) && -+ (control & IEEE80211_EML_CTRL_EMLSR_PARAM_UPDATE)) -+ return; -+ -+ ift_ext_capa = cfg80211_get_iftype_ext_capa(local->hw.wiphy, type); -+ if (!ift_ext_capa) -+ return; -+ -+ if (!status->link_valid) -+ return; -+ -+ sta = sta_info_get_bss(sdata, mgmt->sa); -+ if (!sta) -+ return; -+ -+ if (control & IEEE80211_EML_CTRL_EMLSR_MODE) { -+ u8 emlsr_param_update_len; -+ -+ if (!(ift_ext_capa->eml_capabilities & -+ IEEE80211_EML_CAP_EMLSR_SUPP)) -+ return; -+ -+ opt_len += sizeof(__le16); /* eMLSR link_bitmap */ -+ /* eMLSR param update field is not part of Notfication frame -+ * sent by the AP to client so account it separately. -+ */ -+ emlsr_param_update_len = -+ !!(control & IEEE80211_EML_CTRL_EMLSR_PARAM_UPDATE); -+ -+ if (skb->len < len + opt_len + emlsr_param_update_len) -+ return; -+ -+ if (control & IEEE80211_EML_CTRL_EMLSR_PARAM_UPDATE) { -+ u8 pad_delay, trans_delay; -+ -+ pad_delay = u8_get_bits(ptr[2], -+ IEEE80211_EML_EMLSR_PAD_DELAY); -+ if (pad_delay > -+ IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_256US) -+ return; -+ -+ trans_delay = u8_get_bits(ptr[2], -+ IEEE80211_EML_EMLSR_TRANS_DELAY); -+ if (trans_delay > -+ IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_256US) -+ return; -+ -+ /* Update sta padding and transition delay */ -+ sta->sta.eml_cap = -+ u8_replace_bits(sta->sta.eml_cap, -+ pad_delay, -+ IEEE80211_EML_CAP_EMLSR_PADDING_DELAY); -+ sta->sta.eml_cap = -+ u8_replace_bits(sta->sta.eml_cap, -+ trans_delay, -+ IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY); -+ } -+ } -+ -+ if (control & IEEE80211_EML_CTRL_EMLMR_MODE) { -+ u8 mcs_map_size; -+ int i; -+ -+ if (!(ift_ext_capa->eml_capabilities & -+ IEEE80211_EML_CAP_EMLMR_SUPPORT)) -+ return; -+ -+ opt_len += sizeof(__le16); /* eMLMR link_bitmap */ -+ opt_len++; /* eMLMR mcs_map_count */ -+ if (skb->len < len + opt_len) -+ return; -+ -+ eml_params.emlmr_mcs_map_count = ptr[2]; -+ if (eml_params.emlmr_mcs_map_count > 2) -+ return; -+ -+ mcs_map_size = 3 * (1 + eml_params.emlmr_mcs_map_count); -+ opt_len += mcs_map_size; -+ if (skb->len < len + opt_len) -+ return; -+ -+ for (i = 0; i < mcs_map_size; i++) { -+ u8 rx_mcs, tx_mcs; -+ -+ rx_mcs = u8_get_bits(ptr[3 + i], -+ IEEE80211_EML_EMLMR_RX_MCS_MAP); -+ if (rx_mcs > 8) -+ return; -+ -+ tx_mcs = u8_get_bits(ptr[3 + i], -+ IEEE80211_EML_EMLMR_TX_MCS_MAP); -+ if (tx_mcs > 8) -+ return; -+ } -+ -+ memcpy(eml_params.emlmr_mcs_map_bw, &ptr[3], mcs_map_size); -+ } -+ -+ if ((control & IEEE80211_EML_CTRL_EMLSR_MODE) || -+ (control & IEEE80211_EML_CTRL_EMLMR_MODE)) { -+ eml_params.link_bitmap = get_unaligned_le16(ptr); -+ if ((eml_params.link_bitmap & sdata->vif.active_links) != -+ eml_params.link_bitmap) -+ return; -+ } -+ -+ if (drv_set_eml_op_mode(sdata, &sta->sta, &eml_params)) -+ return; -+ -+ ieee80211_send_eml_op_mode_notif(sdata, mgmt, opt_len); -+} ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -2857,6 +2857,8 @@ void ieee80211_destroy_frag_cache(struct - - u8 ieee80211_ie_len_eht_cap(struct ieee80211_sub_if_data *sdata); - -+void ieee80211_rx_eml_op_mode_notif(struct ieee80211_sub_if_data *sdata, -+ struct sk_buff *skb); - void - ieee80211_eht_cap_ie_to_sta_eht_cap(struct ieee80211_sub_if_data *sdata, - struct ieee80211_supported_band *sband, ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -1634,7 +1634,15 @@ static void ieee80211_iface_process_skb( - } - } else if (ieee80211_is_action(mgmt->frame_control) && - mgmt->u.action.category == WLAN_CATEGORY_PROTECTED_EHT) { -- if (sdata->vif.type == NL80211_IFTYPE_STATION) { -+ if (sdata->vif.type == NL80211_IFTYPE_AP) { -+ switch (mgmt->u.action.u.eml_omn.action_code) { -+ case WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF: -+ ieee80211_rx_eml_op_mode_notif(sdata, skb); -+ break; -+ default: -+ break; -+ } -+ } else if (sdata->vif.type == NL80211_IFTYPE_STATION) { - switch (mgmt->u.action.u.ttlm_req.action_code) { - case WLAN_PROTECTED_EHT_ACTION_TTLM_REQ: - ieee80211_process_neg_ttlm_req(sdata, mgmt, ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -3834,6 +3834,14 @@ ieee80211_rx_h_action(struct ieee80211_r - u.action.u.epcs)) - goto invalid; - goto queue; -+ case WLAN_PROTECTED_EHT_ACTION_EML_OP_MODE_NOTIF: -+ if (sdata->vif.type != NL80211_IFTYPE_AP) -+ break; -+ -+ if (len < offsetofend(typeof(*mgmt), -+ u.action.u.eml_omn)) -+ goto invalid; -+ goto queue; - default: - break; - } ---- a/net/mac80211/trace.h -+++ b/net/mac80211/trace.h -@@ -3359,6 +3359,38 @@ TRACE_EVENT(drv_prep_add_interface, - ) - ); - -+TRACE_EVENT(drv_set_eml_op_mode, -+ TP_PROTO(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_sta *sta, -+ unsigned int link_id, -+ u8 control, u16 link_bitmap), -+ -+ TP_ARGS(local, sdata, sta, link_id, control, link_bitmap), -+ -+ TP_STRUCT__entry(LOCAL_ENTRY -+ VIF_ENTRY -+ STA_ENTRY -+ __field(u32, link_id) -+ __field(u8, control) -+ __field(u16, link_bitmap)), -+ -+ TP_fast_assign(LOCAL_ASSIGN; -+ VIF_ASSIGN; -+ STA_NAMED_ASSIGN(sta); -+ __entry->link_id = link_id; -+ __entry->control = control; -+ __entry->link_bitmap = link_bitmap; -+ ), -+ -+ TP_printk( -+ LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT -+ " (link:%d control:%02x link_bitmap:%04x)", -+ LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->link_id, -+ __entry->control, __entry->link_bitmap -+ ) -+); -+ - #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ - - #undef TRACE_INCLUDE_PATH diff --git a/package/kernel/mac80211/patches/subsys/380-mac80211-report-assoc_link_id-in-station-info-for-no.patch b/package/kernel/mac80211/patches/subsys/380-mac80211-report-assoc_link_id-in-station-info-for-no.patch deleted file mode 100644 index 8fe3cb2f7d1..00000000000 --- a/package/kernel/mac80211/patches/subsys/380-mac80211-report-assoc_link_id-in-station-info-for-no.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Felix Fietkau -Date: Wed, 18 Mar 2026 20:01:16 +0000 -Subject: [PATCH] mac80211: report assoc_link_id in station info for non-MLD - STAs on MLD AP - -When a non-MLD station associates with an MLD AP, it does so on a -specific link. However, sta_set_sinfo() never sets mlo_params_valid, -so nl80211 never emits NL80211_ATTR_MLO_LINK_ID in get_station / -dump_station responses. Userspace has no way to determine which link -a non-MLD STA is associated on. - -Set mlo_params_valid to 1 and assoc_link_id to sta->deflink.link_id, -when valid_links is set. -Also set the mld_addr copy only for MLD STAs, so that non-MLD STAs -get a zeroed mld_addr as documented. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/sta_info.c -+++ b/net/mac80211/sta_info.c -@@ -3256,7 +3256,10 @@ void sta_set_sinfo(struct sta_info *sta, - struct link_sta_info *link_sta; - int link_id; - -- ether_addr_copy(sinfo->mld_addr, sta->addr); -+ sinfo->mlo_params_valid = true; -+ sinfo->assoc_link_id = sta->deflink.link_id; -+ if (sta->sta.mlo) -+ ether_addr_copy(sinfo->mld_addr, sta->addr); - - /* assign valid links first for iteration */ - sinfo->valid_links = sta->sta.valid_links; diff --git a/package/kernel/mac80211/patches/subsys/390-wifi-mac80211-notify-driver-on-airtime-weight-change.patch b/package/kernel/mac80211/patches/subsys/390-wifi-mac80211-notify-driver-on-airtime-weight-change.patch index 0de78a4b71e..78d951d869d 100644 --- a/package/kernel/mac80211/patches/subsys/390-wifi-mac80211-notify-driver-on-airtime-weight-change.patch +++ b/package/kernel/mac80211/patches/subsys/390-wifi-mac80211-notify-driver-on-airtime-weight-change.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -4484,6 +4484,8 @@ struct ieee80211_prep_tx_info { +@@ -4673,6 +4673,8 @@ struct ieee80211_prep_tx_info { * @set_sar_specs: Update the SAR (TX power) settings. * @sta_set_decap_offload: Called to notify the driver when a station is allowed * to use rx decapsulation offload @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau * @add_twt_setup: Update hw with TWT agreement parameters received from the peer. * This callback allows the hw to check if requested parameters * are supported and if there is enough room for a new agreement. -@@ -4896,6 +4898,9 @@ struct ieee80211_ops { +@@ -5087,6 +5089,9 @@ struct ieee80211_ops { void (*sta_set_decap_offload)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, bool enabled); @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau struct ieee80211_twt_setup *twt); --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2298,8 +2298,12 @@ static int sta_apply_parameters(struct i +@@ -2578,8 +2578,12 @@ static int sta_apply_parameters(struct i if (ieee80211_vif_is_mesh(&sdata->vif)) sta_apply_mesh_params(local, sta, params); @@ -45,8 +45,8 @@ Signed-off-by: Felix Fietkau + sta->airtime_weight); + } - /* set the STA state after all sta info from usermode has been set */ - if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) || + if (params->nmi_mac) { + struct ieee80211_sub_if_data *nmi = --- a/net/mac80211/driver-ops.c +++ b/net/mac80211/driver-ops.c @@ -157,6 +157,10 @@ int drv_sta_state(struct ieee80211_local @@ -90,7 +90,7 @@ Signed-off-by: Felix Fietkau struct ieee80211_sta *sta, --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -832,8 +832,13 @@ static int sta_info_insert_drv_state(str +@@ -873,8 +873,13 @@ static int sta_info_insert_drv_state(str * Drivers using legacy sta_add/sta_remove callbacks only * get uploaded set to true after sta_add is called. */ @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h -@@ -2481,6 +2481,33 @@ DEFINE_EVENT(sta_flag_evt, drv_sta_set_d +@@ -2468,6 +2468,33 @@ DEFINE_EVENT(sta_flag_evt, drv_sta_set_d TP_ARGS(local, sdata, sta, enabled) ); diff --git a/package/kernel/mt76/patches/100-mac80211-support-kernel-version-7.1.patch b/package/kernel/mt76/patches/100-mac80211-support-kernel-version-7.1.patch new file mode 100644 index 00000000000..a7492fac07c --- /dev/null +++ b/package/kernel/mt76/patches/100-mac80211-support-kernel-version-7.1.patch @@ -0,0 +1,91 @@ +--- a/mt76_connac_mac.c ++++ b/mt76_connac_mac.c +@@ -422,10 +422,10 @@ mt76_connac2_mac_write_txwi_80211(struct + u32 val; + + if (ieee80211_is_action(fc) && +- skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 && ++ skb->len >= IEEE80211_MIN_ACTION_SIZE(addba_req.capab) && + mgmt->u.action.category == WLAN_CATEGORY_BACK && +- mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) { +- u16 capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab); ++ mgmt->u.action.action_code == WLAN_ACTION_ADDBA_REQ) { ++ u16 capab = le16_to_cpu(mgmt->u.action.addba_req.capab); + + txwi[5] |= cpu_to_le32(MT_TXD5_ADD_BA); + tid = (capab >> 2) & IEEE80211_QOS_CTL_TID_MASK; +--- a/mt7915/mcu.c ++++ b/mt7915/mcu.c +@@ -2003,11 +2003,11 @@ mt7915_mcu_add_inband_discov(struct mt79 + + if (changed & BSS_CHANGED_FILS_DISCOVERY) { + interval = vif->bss_conf.fils_discovery.max_interval; +- skb = ieee80211_get_fils_discovery_tmpl(hw, vif); ++ skb = ieee80211_get_fils_discovery_tmpl(hw, vif, 0); + } else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP && + vif->bss_conf.unsol_bcast_probe_resp_interval) { + interval = vif->bss_conf.unsol_bcast_probe_resp_interval; +- skb = ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif); ++ skb = ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif, 0); + } + + if (!skb) { +--- a/mt7925/mac.c ++++ b/mt7925/mac.c +@@ -673,9 +673,9 @@ mt7925_mac_write_txwi_80211(struct mt76_ + u32 val; + + if (ieee80211_is_action(fc) && +- skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 && ++ skb->len >= IEEE80211_MIN_ACTION_SIZE(action_code) && + mgmt->u.action.category == WLAN_CATEGORY_BACK && +- mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) ++ mgmt->u.action.action_code == WLAN_ACTION_ADDBA_REQ) + tid = MT_TX_ADDBA; + else if (ieee80211_is_mgmt(hdr->frame_control)) + tid = MT_TX_NORMAL; +--- a/mt7996/mac.c ++++ b/mt7996/mac.c +@@ -764,9 +764,9 @@ mt7996_mac_write_txwi_80211(struct mt799 + u32 val; + + if (ieee80211_is_action(fc) && +- skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 && ++ skb->len >= IEEE80211_MIN_ACTION_SIZE(action_code) && + mgmt->u.action.category == WLAN_CATEGORY_BACK && +- mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) { ++ mgmt->u.action.action_code == WLAN_ACTION_ADDBA_REQ) { + if (is_mt7990(&dev->mt76)) + txwi[6] |= cpu_to_le32(FIELD_PREP(MT_TXD6_TID_ADDBA, tid)); + else +--- a/mt7996/mcu.c ++++ b/mt7996/mcu.c +@@ -3445,11 +3445,13 @@ int mt7996_mcu_beacon_inband_discov(stru + if (changed & BSS_CHANGED_FILS_DISCOVERY && + link_conf->fils_discovery.max_interval) { + interval = link_conf->fils_discovery.max_interval; +- skb = ieee80211_get_fils_discovery_tmpl(hw, vif); ++ skb = ieee80211_get_fils_discovery_tmpl(hw, vif, ++ link_conf->link_id); + } else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP && + link_conf->unsol_bcast_probe_resp_interval) { + interval = link_conf->unsol_bcast_probe_resp_interval; +- skb = ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif); ++ skb = ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif, ++ link_conf->link_id); + } + + if (!skb) { +--- a/mt7925/mcu.c ++++ b/mt7925/mcu.c +@@ -1955,8 +1955,8 @@ mt7925_mcu_sta_eht_mld_tlv(struct sk_buf + + eml_cap = (vif->cfg.eml_cap & (IEEE80211_EML_CAP_EMLSR_SUPP | + IEEE80211_EML_CAP_TRANSITION_TIMEOUT)) | +- (ext_capa->eml_capabilities & (IEEE80211_EML_CAP_EMLSR_PADDING_DELAY | +- IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY)); ++ (ext_capa->eml_capabilities & (IEEE80211_EML_CAP_EML_PADDING_DELAY | ++ IEEE80211_EML_CAP_EML_TRANSITION_DELAY)); + + if (eml_cap & IEEE80211_EML_CAP_EMLSR_SUPP) { + eht_mld->eml_cap[0] = u16_get_bits(eml_cap, GENMASK(7, 0)); diff --git a/package/kernel/mwlwifi/patches/101-mac80211-support-kernel-version-7.1.patch b/package/kernel/mwlwifi/patches/101-mac80211-support-kernel-version-7.1.patch new file mode 100644 index 00000000000..d451aac8c1e --- /dev/null +++ b/package/kernel/mwlwifi/patches/101-mac80211-support-kernel-version-7.1.patch @@ -0,0 +1,42 @@ +--- a/hif/pcie/8864/tx.c ++++ b/hif/pcie/8864/tx.c +@@ -719,9 +719,9 @@ void pcie_8864_tx_xmit(struct ieee80211_ + + if (unlikely(ieee80211_is_action(wh->frame_control) && + mgmt->u.action.category == WLAN_CATEGORY_BACK && +- mgmt->u.action.u.addba_req.action_code == ++ mgmt->u.action.action_code == + WLAN_ACTION_ADDBA_REQ)) { +- capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab); ++ capab = le16_to_cpu(mgmt->u.action.addba_req.capab); + tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2; + index = utils_tid_to_ac(tid); + } +--- a/hif/pcie/8964/tx_ndp.c ++++ b/hif/pcie/8964/tx_ndp.c +@@ -551,9 +551,9 @@ void pcie_tx_xmit_ndp(struct ieee80211_h + + if (unlikely(ieee80211_is_action(wh->frame_control) && + mgmt->u.action.category == WLAN_CATEGORY_BACK && +- mgmt->u.action.u.addba_req.action_code == ++ mgmt->u.action.action_code == + WLAN_ACTION_ADDBA_REQ)) { +- capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab); ++ capab = le16_to_cpu(mgmt->u.action.addba_req.capab); + tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2; + index = utils_tid_to_ac(tid); + } +--- a/hif/pcie/8997/tx.c ++++ b/hif/pcie/8997/tx.c +@@ -671,9 +671,9 @@ void pcie_8997_tx_xmit(struct ieee80211_ + + if (unlikely(ieee80211_is_action(wh->frame_control) && + mgmt->u.action.category == WLAN_CATEGORY_BACK && +- mgmt->u.action.u.addba_req.action_code == ++ mgmt->u.action.action_code == + WLAN_ACTION_ADDBA_REQ)) { +- capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab); ++ capab = le16_to_cpu(mgmt->u.action.addba_req.capab); + tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2; + index = utils_tid_to_ac(tid); + }