From 4c03fe22b7c4228595ed5903631402dc7f4874d0 Mon Sep 17 00:00:00 2001 From: Lu jicong Date: Tue, 2 Jul 2024 21:01:49 +0800 Subject: [PATCH 01/65] target.mk: fix arm architecture level detection Now kernel configs of armv6k CPUs don't include CONFIG_CPU_V6. So armv6k CPUs cannot be detected as arm_v6. Fix this by adding detection for CONFIG_CPU_V6K. Signed-off-by: Lu jicong Link: https://github.com/openwrt/openwrt/pull/15855 Signed-off-by: Christian Marangi (cherry picked from commit d55083fbcaea9cdd2ebc10a2d38989ad485a5357) --- include/target.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index b5e3e7ff6f..f72ef32bec 100644 --- a/include/target.mk +++ b/include/target.mk @@ -316,7 +316,15 @@ ifeq ($(DUMP),1) ifneq ($(CONFIG_CPU_MIPS32_R2),) FEATURES += mips16 endif - FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v))) + ifneq ($(CONFIG_CPU_V6),) + FEATURES += arm_v6 + endif + ifneq ($(CONFIG_CPU_V6K),) + FEATURES += arm_v6 + endif + ifneq ($(CONFIG_CPU_V7),) + FEATURES += arm_v7 + endif # remove duplicates FEATURES:=$(sort $(FEATURES)) From e0837a1257e371d2566493a8b98082fc19093a01 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 1 Jul 2024 23:55:03 +0200 Subject: [PATCH 02/65] iw: sync nl80211.h Update the nl80211.h file in iw with the version from backports. The files were out of sync already before the mac80211 update. If iw set the NL80211_ATTR_WIPHY_ANTENNA_GAIN attribute the kernel assumed it set the NL80211_ATTR_PUNCT_BITMAP attribute because the id was the same. Link: https://github.com/openwrt/openwrt/pull/15827 Signed-off-by: Hauke Mehrtens --- .../utils/iw/patches/001-nl80211_h_sync.patch | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/package/network/utils/iw/patches/001-nl80211_h_sync.patch b/package/network/utils/iw/patches/001-nl80211_h_sync.patch index afe27d6f23..9bb2923491 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -126,7 +126,7 @@ * * @NL80211_ATTR_MU_MIMO_GROUP_DATA: array of 24 bytes that defines a MU-MIMO * groupID for monitor mode. -@@ -2663,6 +2716,44 @@ enum nl80211_commands { +@@ -2663,6 +2716,49 @@ enum nl80211_commands { * association request when used with NL80211_CMD_NEW_STATION). Can be set * only if %NL80211_STA_FLAG_WME is set. * @@ -165,13 +165,18 @@ + * the incoming frame RX timestamp. + * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent + * (re)associations. ++ * ++ * @NL80211_ATTR_PUNCT_BITMAP: (u32) Preamble puncturing bitmap, lowest ++ * bit corresponds to the lowest 20 MHz channel. Each bit set to 1 ++ * indicates that the sub-channel is punctured. Higher 16 bits are ++ * reserved. + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. + * * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -3177,6 +3268,23 @@ enum nl80211_attrs { +@@ -3177,6 +3273,25 @@ enum nl80211_attrs { NL80211_ATTR_DISABLE_EHT, @@ -190,12 +195,14 @@ + NL80211_ATTR_RX_HW_TIMESTAMP, + NL80211_ATTR_TD_BITMAP, + ++ NL80211_ATTR_PUNCT_BITMAP, ++ + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, -@@ -3231,6 +3339,11 @@ enum nl80211_attrs { +@@ -3231,6 +3346,11 @@ enum nl80211_attrs { #define NL80211_HE_MIN_CAPABILITY_LEN 16 #define NL80211_HE_MAX_CAPABILITY_LEN 54 #define NL80211_MAX_NR_CIPHER_SUITES 5 @@ -207,7 +214,7 @@ #define NL80211_MAX_NR_AKM_SUITES 2 #define NL80211_EHT_MIN_CAPABILITY_LEN 13 #define NL80211_EHT_MAX_CAPABILITY_LEN 51 -@@ -4853,6 +4966,8 @@ enum nl80211_bss_scan_width { +@@ -4853,6 +4973,8 @@ enum nl80211_bss_scan_width { * Contains a nested array of signal strength attributes (u8, dBm), * using the nesting index as the antenna number. * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz @@ -216,7 +223,7 @@ * @__NL80211_BSS_AFTER_LAST: internal * @NL80211_BSS_MAX: highest BSS attribute */ -@@ -4878,6 +4993,8 @@ enum nl80211_bss { +@@ -4878,6 +5000,8 @@ enum nl80211_bss { NL80211_BSS_PARENT_BSSID, NL80211_BSS_CHAIN_SIGNAL, NL80211_BSS_FREQUENCY_OFFSET, @@ -225,7 +232,7 @@ /* keep last */ __NL80211_BSS_AFTER_LAST, -@@ -5874,7 +5991,7 @@ enum nl80211_ap_sme_features { +@@ -5874,7 +5998,7 @@ enum nl80211_ap_sme_features { * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up * the connected inactive stations in AP mode. * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested @@ -234,7 +241,7 @@ * cellular base stations. * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: (no longer available, only * here to reserve the value for API/ABI compatibility) -@@ -6174,6 +6291,14 @@ enum nl80211_feature_flags { +@@ -6174,6 +6298,16 @@ enum nl80211_feature_flags { * @NL80211_EXT_FEATURE_RADAR_BACKGROUND: Device supports background radar/CAC * detection. * @@ -245,15 +252,18 @@ + * or other reasons. Note that certain driver specific restrictions + * might apply, e.g. no scans in progress, no offchannel operations + * in progress, and no active connections. ++ * ++ * @NL80211_EXT_FEATURE_PUNCT: Driver supports preamble puncturing in AP mode. + * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. */ -@@ -6241,6 +6366,7 @@ enum nl80211_ext_feature_index { +@@ -6241,6 +6375,8 @@ enum nl80211_ext_feature_index { NL80211_EXT_FEATURE_BSS_COLOR, NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD, NL80211_EXT_FEATURE_RADAR_BACKGROUND, + NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE, ++ NL80211_EXT_FEATURE_PUNCT, /* add new features before the definition below */ NUM_NL80211_EXT_FEATURES, From 323e249ce8edfc2ee556875b4f64c27834937989 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 28 Jun 2024 01:32:46 +0200 Subject: [PATCH 03/65] mac80211: Update to version 6.1.97-1 This updates mac80211 to version 6.1.97-1. This code is based on Linux 6.1.97 and contains all fixes included in the upstream wireless subsystem from that kernel version. This includes many bugfixes and also some security fixes. The removed patches are already integrated in upstream Linux 6.1.97 or in backports. The following patches were integrated in upstream Linux: ath11k/0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch ath11k/0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch ath11k/0036-wifi-ath11k-fix-SAC-bug-on-peer-addition-with-sta-ba.patch ath11k/0047-wifi-ath11k-fix-deinitialization-of-firmware-resourc.patch ath11k/0053-wifi-ath11k-fix-writing-to-unintended-memory-region.patch ath11k/0060-wifi-ath11k-Ignore-frags-from-uninitialized-peer-in-.patch ath11k/0065-wifi-ath11k-fix-tx-status-reporting-in-encap-offload.patch ath11k/0067-wifi-ath11k-Fix-SKB-corruption-in-REO-destination-ri.patch ath11k/0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch ath11k/0080-wifi-ath11k-add-support-default-regdb-while-searchin.patch ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch ath11k/0096-wifi-ath11k-fix-boot-failure-with-one-MSI-vector.patch subsys/337-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch The following patches were integrated in upstream backports: ath11k/901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch build/080-resv_start_op.patch build/110-backport_napi_build_skb.patch The following files are missing in backports, we do not have to remove them any more. Some were already missing before some were removed in this update: include/linux/cordic.h include/linux/crc8.h include/linux/eeprom_93cx6.h include/linux/wl12xx.h include/net/ieee80211.h backport-include/linux/bcm47xx_nvram.h include/linux/ath9k_platform.h include/net/bluetooth/ backports ships a dummy Mediatek wed header for older kernel versions. We backported the feature in our kernel, remove the dummy header: backport-include/linux/soc/mediatek/mtk_wed.h Remove header files for subsystems used form the mainline kernel: include/trace/events/qrtr.h include/net/rsi_91x.h backport-include/linux/platform_data/brcmnand.h Link: https://github.com/openwrt/openwrt/pull/15827 Signed-off-by: Hauke Mehrtens --- package/kernel/mac80211/Makefile | 23 ++-- .../patches/ath/400-ath_move_debug_code.patch | 2 +- .../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 +- ...rolling-support-for-various-chipsets.patch | 28 ++-- ...75-ath10k-use-tpt-trigger-by-default.patch | 4 +- ...h10k-Try-to-get-mac-address-from-dts.patch | 2 +- ...k-always-use-mac80211-loss-detection.patch | 2 +- ...-tx-queues-immediately-upon-firmware.patch | 6 +- ...-ath11k-suppress-add-interface-error.patch | 4 +- ...support-to-configure-channel-dwell-t.patch | 8 +- ...firmware-crash-on-vdev-delete-race-c.patch | 8 +- ...monitor-vdev-creation-with-firmware-.patch | 2 +- ...hronize-ath11k_mac_he_gi_to_nl80211_.patch | 42 ------ ...ger-sta-disconnect-on-hardware-resta.patch | 4 +- ...-remap-ce-register-space-for-IPQ5018.patch | 6 +- ...scan-request-param-frame-size-warnin.patch | 6 +- ...support-to-configure-FTM-responder-r.patch | 6 +- ...ix-ce-memory-mapping-for-ahb-devices.patch | 4 +- ...return-value-check-in-ath11k_ahb_pro.patch | 2 +- ...platform_get_irq-to-get-the-interrup.patch | 50 ------- ...SAC-bug-on-peer-addition-with-sta-ba.patch | 53 -------- ...low-system-suspend-to-survive-ath11k.patch | 2 +- ...-MU-MIMO-params-from-hostapd-to-hard.patch | 18 +-- ...-HE-MCS-mapper-to-a-separate-functio.patch | 4 +- ...rate-rx-and-tx-mcs-maps-for-supporte.patch | 2 +- ...tx-ack-signal-support-for-management.patch | 2 +- ...support-to-parse-new-WMI-event-for-6.patch | 2 +- ...deinitialization-of-firmware-resourc.patch | 79 ----------- ...BUFFER_DONE-read-on-monitor-ring-rx-.patch | 2 +- ...wifi-ath11k-Optimize-6-GHz-scan-time.patch | 2 +- ...igure-the-FTM-responder-role-using-f.patch | 4 +- ...-writing-to-unintended-memory-region.patch | 43 ------ ...-11d-scan-start-before-WMI_START_SCA.patch | 2 +- ...1k-Remove-redundant-pci_clear_master.patch | 6 +- ...ble-Spectral-scan-upon-removing-inte.patch | 2 +- ...pci-Add-more-MODULE_FIRMWARE-entries.patch | 2 +- ...t-a-warning-when-crypto_alloc_shash-.patch | 2 +- ...re-frags-from-uninitialized-peer-in-.patch | 104 -------------- ...-undefined-behavior-with-__fls-in-dp.patch | 2 +- ...tx-status-reporting-in-encap-offload.patch | 119 ---------------- ...SKB-corruption-in-REO-destination-ri.patch | 70 ---------- ...emove-disabling-of-80-80-and-160-MHz.patch | 2 +- ...registration-of-6Ghz-only-phy-withou.patch | 61 --------- ...ound-false-positive-stringop-overrea.patch | 6 +- ...k-driver-settings-for-MBSSID-and-EMA.patch | 4 +- ...ID-configuration-during-vdev-create-.patch | 8 +- ...ID-parameter-configuration-in-AP-mod.patch | 12 +- ...efactor-vif-parameter-configurations.patch | 4 +- ...76-wifi-ath11k-MBSSID-beacon-support.patch | 8 +- .../0077-wifi-ath11k-EMA-beacon-support.patch | 6 +- ...cate-the-func-ath11k_mac_bitrate_mas.patch | 4 +- ...-HT-fixed-rate-in-WMI-peer-fixed-par.patch | 14 +- ...support-default-regdb-while-searchin.patch | 127 ------------------ ...ifi-ath11k-factory-test-mode-support.patch | 8 +- ...w-ath11k-to-boot-without-caldata-in-.patch | 2 +- ...ix-memory-leak-in-WMI-firmware-stats.patch | 51 ------- ...ath11k-Add-missing-check-for-ioremap.patch | 38 ------ ...ert-wifi-ath11k-Enable-threaded-NAPI.patch | 2 +- ...coldboot-calibration-support-for-QCN.patch | 6 +- ...fix-boot-failure-with-one-MSI-vector.patch | 103 -------------- ...k-control-thermal-support-via-symbol.patch | 2 +- ...ci-fix-compilation-in-5.16-and-older.patch | 29 ---- .../ath9k/512-ath9k_channelbw_debugfs.patch | 2 +- .../ath9k/531-ath9k_extra_platform_leds.patch | 12 -- .../ath9k/542-ath9k_debugfs_diag.patch | 2 +- .../ath9k/549-ath9k_enable_gpio_buttons.patch | 13 -- .../ath9k/551-ath9k_ubnt_uap_plus_hsr.patch | 6 +- .../810-b43-gpio-mask-module-option.patch | 2 +- .../brcm/812-b43-add-antenna-control.patch | 14 +- .../814-b43-only-use-gpio-0-1-for-led.patch | 2 +- .../patches/build/001-fix_build.patch | 16 +-- .../patches/build/060-no_local_ssb_bcma.patch | 10 +- .../patches/build/080-resv_start_op.patch | 24 ---- .../100-backports-drop-QRTR-and-MHI.patch | 4 +- .../build/110-backport_napi_build_skb.patch | 11 -- ...ringified-name-of-command-in-error-l.patch | 2 +- .../602-rt2x00-introduce-rt2x00eeprom.patch | 6 +- ...isabling_bands_through_platform_data.patch | 2 +- ...07-rt2x00-add_platform_data_mac_addr.patch | 2 +- ...00-allow_disabling_bands_through_dts.patch | 2 +- .../611-rt2x00-add-AP+STA-support.patch | 2 +- ...-rework-MT7620-PA-LNA-RF-calibration.patch | 12 +- .../110-mac80211_keep_keys_on_stop_ap.patch | 2 +- .../mac80211/patches/subsys/210-ap_scan.patch | 2 +- ...domize-BA-session-dialog-token-alloc.patch | 2 +- ...crease-quantum-for-airtime-scheduler.patch | 6 +- ...d-internal-handler-for-wake_tx_queue.patch | 14 +- ...dd-wake_tx_queue-callback-to-drivers.patch | 10 +- ...c80211-Drop-support-for-TX-push-path.patch | 68 ++++++---- ...ltek-remove-duplicated-wake_tx_queue.patch | 4 +- ...port-for-restricting-netdev-features.patch | 36 ++--- ...x-and-simplify-unencrypted-drop-chec.patch | 6 +- ...move-mesh-forwarding-congestion-chec.patch | 4 +- ...x-receiving-A-MSDU-frames-on-mesh-in.patch | 20 +-- ...d-a-workaround-for-receiving-non-sta.patch | 10 +- ...x-race-in-mesh-sequence-number-assig.patch | 2 +- ...wifi-mac80211-mesh-fast-xmit-support.patch | 38 +++--- ...e-mesh-header-cache-to-speed-up-mesh.patch | 12 +- .../321-mac80211-fix-mesh-forwarding.patch | 4 +- ...x-mesh-path-discovery-based-on-unica.patch | 4 +- ...d-VHT-MU-MIMO-related-flags-in-ieee8.patch | 2 +- ...d-HE-MU-MIMO-related-flags-in-ieee80.patch | 2 +- ...troduce-ieee80211_refresh_tx_agg_ses.patch | 2 +- ...fi-mac80211-add-mesh-fast-rx-support.patch | 8 +- ...d-support-for-letting-drivers-regist.patch | 14 +- ...x-receiving-mesh-packets-in-forwardi.patch | 4 +- ...orrectly-mark-FTM-frames-non-buffera.patch | 10 +- ...mac80211-flush-queues-on-STA-removal.patch | 2 +- ...i-mvm-support-flush-on-AP-interfaces.patch | 4 +- ...3-wifi-mac80211-add-flush_sta-method.patch | 6 +- ...ifi-mvm-support-new-flush_sta-method.patch | 4 +- ...d-LDPC-related-flags-in-ieee80211_bs.patch | 4 +- ...0211-generate-EMA-beacons-in-AP-mode.patch | 24 ++-- ...x-race-condition-on-enabling-fast-xm.patch | 34 ----- ...race-period-for-DFS-available-after-.patch | 6 +- ...Transition-Disable-policy-during-por.patch | 14 +- ...ort-minimal-EHT-rate-reporting-on-RX.patch | 14 +- ...1-mlme-handle-EHT-channel-puncturing.patch | 18 +-- ...ve-puncturing-bitmap-validation-from.patch | 6 +- ...idate-and-configure-puncturing-bitma.patch | 16 +-- ...clude-puncturing-bitmap-in-channel-s.patch | 26 ++-- ...mac80211-configure-puncturing-bitmap.patch | 12 +- ...d-EHT-MU-MIMO-related-flags-in-ieee8.patch | 2 +- ...-mac80211-warn-only-once-on-AP-probe.patch | 2 +- ...d-getter-functions-for-vif-MLD-state.patch | 72 +++++----- .../patches/subsys/400-allow-ibss-mixed.patch | 2 +- .../500-mac80211_configure_antenna_gain.patch | 20 +-- .../780-avoid-crashing-missing-band.patch | 2 +- 132 files changed, 454 insertions(+), 1512 deletions(-) delete mode 100644 package/kernel/mac80211/patches/ath11k/0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0036-wifi-ath11k-fix-SAC-bug-on-peer-addition-with-sta-ba.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0047-wifi-ath11k-fix-deinitialization-of-firmware-resourc.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0053-wifi-ath11k-fix-writing-to-unintended-memory-region.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0060-wifi-ath11k-Ignore-frags-from-uninitialized-peer-in-.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0065-wifi-ath11k-fix-tx-status-reporting-in-encap-offload.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0067-wifi-ath11k-Fix-SKB-corruption-in-REO-destination-ri.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0080-wifi-ath11k-add-support-default-regdb-while-searchin.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/0096-wifi-ath11k-fix-boot-failure-with-one-MSI-vector.patch delete mode 100644 package/kernel/mac80211/patches/ath11k/901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch delete mode 100644 package/kernel/mac80211/patches/build/080-resv_start_op.patch delete mode 100644 package/kernel/mac80211/patches/build/110-backport_napi_build_skb.patch delete mode 100644 package/kernel/mac80211/patches/subsys/337-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index a7472ee779..42365e516c 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,11 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=6.1.24 -PKG_RELEASE:=4 -# PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/ -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ -PKG_HASH:=5d39aca7e34c33cb9b3e366117b2e86841b7bdd37933679d6b1e61be6b150648 +PKG_VERSION:=6.1.97-1 +PKG_RELEASE:=1 +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.97/ +PKG_HASH:=8e9ae2d02f373252dd61f5c6a81c88eec67ca773464d9ef3d844752dc6775540 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) @@ -299,17 +298,14 @@ define Build/Prepare $(Build/Patch) rm -rf \ $(PKG_BUILD_DIR)/include/linux/ssb \ - $(PKG_BUILD_DIR)/include/linux/bcma \ - $(PKG_BUILD_DIR)/include/net/bluetooth + $(PKG_BUILD_DIR)/include/linux/bcma rm -f \ - $(PKG_BUILD_DIR)/include/linux/cordic.h \ - $(PKG_BUILD_DIR)/include/linux/crc8.h \ - $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \ - $(PKG_BUILD_DIR)/include/linux/wl12xx.h \ $(PKG_BUILD_DIR)/include/linux/mhi.h \ - $(PKG_BUILD_DIR)/include/net/ieee80211.h \ - $(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h + $(PKG_BUILD_DIR)/include/trace/events/qrtr.h \ + $(PKG_BUILD_DIR)/include/net/rsi_91x.h \ + $(PKG_BUILD_DIR)/backport-include/linux/platform_data/brcmnand.h \ + $(PKG_BUILD_DIR)/backport-include/linux/soc/mediatek/mtk_wed.h echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version endef @@ -325,7 +321,6 @@ endif ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") define Build/Configure - cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h endef diff --git a/package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch b/package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch index eacc72776e..b2c8c0161a 100644 --- a/package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch +++ b/package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch @@ -14,7 +14,7 @@ CFLAGS_trace.o := -I$(src) --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h -@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common, +@@ -321,14 +321,7 @@ void _ath_dbg(struct ath_common *common, #endif /* CPTCFG_ATH_DEBUG */ /** Returns string describing opmode, or NULL if unknown mode. */ 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 fd5493de71..0f6a570cb0 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 -@@ -102,6 +102,7 @@ ADM8211= +@@ -94,6 +94,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 8d83921a3b..bc750d5e11 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 -@@ -3370,6 +3370,8 @@ void regulatory_hint_country_ie(struct w +@@ -3373,6 +3373,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; -@@ -3621,6 +3623,7 @@ static bool is_wiphy_all_set_reg_flag(en +@@ -3624,6 +3626,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 41ad6006b5..dae9588fea 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 -@@ -86,6 +86,12 @@ config ATH10K_TRACING +@@ -87,6 +87,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 -@@ -161,6 +161,7 @@ ATH10K_SNOC= +@@ -153,6 +153,7 @@ ATH10K_SNOC= ATH10K_DEBUG= ATH10K_DEBUGFS= 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 7a38cf3e4e..7b2f327247 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 -@@ -3516,6 +3516,16 @@ int ath10k_core_register(struct ath10k * +@@ -3510,6 +3510,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 e8beed17e8..7dcf0f4988 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 -@@ -9909,6 +9909,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -9918,6 +9918,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[] = { -@@ -10267,6 +10282,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -10276,6 +10291,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; diff --git a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 1c1630c051..e6e048577b 100644 --- a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -85,7 +85,7 @@ v13: create mode 100644 drivers/net/wireless/ath/ath10k/leds.h --- a/drivers/net/wireless/ath/ath10k/Kconfig +++ b/drivers/net/wireless/ath/ath10k/Kconfig -@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS +@@ -72,6 +72,16 @@ config ATH10K_DEBUGFS If unsure, say Y to make it easier to debug problems. @@ -114,7 +114,7 @@ v13: ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o --- a/local-symbols +++ b/local-symbols -@@ -162,6 +162,7 @@ ATH10K_DEBUG= +@@ -154,6 +154,7 @@ ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_SPECTRAL= ATH10K_THERMAL= @@ -172,7 +172,7 @@ v13: .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -3231,6 +3237,10 @@ int ath10k_core_start(struct ath10k *ar, +@@ -3225,6 +3231,10 @@ int ath10k_core_start(struct ath10k *ar, goto err_hif_stop; } @@ -183,7 +183,7 @@ v13: return 0; err_hif_stop: -@@ -3489,9 +3499,18 @@ static void ath10k_core_register_work(st +@@ -3483,9 +3493,18 @@ static void ath10k_core_register_work(st goto err_spectral_destroy; } @@ -202,7 +202,7 @@ v13: err_spectral_destroy: ath10k_spectral_destroy(ar); err_debug_destroy: -@@ -3537,6 +3556,8 @@ void ath10k_core_unregister(struct ath10 +@@ -3531,6 +3550,8 @@ void ath10k_core_unregister(struct ath10 if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; @@ -221,7 +221,7 @@ v13: #include "htt.h" #include "htc.h" -@@ -1253,6 +1254,13 @@ struct ath10k { +@@ -1256,6 +1257,13 @@ struct ath10k { } testmode; struct { @@ -237,7 +237,7 @@ v13: u32 fw_crash_counter; --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h -@@ -519,6 +519,7 @@ struct ath10k_hw_params { +@@ -520,6 +520,7 @@ struct ath10k_hw_params { const char *name; u32 patch_load_addr; int uart_pin; @@ -456,7 +456,7 @@ v13: { --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops +@@ -4598,6 +4598,8 @@ static const struct wmi_ops wmi_tlv_ops .gen_echo = ath10k_wmi_tlv_op_gen_echo, .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, @@ -467,7 +467,7 @@ v13: static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -7492,6 +7492,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -517,7 +517,7 @@ v13: static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -9160,6 +9203,9 @@ static const struct wmi_ops wmi_ops = { +@@ -9180,6 +9223,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -527,7 +527,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9230,6 +9276,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -9250,6 +9296,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -536,7 +536,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9302,6 +9350,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -9322,6 +9370,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -545,7 +545,7 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -9373,6 +9423,8 @@ static const struct wmi_ops wmi_10_2_4_o +@@ -9393,6 +9443,8 @@ static const struct wmi_ops wmi_10_2_4_o ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, @@ -554,7 +554,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9454,6 +9506,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -9474,6 +9526,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, 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 4c1f9aa815..b6a551bacb 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 -@@ -1309,6 +1309,10 @@ struct ath10k { +@@ -1312,6 +1312,10 @@ struct ath10k { s32 tx_power_2g_limit; s32 tx_power_5g_limit; @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -10284,7 +10284,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10293,7 +10293,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 084e28a2d9..ed88f22957 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 -@@ -3407,6 +3408,8 @@ static int ath10k_core_probe_fw(struct a +@@ -3401,6 +3402,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 f025fea63b..b9cdae7e1f 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 -@@ -10080,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *a +@@ -10089,7 +10089,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/ath11k/0001-wifi-ath11k-stop-tx-queues-immediately-upon-firmware.patch b/package/kernel/mac80211/patches/ath11k/0001-wifi-ath11k-stop-tx-queues-immediately-upon-firmware.patch index d0dc04febf..fd39392604 100644 --- a/package/kernel/mac80211/patches/ath11k/0001-wifi-ath11k-stop-tx-queues-immediately-upon-firmware.patch +++ b/package/kernel/mac80211/patches/ath11k/0001-wifi-ath11k-stop-tx-queues-immediately-upon-firmware.patch @@ -35,7 +35,7 @@ Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -1641,7 +1641,7 @@ static void ath11k_update_11d(struct wor +@@ -1668,7 +1668,7 @@ static void ath11k_update_11d(struct wor } } @@ -44,7 +44,7 @@ Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com { struct ath11k *ar; struct ath11k_pdev *pdev; -@@ -1730,9 +1730,6 @@ static void ath11k_core_restart(struct w +@@ -1757,9 +1757,6 @@ static void ath11k_core_restart(struct w struct ath11k_base *ab = container_of(work, struct ath11k_base, restart_work); int ret; @@ -66,7 +66,7 @@ Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com const char *filename); --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c -@@ -3164,6 +3164,9 @@ static void ath11k_qmi_driver_event_work +@@ -3169,6 +3169,9 @@ static void ath11k_qmi_driver_event_work case ATH11K_QMI_EVENT_SERVER_EXIT: set_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags); set_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags); diff --git a/package/kernel/mac80211/patches/ath11k/0007-wifi-ath11k-suppress-add-interface-error.patch b/package/kernel/mac80211/patches/ath11k/0007-wifi-ath11k-suppress-add-interface-error.patch index fbef0abb8d..bdc9f734c0 100644 --- a/package/kernel/mac80211/patches/ath11k/0007-wifi-ath11k-suppress-add-interface-error.patch +++ b/package/kernel/mac80211/patches/ath11k/0007-wifi-ath11k-suppress-add-interface-error.patch @@ -20,7 +20,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -6421,18 +6421,16 @@ static int ath11k_mac_op_add_interface(s +@@ -6418,18 +6418,16 @@ static int ath11k_mac_op_add_interface(s ath11k_dp_vdev_tx_attach(ar, arvif); @@ -42,7 +42,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com mutex_unlock(&ar->conf_mutex); return 0; -@@ -6457,7 +6455,6 @@ err_vdev_del: +@@ -6454,7 +6452,6 @@ err_vdev_del: spin_unlock_bh(&ar->data_lock); err: diff --git a/package/kernel/mac80211/patches/ath11k/0008-wifi-ath11k-add-support-to-configure-channel-dwell-t.patch b/package/kernel/mac80211/patches/ath11k/0008-wifi-ath11k-add-support-to-configure-channel-dwell-t.patch index d0b19fe59f..be31648a4e 100644 --- a/package/kernel/mac80211/patches/ath11k/0008-wifi-ath11k-add-support-to-configure-channel-dwell-t.patch +++ b/package/kernel/mac80211/patches/ath11k/0008-wifi-ath11k-add-support-to-configure-channel-dwell-t.patch @@ -43,7 +43,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com static const u32 ath11k_smps_map[] = { [WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC, -@@ -3612,6 +3615,7 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3609,6 +3612,7 @@ static int ath11k_mac_op_hw_scan(struct struct scan_req_params arg; int ret = 0; int i; @@ -51,7 +51,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com mutex_lock(&ar->conf_mutex); -@@ -3681,6 +3685,26 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3678,6 +3682,26 @@ static int ath11k_mac_op_hw_scan(struct ether_addr_copy(arg.mac_mask.addr, req->mac_addr_mask); } @@ -78,7 +78,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com ret = ath11k_start_scan(ar, &arg); if (ret) { ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret); -@@ -3689,10 +3713,8 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3686,10 +3710,8 @@ static int ath11k_mac_op_hw_scan(struct spin_unlock_bh(&ar->data_lock); } @@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com exit: kfree(arg.chan_list); -@@ -9060,6 +9082,9 @@ static int __ath11k_mac_register(struct +@@ -9065,6 +9087,9 @@ static int __ath11k_mac_register(struct NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP); } diff --git a/package/kernel/mac80211/patches/ath11k/0010-wifi-ath11k-Fix-firmware-crash-on-vdev-delete-race-c.patch b/package/kernel/mac80211/patches/ath11k/0010-wifi-ath11k-Fix-firmware-crash-on-vdev-delete-race-c.patch index 7275af06ea..e58ce14274 100644 --- a/package/kernel/mac80211/patches/ath11k/0010-wifi-ath11k-Fix-firmware-crash-on-vdev-delete-race-c.patch +++ b/package/kernel/mac80211/patches/ath11k/0010-wifi-ath11k-Fix-firmware-crash-on-vdev-delete-race-c.patch @@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -6233,6 +6233,40 @@ void ath11k_mac_11d_scan_stop_all(struct +@@ -6230,6 +6230,40 @@ void ath11k_mac_11d_scan_stop_all(struct } } @@ -62,7 +62,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { -@@ -6468,10 +6502,7 @@ err_peer_del: +@@ -6465,10 +6499,7 @@ err_peer_del: } err_vdev_del: @@ -74,7 +74,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com spin_lock_bh(&ar->data_lock); list_del(&arvif->list); spin_unlock_bh(&ar->data_lock); -@@ -6499,7 +6530,6 @@ static void ath11k_mac_op_remove_interfa +@@ -6496,7 +6527,6 @@ static void ath11k_mac_op_remove_interfa struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); struct ath11k_base *ab = ar->ab; @@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com int ret; int i; -@@ -6520,29 +6550,13 @@ static void ath11k_mac_op_remove_interfa +@@ -6517,29 +6547,13 @@ static void ath11k_mac_op_remove_interfa arvif->vdev_id, ret); } diff --git a/package/kernel/mac80211/patches/ath11k/0011-wifi-ath11k-fix-monitor-vdev-creation-with-firmware-.patch b/package/kernel/mac80211/patches/ath11k/0011-wifi-ath11k-fix-monitor-vdev-creation-with-firmware-.patch index 2f066d0a56..dc51960be1 100644 --- a/package/kernel/mac80211/patches/ath11k/0011-wifi-ath11k-fix-monitor-vdev-creation-with-firmware-.patch +++ b/package/kernel/mac80211/patches/ath11k/0011-wifi-ath11k-fix-monitor-vdev-creation-with-firmware-.patch @@ -27,7 +27,7 @@ Link: https://lore.kernel.org/r/20221014155054.11471-1-quic_nmaran@quicinc.com --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -1677,6 +1677,10 @@ void ath11k_core_pre_reconfigure_recover +@@ -1704,6 +1704,10 @@ void ath11k_core_pre_reconfigure_recover ath11k_mac_tx_mgmt_pending_free, ar); idr_destroy(&ar->txmgmt_idr); wake_up(&ar->txmgmt_empty_waitq); diff --git a/package/kernel/mac80211/patches/ath11k/0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch b/package/kernel/mac80211/patches/ath11k/0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch deleted file mode 100644 index 1e89b4d4f2..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch +++ /dev/null @@ -1,42 +0,0 @@ -From dd1c2322694522f674c874f5fa02ac5ae39135dd Mon Sep 17 00:00:00 2001 -From: "Jiri Slaby (SUSE)" -Date: Mon, 31 Oct 2022 12:43:41 +0100 -Subject: [PATCH] wifi: ath11k: synchronize - ath11k_mac_he_gi_to_nl80211_he_gi()'s return type - -ath11k_mac_he_gi_to_nl80211_he_gi() generates a valid warning with gcc-13: - drivers/net/wireless/ath/ath11k/mac.c:321:20: error: conflicting types for 'ath11k_mac_he_gi_to_nl80211_he_gi' due to enum/integer mismatch; have 'enum nl80211_he_gi(u8)' - drivers/net/wireless/ath/ath11k/mac.h:166:5: note: previous declaration of 'ath11k_mac_he_gi_to_nl80211_he_gi' with type 'u32(u8)' - -I.e. the type of the return value ath11k_mac_he_gi_to_nl80211_he_gi() in -the declaration is u32, while the definition spells enum nl80211_he_gi. -Synchronize them to the latter. - -Cc: Martin Liska -Cc: Kalle Valo -Cc: "David S. Miller" -Cc: Eric Dumazet -Cc: Jakub Kicinski -Cc: Paolo Abeni -Cc: ath11k@lists.infradead.org -Cc: linux-wireless@vger.kernel.org -Cc: netdev@vger.kernel.org -Signed-off-by: Jiri Slaby (SUSE) -Reviewed-by: Jeff Johnson -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20221031114341.10377-1-jirislaby@kernel.org ---- - drivers/net/wireless/ath/ath11k/mac.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ath/ath11k/mac.h -+++ b/drivers/net/wireless/ath/ath11k/mac.h -@@ -163,7 +163,7 @@ void ath11k_mac_drain_tx(struct ath11k * - void ath11k_mac_peer_cleanup_all(struct ath11k *ar); - int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx); - u8 ath11k_mac_bw_to_mac80211_bw(u8 bw); --u32 ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi); -+enum nl80211_he_gi ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi); - enum nl80211_he_ru_alloc ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(u16 ru_phy); - enum nl80211_he_ru_alloc ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones); - enum ath11k_supported_bw ath11k_mac_mac80211_bw_to_ath11k_bw(enum rate_info_bw bw); diff --git a/package/kernel/mac80211/patches/ath11k/0017-wifi-ath11k-Trigger-sta-disconnect-on-hardware-resta.patch b/package/kernel/mac80211/patches/ath11k/0017-wifi-ath11k-Trigger-sta-disconnect-on-hardware-resta.patch index f95e5027b2..792100ae38 100644 --- a/package/kernel/mac80211/patches/ath11k/0017-wifi-ath11k-Trigger-sta-disconnect-on-hardware-resta.patch +++ b/package/kernel/mac80211/patches/ath11k/0017-wifi-ath11k-Trigger-sta-disconnect-on-hardware-resta.patch @@ -96,7 +96,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com struct ath11k_hw_ops { --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -8010,6 +8010,7 @@ ath11k_mac_op_reconfig_complete(struct i +@@ -8007,6 +8007,7 @@ ath11k_mac_op_reconfig_complete(struct i struct ath11k *ar = hw->priv; struct ath11k_base *ab = ar->ab; int recovery_count; @@ -104,7 +104,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART) return; -@@ -8045,6 +8046,12 @@ ath11k_mac_op_reconfig_complete(struct i +@@ -8042,6 +8043,12 @@ ath11k_mac_op_reconfig_complete(struct i ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset success\n"); } } diff --git a/package/kernel/mac80211/patches/ath11k/0021-wifi-ath11k-remap-ce-register-space-for-IPQ5018.patch b/package/kernel/mac80211/patches/ath11k/0021-wifi-ath11k-remap-ce-register-space-for-IPQ5018.patch index d07a258ac2..1c74c4f01f 100644 --- a/package/kernel/mac80211/patches/ath11k/0021-wifi-ath11k-remap-ce-register-space-for-IPQ5018.patch +++ b/package/kernel/mac80211/patches/ath11k/0021-wifi-ath11k-remap-ce-register-space-for-IPQ5018.patch @@ -81,7 +81,7 @@ Link: https://lore.kernel.org/r/20221122132152.17771-5-quic_kathirve@quicinc.com } } -@@ -1142,10 +1154,26 @@ static int ath11k_ahb_probe(struct platf +@@ -1148,10 +1160,26 @@ static int ath11k_ahb_probe(struct platf goto err_core_free; } @@ -108,7 +108,7 @@ Link: https://lore.kernel.org/r/20221122132152.17771-5-quic_kathirve@quicinc.com ret = ath11k_ahb_setup_resources(ab); if (ret) goto err_core_free; -@@ -1236,6 +1264,10 @@ static void ath11k_ahb_free_resources(st +@@ -1242,6 +1270,10 @@ static void ath11k_ahb_free_resources(st ath11k_ahb_release_smp2p_handle(ab); ath11k_ahb_fw_resource_deinit(ab); ath11k_ce_free_pipes(ab); @@ -340,7 +340,7 @@ Link: https://lore.kernel.org/r/20221122132152.17771-5-quic_kathirve@quicinc.com extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750; --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -543,6 +543,8 @@ static int ath11k_pci_claim(struct ath11 +@@ -547,6 +547,8 @@ static int ath11k_pci_claim(struct ath11 goto clear_master; } diff --git a/package/kernel/mac80211/patches/ath11k/0026-wifi-ath11k-Fix-scan-request-param-frame-size-warnin.patch b/package/kernel/mac80211/patches/ath11k/0026-wifi-ath11k-Fix-scan-request-param-frame-size-warnin.patch index 50c14e7b98..9bab303ce9 100644 --- a/package/kernel/mac80211/patches/ath11k/0026-wifi-ath11k-Fix-scan-request-param-frame-size-warnin.patch +++ b/package/kernel/mac80211/patches/ath11k/0026-wifi-ath11k-Fix-scan-request-param-frame-size-warnin.patch @@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -3612,7 +3612,7 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3609,7 +3609,7 @@ static int ath11k_mac_op_hw_scan(struct struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); struct cfg80211_scan_request *req = &hw_req->req; @@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com int ret = 0; int i; u32 scan_timeout; -@@ -3640,72 +3640,78 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3637,72 +3637,78 @@ static int ath11k_mac_op_hw_scan(struct if (ret) goto exit; @@ -143,7 +143,7 @@ Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com if (ret) { ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret); spin_lock_bh(&ar->data_lock); -@@ -3717,10 +3723,11 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3714,10 +3720,11 @@ static int ath11k_mac_op_hw_scan(struct msecs_to_jiffies(scan_timeout)); exit: diff --git a/package/kernel/mac80211/patches/ath11k/0029-wifi-ath11k-Add-support-to-configure-FTM-responder-r.patch b/package/kernel/mac80211/patches/ath11k/0029-wifi-ath11k-Add-support-to-configure-FTM-responder-r.patch index f652d689b5..3631068d58 100644 --- a/package/kernel/mac80211/patches/ath11k/0029-wifi-ath11k-Add-support-to-configure-FTM-responder-r.patch +++ b/package/kernel/mac80211/patches/ath11k/0029-wifi-ath11k-Add-support-to-configure-FTM-responder-r.patch @@ -116,7 +116,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com struct ath11k_hw_ops { --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -3110,7 +3110,7 @@ static void ath11k_mac_op_bss_info_chang +@@ -3107,7 +3107,7 @@ static void ath11k_mac_op_bss_info_chang u16 bitrate; int ret = 0; u8 rateidx; @@ -125,7 +125,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com u32 ipv4_cnt; mutex_lock(&ar->conf_mutex); -@@ -3412,6 +3412,20 @@ static void ath11k_mac_op_bss_info_chang +@@ -3409,6 +3409,20 @@ static void ath11k_mac_op_bss_info_chang } } @@ -146,7 +146,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com if (changed & BSS_CHANGED_FILS_DISCOVERY || changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP) ath11k_mac_fils_discovery(arvif, info); -@@ -9113,6 +9127,10 @@ static int __ath11k_mac_register(struct +@@ -9118,6 +9132,10 @@ static int __ath11k_mac_register(struct wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL); diff --git a/package/kernel/mac80211/patches/ath11k/0031-wifi-ath11k-fix-ce-memory-mapping-for-ahb-devices.patch b/package/kernel/mac80211/patches/ath11k/0031-wifi-ath11k-fix-ce-memory-mapping-for-ahb-devices.patch index 2786799972..417e12c47a 100644 --- a/package/kernel/mac80211/patches/ath11k/0031-wifi-ath11k-fix-ce-memory-mapping-for-ahb-devices.patch +++ b/package/kernel/mac80211/patches/ath11k/0031-wifi-ath11k-fix-ce-memory-mapping-for-ahb-devices.patch @@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230113063209.7256-1-quic_rajkbhag@quicinc.com --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c -@@ -1157,12 +1157,16 @@ static int ath11k_ahb_probe(struct platf +@@ -1163,12 +1163,16 @@ static int ath11k_ahb_probe(struct platf goto err_core_free; } @@ -101,7 +101,7 @@ Link: https://lore.kernel.org/r/20230113063209.7256-1-quic_rajkbhag@quicinc.com if (ab->hw_params.ce_remap) { const struct ce_remap *ce_remap = ab->hw_params.ce_remap; /* ce register space is moved out of wcss unlike ipq8074 or ipq6018 -@@ -1177,10 +1181,6 @@ static int ath11k_ahb_probe(struct platf +@@ -1183,10 +1187,6 @@ static int ath11k_ahb_probe(struct platf } } diff --git a/package/kernel/mac80211/patches/ath11k/0034-wifi-ath11k-fix-return-value-check-in-ath11k_ahb_pro.patch b/package/kernel/mac80211/patches/ath11k/0034-wifi-ath11k-fix-return-value-check-in-ath11k_ahb_pro.patch index 59132913bd..ff3d5df10a 100644 --- a/package/kernel/mac80211/patches/ath11k/0034-wifi-ath11k-fix-return-value-check-in-ath11k_ahb_pro.patch +++ b/package/kernel/mac80211/patches/ath11k/0034-wifi-ath11k-fix-return-value-check-in-ath11k_ahb_pro.patch @@ -16,7 +16,7 @@ Link: https://lore.kernel.org/r/20230217030031.4021289-1-yangyingliang@huawei.co --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c -@@ -1174,7 +1174,7 @@ static int ath11k_ahb_probe(struct platf +@@ -1180,7 +1180,7 @@ static int ath11k_ahb_probe(struct platf * to a new space for accessing them. */ ab->mem_ce = ioremap(ce_remap->base, ce_remap->size); diff --git a/package/kernel/mac80211/patches/ath11k/0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch b/package/kernel/mac80211/patches/ath11k/0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch deleted file mode 100644 index 93a9da8fc2..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch +++ /dev/null @@ -1,50 +0,0 @@ -From f117276638b7600b981b3fe28550823cfbe1ef23 Mon Sep 17 00:00:00 2001 -From: Douglas Anderson -Date: Wed, 1 Feb 2023 08:54:42 -0800 -Subject: [PATCH] wifi: ath11k: Use platform_get_irq() to get the interrupt - -As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ -resource from DT core"), we need to use platform_get_irq() instead of -platform_get_resource() to get our IRQs because -platform_get_resource() simply won't get them anymore. - -This was already fixed in several other Atheros WiFi drivers, -apparently in response to Zeal Robot reports. An example of another -fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the -interrupt"). ath11k seems to have been missed in this effort, though. - -Without this change, WiFi wasn't coming up on my Qualcomm sc7280-based -hardware. Specifically, "platform_get_resource(pdev, IORESOURCE_IRQ, -i)" was failing even for i=0. - -Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 - -Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") -Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device") -Signed-off-by: Douglas Anderson -Tested-by: Jun Yu -Reviewed-by: Lad Prabhakar -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230201084131.v2.1.I69cf3d56c97098287fe3a70084ee515098390b70@changeid ---- - drivers/net/wireless/ath/ath11k/ahb.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/drivers/net/wireless/ath/ath11k/ahb.c -+++ b/drivers/net/wireless/ath/ath11k/ahb.c -@@ -874,11 +874,11 @@ static int ath11k_ahb_setup_msi_resource - ab->pci.msi.ep_base_data = int_prop + 32; - - for (i = 0; i < ab->pci.msi.config->total_vectors; i++) { -- res = platform_get_resource(pdev, IORESOURCE_IRQ, i); -- if (!res) -- return -ENODEV; -+ ret = platform_get_irq(pdev, i); -+ if (ret < 0) -+ return ret; - -- ab->pci.msi.irqs[i] = res->start; -+ ab->pci.msi.irqs[i] = ret; - } - - set_bit(ATH11K_FLAG_MULTI_MSI_VECTORS, &ab->dev_flags); diff --git a/package/kernel/mac80211/patches/ath11k/0036-wifi-ath11k-fix-SAC-bug-on-peer-addition-with-sta-ba.patch b/package/kernel/mac80211/patches/ath11k/0036-wifi-ath11k-fix-SAC-bug-on-peer-addition-with-sta-ba.patch deleted file mode 100644 index b37f070ba6..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0036-wifi-ath11k-fix-SAC-bug-on-peer-addition-with-sta-ba.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 60b7d62ba8cdbd073997bff0f1cdae8d844002c0 Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Thu, 9 Feb 2023 23:26:22 +0100 -Subject: [PATCH] wifi: ath11k: fix SAC bug on peer addition with sta band - migration - -Fix sleep in atomic context warning detected by Smatch static checker -analyzer. - -Following the locking pattern for peer_rhash_add lock tbl_mtx_lock mutex -always even if sta is not transitioning to another band. -This is peer_add function and a more secure locking should not cause -performance regression. - -Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 - -Fixes: d673cb6fe6c0 ("wifi: ath11k: fix peer addition/deletion error on sta band migration") -Reported-by: Dan Carpenter -Signed-off-by: Christian Marangi -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230209222622.1751-1-ansuelsmth@gmail.com ---- - drivers/net/wireless/ath/ath11k/peer.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/drivers/net/wireless/ath/ath11k/peer.c -+++ b/drivers/net/wireless/ath/ath11k/peer.c -@@ -382,22 +382,23 @@ int ath11k_peer_create(struct ath11k *ar - return -ENOBUFS; - } - -+ mutex_lock(&ar->ab->tbl_mtx_lock); - spin_lock_bh(&ar->ab->base_lock); - peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr); - if (peer) { - if (peer->vdev_id == param->vdev_id) { - spin_unlock_bh(&ar->ab->base_lock); -+ mutex_unlock(&ar->ab->tbl_mtx_lock); - return -EINVAL; - } - - /* Assume sta is transitioning to another band. - * Remove here the peer from rhash. - */ -- mutex_lock(&ar->ab->tbl_mtx_lock); - ath11k_peer_rhash_delete(ar->ab, peer); -- mutex_unlock(&ar->ab->tbl_mtx_lock); - } - spin_unlock_bh(&ar->ab->base_lock); -+ mutex_unlock(&ar->ab->tbl_mtx_lock); - - ret = ath11k_wmi_send_peer_create_cmd(ar, param); - if (ret) { diff --git a/package/kernel/mac80211/patches/ath11k/0037-wifi-ath11k-allow-system-suspend-to-survive-ath11k.patch b/package/kernel/mac80211/patches/ath11k/0037-wifi-ath11k-allow-system-suspend-to-survive-ath11k.patch index fa680954e6..2f4ef2f7af 100644 --- a/package/kernel/mac80211/patches/ath11k/0037-wifi-ath11k-allow-system-suspend-to-survive-ath11k.patch +++ b/package/kernel/mac80211/patches/ath11k/0037-wifi-ath11k-allow-system-suspend-to-survive-ath11k.patch @@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230201183201.14431-1-len.brown@intel.com --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -998,7 +998,7 @@ static __maybe_unused int ath11k_pci_pm_ +@@ -1004,7 +1004,7 @@ static __maybe_unused int ath11k_pci_pm_ if (ret) ath11k_warn(ab, "failed to resume core: %d\n", ret); diff --git a/package/kernel/mac80211/patches/ath11k/0039-wifi-ath11k-push-MU-MIMO-params-from-hostapd-to-hard.patch b/package/kernel/mac80211/patches/ath11k/0039-wifi-ath11k-push-MU-MIMO-params-from-hostapd-to-hard.patch index 298ce1a612..b609282513 100644 --- a/package/kernel/mac80211/patches/ath11k/0039-wifi-ath11k-push-MU-MIMO-params-from-hostapd-to-hard.patch +++ b/package/kernel/mac80211/patches/ath11k/0039-wifi-ath11k-push-MU-MIMO-params-from-hostapd-to-hard.patch @@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -2699,6 +2699,117 @@ static int ath11k_setup_peer_smps(struct +@@ -2696,6 +2696,117 @@ static int ath11k_setup_peer_smps(struct ath11k_smps_map[smps]); } @@ -139,7 +139,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q static void ath11k_bss_assoc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf) -@@ -2709,6 +2820,7 @@ static void ath11k_bss_assoc(struct ieee +@@ -2706,6 +2817,7 @@ static void ath11k_bss_assoc(struct ieee struct ieee80211_sta *ap_sta; struct ath11k_peer *peer; bool is_auth = false; @@ -147,7 +147,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q int ret; lockdep_assert_held(&ar->conf_mutex); -@@ -2726,6 +2838,9 @@ static void ath11k_bss_assoc(struct ieee +@@ -2723,6 +2835,9 @@ static void ath11k_bss_assoc(struct ieee return; } @@ -157,7 +157,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q ath11k_peer_assoc_prepare(ar, vif, ap_sta, &peer_arg, false); rcu_read_unlock(); -@@ -2753,6 +2868,12 @@ static void ath11k_bss_assoc(struct ieee +@@ -2750,6 +2865,12 @@ static void ath11k_bss_assoc(struct ieee return; } @@ -170,7 +170,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q WARN_ON(arvif->is_up); arvif->aid = vif->cfg.aid; -@@ -3202,6 +3323,8 @@ static void ath11k_mac_op_bss_info_chang +@@ -3199,6 +3320,8 @@ static void ath11k_mac_op_bss_info_chang ether_addr_copy(arvif->bssid, info->bssid); if (changed & BSS_CHANGED_BEACON_ENABLED) { @@ -179,7 +179,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q ath11k_control_beaconing(arvif, info); if (arvif->is_up && vif->bss_conf.he_support && -@@ -5392,6 +5515,10 @@ static int ath11k_mac_copy_he_cap(struct +@@ -5389,6 +5512,10 @@ static int ath11k_mac_copy_he_cap(struct he_cap_elem->mac_cap_info[1] &= IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK; @@ -190,7 +190,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q he_cap_elem->phy_cap_info[5] &= ~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK; -@@ -6026,69 +6153,6 @@ ath11k_mac_setup_vdev_create_params(stru +@@ -6023,69 +6150,6 @@ ath11k_mac_setup_vdev_create_params(stru } } @@ -260,7 +260,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { -@@ -6757,7 +6821,6 @@ ath11k_mac_vdev_start_restart(struct ath +@@ -6754,7 +6818,6 @@ ath11k_mac_vdev_start_restart(struct ath struct ath11k_base *ab = ar->ab; struct wmi_vdev_start_req_arg arg = {}; const struct cfg80211_chan_def *chandef = &ctx->def; @@ -268,7 +268,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q int ret = 0; lockdep_assert_held(&ar->conf_mutex); -@@ -6798,15 +6861,6 @@ ath11k_mac_vdev_start_restart(struct ath +@@ -6795,15 +6858,6 @@ ath11k_mac_vdev_start_restart(struct ath spin_lock_bh(&ab->base_lock); arg.regdomain = ar->ab->dfs_region; spin_unlock_bh(&ab->base_lock); diff --git a/package/kernel/mac80211/patches/ath11k/0040-wifi-ath11k-move-HE-MCS-mapper-to-a-separate-functio.patch b/package/kernel/mac80211/patches/ath11k/0040-wifi-ath11k-move-HE-MCS-mapper-to-a-separate-functio.patch index 6bc9880e10..e8051c67ee 100644 --- a/package/kernel/mac80211/patches/ath11k/0040-wifi-ath11k-move-HE-MCS-mapper-to-a-separate-functio.patch +++ b/package/kernel/mac80211/patches/ath11k/0040-wifi-ath11k-move-HE-MCS-mapper-to-a-separate-functio.patch @@ -17,7 +17,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -5483,6 +5483,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c +@@ -5480,6 +5480,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c return cpu_to_le16(bcap->he_6ghz_capa); } @@ -45,7 +45,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q static int ath11k_mac_copy_he_cap(struct ath11k *ar, struct ath11k_pdev_cap *cap, struct ieee80211_sband_iftype_data *data, -@@ -5544,18 +5565,7 @@ static int ath11k_mac_copy_he_cap(struct +@@ -5541,18 +5562,7 @@ static int ath11k_mac_copy_he_cap(struct break; } diff --git a/package/kernel/mac80211/patches/ath11k/0041-wifi-ath11k-generate-rx-and-tx-mcs-maps-for-supporte.patch b/package/kernel/mac80211/patches/ath11k/0041-wifi-ath11k-generate-rx-and-tx-mcs-maps-for-supporte.patch index 5cb7801b29..a3af9867ec 100644 --- a/package/kernel/mac80211/patches/ath11k/0041-wifi-ath11k-generate-rx-and-tx-mcs-maps-for-supporte.patch +++ b/package/kernel/mac80211/patches/ath11k/0041-wifi-ath11k-generate-rx-and-tx-mcs-maps-for-supporte.patch @@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-5-git-send-email-quic_msinada@q --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -5488,20 +5488,36 @@ static void ath11k_mac_set_hemcsmap(stru +@@ -5485,20 +5485,36 @@ static void ath11k_mac_set_hemcsmap(stru struct ieee80211_sta_he_cap *he_cap, int band) { diff --git a/package/kernel/mac80211/patches/ath11k/0042-wifi-ath11k-Add-tx-ack-signal-support-for-management.patch b/package/kernel/mac80211/patches/ath11k/0042-wifi-ath11k-Add-tx-ack-signal-support-for-management.patch index 8d41657311..4acfb78be1 100644 --- a/package/kernel/mac80211/patches/ath11k/0042-wifi-ath11k-Add-tx-ack-signal-support-for-management.patch +++ b/package/kernel/mac80211/patches/ath11k/0042-wifi-ath11k-Add-tx-ack-signal-support-for-management.patch @@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20221219053844.4084486-1-quic_mkenna@quicinc.com static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw, --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -9174,6 +9174,11 @@ static int __ath11k_mac_register(struct +@@ -9179,6 +9179,11 @@ static int __ath11k_mac_register(struct goto err_free_if_combs; } diff --git a/package/kernel/mac80211/patches/ath11k/0044-wifi-ath11k-add-support-to-parse-new-WMI-event-for-6.patch b/package/kernel/mac80211/patches/ath11k/0044-wifi-ath11k-add-support-to-parse-new-WMI-event-for-6.patch index e165c09dc4..237182235d 100644 --- a/package/kernel/mac80211/patches/ath11k/0044-wifi-ath11k-add-support-to-parse-new-WMI-event-for-6.patch +++ b/package/kernel/mac80211/patches/ath11k/0044-wifi-ath11k-add-support-to-parse-new-WMI-event-for-6.patch @@ -568,7 +568,7 @@ Link: https://lore.kernel.org/r/20230110121024.14051-3-quic_adisi@quicinc.com kfree(reg_info); } return ret; -@@ -8054,7 +8437,10 @@ static void ath11k_wmi_tlv_op_rx(struct +@@ -8070,7 +8453,10 @@ static void ath11k_wmi_tlv_op_rx(struct ath11k_service_ready_ext2_event(ab, skb); break; case WMI_REG_CHAN_LIST_CC_EVENTID: diff --git a/package/kernel/mac80211/patches/ath11k/0047-wifi-ath11k-fix-deinitialization-of-firmware-resourc.patch b/package/kernel/mac80211/patches/ath11k/0047-wifi-ath11k-fix-deinitialization-of-firmware-resourc.patch deleted file mode 100644 index eec11f50e3..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0047-wifi-ath11k-fix-deinitialization-of-firmware-resourc.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5a78ac33e3cb8822da64dd1af196e83664b332b0 Mon Sep 17 00:00:00 2001 -From: Aditya Kumar Singh -Date: Thu, 9 Mar 2023 15:23:08 +0530 -Subject: [PATCH] wifi: ath11k: fix deinitialization of firmware resources - -Currently, in ath11k_ahb_fw_resources_init(), iommu domain -mapping is done only for the chipsets having fixed firmware -memory. Also, for such chipsets, mapping is done only if it -does not have TrustZone support. - -During deinitialization, only if TrustZone support is not there, -iommu is unmapped back. However, for non fixed firmware memory -chipsets, TrustZone support is not there and this makes the -condition check to true and it tries to unmap the memory which -was not mapped during initialization. - -This leads to the following trace - - -[ 83.198790] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 -[ 83.259537] Modules linked in: ath11k_ahb ath11k qmi_helpers -.. snip .. -[ 83.280286] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) -[ 83.287228] pc : __iommu_unmap+0x30/0x140 -[ 83.293907] lr : iommu_unmap+0x5c/0xa4 -[ 83.298072] sp : ffff80000b3abad0 -.. snip .. -[ 83.369175] Call trace: -[ 83.376282] __iommu_unmap+0x30/0x140 -[ 83.378541] iommu_unmap+0x5c/0xa4 -[ 83.382360] ath11k_ahb_fw_resource_deinit.part.12+0x2c/0xac [ath11k_ahb] -[ 83.385666] ath11k_ahb_free_resources+0x140/0x17c [ath11k_ahb] -[ 83.392521] ath11k_ahb_shutdown+0x34/0x40 [ath11k_ahb] -[ 83.398248] platform_shutdown+0x20/0x2c -[ 83.403455] device_shutdown+0x16c/0x1c4 -[ 83.407621] kernel_restart_prepare+0x34/0x3c -[ 83.411529] kernel_restart+0x14/0x74 -[ 83.415781] __do_sys_reboot+0x1c4/0x22c -[ 83.419427] __arm64_sys_reboot+0x1c/0x24 -[ 83.423420] invoke_syscall+0x44/0xfc -[ 83.427326] el0_svc_common.constprop.3+0xac/0xe8 -[ 83.430974] do_el0_svc+0xa0/0xa8 -[ 83.435659] el0_svc+0x1c/0x44 -[ 83.438957] el0t_64_sync_handler+0x60/0x144 -[ 83.441910] el0t_64_sync+0x15c/0x160 -[ 83.446343] Code: aa0103f4 f9400001 f90027a1 d2800001 (f94006a0) -[ 83.449903] ---[ end trace 0000000000000000 ]--- - -This can be reproduced by probing an AHB chipset which is not -having a fixed memory region. During reboot (or rmmod) trace -can be seen. - -Fix this issue by adding a condition check on firmware fixed memory -hw_param as done in the counter initialization function. - -Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 - -Fixes: f9eec4947add ("ath11k: Add support for targets without trustzone") -Signed-off-by: Aditya Kumar Singh -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230309095308.24937-1-quic_adisi@quicinc.com ---- - drivers/net/wireless/ath/ath11k/ahb.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/net/wireless/ath/ath11k/ahb.c -+++ b/drivers/net/wireless/ath/ath11k/ahb.c -@@ -1078,6 +1078,12 @@ static int ath11k_ahb_fw_resource_deinit - struct iommu_domain *iommu; - size_t unmapped_size; - -+ /* Chipsets not requiring MSA would have not initialized -+ * MSA resources, return success in such cases. -+ */ -+ if (!ab->hw_params.fixed_fw_mem) -+ return 0; -+ - if (ab_ahb->fw.use_tz) - return 0; - diff --git a/package/kernel/mac80211/patches/ath11k/0048-wifi-ath11k-fix-BUFFER_DONE-read-on-monitor-ring-rx-.patch b/package/kernel/mac80211/patches/ath11k/0048-wifi-ath11k-fix-BUFFER_DONE-read-on-monitor-ring-rx-.patch index 3e22645331..57f0aea88f 100644 --- a/package/kernel/mac80211/patches/ath11k/0048-wifi-ath11k-fix-BUFFER_DONE-read-on-monitor-ring-rx-.patch +++ b/package/kernel/mac80211/patches/ath11k/0048-wifi-ath11k-fix-BUFFER_DONE-read-on-monitor-ring-rx-.patch @@ -65,7 +65,7 @@ Link: https://lore.kernel.org/r/20230309164434.32660-1-quic_hprem@quicinc.com return 0; } -@@ -3029,39 +3006,51 @@ static int ath11k_dp_rx_reap_mon_status_ +@@ -3038,39 +3015,51 @@ static int ath11k_dp_rx_reap_mon_status_ spin_lock_bh(&rx_ring->idr_lock); skb = idr_find(&rx_ring->bufs_idr, buf_id); diff --git a/package/kernel/mac80211/patches/ath11k/0049-wifi-ath11k-Optimize-6-GHz-scan-time.patch b/package/kernel/mac80211/patches/ath11k/0049-wifi-ath11k-Optimize-6-GHz-scan-time.patch index f468990feb..9de6c90733 100644 --- a/package/kernel/mac80211/patches/ath11k/0049-wifi-ath11k-Optimize-6-GHz-scan-time.patch +++ b/package/kernel/mac80211/patches/ath11k/0049-wifi-ath11k-Optimize-6-GHz-scan-time.patch @@ -47,7 +47,7 @@ Link: https://lore.kernel.org/r/20230323060913.10097-1-quic_mpubbise@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -3819,8 +3819,29 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3816,8 +3816,29 @@ static int ath11k_mac_op_hw_scan(struct goto exit; } diff --git a/package/kernel/mac80211/patches/ath11k/0050-wifi-ath11k-Configure-the-FTM-responder-role-using-f.patch b/package/kernel/mac80211/patches/ath11k/0050-wifi-ath11k-Configure-the-FTM-responder-role-using-f.patch index bca08b177f..94e00cd66c 100644 --- a/package/kernel/mac80211/patches/ath11k/0050-wifi-ath11k-Configure-the-FTM-responder-role-using-f.patch +++ b/package/kernel/mac80211/patches/ath11k/0050-wifi-ath11k-Configure-the-FTM-responder-role-using-f.patch @@ -97,7 +97,7 @@ Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com struct ath11k_hw_ops { --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -3538,7 +3538,7 @@ static void ath11k_mac_op_bss_info_chang +@@ -3535,7 +3535,7 @@ static void ath11k_mac_op_bss_info_chang if (changed & BSS_CHANGED_FTM_RESPONDER && arvif->ftm_responder != info->ftm_responder && @@ -106,7 +106,7 @@ Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com (vif->type == NL80211_IFTYPE_AP || vif->type == NL80211_IFTYPE_MESH_POINT)) { arvif->ftm_responder = info->ftm_responder; -@@ -9234,7 +9234,7 @@ static int __ath11k_mac_register(struct +@@ -9239,7 +9239,7 @@ static int __ath11k_mac_register(struct wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL); diff --git a/package/kernel/mac80211/patches/ath11k/0053-wifi-ath11k-fix-writing-to-unintended-memory-region.patch b/package/kernel/mac80211/patches/ath11k/0053-wifi-ath11k-fix-writing-to-unintended-memory-region.patch deleted file mode 100644 index 7b8a7d4543..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0053-wifi-ath11k-fix-writing-to-unintended-memory-region.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 756a7f90878f0866fd2fe167ef37e90b47326b96 Mon Sep 17 00:00:00 2001 -From: P Praneesh -Date: Fri, 24 Mar 2023 16:57:01 +0200 -Subject: [PATCH] wifi: ath11k: fix writing to unintended memory region - -While initializing spectral, the magic value is getting written to the -invalid memory address leading to random boot-up crash. This occurs -due to the incorrect index increment in ath11k_dbring_fill_magic_value -function. Fix it by replacing the existing logic with memset32 to ensure -there is no invalid memory access. - -Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1 - -Fixes: d3d358efc553 ("ath11k: add spectral/CFR buffer validation support") -Signed-off-by: P Praneesh -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230321052900.16895-1-quic_ppranees@quicinc.com ---- - drivers/net/wireless/ath/ath11k/dbring.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - ---- a/drivers/net/wireless/ath/ath11k/dbring.c -+++ b/drivers/net/wireless/ath/ath11k/dbring.c -@@ -26,13 +26,13 @@ int ath11k_dbring_validate_buffer(struct - static void ath11k_dbring_fill_magic_value(struct ath11k *ar, - void *buffer, u32 size) - { -- u32 *temp; -- int idx; -+ /* memset32 function fills buffer payload with the ATH11K_DB_MAGIC_VALUE -+ * and the variable size is expected to be the number of u32 values -+ * to be stored, not the number of bytes. -+ */ -+ size = size / sizeof(u32); - -- size = size >> 2; -- -- for (idx = 0, temp = buffer; idx < size; idx++, temp++) -- *temp++ = ATH11K_DB_MAGIC_VALUE; -+ memset32(buffer, ATH11K_DB_MAGIC_VALUE, size); - } - - static int ath11k_dbring_bufs_replenish(struct ath11k *ar, diff --git a/package/kernel/mac80211/patches/ath11k/0054-wifi-ath11k-Send-11d-scan-start-before-WMI_START_SCA.patch b/package/kernel/mac80211/patches/ath11k/0054-wifi-ath11k-Send-11d-scan-start-before-WMI_START_SCA.patch index 0f8e637592..a516a08b8c 100644 --- a/package/kernel/mac80211/patches/ath11k/0054-wifi-ath11k-Send-11d-scan-start-before-WMI_START_SCA.patch +++ b/package/kernel/mac80211/patches/ath11k/0054-wifi-ath11k-Send-11d-scan-start-before-WMI_START_SCA.patch @@ -30,7 +30,7 @@ Link: https://lore.kernel.org/r/20230315161817.29627-1-quic_mpubbise@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -3755,6 +3755,18 @@ static int ath11k_mac_op_hw_scan(struct +@@ -3752,6 +3752,18 @@ static int ath11k_mac_op_hw_scan(struct int i; u32 scan_timeout; diff --git a/package/kernel/mac80211/patches/ath11k/0055-wifi-ath11k-Remove-redundant-pci_clear_master.patch b/package/kernel/mac80211/patches/ath11k/0055-wifi-ath11k-Remove-redundant-pci_clear_master.patch index 0439727e72..c2fc1922cf 100644 --- a/package/kernel/mac80211/patches/ath11k/0055-wifi-ath11k-Remove-redundant-pci_clear_master.patch +++ b/package/kernel/mac80211/patches/ath11k/0055-wifi-ath11k-Remove-redundant-pci_clear_master.patch @@ -30,7 +30,7 @@ Link: https://lore.kernel.org/r/20230323112613.7550-1-cai.huoqing@linux.dev --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -540,7 +540,7 @@ static int ath11k_pci_claim(struct ath11 +@@ -544,7 +544,7 @@ static int ath11k_pci_claim(struct ath11 if (!ab->mem) { ath11k_err(ab, "failed to map pci bar %d\n", ATH11K_PCI_BAR_NUM); ret = -EIO; @@ -39,7 +39,7 @@ Link: https://lore.kernel.org/r/20230323112613.7550-1-cai.huoqing@linux.dev } ab->mem_ce = ab->mem; -@@ -548,8 +548,6 @@ static int ath11k_pci_claim(struct ath11 +@@ -552,8 +552,6 @@ static int ath11k_pci_claim(struct ath11 ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot pci_mem 0x%pK\n", ab->mem); return 0; @@ -48,7 +48,7 @@ Link: https://lore.kernel.org/r/20230323112613.7550-1-cai.huoqing@linux.dev release_region: pci_release_region(pdev, ATH11K_PCI_BAR_NUM); disable_device: -@@ -565,7 +563,6 @@ static void ath11k_pci_free_region(struc +@@ -569,7 +567,6 @@ static void ath11k_pci_free_region(struc pci_iounmap(pci_dev, ab->mem); ab->mem = NULL; diff --git a/package/kernel/mac80211/patches/ath11k/0056-wifi-ath11k-Disable-Spectral-scan-upon-removing-inte.patch b/package/kernel/mac80211/patches/ath11k/0056-wifi-ath11k-Disable-Spectral-scan-upon-removing-inte.patch index 44532a4d72..e58e9f296d 100644 --- a/package/kernel/mac80211/patches/ath11k/0056-wifi-ath11k-Disable-Spectral-scan-upon-removing-inte.patch +++ b/package/kernel/mac80211/patches/ath11k/0056-wifi-ath11k-Disable-Spectral-scan-upon-removing-inte.patch @@ -22,7 +22,7 @@ Link: https://lore.kernel.org/r/20230328071150.29645-1-quic_tamizhr@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -6685,6 +6685,11 @@ static void ath11k_mac_op_remove_interfa +@@ -6682,6 +6682,11 @@ static void ath11k_mac_op_remove_interfa ath11k_dbg(ab, ATH11K_DBG_MAC, "mac remove interface (vdev %d)\n", arvif->vdev_id); diff --git a/package/kernel/mac80211/patches/ath11k/0058-wifi-ath11k-pci-Add-more-MODULE_FIRMWARE-entries.patch b/package/kernel/mac80211/patches/ath11k/0058-wifi-ath11k-pci-Add-more-MODULE_FIRMWARE-entries.patch index 585864eff2..334aff40d8 100644 --- a/package/kernel/mac80211/patches/ath11k/0058-wifi-ath11k-pci-Add-more-MODULE_FIRMWARE-entries.patch +++ b/package/kernel/mac80211/patches/ath11k/0058-wifi-ath11k-pci-Add-more-MODULE_FIRMWARE-entries.patch @@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20230330143718.19511-1-tiwai@suse.de --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -1036,7 +1036,8 @@ module_exit(ath11k_pci_exit); +@@ -1042,7 +1042,8 @@ module_exit(ath11k_pci_exit); MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices"); MODULE_LICENSE("Dual BSD/GPL"); diff --git a/package/kernel/mac80211/patches/ath11k/0059-wifi-ath11k-print-a-warning-when-crypto_alloc_shash-.patch b/package/kernel/mac80211/patches/ath11k/0059-wifi-ath11k-print-a-warning-when-crypto_alloc_shash-.patch index fab52a0fa7..7a0c8c7585 100644 --- a/package/kernel/mac80211/patches/ath11k/0059-wifi-ath11k-print-a-warning-when-crypto_alloc_shash-.patch +++ b/package/kernel/mac80211/patches/ath11k/0059-wifi-ath11k-print-a-warning-when-crypto_alloc_shash-.patch @@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c -@@ -3106,8 +3106,11 @@ int ath11k_peer_rx_frag_setup(struct ath +@@ -3115,8 +3115,11 @@ int ath11k_peer_rx_frag_setup(struct ath int i; tfm = crypto_alloc_shash("michael_mic", 0, 0); diff --git a/package/kernel/mac80211/patches/ath11k/0060-wifi-ath11k-Ignore-frags-from-uninitialized-peer-in-.patch b/package/kernel/mac80211/patches/ath11k/0060-wifi-ath11k-Ignore-frags-from-uninitialized-peer-in-.patch deleted file mode 100644 index 5bbf9e04a4..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0060-wifi-ath11k-Ignore-frags-from-uninitialized-peer-in-.patch +++ /dev/null @@ -1,104 +0,0 @@ -From a06bfb3c9f69f303692cdae87bc0899d2ae8b2a6 Mon Sep 17 00:00:00 2001 -From: Harshitha Prem -Date: Tue, 4 Apr 2023 00:11:54 +0530 -Subject: [PATCH] wifi: ath11k: Ignore frags from uninitialized peer in dp. - -When max virtual ap interfaces are configured in all the bands with -ACS and hostapd restart is done every 60s, a crash is observed at -random times. -In this certain scenario, a fragmented packet is received for -self peer, for which rx_tid and rx_frags are not initialized in -datapath. While handling this fragment, crash is observed as the -rx_frag list is uninitialised and when we walk in -ath11k_dp_rx_h_sort_frags, skb null leads to exception. - -To address this, before processing received fragments we check -dp_setup_done flag is set to ensure that peer has completed its -dp peer setup for fragment queue, else ignore processing the -fragments. - -Call trace: - ath11k_dp_process_rx_err+0x550/0x1084 [ath11k] - ath11k_dp_service_srng+0x70/0x370 [ath11k] - 0xffffffc009693a04 - __napi_poll+0x30/0xa4 - net_rx_action+0x118/0x270 - __do_softirq+0x10c/0x244 - irq_exit+0x64/0xb4 - __handle_domain_irq+0x88/0xac - gic_handle_irq+0x74/0xbc - el1_irq+0xf0/0x1c0 - arch_cpu_idle+0x10/0x18 - do_idle+0x104/0x248 - cpu_startup_entry+0x20/0x64 - rest_init+0xd0/0xdc - arch_call_rest_init+0xc/0x14 - start_kernel+0x480/0x4b8 - Code: f9400281 f94066a2 91405021 b94a0023 (f9406401) - -Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 - -Signed-off-by: Harshitha Prem -Signed-off-by: Nagarajan Maran -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230403184155.8670-2-quic_nmaran@quicinc.com ---- - drivers/net/wireless/ath/ath11k/dp.c | 4 +++- - drivers/net/wireless/ath/ath11k/dp_rx.c | 8 ++++++++ - drivers/net/wireless/ath/ath11k/peer.h | 1 + - 3 files changed, 12 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/ath/ath11k/dp.c -+++ b/drivers/net/wireless/ath/ath11k/dp.c -@@ -36,6 +36,7 @@ void ath11k_dp_peer_cleanup(struct ath11 - } - - ath11k_peer_rx_tid_cleanup(ar, peer); -+ peer->dp_setup_done = false; - crypto_free_shash(peer->tfm_mmic); - spin_unlock_bh(&ab->base_lock); - } -@@ -72,7 +73,8 @@ int ath11k_dp_peer_setup(struct ath11k * - ret = ath11k_peer_rx_frag_setup(ar, addr, vdev_id); - if (ret) { - ath11k_warn(ab, "failed to setup rx defrag context\n"); -- return ret; -+ tid--; -+ goto peer_clean; - } - - /* TODO: Setup other peer specific resource used in data path */ ---- a/drivers/net/wireless/ath/ath11k/dp_rx.c -+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c -@@ -3130,6 +3130,7 @@ int ath11k_peer_rx_frag_setup(struct ath - } - - peer->tfm_mmic = tfm; -+ peer->dp_setup_done = true; - spin_unlock_bh(&ab->base_lock); - - return 0; -@@ -3575,6 +3576,13 @@ static int ath11k_dp_rx_frag_h_mpdu(stru - ret = -ENOENT; - goto out_unlock; - } -+ if (!peer->dp_setup_done) { -+ ath11k_warn(ab, "The peer %pM [%d] has uninitialized datapath\n", -+ peer->addr, peer_id); -+ ret = -ENOENT; -+ goto out_unlock; -+ } -+ - rx_tid = &peer->rx_tid[tid]; - - if ((!skb_queue_empty(&rx_tid->rx_frags) && seqno != rx_tid->cur_sn) || ---- a/drivers/net/wireless/ath/ath11k/peer.h -+++ b/drivers/net/wireless/ath/ath11k/peer.h -@@ -35,6 +35,7 @@ struct ath11k_peer { - u16 sec_type; - u16 sec_type_grp; - bool is_authorized; -+ bool dp_setup_done; - }; - - void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id); diff --git a/package/kernel/mac80211/patches/ath11k/0061-wifi-ath11k-fix-undefined-behavior-with-__fls-in-dp.patch b/package/kernel/mac80211/patches/ath11k/0061-wifi-ath11k-fix-undefined-behavior-with-__fls-in-dp.patch index d68c19f160..508a813189 100644 --- a/package/kernel/mac80211/patches/ath11k/0061-wifi-ath11k-fix-undefined-behavior-with-__fls-in-dp.patch +++ b/package/kernel/mac80211/patches/ath11k/0061-wifi-ath11k-fix-undefined-behavior-with-__fls-in-dp.patch @@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230403184155.8670-3-quic_nmaran@quicinc.com --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c -@@ -3598,7 +3598,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru +@@ -3607,7 +3607,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru goto out_unlock; } diff --git a/package/kernel/mac80211/patches/ath11k/0065-wifi-ath11k-fix-tx-status-reporting-in-encap-offload.patch b/package/kernel/mac80211/patches/ath11k/0065-wifi-ath11k-fix-tx-status-reporting-in-encap-offload.patch deleted file mode 100644 index e2fe419158..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0065-wifi-ath11k-fix-tx-status-reporting-in-encap-offload.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 6257c702264c44d74c6b71f0c62a7665da2dc356 Mon Sep 17 00:00:00 2001 -From: Pradeep Kumar Chitrapu -Date: Mon, 17 Apr 2023 13:35:02 +0300 -Subject: [PATCH] wifi: ath11k: fix tx status reporting in encap offload mode - -ieee80211_tx_status() treats packets in 802.11 frame format and -tries to extract sta address from packet header. When tx encap -offload is enabled, this becomes invalid operation. Hence, switch -to using ieee80211_tx_status_ext() after filling in station -address for handling both 802.11 and 802.3 frames. - -Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 - -Signed-off-by: Pradeep Kumar Chitrapu -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230403195738.25367-2-quic_pradeepc@quicinc.com ---- - drivers/net/wireless/ath/ath11k/dp.h | 4 +++ - drivers/net/wireless/ath/ath11k/dp_tx.c | 33 ++++++++++++++++++++++++- - drivers/net/wireless/ath/ath11k/dp_tx.h | 1 + - 3 files changed, 37 insertions(+), 1 deletion(-) - ---- a/drivers/net/wireless/ath/ath11k/dp.h -+++ b/drivers/net/wireless/ath/ath11k/dp.h -@@ -303,12 +303,16 @@ struct ath11k_dp { - - #define HTT_TX_WBM_COMP_STATUS_OFFSET 8 - -+#define HTT_INVALID_PEER_ID 0xffff -+ - /* HTT tx completion is overlaid in wbm_release_ring */ - #define HTT_TX_WBM_COMP_INFO0_STATUS GENMASK(12, 9) - #define HTT_TX_WBM_COMP_INFO0_REINJECT_REASON GENMASK(16, 13) - #define HTT_TX_WBM_COMP_INFO0_REINJECT_REASON GENMASK(16, 13) - - #define HTT_TX_WBM_COMP_INFO1_ACK_RSSI GENMASK(31, 24) -+#define HTT_TX_WBM_COMP_INFO2_SW_PEER_ID GENMASK(15, 0) -+#define HTT_TX_WBM_COMP_INFO2_VALID BIT(21) - - struct htt_tx_wbm_completion { - u32 info0; ---- a/drivers/net/wireless/ath/ath11k/dp_tx.c -+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c -@@ -316,10 +316,12 @@ ath11k_dp_tx_htt_tx_complete_buf(struct - struct dp_tx_ring *tx_ring, - struct ath11k_dp_htt_wbm_tx_status *ts) - { -+ struct ieee80211_tx_status status = { 0 }; - struct sk_buff *msdu; - struct ieee80211_tx_info *info; - struct ath11k_skb_cb *skb_cb; - struct ath11k *ar; -+ struct ath11k_peer *peer; - - spin_lock(&tx_ring->tx_idr_lock); - msdu = idr_remove(&tx_ring->txbuf_idr, ts->msdu_id); -@@ -341,6 +343,11 @@ ath11k_dp_tx_htt_tx_complete_buf(struct - - dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); - -+ if (!skb_cb->vif) { -+ dev_kfree_skb_any(msdu); -+ return; -+ } -+ - memset(&info->status, 0, sizeof(info->status)); - - if (ts->acked) { -@@ -355,7 +362,23 @@ ath11k_dp_tx_htt_tx_complete_buf(struct - } - } - -- ieee80211_tx_status(ar->hw, msdu); -+ spin_lock_bh(&ab->base_lock); -+ peer = ath11k_peer_find_by_id(ab, ts->peer_id); -+ if (!peer || !peer->sta) { -+ ath11k_dbg(ab, ATH11K_DBG_DATA, -+ "dp_tx: failed to find the peer with peer_id %d\n", -+ ts->peer_id); -+ spin_unlock_bh(&ab->base_lock); -+ dev_kfree_skb_any(msdu); -+ return; -+ } -+ spin_unlock_bh(&ab->base_lock); -+ -+ status.sta = peer->sta; -+ status.info = info; -+ status.skb = msdu; -+ -+ ieee80211_tx_status_ext(ar->hw, &status); - } - - static void -@@ -379,7 +402,15 @@ ath11k_dp_tx_process_htt_tx_complete(str - ts.msdu_id = msdu_id; - ts.ack_rssi = FIELD_GET(HTT_TX_WBM_COMP_INFO1_ACK_RSSI, - status_desc->info1); -+ -+ if (FIELD_GET(HTT_TX_WBM_COMP_INFO2_VALID, status_desc->info2)) -+ ts.peer_id = FIELD_GET(HTT_TX_WBM_COMP_INFO2_SW_PEER_ID, -+ status_desc->info2); -+ else -+ ts.peer_id = HTT_INVALID_PEER_ID; -+ - ath11k_dp_tx_htt_tx_complete_buf(ab, tx_ring, &ts); -+ - break; - case HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ: - case HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT: ---- a/drivers/net/wireless/ath/ath11k/dp_tx.h -+++ b/drivers/net/wireless/ath/ath11k/dp_tx.h -@@ -13,6 +13,7 @@ struct ath11k_dp_htt_wbm_tx_status { - u32 msdu_id; - bool acked; - int ack_rssi; -+ u16 peer_id; - }; - - void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts); diff --git a/package/kernel/mac80211/patches/ath11k/0067-wifi-ath11k-Fix-SKB-corruption-in-REO-destination-ri.patch b/package/kernel/mac80211/patches/ath11k/0067-wifi-ath11k-Fix-SKB-corruption-in-REO-destination-ri.patch deleted file mode 100644 index 8b300f3a79..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0067-wifi-ath11k-Fix-SKB-corruption-in-REO-destination-ri.patch +++ /dev/null @@ -1,70 +0,0 @@ -From f9fff67d2d7ca6fa8066132003a3deef654c55b1 Mon Sep 17 00:00:00 2001 -From: Nagarajan Maran -Date: Mon, 17 Apr 2023 13:35:02 +0300 -Subject: [PATCH] wifi: ath11k: Fix SKB corruption in REO destination ring - -While running traffics for a long time, randomly an RX descriptor -filled with value "0" from REO destination ring is received. -This descriptor which is invalid causes the wrong SKB (SKB stored in -the IDR lookup with buffer id "0") to be fetched which in turn -causes SKB memory corruption issue and the same leads to crash -after some time. - -Changed the start id for idr allocation to "1" and the buffer id "0" -is reserved for error validation. Introduced Sanity check to validate -the descriptor, before processing the SKB. - -Crash Signature : - -Unable to handle kernel paging request at virtual address 3f004900 -PC points to "b15_dma_inv_range+0x30/0x50" -LR points to "dma_cache_maint_page+0x8c/0x128". -The Backtrace obtained is as follows: -[<8031716c>] (b15_dma_inv_range) from [<80313a4c>] (dma_cache_maint_page+0x8c/0x128) -[<80313a4c>] (dma_cache_maint_page) from [<80313b90>] (__dma_page_dev_to_cpu+0x28/0xcc) -[<80313b90>] (__dma_page_dev_to_cpu) from [<7fb5dd68>] (ath11k_dp_process_rx+0x1e8/0x4a4 [ath11k]) -[<7fb5dd68>] (ath11k_dp_process_rx [ath11k]) from [<7fb53c20>] (ath11k_dp_service_srng+0xb0/0x2ac [ath11k]) -[<7fb53c20>] (ath11k_dp_service_srng [ath11k]) from [<7f67bba4>] (ath11k_pci_ext_grp_napi_poll+0x1c/0x78 [ath11k_pci]) -[<7f67bba4>] (ath11k_pci_ext_grp_napi_poll [ath11k_pci]) from [<807d5cf4>] (__napi_poll+0x28/0xb8) -[<807d5cf4>] (__napi_poll) from [<807d5f28>] (net_rx_action+0xf0/0x280) -[<807d5f28>] (net_rx_action) from [<80302148>] (__do_softirq+0xd0/0x280) -[<80302148>] (__do_softirq) from [<80320408>] (irq_exit+0x74/0xd4) -[<80320408>] (irq_exit) from [<803638a4>] (__handle_domain_irq+0x90/0xb4) -[<803638a4>] (__handle_domain_irq) from [<805bedec>] (gic_handle_irq+0x58/0x90) -[<805bedec>] (gic_handle_irq) from [<80301a78>] (__irq_svc+0x58/0x8c) - -Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 - -Signed-off-by: Nagarajan Maran -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230403191533.28114-1-quic_nmaran@quicinc.com ---- - drivers/net/wireless/ath/ath11k/dp_rx.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - ---- a/drivers/net/wireless/ath/ath11k/dp_rx.c -+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c -@@ -389,10 +389,10 @@ int ath11k_dp_rxbufs_replenish(struct at - goto fail_free_skb; - - spin_lock_bh(&rx_ring->idr_lock); -- buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 0, -- rx_ring->bufs_max * 3, GFP_ATOMIC); -+ buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 1, -+ (rx_ring->bufs_max * 3) + 1, GFP_ATOMIC); - spin_unlock_bh(&rx_ring->idr_lock); -- if (buf_id < 0) -+ if (buf_id <= 0) - goto fail_dma_unmap; - - desc = ath11k_hal_srng_src_get_next_entry(ab, srng); -@@ -2665,6 +2665,9 @@ try_again: - cookie); - mac_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_PDEV_ID, cookie); - -+ if (unlikely(buf_id == 0)) -+ continue; -+ - ar = ab->pdevs[mac_id].ar; - rx_ring = &ar->dp.rx_refill_buf_ring; - spin_lock_bh(&rx_ring->idr_lock); diff --git a/package/kernel/mac80211/patches/ath11k/0068-wifi-ath11k-Remove-disabling-of-80-80-and-160-MHz.patch b/package/kernel/mac80211/patches/ath11k/0068-wifi-ath11k-Remove-disabling-of-80-80-and-160-MHz.patch index ce5ffd273b..85ca7ae36a 100644 --- a/package/kernel/mac80211/patches/ath11k/0068-wifi-ath11k-Remove-disabling-of-80-80-and-160-MHz.patch +++ b/package/kernel/mac80211/patches/ath11k/0068-wifi-ath11k-Remove-disabling-of-80-80-and-160-MHz.patch @@ -24,7 +24,7 @@ Link: https://lore.kernel.org/r/1681762947-13882-1-git-send-email-quic_msinada@q --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -5585,10 +5585,6 @@ static int ath11k_mac_copy_he_cap(struct +@@ -5582,10 +5582,6 @@ static int ath11k_mac_copy_he_cap(struct he_cap_elem->mac_cap_info[1] &= IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK; diff --git a/package/kernel/mac80211/patches/ath11k/0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch b/package/kernel/mac80211/patches/ath11k/0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch deleted file mode 100644 index 32468dbc4c..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch +++ /dev/null @@ -1,61 +0,0 @@ -From e2ceb1de2f83aafd8003f0b72dfd4b7441e97d14 Mon Sep 17 00:00:00 2001 -From: Maxime Bizon -Date: Fri, 21 Apr 2023 16:54:45 +0200 -Subject: [PATCH] wifi: ath11k: fix registration of 6Ghz-only phy without the - full channel range - -Because of what seems to be a typo, a 6Ghz-only phy for which the BDF -does not allow the 7115Mhz channel will fail to register: - - WARNING: CPU: 2 PID: 106 at net/wireless/core.c:907 wiphy_register+0x914/0x954 - Modules linked in: ath11k_pci sbsa_gwdt - CPU: 2 PID: 106 Comm: kworker/u8:5 Not tainted 6.3.0-rc7-next-20230418-00549-g1e096a17625a-dirty #9 - Hardware name: Freebox V7R Board (DT) - Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work - pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) - pc : wiphy_register+0x914/0x954 - lr : ieee80211_register_hw+0x67c/0xc10 - sp : ffffff800b123aa0 - x29: ffffff800b123aa0 x28: 0000000000000000 x27: 0000000000000000 - x26: 0000000000000000 x25: 0000000000000006 x24: ffffffc008d51418 - x23: ffffffc008cb0838 x22: ffffff80176c2460 x21: 0000000000000168 - x20: ffffff80176c0000 x19: ffffff80176c03e0 x18: 0000000000000014 - x17: 00000000cbef338c x16: 00000000d2a26f21 x15: 00000000ad6bb85f - x14: 0000000000000020 x13: 0000000000000020 x12: 00000000ffffffbd - x11: 0000000000000208 x10: 00000000fffffdf7 x9 : ffffffc009394718 - x8 : ffffff80176c0528 x7 : 000000007fffffff x6 : 0000000000000006 - x5 : 0000000000000005 x4 : ffffff800b304284 x3 : ffffff800b304284 - x2 : ffffff800b304d98 x1 : 0000000000000000 x0 : 0000000000000000 - Call trace: - wiphy_register+0x914/0x954 - ieee80211_register_hw+0x67c/0xc10 - ath11k_mac_register+0x7c4/0xe10 - ath11k_core_qmi_firmware_ready+0x1f4/0x570 - ath11k_qmi_driver_event_work+0x198/0x590 - process_one_work+0x1b8/0x328 - worker_thread+0x6c/0x414 - kthread+0x100/0x104 - ret_from_fork+0x10/0x20 - ---[ end trace 0000000000000000 ]--- - ath11k_pci 0002:01:00.0: ieee80211 registration failed: -22 - ath11k_pci 0002:01:00.0: failed register the radio with mac80211: -22 - ath11k_pci 0002:01:00.0: failed to create pdev core: -22 - -Signed-off-by: Maxime Bizon -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230421145445.2612280-1-mbizon@freebox.fr ---- - drivers/net/wireless/ath/ath11k/mac.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ath/ath11k/mac.c -+++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -8892,7 +8892,7 @@ static int ath11k_mac_setup_channels_rat - } - - if (supported_bands & WMI_HOST_WLAN_5G_CAP) { -- if (reg_cap->high_5ghz_chan >= ATH11K_MAX_6G_FREQ) { -+ if (reg_cap->high_5ghz_chan >= ATH11K_MIN_6G_FREQ) { - channels = kmemdup(ath11k_6ghz_channels, - sizeof(ath11k_6ghz_channels), GFP_KERNEL); - if (!channels) { diff --git a/package/kernel/mac80211/patches/ath11k/0070-wifi-ath-work-around-false-positive-stringop-overrea.patch b/package/kernel/mac80211/patches/ath11k/0070-wifi-ath-work-around-false-positive-stringop-overrea.patch index aa4df16a90..faf3d88f47 100644 --- a/package/kernel/mac80211/patches/ath11k/0070-wifi-ath-work-around-false-positive-stringop-overrea.patch +++ b/package/kernel/mac80211/patches/ath11k/0070-wifi-ath-work-around-false-positive-stringop-overrea.patch @@ -55,7 +55,7 @@ Link: https://lore.kernel.org/r/20230417205447.1800912-1-arnd@kernel.org { int nss; -@@ -1658,7 +1658,7 @@ static void ath11k_peer_assoc_h_rates(st +@@ -1651,7 +1651,7 @@ static void ath11k_peer_assoc_h_rates(st } static bool @@ -64,7 +64,7 @@ Link: https://lore.kernel.org/r/20230417205447.1800912-1-arnd@kernel.org { int nss; -@@ -1670,7 +1670,7 @@ ath11k_peer_assoc_h_ht_masked(const u8 h +@@ -1663,7 +1663,7 @@ ath11k_peer_assoc_h_ht_masked(const u8 h } static bool @@ -73,7 +73,7 @@ Link: https://lore.kernel.org/r/20230417205447.1800912-1-arnd@kernel.org { int nss; -@@ -2065,7 +2065,7 @@ static u16 ath11k_peer_assoc_h_he_limit( +@@ -2058,7 +2058,7 @@ static u16 ath11k_peer_assoc_h_he_limit( } static bool diff --git a/package/kernel/mac80211/patches/ath11k/0071-wifi-ath11k-driver-settings-for-MBSSID-and-EMA.patch b/package/kernel/mac80211/patches/ath11k/0071-wifi-ath11k-driver-settings-for-MBSSID-and-EMA.patch index bede4819ca..6ea754d131 100644 --- a/package/kernel/mac80211/patches/ath11k/0071-wifi-ath11k-driver-settings-for-MBSSID-and-EMA.patch +++ b/package/kernel/mac80211/patches/ath11k/0071-wifi-ath11k-driver-settings-for-MBSSID-and-EMA.patch @@ -56,7 +56,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com #define ATH11K_QUEUE_LEN 4096 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -9001,19 +9001,23 @@ static int ath11k_mac_setup_iface_combin +@@ -9006,19 +9006,23 @@ static int ath11k_mac_setup_iface_combin static const u8 ath11k_if_types_ext_capa[] = { [0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING, @@ -80,7 +80,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com }; static const struct wiphy_iftype_ext_capab ath11k_iftypes_ext_capa[] = { -@@ -9251,6 +9255,9 @@ static int __ath11k_mac_register(struct +@@ -9256,6 +9260,9 @@ static int __ath11k_mac_register(struct wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER); diff --git a/package/kernel/mac80211/patches/ath11k/0072-wifi-ath11k-MBSSID-configuration-during-vdev-create-.patch b/package/kernel/mac80211/patches/ath11k/0072-wifi-ath11k-MBSSID-configuration-during-vdev-create-.patch index 4ba0717319..90f92ab31f 100644 --- a/package/kernel/mac80211/patches/ath11k/0072-wifi-ath11k-MBSSID-configuration-during-vdev-create-.patch +++ b/package/kernel/mac80211/patches/ath11k/0072-wifi-ath11k-MBSSID-configuration-during-vdev-create-.patch @@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -6181,17 +6181,62 @@ static void ath11k_mac_op_stop(struct ie +@@ -6178,17 +6178,62 @@ static void ath11k_mac_op_stop(struct ie atomic_set(&ar->num_pending_mgmt_tx, 0); } @@ -89,7 +89,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) { params->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains; -@@ -6206,6 +6251,7 @@ ath11k_mac_setup_vdev_create_params(stru +@@ -6203,6 +6248,7 @@ ath11k_mac_setup_vdev_create_params(stru params->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains; params->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains; } @@ -97,7 +97,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com } static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw, -@@ -6500,7 +6546,12 @@ static int ath11k_mac_op_add_interface(s +@@ -6497,7 +6543,12 @@ static int ath11k_mac_op_add_interface(s for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++) vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES - 1); @@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com ret = ath11k_wmi_vdev_create(ar, vif->addr, &vdev_param); if (ret) { -@@ -6905,6 +6956,17 @@ ath11k_mac_vdev_start_restart(struct ath +@@ -6902,6 +6953,17 @@ ath11k_mac_vdev_start_restart(struct ath arg.pref_tx_streams = ar->num_tx_chains; arg.pref_rx_streams = ar->num_rx_chains; diff --git a/package/kernel/mac80211/patches/ath11k/0074-wifi-ath11k-MBSSID-parameter-configuration-in-AP-mod.patch b/package/kernel/mac80211/patches/ath11k/0074-wifi-ath11k-MBSSID-parameter-configuration-in-AP-mod.patch index d93e27dd42..44286f79cc 100644 --- a/package/kernel/mac80211/patches/ath11k/0074-wifi-ath11k-MBSSID-parameter-configuration-in-AP-mod.patch +++ b/package/kernel/mac80211/patches/ath11k/0074-wifi-ath11k-MBSSID-parameter-configuration-in-AP-mod.patch @@ -29,7 +29,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com if (ret) { ath11k_warn(ar->ab, "failed to put up monitor vdev %i: %d\n", vdev_id, ret); -@@ -1423,6 +1423,7 @@ static void ath11k_control_beaconing(str +@@ -1416,6 +1416,7 @@ static void ath11k_control_beaconing(str struct ieee80211_bss_conf *info) { struct ath11k *ar = arvif->ar; @@ -37,7 +37,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com int ret = 0; lockdep_assert_held(&arvif->ar->conf_mutex); -@@ -1451,8 +1452,14 @@ static void ath11k_control_beaconing(str +@@ -1444,8 +1445,14 @@ static void ath11k_control_beaconing(str ether_addr_copy(arvif->bssid, info->bssid); @@ -53,7 +53,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com if (ret) { ath11k_warn(ar->ab, "failed to bring up vdev %d: %i\n", arvif->vdev_id, ret); -@@ -2879,7 +2886,8 @@ static void ath11k_bss_assoc(struct ieee +@@ -2876,7 +2883,8 @@ static void ath11k_bss_assoc(struct ieee arvif->aid = vif->cfg.aid; ether_addr_copy(arvif->bssid, bss_conf->bssid); @@ -63,7 +63,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com if (ret) { ath11k_warn(ar->ab, "failed to set vdev %d up: %d\n", arvif->vdev_id, ret); -@@ -7133,7 +7141,8 @@ ath11k_mac_update_vif_chan(struct ath11k +@@ -7130,7 +7138,8 @@ ath11k_mac_update_vif_chan(struct ath11k int n_vifs) { struct ath11k_base *ab = ar->ab; @@ -73,7 +73,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com int ret; int i; bool monitor_vif = false; -@@ -7187,8 +7196,15 @@ ath11k_mac_update_vif_chan(struct ath11k +@@ -7184,8 +7193,15 @@ ath11k_mac_update_vif_chan(struct ath11k ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n", ret); @@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com if (ret) { ath11k_warn(ab, "failed to bring vdev up %d: %d\n", arvif->vdev_id, ret); -@@ -7306,7 +7322,8 @@ static int ath11k_start_vdev_delay(struc +@@ -7303,7 +7319,8 @@ static int ath11k_start_vdev_delay(struc } if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { diff --git a/package/kernel/mac80211/patches/ath11k/0075-wifi-ath11k-refactor-vif-parameter-configurations.patch b/package/kernel/mac80211/patches/ath11k/0075-wifi-ath11k-refactor-vif-parameter-configurations.patch index 8509e55978..a2b6654cb9 100644 --- a/package/kernel/mac80211/patches/ath11k/0075-wifi-ath11k-refactor-vif-parameter-configurations.patch +++ b/package/kernel/mac80211/patches/ath11k/0075-wifi-ath11k-refactor-vif-parameter-configurations.patch @@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-6-quic_alokad@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -1351,28 +1351,14 @@ err_mon_del: +@@ -1344,28 +1344,14 @@ err_mon_del: return ret; } @@ -55,7 +55,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-6-quic_alokad@quicinc.com ies += sizeof(mgmt->u.beacon); if (cfg80211_find_ie(WLAN_EID_RSN, ies, (skb_tail_pointer(bcn) - ies))) -@@ -1386,7 +1372,28 @@ static int ath11k_mac_setup_bcn_tmpl(str +@@ -1379,7 +1365,28 @@ static int ath11k_mac_setup_bcn_tmpl(str arvif->wpaie_present = true; else arvif->wpaie_present = false; diff --git a/package/kernel/mac80211/patches/ath11k/0076-wifi-ath11k-MBSSID-beacon-support.patch b/package/kernel/mac80211/patches/ath11k/0076-wifi-ath11k-MBSSID-beacon-support.patch index d23ea8deea..9369b5f2da 100644 --- a/package/kernel/mac80211/patches/ath11k/0076-wifi-ath11k-MBSSID-beacon-support.patch +++ b/package/kernel/mac80211/patches/ath11k/0076-wifi-ath11k-MBSSID-beacon-support.patch @@ -24,7 +24,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -1351,6 +1351,84 @@ err_mon_del: +@@ -1344,6 +1344,84 @@ err_mon_del: return ret; } @@ -109,7 +109,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com static void ath11k_mac_set_vif_params(struct ath11k_vif *arvif, struct sk_buff *bcn) { -@@ -1374,18 +1452,26 @@ static void ath11k_mac_set_vif_params(st +@@ -1367,18 +1445,26 @@ static void ath11k_mac_set_vif_params(st arvif->wpaie_present = false; } @@ -139,7 +139,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0); if (!bcn) { -@@ -1393,9 +1479,12 @@ static int ath11k_mac_setup_bcn_tmpl(str +@@ -1386,9 +1472,12 @@ static int ath11k_mac_setup_bcn_tmpl(str return -EPERM; } @@ -154,7 +154,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-7-quic_alokad@quicinc.com kfree_skb(bcn); if (ret) -@@ -1405,6 +1494,23 @@ static int ath11k_mac_setup_bcn_tmpl(str +@@ -1398,6 +1487,23 @@ static int ath11k_mac_setup_bcn_tmpl(str return ret; } diff --git a/package/kernel/mac80211/patches/ath11k/0077-wifi-ath11k-EMA-beacon-support.patch b/package/kernel/mac80211/patches/ath11k/0077-wifi-ath11k-EMA-beacon-support.patch index 51353fa3e4..fbd8689650 100644 --- a/package/kernel/mac80211/patches/ath11k/0077-wifi-ath11k-EMA-beacon-support.patch +++ b/package/kernel/mac80211/patches/ath11k/0077-wifi-ath11k-EMA-beacon-support.patch @@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-8-quic_alokad@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -1452,6 +1452,60 @@ static void ath11k_mac_set_vif_params(st +@@ -1445,6 +1445,60 @@ static void ath11k_mac_set_vif_params(st arvif->wpaie_present = false; } @@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-8-quic_alokad@quicinc.com static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif) { struct ath11k *ar = arvif->ar; -@@ -1484,7 +1538,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbs +@@ -1477,7 +1531,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbs else if (!ath11k_mac_set_nontx_vif_params(tx_arvif, arvif, bcn)) return -EINVAL; @@ -91,7 +91,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-8-quic_alokad@quicinc.com kfree_skb(bcn); if (ret) -@@ -1508,6 +1562,9 @@ static int ath11k_mac_setup_bcn_tmpl(str +@@ -1501,6 +1555,9 @@ static int ath11k_mac_setup_bcn_tmpl(str arvif != (void *)vif->mbssid_tx_vif->drv_priv && arvif->is_up) return 0; diff --git a/package/kernel/mac80211/patches/ath11k/0078-wifi-ath11k-Relocate-the-func-ath11k_mac_bitrate_mas.patch b/package/kernel/mac80211/patches/ath11k/0078-wifi-ath11k-Relocate-the-func-ath11k_mac_bitrate_mas.patch index 610bf72514..50a7def52c 100644 --- a/package/kernel/mac80211/patches/ath11k/0078-wifi-ath11k-Relocate-the-func-ath11k_mac_bitrate_mas.patch +++ b/package/kernel/mac80211/patches/ath11k/0078-wifi-ath11k-Relocate-the-func-ath11k_mac_bitrate_mas.patch @@ -31,7 +31,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com */ #include -@@ -4338,6 +4338,20 @@ exit: +@@ -4335,6 +4335,20 @@ exit: } static int @@ -52,7 +52,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com ath11k_mac_bitrate_mask_num_vht_rates(struct ath11k *ar, enum nl80211_band band, const struct cfg80211_bitrate_mask *mask) -@@ -7791,20 +7805,6 @@ static void ath11k_mac_op_flush(struct i +@@ -7788,20 +7802,6 @@ static void ath11k_mac_op_flush(struct i ath11k_mac_flush_tx_complete(ar); } diff --git a/package/kernel/mac80211/patches/ath11k/0079-wifi-ath11k-Send-HT-fixed-rate-in-WMI-peer-fixed-par.patch b/package/kernel/mac80211/patches/ath11k/0079-wifi-ath11k-Send-HT-fixed-rate-in-WMI-peer-fixed-par.patch index 6282f4462e..31c01bd57d 100644 --- a/package/kernel/mac80211/patches/ath11k/0079-wifi-ath11k-Send-HT-fixed-rate-in-WMI-peer-fixed-par.patch +++ b/package/kernel/mac80211/patches/ath11k/0079-wifi-ath11k-Send-HT-fixed-rate-in-WMI-peer-fixed-par.patch @@ -27,7 +27,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -4480,6 +4480,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct +@@ -4477,6 +4477,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct return ret; } @@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com static int ath11k_station_assoc(struct ath11k *ar, struct ieee80211_vif *vif, struct ieee80211_sta *sta, -@@ -4491,7 +4539,7 @@ static int ath11k_station_assoc(struct a +@@ -4488,7 +4536,7 @@ static int ath11k_station_assoc(struct a struct cfg80211_chan_def def; enum nl80211_band band; struct cfg80211_bitrate_mask *mask; @@ -91,7 +91,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com lockdep_assert_held(&ar->conf_mutex); -@@ -4519,6 +4567,7 @@ static int ath11k_station_assoc(struct a +@@ -4516,6 +4564,7 @@ static int ath11k_station_assoc(struct a num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band, mask); num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band, mask); @@ -99,7 +99,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com /* If single VHT/HE rate is configured (by set_bitrate_mask()), * peer_assoc will disable VHT/HE. This is now enabled by a peer specific -@@ -4535,6 +4584,11 @@ static int ath11k_station_assoc(struct a +@@ -4532,6 +4581,11 @@ static int ath11k_station_assoc(struct a band); if (ret) return ret; @@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com } /* Re-assoc is run only to update supported rates for given station. It -@@ -4608,7 +4662,7 @@ static void ath11k_sta_rc_update_wk(stru +@@ -4605,7 +4659,7 @@ static void ath11k_sta_rc_update_wk(stru const u16 *vht_mcs_mask; const u16 *he_mcs_mask; u32 changed, bw, nss, smps, bw_prev; @@ -120,7 +120,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com const struct cfg80211_bitrate_mask *mask; struct peer_assoc_params peer_arg; enum wmi_phy_mode peer_phymode; -@@ -4724,6 +4778,8 @@ static void ath11k_sta_rc_update_wk(stru +@@ -4721,6 +4775,8 @@ static void ath11k_sta_rc_update_wk(stru if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) { mask = &arvif->bitrate_mask; @@ -129,7 +129,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band, mask); num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band, -@@ -4746,6 +4802,9 @@ static void ath11k_sta_rc_update_wk(stru +@@ -4743,6 +4799,9 @@ static void ath11k_sta_rc_update_wk(stru } else if (sta->deflink.he_cap.has_he && num_he_rates == 1) { ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask, band); diff --git a/package/kernel/mac80211/patches/ath11k/0080-wifi-ath11k-add-support-default-regdb-while-searchin.patch b/package/kernel/mac80211/patches/ath11k/0080-wifi-ath11k-add-support-default-regdb-while-searchin.patch deleted file mode 100644 index 5ff40aac7a..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0080-wifi-ath11k-add-support-default-regdb-while-searchin.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 88ca89202f8e8afb5225eb5244d79cd67c15d744 Mon Sep 17 00:00:00 2001 -From: Wen Gong -Date: Fri, 26 May 2023 12:41:06 +0300 -Subject: [PATCH] wifi: ath11k: add support default regdb while searching - board-2.bin for WCN6855 - -Sometimes board-2.bin does not have the regdb data which matched the -parameters such as vendor, device, subsystem-vendor, subsystem-device -and etc. Add default regdb data with 'bus=%s' into board-2.bin for -WCN6855, then ath11k use 'bus=pci' to search regdb data in board-2.bin -for WCN6855. - -kernel: [ 122.515808] ath11k_pci 0000:03:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262' -kernel: [ 122.517240] ath11k_pci 0000:03:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 6179564 -kernel: [ 122.517280] ath11k_pci 0000:03:00.0: failed to fetch regdb data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262 from ath11k/WCN6855/hw2.0/board-2.bin -kernel: [ 122.517464] ath11k_pci 0000:03:00.0: boot using board name 'bus=pci' -kernel: [ 122.518901] ath11k_pci 0000:03:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 6179564 -kernel: [ 122.518915] ath11k_pci 0000:03:00.0: board name -kernel: [ 122.518917] ath11k_pci 0000:03:00.0: 00000000: 62 75 73 3d 70 63 69 bus=pci -kernel: [ 122.518918] ath11k_pci 0000:03:00.0: boot found match regdb data for name 'bus=pci' -kernel: [ 122.518920] ath11k_pci 0000:03:00.0: boot found regdb data for 'bus=pci' -kernel: [ 122.518921] ath11k_pci 0000:03:00.0: fetched regdb - -Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 - -Signed-off-by: Wen Gong -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230517133959.8224-1-quic_wgong@quicinc.com ---- - drivers/net/wireless/ath/ath11k/core.c | 53 +++++++++++++++++++------- - 1 file changed, 40 insertions(+), 13 deletions(-) - ---- a/drivers/net/wireless/ath/ath11k/core.c -+++ b/drivers/net/wireless/ath/ath11k/core.c -@@ -961,7 +961,8 @@ int ath11k_core_check_dt(struct ath11k_b - } - - static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name, -- size_t name_len, bool with_variant) -+ size_t name_len, bool with_variant, -+ bool bus_type_mode) - { - /* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */ - char variant[9 + ATH11K_QMI_BDF_EXT_STR_LENGTH] = { 0 }; -@@ -972,15 +973,20 @@ static int __ath11k_core_create_board_na - - switch (ab->id.bdf_search) { - case ATH11K_BDF_SEARCH_BUS_AND_BOARD: -- scnprintf(name, name_len, -- "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s", -- ath11k_bus_str(ab->hif.bus), -- ab->id.vendor, ab->id.device, -- ab->id.subsystem_vendor, -- ab->id.subsystem_device, -- ab->qmi.target.chip_id, -- ab->qmi.target.board_id, -- variant); -+ if (bus_type_mode) -+ scnprintf(name, name_len, -+ "bus=%s", -+ ath11k_bus_str(ab->hif.bus)); -+ else -+ scnprintf(name, name_len, -+ "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s", -+ ath11k_bus_str(ab->hif.bus), -+ ab->id.vendor, ab->id.device, -+ ab->id.subsystem_vendor, -+ ab->id.subsystem_device, -+ ab->qmi.target.chip_id, -+ ab->qmi.target.board_id, -+ variant); - break; - default: - scnprintf(name, name_len, -@@ -999,13 +1005,19 @@ static int __ath11k_core_create_board_na - static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name, - size_t name_len) - { -- return __ath11k_core_create_board_name(ab, name, name_len, true); -+ return __ath11k_core_create_board_name(ab, name, name_len, true, false); - } - - static int ath11k_core_create_fallback_board_name(struct ath11k_base *ab, char *name, - size_t name_len) - { -- return __ath11k_core_create_board_name(ab, name, name_len, false); -+ return __ath11k_core_create_board_name(ab, name, name_len, false, false); -+} -+ -+static int ath11k_core_create_bus_type_board_name(struct ath11k_base *ab, char *name, -+ size_t name_len) -+{ -+ return __ath11k_core_create_board_name(ab, name, name_len, false, true); - } - - const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab, -@@ -1309,7 +1321,7 @@ success: - - int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd) - { -- char boardname[BOARD_NAME_SIZE]; -+ char boardname[BOARD_NAME_SIZE], default_boardname[BOARD_NAME_SIZE]; - int ret; - - ret = ath11k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE); -@@ -1323,6 +1335,21 @@ int ath11k_core_fetch_regdb(struct ath11 - ATH11K_BD_IE_REGDB, - ATH11K_BD_IE_REGDB_NAME, - ATH11K_BD_IE_REGDB_DATA); -+ if (!ret) -+ goto exit; -+ -+ ret = ath11k_core_create_bus_type_board_name(ab, default_boardname, -+ BOARD_NAME_SIZE); -+ if (ret) { -+ ath11k_dbg(ab, ATH11K_DBG_BOOT, -+ "failed to create default board name for regdb: %d", ret); -+ goto exit; -+ } -+ -+ ret = ath11k_core_fetch_board_data_api_n(ab, bd, default_boardname, -+ ATH11K_BD_IE_REGDB, -+ ATH11K_BD_IE_REGDB_NAME, -+ ATH11K_BD_IE_REGDB_DATA); - if (!ret) - goto exit; - diff --git a/package/kernel/mac80211/patches/ath11k/0082-wifi-ath11k-factory-test-mode-support.patch b/package/kernel/mac80211/patches/ath11k/0082-wifi-ath11k-factory-test-mode-support.patch index f1b262724f..2964ca809a 100644 --- a/package/kernel/mac80211/patches/ath11k/0082-wifi-ath11k-factory-test-mode-support.patch +++ b/package/kernel/mac80211/patches/ath11k/0082-wifi-ath11k-factory-test-mode-support.patch @@ -226,7 +226,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com if (pdev && pdev->pdev_id == pdev_id) return (pdev->ar ? pdev->ar : NULL); -@@ -6271,6 +6274,11 @@ static int ath11k_mac_op_start(struct ie +@@ -6268,6 +6271,11 @@ static int ath11k_mac_op_start(struct ie struct ath11k_pdev *pdev = ar->pdev; int ret; @@ -238,7 +238,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com ath11k_mac_drain_tx(ar); mutex_lock(&ar->conf_mutex); -@@ -6285,6 +6293,7 @@ static int ath11k_mac_op_start(struct ie +@@ -6282,6 +6290,7 @@ static int ath11k_mac_op_start(struct ie case ATH11K_STATE_RESTARTED: case ATH11K_STATE_WEDGED: case ATH11K_STATE_ON: @@ -257,7 +257,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com */ #include -@@ -745,6 +745,7 @@ static int ath11k_pci_probe(struct pci_d +@@ -751,6 +751,7 @@ static int ath11k_pci_probe(struct pci_d ab_pci->ab = ab; ab_pci->pdev = pdev; ab->hif.ops = &ath11k_pci_hif_ops; @@ -767,7 +767,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com { const void **tb; int ret; -@@ -8628,6 +8628,9 @@ static void ath11k_wmi_tlv_op_rx(struct +@@ -8644,6 +8644,9 @@ static void ath11k_wmi_tlv_op_rx(struct case WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID: ath11k_wmi_pdev_csa_switch_count_status_event(ab, skb); break; diff --git a/package/kernel/mac80211/patches/ath11k/0083-wifi-ath11k-Allow-ath11k-to-boot-without-caldata-in-.patch b/package/kernel/mac80211/patches/ath11k/0083-wifi-ath11k-Allow-ath11k-to-boot-without-caldata-in-.patch index 5a1fa88294..f237199ff8 100644 --- a/package/kernel/mac80211/patches/ath11k/0083-wifi-ath11k-Allow-ath11k-to-boot-without-caldata-in-.patch +++ b/package/kernel/mac80211/patches/ath11k/0083-wifi-ath11k-Allow-ath11k-to-boot-without-caldata-in-.patch @@ -30,7 +30,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-5-quic_rajkbhag@quicinc.com */ #include -@@ -2460,6 +2460,14 @@ static int ath11k_qmi_load_bdf_qmi(struc +@@ -2465,6 +2465,14 @@ static int ath11k_qmi_load_bdf_qmi(struc fw_entry = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_CAL_FILE); if (IS_ERR(fw_entry)) { diff --git a/package/kernel/mac80211/patches/ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch b/package/kernel/mac80211/patches/ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch deleted file mode 100644 index dde30b962d..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 6aafa1c2d3e3fea2ebe84c018003f2a91722e607 Mon Sep 17 00:00:00 2001 -From: P Praneesh -Date: Tue, 6 Jun 2023 14:41:28 +0530 -Subject: [PATCH] wifi: ath11k: fix memory leak in WMI firmware stats - -Memory allocated for firmware pdev, vdev and beacon statistics -are not released during rmmod. - -Fix it by calling ath11k_fw_stats_free() function before hardware -unregister. - -While at it, avoid calling ath11k_fw_stats_free() while processing -the firmware stats received in the WMI event because the local list -is getting spliced and reinitialised and hence there are no elements -in the list after splicing. - -Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 - -Signed-off-by: P Praneesh -Signed-off-by: Aditya Kumar Singh -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230606091128.14202-1-quic_adisi@quicinc.com ---- - drivers/net/wireless/ath/ath11k/mac.c | 1 + - drivers/net/wireless/ath/ath11k/wmi.c | 5 +++++ - 2 files changed, 6 insertions(+) - ---- a/drivers/net/wireless/ath/ath11k/mac.c -+++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -9792,6 +9792,7 @@ void ath11k_mac_destroy(struct ath11k_ba - if (!ar) - continue; - -+ ath11k_fw_stats_free(&ar->fw_stats); - ieee80211_free_hw(ar->hw); - pdev->ar = NULL; - } ---- a/drivers/net/wireless/ath/ath11k/wmi.c -+++ b/drivers/net/wireless/ath/ath11k/wmi.c -@@ -8119,6 +8119,11 @@ complete: - rcu_read_unlock(); - spin_unlock_bh(&ar->data_lock); - -+ /* Since the stats's pdev, vdev and beacon list are spliced and reinitialised -+ * at this point, no need to free the individual list. -+ */ -+ return; -+ - free: - ath11k_fw_stats_free(&stats); - } diff --git a/package/kernel/mac80211/patches/ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch b/package/kernel/mac80211/patches/ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch deleted file mode 100644 index e536c3bd64..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 16e0077e14a73866e9b0f4a6bf4ad3d4a5cb0f2a Mon Sep 17 00:00:00 2001 -From: Jiasheng Jiang -Date: Tue, 13 Jun 2023 12:19:40 +0300 -Subject: [PATCH] wifi: ath11k: Add missing check for ioremap - -Add check for ioremap() and return the error if it fails in order to -guarantee the success of ioremap(), same as in -ath11k_qmi_load_file_target_mem(). - -Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices") -Signed-off-by: Jiasheng Jiang -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230608022858.27405-1-jiasheng@iscas.ac.cn ---- - drivers/net/wireless/ath/ath11k/qmi.c | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/drivers/net/wireless/ath/ath11k/qmi.c -+++ b/drivers/net/wireless/ath/ath11k/qmi.c -@@ -2061,6 +2061,9 @@ static int ath11k_qmi_assign_target_mem_ - ab->qmi.target_mem[idx].iaddr = - ioremap(ab->qmi.target_mem[idx].paddr, - ab->qmi.target_mem[i].size); -+ if (!ab->qmi.target_mem[idx].iaddr) -+ return -EIO; -+ - ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size; - host_ddr_sz = ab->qmi.target_mem[i].size; - ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type; -@@ -2086,6 +2089,8 @@ static int ath11k_qmi_assign_target_mem_ - ab->qmi.target_mem[idx].iaddr = - ioremap(ab->qmi.target_mem[idx].paddr, - ab->qmi.target_mem[i].size); -+ if (!ab->qmi.target_mem[idx].iaddr) -+ return -EIO; - } else { - ab->qmi.target_mem[idx].paddr = - ATH11K_QMI_CALDB_ADDRESS; diff --git a/package/kernel/mac80211/patches/ath11k/0090-Revert-wifi-ath11k-Enable-threaded-NAPI.patch b/package/kernel/mac80211/patches/ath11k/0090-Revert-wifi-ath11k-Enable-threaded-NAPI.patch index 313c18c557..9b2800cecc 100644 --- a/package/kernel/mac80211/patches/ath11k/0090-Revert-wifi-ath11k-Enable-threaded-NAPI.patch +++ b/package/kernel/mac80211/patches/ath11k/0090-Revert-wifi-ath11k-Enable-threaded-NAPI.patch @@ -34,7 +34,7 @@ Link: https://lore.kernel.org/r/20230720151444.2016637-1-kvalo@kernel.org } --- a/drivers/net/wireless/ath/ath11k/pcic.c +++ b/drivers/net/wireless/ath/ath11k/pcic.c -@@ -466,7 +466,6 @@ void ath11k_pcic_ext_irq_enable(struct a +@@ -464,7 +464,6 @@ void ath11k_pcic_ext_irq_enable(struct a struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; if (!irq_grp->napi_enabled) { diff --git a/package/kernel/mac80211/patches/ath11k/0092-wifi-ath11k-Add-coldboot-calibration-support-for-QCN.patch b/package/kernel/mac80211/patches/ath11k/0092-wifi-ath11k-Add-coldboot-calibration-support-for-QCN.patch index 31b11ddee4..1b0dbc4ad1 100644 --- a/package/kernel/mac80211/patches/ath11k/0092-wifi-ath11k-Add-coldboot-calibration-support-for-QCN.patch +++ b/package/kernel/mac80211/patches/ath11k/0092-wifi-ath11k-Add-coldboot-calibration-support-for-QCN.patch @@ -104,14 +104,14 @@ Link: https://lore.kernel.org/r/20230726141032.3061-3-quic_rajkbhag@quicinc.com #define ATH11K_PCI_BAR_NUM 0 #define ATH11K_PCI_DMA_MASK 32 -@@ -897,6 +898,7 @@ unsupported_wcn6855_soc: +@@ -903,6 +904,7 @@ unsupported_wcn6855_soc: ath11k_err(ab, "failed to init core: %d\n", ret); - goto err_irq_affinity_cleanup; + goto err_free_irq; } + ath11k_qmi_fwreset_from_cold_boot(ab); return 0; - err_irq_affinity_cleanup: + err_free_irq: --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -9,6 +9,7 @@ diff --git a/package/kernel/mac80211/patches/ath11k/0096-wifi-ath11k-fix-boot-failure-with-one-MSI-vector.patch b/package/kernel/mac80211/patches/ath11k/0096-wifi-ath11k-fix-boot-failure-with-one-MSI-vector.patch deleted file mode 100644 index 9101a1ea1c..0000000000 --- a/package/kernel/mac80211/patches/ath11k/0096-wifi-ath11k-fix-boot-failure-with-one-MSI-vector.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 39564b475ac5a589e6c22c43a08cbd283c295d2c Mon Sep 17 00:00:00 2001 -From: Baochen Qiang -Date: Thu, 7 Sep 2023 09:56:06 +0800 -Subject: [PATCH] wifi: ath11k: fix boot failure with one MSI vector - -Commit 5b32b6dd96633 ("ath11k: Remove core PCI references from -PCI common code") breaks with one MSI vector because it moves -affinity setting after IRQ request, see below log: - -[ 1417.278835] ath11k_pci 0000:02:00.0: failed to receive control response completion, polling.. -[ 1418.302829] ath11k_pci 0000:02:00.0: Service connect timeout -[ 1418.302833] ath11k_pci 0000:02:00.0: failed to connect to HTT: -110 -[ 1418.303669] ath11k_pci 0000:02:00.0: failed to start core: -110 - -The detail is, if do affinity request after IRQ activated, -which is done in request_irq(), kernel caches that request and -returns success directly. Later when a subsequent MHI interrupt is -fired, kernel will do the real affinity setting work, as a result, -changs the MSI vector. However at that time host has configured -old vector to hardware, so host never receives CE or DP interrupts. - -Fix it by setting affinity before registering MHI controller -where host is, for the first time, doing IRQ request. - -Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 -Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 -Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01160-QCAMSLSWPLZ-1 - -Fixes: 5b32b6dd9663 ("ath11k: Remove core PCI references from PCI common code") -Signed-off-by: Baochen Qiang -Acked-by: Jeff Johnson -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230907015606.16297-1-quic_bqiang@quicinc.com ---- - drivers/net/wireless/ath/ath11k/pci.c | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - ---- a/drivers/net/wireless/ath/ath11k/pci.c -+++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -852,10 +852,16 @@ unsupported_wcn6855_soc: - if (ret) - goto err_pci_disable_msi; - -+ ret = ath11k_pci_set_irq_affinity_hint(ab_pci, cpumask_of(0)); -+ if (ret) { -+ ath11k_err(ab, "failed to set irq affinity %d\n", ret); -+ goto err_pci_disable_msi; -+ } -+ - ret = ath11k_mhi_register(ab_pci); - if (ret) { - ath11k_err(ab, "failed to register mhi: %d\n", ret); -- goto err_pci_disable_msi; -+ goto err_irq_affinity_cleanup; - } - - ret = ath11k_hal_srng_init(ab); -@@ -876,12 +882,6 @@ unsupported_wcn6855_soc: - goto err_ce_free; - } - -- ret = ath11k_pci_set_irq_affinity_hint(ab_pci, cpumask_of(0)); -- if (ret) { -- ath11k_err(ab, "failed to set irq affinity %d\n", ret); -- goto err_free_irq; -- } -- - /* kernel may allocate a dummy vector before request_irq and - * then allocate a real vector when request_irq is called. - * So get msi_data here again to avoid spurious interrupt -@@ -890,20 +890,17 @@ unsupported_wcn6855_soc: - ret = ath11k_pci_config_msi_data(ab_pci); - if (ret) { - ath11k_err(ab, "failed to config msi_data: %d\n", ret); -- goto err_irq_affinity_cleanup; -+ goto err_free_irq; - } - - ret = ath11k_core_init(ab); - if (ret) { - ath11k_err(ab, "failed to init core: %d\n", ret); -- goto err_irq_affinity_cleanup; -+ goto err_free_irq; - } - ath11k_qmi_fwreset_from_cold_boot(ab); - return 0; - --err_irq_affinity_cleanup: -- ath11k_pci_set_irq_affinity_hint(ab_pci, NULL); -- - err_free_irq: - ath11k_pcic_free_irq(ab); - -@@ -916,6 +913,9 @@ err_hal_srng_deinit: - err_mhi_unregister: - ath11k_mhi_unregister(ab_pci); - -+err_irq_affinity_cleanup: -+ ath11k_pci_set_irq_affinity_hint(ab_pci, NULL); -+ - err_pci_disable_msi: - ath11k_pci_free_msi(ab_pci); - 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 60720a721e..64496db7d9 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 @@ -56,7 +56,7 @@ Signed-off-by: Robert Marko int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state); --- a/local-symbols +++ b/local-symbols -@@ -174,6 +174,7 @@ ATH11K_DEBUG= +@@ -166,6 +166,7 @@ ATH11K_DEBUG= ATH11K_DEBUGFS= ATH11K_TRACING= ATH11K_SPECTRAL= diff --git a/package/kernel/mac80211/patches/ath11k/901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch b/package/kernel/mac80211/patches/ath11k/901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch deleted file mode 100644 index 9a0ca80090..0000000000 --- a/package/kernel/mac80211/patches/ath11k/901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 04178918e7f6b5f34dde81ec79ee8a1ccace3be3 Mon Sep 17 00:00:00 2001 -From: Robert Marko -Date: Mon, 17 Oct 2022 11:45:03 +0200 -Subject: [PATCH] wifi: ath11k: pci: fix compilation in 5.16 and older - -Commit ("genirq/msi, treewide: Use a named struct for PCI/MSI attributes") -changed the msi_desc structure a bit, however that is only available in -kernels 5.17 and newer, so check for kernel version to allow compilation -in 5.16 and older. - -Signed-off-by: Robert Marko ---- - drivers/net/wireless/ath/ath11k/pci.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/net/wireless/ath/ath11k/pci.c -+++ b/drivers/net/wireless/ath/ath11k/pci.c -@@ -459,7 +459,11 @@ static int ath11k_pci_alloc_msi(struct a - pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_LO, - &ab->pci.msi.addr_lo); - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0)) - if (msi_desc->pci.msi_attrib.is_64) { -+#else -+ if (msi_desc->msi_attrib.is_64) { -+#endif - pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_HI, - &ab->pci.msi.addr_hi); - } else { 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 a871e458a4..94a191e0d8 100644 --- a/package/kernel/mac80211/patches/ath9k/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/ath9k/512-ath9k_channelbw_debugfs.patch @@ -64,7 +64,7 @@ debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy, --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h -@@ -149,6 +149,7 @@ struct ath_common { +@@ -151,6 +151,7 @@ struct ath_common { int debug_mask; enum ath_device_state state; unsigned long op_flags; diff --git a/package/kernel/mac80211/patches/ath9k/531-ath9k_extra_platform_leds.patch b/package/kernel/mac80211/patches/ath9k/531-ath9k_extra_platform_leds.patch index 8ed7ad8a09..1055bd335c 100644 --- a/package/kernel/mac80211/patches/ath9k/531-ath9k_extra_platform_leds.patch +++ b/package/kernel/mac80211/patches/ath9k/531-ath9k_extra_platform_leds.patch @@ -1,15 +1,3 @@ ---- a/include/linux/ath9k_platform.h -+++ b/include/linux/ath9k_platform.h -@@ -46,6 +46,9 @@ struct ath9k_platform_data { - int (*external_reset)(void); - - bool use_eeprom; -+ -+ int num_leds; -+ const struct gpio_led *leds; - }; - - #endif /* _LINUX_ATH9K_PLATFORM_H */ --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -15,6 +15,7 @@ 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 e09bbc08ea..aaf1acb32d 100644 --- a/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath9k/542-ath9k_debugfs_diag.patch @@ -125,7 +125,7 @@ REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -538,6 +538,11 @@ irqreturn_t ath_isr(int irq, void *dev) +@@ -537,6 +537,11 @@ irqreturn_t ath_isr(int irq, void *dev) return IRQ_HANDLED; } diff --git a/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch index 716e09f351..1c5c54cb35 100644 --- a/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch +++ b/package/kernel/mac80211/patches/ath9k/549-ath9k_enable_gpio_buttons.patch @@ -128,16 +128,3 @@ Signed-off-by: Felix Fietkau if (pdata && pdata->leds && pdata->num_leds) for (i = 0; i < pdata->num_leds; i++) { ---- a/include/linux/ath9k_platform.h -+++ b/include/linux/ath9k_platform.h -@@ -49,6 +49,10 @@ struct ath9k_platform_data { - - int num_leds; - const struct gpio_led *leds; -+ -+ unsigned num_btns; -+ const struct gpio_keys_button *btns; -+ unsigned btn_poll_interval; - }; - - #endif /* _LINUX_ATH9K_PLATFORM_H */ 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 efc4b9187c..07846d6001 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 @@ -339,7 +339,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop); -@@ -659,6 +660,7 @@ void ath_reset_work(struct work_struct * +@@ -658,6 +659,7 @@ void ath_reset_work(struct work_struct * static int ath9k_start(struct ieee80211_hw *hw) { struct ath_softc *sc = hw->priv; @@ -347,7 +347,7 @@ struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; -@@ -737,6 +739,11 @@ static int ath9k_start(struct ieee80211_ +@@ -736,6 +738,11 @@ static int ath9k_start(struct ieee80211_ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); } @@ -371,7 +371,7 @@ --- a/local-symbols +++ b/local-symbols -@@ -129,6 +129,7 @@ ATH9K_WOW= +@@ -121,6 +121,7 @@ ATH9K_WOW= ATH9K_RFKILL= ATH9K_CHANNEL_CONTEXT= ATH9K_PCOEM= 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 09ef50526f..295a4cca73 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, -@@ -2869,10 +2874,10 @@ static int b43_gpio_init(struct b43_wlde +@@ -2870,10 +2875,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/812-b43-add-antenna-control.patch b/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch index 22b67c49d8..3ffac2b2d1 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 @@ -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. */ -@@ -3284,8 +3284,8 @@ static int b43_chip_init(struct b43_wlde +@@ -3285,8 +3285,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); -@@ -3986,7 +3986,6 @@ static int b43_op_config(struct ieee8021 +@@ -3988,7 +3988,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); -@@ -4029,11 +4028,9 @@ static int b43_op_config(struct ieee8021 +@@ -4031,11 +4030,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) { -@@ -5176,6 +5173,47 @@ static int b43_op_get_survey(struct ieee +@@ -5178,6 +5175,47 @@ static int b43_op_get_survey(struct ieee return 0; } @@ -90,7 +90,7 @@ static const struct ieee80211_ops b43_hw_ops = { .tx = b43_op_tx, .wake_tx_queue = ieee80211_handle_wake_tx_queue, -@@ -5198,6 +5236,8 @@ static const struct ieee80211_ops b43_hw +@@ -5200,6 +5238,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, @@ -99,7 +99,7 @@ }; /* Hard-reset the chip. Do not call this directly. -@@ -5499,6 +5539,8 @@ static int b43_one_core_attach(struct b4 +@@ -5501,6 +5541,8 @@ static int b43_one_core_attach(struct b4 if (!wldev) goto out; @@ -108,7 +108,7 @@ wldev->use_pio = b43_modparam_pio; wldev->dev = dev; wldev->wl = wl; -@@ -5590,6 +5632,9 @@ static struct b43_wl *b43_wireless_init( +@@ -5592,6 +5634,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 9cb0a32fd4..f7aa413208 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 -@@ -2886,6 +2886,14 @@ static int b43_gpio_init(struct b43_wlde +@@ -2887,6 +2887,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/build/001-fix_build.patch b/package/kernel/mac80211/patches/build/001-fix_build.patch index 8f63d36e2e..aaea4a8f26 100644 --- a/package/kernel/mac80211/patches/build/001-fix_build.patch +++ b/package/kernel/mac80211/patches/build/001-fix_build.patch @@ -27,7 +27,7 @@ @set -e ; test -f local-symbols || ( \ echo "/--------------" ;\ echo "| You shouldn't run make in the backports tree, but only in" ;\ -@@ -60,58 +62,62 @@ mrproper: +@@ -60,57 +62,61 @@ mrproper: echo "| (that isn't currently running.)" ;\ echo "\\--" ;\ false) @@ -56,13 +56,12 @@ - done \ - ) > Kconfig.kernel ;\ - kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ -- kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\ +- kernelversion | sed 's/^\(\([3-6]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\ - test "$$kver" != "" || echo "Kernel version parse failed!" ;\ - test "$$kver" != "" ;\ -- kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\ -- kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\ - kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\ -- kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\ +- kvers="$$kvers $$(seq 0 19 | sed 's/^/5./')" ;\ +- kvers="$$kvers $$(seq 0 20 | sed 's/^/6./')" ;\ - print=0 ;\ - for v in $$kvers ; do \ - if [ "$$print" = "1" ] ; then \ @@ -113,13 +112,12 @@ + +Kconfig.versions: Kconfig.kernel + @kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ -+ kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\ ++ kernelversion | sed 's/^\(\([3-6]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\ + test "$$kver" != "" || echo "Kernel version parse failed!" ;\ + test "$$kver" != "" ;\ -+ kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\ -+ kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\ + kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\ -+ kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\ ++ kvers="$$kvers $$(seq 0 19 | sed 's/^/5./')" ;\ ++ kvers="$$kvers $$(seq 0 20 | sed 's/^/6./')" ;\ + print=0 ;\ + for v in $$kvers ; do \ + if [ "$$print" = "1" ] ; then \ diff --git a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch index 4ad2ac081a..68cf19e2d5 100644 --- a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch +++ b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -470,43 +470,6 @@ USB_VL600= +@@ -462,43 +462,6 @@ USB_VL600= USB_NET_CH9200= USB_NET_AQC111= USB_RTL8153_ECM= @@ -90,7 +90,7 @@ config B43_PHY_G --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -2853,7 +2853,7 @@ static struct ssb_device *b43_ssb_gpio_d +@@ -2854,7 +2854,7 @@ static struct ssb_device *b43_ssb_gpio_d { struct ssb_bus *bus = dev->dev->sdev->bus; @@ -99,7 +99,7 @@ return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev); #else return bus->chipco.dev; -@@ -4871,7 +4871,7 @@ static int b43_wireless_core_init(struct +@@ -4873,7 +4873,7 @@ static int b43_wireless_core_init(struct } if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW) hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */ @@ -171,7 +171,7 @@ depends on CORDIC --- a/Kconfig.local +++ b/Kconfig.local -@@ -1414,117 +1414,6 @@ config BACKPORTED_USB_NET_AQC111 +@@ -1390,117 +1390,6 @@ config BACKPORTED_USB_NET_AQC111 config BACKPORTED_USB_RTL8153_ECM tristate default USB_RTL8153_ECM @@ -303,7 +303,7 @@ source "$BACKPORT_DIR/drivers/staging/Kconfig" --- a/Makefile.kernel +++ b/Makefile.kernel -@@ -43,8 +43,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/ +@@ -42,8 +42,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/ obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/ obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/ obj-$(CPTCFG_WLAN) += drivers/net/wireless/ diff --git a/package/kernel/mac80211/patches/build/080-resv_start_op.patch b/package/kernel/mac80211/patches/build/080-resv_start_op.patch deleted file mode 100644 index 40b8e94a20..0000000000 --- a/package/kernel/mac80211/patches/build/080-resv_start_op.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/drivers/net/wireless/mac80211_hwsim.c -+++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -5363,7 +5363,9 @@ static struct genl_family hwsim_genl_fam - .module = THIS_MODULE, - .small_ops = hwsim_ops, - .n_small_ops = ARRAY_SIZE(hwsim_ops), -+#if LINUX_VERSION_IS_GEQ(6,1,0) - .resv_start_op = HWSIM_CMD_DEL_MAC_ADDR + 1, -+#endif - .mcgrps = hwsim_mcgrps, - .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps), - }; ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -17233,7 +17233,9 @@ static struct genl_family nl80211_fam __ - .n_ops = ARRAY_SIZE(nl80211_ops), - .small_ops = nl80211_small_ops, - .n_small_ops = ARRAY_SIZE(nl80211_small_ops), -+#if LINUX_VERSION_IS_GEQ(6,1,0) - .resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1, -+#endif - .mcgrps = nl80211_mcgrps, - .n_mcgrps = ARRAY_SIZE(nl80211_mcgrps), - .parallel_ops = true, 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 b017a0ce14..f072fc30fc 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 -@@ -39,9 +39,7 @@ obj-y += compat/ +@@ -38,9 +38,7 @@ obj-y += compat/ obj-$(CPTCFG_CFG80211) += net/wireless/ obj-$(CPTCFG_MAC80211) += net/mac80211/ @@ -59,7 +59,7 @@ Signed-off-by: Robert Marko --- a/local-symbols +++ b/local-symbols -@@ -65,14 +65,6 @@ MAC80211_MESH_PS_DEBUG= +@@ -57,14 +57,6 @@ MAC80211_MESH_PS_DEBUG= MAC80211_TDLS_DEBUG= MAC80211_DEBUG_COUNTERS= MAC80211_STA_HASH_MAX_SIZE= diff --git a/package/kernel/mac80211/patches/build/110-backport_napi_build_skb.patch b/package/kernel/mac80211/patches/build/110-backport_napi_build_skb.patch deleted file mode 100644 index 1e152fecea..0000000000 --- a/package/kernel/mac80211/patches/build/110-backport_napi_build_skb.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/backport-include/linux/skbuff.h -+++ b/backport-include/linux/skbuff.h -@@ -144,4 +144,8 @@ static inline u64 skb_get_kcov_handle(st - #define napi_build_skb build_skb - #endif - -+#if LINUX_VERSION_IS_LESS(5,11,0) -+#define napi_build_skb build_skb -+#endif -+ - #endif /* __BACKPORT_SKBUFF_H */ diff --git a/package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch b/package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch index 98ed9e60e9..4e3ff4228e 100644 --- a/package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch +++ b/package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch @@ -177,7 +177,7 @@ Signed-off-by: Pali Rohár adapter->cmd_wait_q.status = -1; --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c -@@ -794,7 +794,8 @@ int mwifiex_uap_prepare_cmd(struct mwifi +@@ -802,7 +802,8 @@ int mwifiex_uap_prepare_cmd(struct mwifi break; default: mwifiex_dbg(priv->adapter, ERROR, diff --git a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch index ab0fa3670d..e975befef3 100644 --- a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch +++ b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -347,6 +347,7 @@ RT2X00_LIB_FIRMWARE= +@@ -339,6 +339,7 @@ RT2X00_LIB_FIRMWARE= RT2X00_LIB_CRYPTO= RT2X00_LIB_LEDS= RT2X00_LIB_DEBUGFS= @@ -127,7 +127,7 @@ DECLARE_KFIFO_PTR(txstatus_fifo, u32); --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1419,6 +1419,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de +@@ -1423,6 +1423,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup); INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep); @@ -138,7 +138,7 @@ /* * Let the driver probe the device to detect the capabilities. */ -@@ -1559,6 +1563,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ +@@ -1563,6 +1567,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ * Free the driver data. */ kfree(rt2x00dev->drv_data); diff --git a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch b/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch index ffee2189d2..ab09a68297 100644 --- a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch +++ b/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch @@ -12,7 +12,7 @@ #endif /* _RT2X00_PLATFORM_H */ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1007,6 +1007,22 @@ static int rt2x00lib_probe_hw_modes(stru +@@ -1008,6 +1008,22 @@ static int rt2x00lib_probe_hw_modes(stru unsigned int num_rates; unsigned int i; diff --git a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch b/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch index 37553bb80a..79f99ffdf4 100644 --- a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch +++ b/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -989,6 +989,12 @@ static void rt2x00lib_rate(struct ieee80 +@@ -990,6 +990,12 @@ static void rt2x00lib_rate(struct ieee80 void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr) { 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 6211809c0a..31f2f0261f 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 -@@ -1012,6 +1012,16 @@ static int rt2x00lib_probe_hw_modes(stru +@@ -1013,6 +1013,16 @@ 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/611-rt2x00-add-AP+STA-support.patch b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch index 5ef5fc8def..9564f02edd 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 -@@ -1358,7 +1358,7 @@ static inline void rt2x00lib_set_if_comb +@@ -1362,7 +1362,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/998-wifi-rt2x00-rework-MT7620-PA-LNA-RF-calibration.patch b/package/kernel/mac80211/patches/rt2x00/998-wifi-rt2x00-rework-MT7620-PA-LNA-RF-calibration.patch index 5f6f5140d9..a96c8ccdae 100644 --- a/package/kernel/mac80211/patches/rt2x00/998-wifi-rt2x00-rework-MT7620-PA-LNA-RF-calibration.patch +++ b/package/kernel/mac80211/patches/rt2x00/998-wifi-rt2x00-rework-MT7620-PA-LNA-RF-calibration.patch @@ -39,8 +39,8 @@ Signed-off-by: Shiji Yang - } } - static void rt2800_config_alc_rt6352(struct rt2x00_dev *rt2x00dev, -@@ -4457,89 +4449,63 @@ static void rt2800_config_channel(struct + static void rt2800_config_alc(struct rt2x00_dev *rt2x00dev, +@@ -4438,89 +4430,63 @@ static void rt2800_config_channel(struct usleep_range(1000, 1500); } @@ -174,7 +174,7 @@ Signed-off-by: Shiji Yang } bbp = rt2800_bbp_read(rt2x00dev, 4); -@@ -5649,43 +5615,6 @@ void rt2800_vco_calibration(struct rt2x0 +@@ -5630,43 +5596,6 @@ void rt2800_vco_calibration(struct rt2x0 } } rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin); @@ -218,7 +218,7 @@ Signed-off-by: Shiji Yang } EXPORT_SYMBOL_GPL(rt2800_vco_calibration); -@@ -8650,7 +8579,7 @@ static void rt2800_r_calibration(struct +@@ -8631,7 +8560,7 @@ static void rt2800_r_calibration(struct rt2x00_warn(rt2x00dev, "Wait MAC Tx Status to MAX !!!\n"); maccfg = rt2800_register_read(rt2x00dev, MAC_SYS_CTRL); @@ -227,7 +227,7 @@ Signed-off-by: Shiji Yang rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, maccfg); if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev, MAC_STATUS_CFG_BBP_RF_BUSY_RX))) -@@ -10688,30 +10617,143 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10669,30 +10598,143 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C); } @@ -385,7 +385,7 @@ Signed-off-by: Shiji Yang } } -@@ -10804,6 +10846,10 @@ int rt2800_enable_radio(struct rt2x00_de +@@ -10785,6 +10827,10 @@ int rt2800_enable_radio(struct rt2x00_de rt2800_init_bbp(rt2x00dev); rt2800_init_rfcsr(rt2x00dev); 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 4d4a2a8f5e..d08bb01cba 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,7 +9,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnect --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1519,7 +1519,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1523,7 +1523,6 @@ static int ieee80211_stop_ap(struct wiph link_conf->bssid_indicator = 0; __sta_info_flush(sdata, true); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index 10b842d9af..85ebb50445 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 -@@ -2727,6 +2727,8 @@ static int ieee80211_scan(struct wiphy * +@@ -2733,6 +2733,8 @@ static int ieee80211_scan(struct wiphy * */ fallthrough; case NL80211_IFTYPE_AP: 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 63b2177471..518223b4f4 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,7 +28,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -554,6 +554,7 @@ __sta_info_alloc(struct ieee80211_sub_if +@@ -557,6 +557,7 @@ __sta_info_alloc(struct ieee80211_sub_if INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames); INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work); mutex_init(&sta->ampdu_mlme.mtx); 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 0ac972955f..c5aef959ad 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 @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3984,7 +3984,7 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -3992,7 +3992,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, -@@ -4127,7 +4127,8 @@ bool ieee80211_txq_may_transmit(struct i +@@ -4135,7 +4135,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]); } -@@ -4135,7 +4136,7 @@ bool ieee80211_txq_may_transmit(struct i +@@ -4143,7 +4144,7 @@ bool ieee80211_txq_may_transmit(struct i if (sta->airtime[ac].deficit >= 0) goto out; diff --git a/package/kernel/mac80211/patches/subsys/306-01-v6.2-wifi-mac80211-add-internal-handler-for-wake_tx_queue.patch b/package/kernel/mac80211/patches/subsys/306-01-v6.2-wifi-mac80211-add-internal-handler-for-wake_tx_queue.patch index d14ba05e69..606ca335b9 100644 --- a/package/kernel/mac80211/patches/subsys/306-01-v6.2-wifi-mac80211-add-internal-handler-for-wake_tx_queue.patch +++ b/package/kernel/mac80211/patches/subsys/306-01-v6.2-wifi-mac80211-add-internal-handler-for-wake_tx_queue.patch @@ -51,7 +51,7 @@ Signed-off-by: Johannes Berg * * Drivers can optionally delegate responsibility for scheduling queues to * mac80211, to take advantage of airtime fairness accounting. In this case, to -@@ -2248,8 +2249,8 @@ struct ieee80211_link_sta { +@@ -2257,8 +2258,8 @@ struct ieee80211_link_sta { * For non MLO STA it will point to the deflink data. For MLO STA * ieee80211_sta_recalc_aggregates() must be called to update it. * @support_p2p_ps: indicates whether the STA supports P2P PS mechanism or not. @@ -62,7 +62,7 @@ Signed-off-by: Johannes Berg * @deflink: This holds the default link STA information, for non MLO STA all link * specific STA information is accessed through @deflink or through * link[0] which points to address of @deflink. For MLO Link STA -@@ -5687,7 +5688,7 @@ void ieee80211_key_replay(struct ieee802 +@@ -5700,7 +5701,7 @@ void ieee80211_key_replay(struct ieee802 * @hw: pointer as obtained from ieee80211_alloc_hw(). * @queue: queue number (counted from zero). * @@ -71,7 +71,7 @@ Signed-off-by: Johannes Berg */ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue); -@@ -5696,7 +5697,7 @@ void ieee80211_wake_queue(struct ieee802 +@@ -5709,7 +5710,7 @@ void ieee80211_wake_queue(struct ieee802 * @hw: pointer as obtained from ieee80211_alloc_hw(). * @queue: queue number (counted from zero). * @@ -80,7 +80,7 @@ Signed-off-by: Johannes Berg */ void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue); -@@ -5705,7 +5706,7 @@ void ieee80211_stop_queue(struct ieee802 +@@ -5718,7 +5719,7 @@ void ieee80211_stop_queue(struct ieee802 * @hw: pointer as obtained from ieee80211_alloc_hw(). * @queue: queue number (counted from zero). * @@ -89,7 +89,7 @@ Signed-off-by: Johannes Berg * * Return: %true if the queue is stopped. %false otherwise. */ -@@ -5716,7 +5717,7 @@ int ieee80211_queue_stopped(struct ieee8 +@@ -5729,7 +5730,7 @@ int ieee80211_queue_stopped(struct ieee8 * ieee80211_stop_queues - stop all queues * @hw: pointer as obtained from ieee80211_alloc_hw(). * @@ -98,7 +98,7 @@ Signed-off-by: Johannes Berg */ void ieee80211_stop_queues(struct ieee80211_hw *hw); -@@ -5724,7 +5725,7 @@ void ieee80211_stop_queues(struct ieee80 +@@ -5737,7 +5738,7 @@ void ieee80211_stop_queues(struct ieee80 * ieee80211_wake_queues - wake all queues * @hw: pointer as obtained from ieee80211_alloc_hw(). * @@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg */ void ieee80211_wake_queues(struct ieee80211_hw *hw); -@@ -6946,6 +6947,18 @@ static inline struct sk_buff *ieee80211_ +@@ -6960,6 +6961,18 @@ static inline struct sk_buff *ieee80211_ } /** diff --git a/package/kernel/mac80211/patches/subsys/306-02-v6.2-wifi-mac80211-add-wake_tx_queue-callback-to-drivers.patch b/package/kernel/mac80211/patches/subsys/306-02-v6.2-wifi-mac80211-add-wake_tx_queue-callback-to-drivers.patch index fee038d90c..07b1c8a8f2 100644 --- a/package/kernel/mac80211/patches/subsys/306-02-v6.2-wifi-mac80211-add-wake_tx_queue-callback-to-drivers.patch +++ b/package/kernel/mac80211/patches/subsys/306-02-v6.2-wifi-mac80211-add-wake_tx_queue-callback-to-drivers.patch @@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg .remove_interface = ar5523_remove_interface, --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -8587,6 +8587,7 @@ err_fallback: +@@ -8592,6 +8592,7 @@ err_fallback: static const struct ieee80211_ops ath11k_ops = { .tx = ath11k_mac_op_tx, @@ -96,7 +96,7 @@ Signed-off-by: Johannes Berg .config = at76_config, --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -5171,6 +5171,7 @@ static int b43_op_get_survey(struct ieee +@@ -5173,6 +5173,7 @@ static int b43_op_get_survey(struct ieee static const struct ieee80211_ops b43_hw_ops = { .tx = b43_op_tx, @@ -306,7 +306,7 @@ Signed-off-by: Johannes Berg .add_interface = rtl8187_add_interface, --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c -@@ -6548,6 +6548,7 @@ static void rtl8xxxu_stop(struct ieee802 +@@ -6546,6 +6546,7 @@ static void rtl8xxxu_stop(struct ieee802 static const struct ieee80211_ops rtl8xxxu_ops = { .tx = rtl8xxxu_tx, @@ -326,7 +326,7 @@ Signed-off-by: Johannes Berg .change_interface = rtl_op_change_interface, --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c -@@ -896,6 +896,7 @@ static void rtw_ops_sta_rc_update(struct +@@ -892,6 +892,7 @@ static void rtw_ops_sta_rc_update(struct const struct ieee80211_ops rtw_ops = { .tx = rtw_ops_tx, @@ -336,7 +336,7 @@ Signed-off-by: Johannes Berg .stop = rtw_ops_stop, --- a/drivers/net/wireless/realtek/rtw89/mac80211.c +++ b/drivers/net/wireless/realtek/rtw89/mac80211.c -@@ -918,6 +918,7 @@ static int rtw89_ops_set_tid_config(stru +@@ -916,6 +916,7 @@ static int rtw89_ops_set_tid_config(stru const struct ieee80211_ops rtw89_ops = { .tx = rtw89_ops_tx, diff --git a/package/kernel/mac80211/patches/subsys/306-03-v6.2-wifi-mac80211-Drop-support-for-TX-push-path.patch b/package/kernel/mac80211/patches/subsys/306-03-v6.2-wifi-mac80211-Drop-support-for-TX-push-path.patch index f9f9977cee..1e93d8355e 100644 --- a/package/kernel/mac80211/patches/subsys/306-03-v6.2-wifi-mac80211-Drop-support-for-TX-push-path.patch +++ b/package/kernel/mac80211/patches/subsys/306-03-v6.2-wifi-mac80211-Drop-support-for-TX-push-path.patch @@ -11,7 +11,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -4346,9 +4346,6 @@ static int ieee80211_get_txq_stats(struc +@@ -4357,9 +4357,6 @@ static int ieee80211_get_txq_stats(struc struct ieee80211_sub_if_data *sdata; int ret = 0; @@ -63,7 +63,7 @@ Signed-off-by: Johannes Berg NL80211_EXT_FEATURE_AQL)) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -2294,7 +2294,6 @@ void ieee80211_wake_queue_by_reason(stru +@@ -2300,7 +2300,6 @@ void ieee80211_wake_queue_by_reason(stru void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue, enum queue_stop_reason reason, bool refcounted); @@ -86,13 +86,25 @@ Signed-off-by: Johannes Berg ieee80211_roc_purge(local, sdata); switch (sdata->vif.type) { -@@ -813,13 +807,6 @@ static void ieee80211_uninit(struct net_ +@@ -813,25 +807,6 @@ static void ieee80211_uninit(struct net_ ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); } +-#if LINUX_VERSION_IS_GEQ(5,2,0) -static u16 ieee80211_netdev_select_queue(struct net_device *dev, - struct sk_buff *skb, - struct net_device *sb_dev) +-#elif LINUX_VERSION_IS_GEQ(4,19,0) +-static u16 ieee80211_netdev_select_queue(struct net_device *dev, +- struct sk_buff *skb, +- struct net_device *sb_dev, +- select_queue_fallback_t fallback) +-#else +-static u16 ieee80211_netdev_select_queue(struct net_device *dev, +- struct sk_buff *skb, +- void *accel_priv, +- select_queue_fallback_t fallback) +-#endif -{ - return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); -} @@ -100,7 +112,7 @@ Signed-off-by: Johannes Berg static void ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) { -@@ -833,7 +820,6 @@ static const struct net_device_ops ieee8 +@@ -845,7 +820,6 @@ static const struct net_device_ops ieee8 .ndo_start_xmit = ieee80211_subif_start_xmit, .ndo_set_rx_mode = ieee80211_set_multicast_list, .ndo_set_mac_address = ieee80211_change_mac, @@ -108,15 +120,15 @@ Signed-off-by: Johannes Berg .ndo_get_stats64 = ieee80211_get_stats64, }; -@@ -941,7 +927,6 @@ static const struct net_device_ops ieee8 +@@ -967,7 +941,6 @@ static const struct net_device_ops ieee8 .ndo_start_xmit = ieee80211_subif_start_xmit_8023, .ndo_set_rx_mode = ieee80211_set_multicast_list, .ndo_set_mac_address = ieee80211_change_mac, - .ndo_select_queue = ieee80211_netdev_select_queue, .ndo_get_stats64 = ieee80211_get_stats64, + #if LINUX_VERSION_IS_GEQ(5,13,0) .ndo_fill_forward_path = ieee80211_netdev_fill_forward_path, - }; -@@ -1443,35 +1428,6 @@ int ieee80211_do_open(struct wireless_de +@@ -1471,35 +1444,6 @@ int ieee80211_do_open(struct wireless_de ieee80211_recalc_ps(local); @@ -152,7 +164,7 @@ Signed-off-by: Johannes Berg set_bit(SDATA_STATE_RUNNING, &sdata->state); return 0; -@@ -1501,17 +1457,12 @@ static void ieee80211_if_setup(struct ne +@@ -1529,17 +1473,12 @@ static void ieee80211_if_setup(struct ne { ether_setup(dev); dev->priv_flags &= ~IFF_TX_SKB_SHARING; @@ -171,7 +183,7 @@ Signed-off-by: Johannes Berg static void ieee80211_iface_process_skb(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) -@@ -2096,9 +2047,7 @@ int ieee80211_if_add(struct ieee80211_lo +@@ -2124,9 +2063,7 @@ int ieee80211_if_add(struct ieee80211_lo struct net_device *ndev = NULL; struct ieee80211_sub_if_data *sdata = NULL; struct txq_info *txqi; @@ -181,7 +193,7 @@ Signed-off-by: Johannes Berg ASSERT_RTNL(); -@@ -2121,30 +2070,18 @@ int ieee80211_if_add(struct ieee80211_lo +@@ -2149,30 +2086,18 @@ int ieee80211_if_add(struct ieee80211_lo sizeof(void *)); int txq_size = 0; @@ -216,7 +228,7 @@ Signed-off-by: Johannes Berg ndev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -630,7 +630,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -627,7 +627,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config || !ops->add_interface || !ops->remove_interface || @@ -225,7 +237,7 @@ Signed-off-by: Johannes Berg return NULL; if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove))) -@@ -719,9 +719,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -716,9 +716,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ if (!ops->set_key) wiphy->flags |= WIPHY_FLAG_IBSS_RSN; @@ -236,7 +248,7 @@ Signed-off-by: Johannes Berg wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_RRM); wiphy->bss_priv_size = sizeof(struct ieee80211_bss); -@@ -834,10 +832,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -831,10 +829,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ atomic_set(&local->agg_queue_stop[i], 0); } tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending); @@ -250,7 +262,7 @@ Signed-off-by: Johannes Berg skb_queue_head_init(&local->skb_queue); --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -1571,9 +1571,6 @@ static void sta_ps_start(struct sta_info +@@ -1573,9 +1573,6 @@ static void sta_ps_start(struct sta_info ieee80211_clear_fast_xmit(sta); @@ -286,7 +298,7 @@ Signed-off-by: Johannes Berg } for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { -@@ -425,8 +423,7 @@ void sta_info_free(struct ieee80211_loca +@@ -428,8 +426,7 @@ void sta_info_free(struct ieee80211_loca sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr); @@ -296,7 +308,7 @@ Signed-off-by: Johannes Berg kfree(rcu_dereference_raw(sta->sta.rates)); #ifdef CPTCFG_MAC80211_MESH kfree(sta->mesh); -@@ -527,6 +524,8 @@ __sta_info_alloc(struct ieee80211_sub_if +@@ -530,6 +527,8 @@ __sta_info_alloc(struct ieee80211_sub_if struct ieee80211_local *local = sdata->local; struct ieee80211_hw *hw = &local->hw; struct sta_info *sta; @@ -305,7 +317,7 @@ Signed-off-by: Johannes Berg int i; sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp); -@@ -597,21 +596,18 @@ __sta_info_alloc(struct ieee80211_sub_if +@@ -600,21 +599,18 @@ __sta_info_alloc(struct ieee80211_sub_if sta->last_connected = ktime_get_seconds(); @@ -336,7 +348,7 @@ Signed-off-by: Johannes Berg } if (sta_prepare_rate_control(local, sta, gfp)) -@@ -685,8 +681,7 @@ __sta_info_alloc(struct ieee80211_sub_if +@@ -688,8 +684,7 @@ __sta_info_alloc(struct ieee80211_sub_if return sta; free_txq: @@ -346,7 +358,7 @@ Signed-off-by: Johannes Berg free: sta_info_free_link(&sta->deflink); #ifdef CPTCFG_MAC80211_MESH -@@ -1960,9 +1955,6 @@ ieee80211_sta_ps_deliver_response(struct +@@ -1965,9 +1960,6 @@ ieee80211_sta_ps_deliver_response(struct * TIM recalculation. */ @@ -356,7 +368,7 @@ Signed-off-by: Johannes Berg for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) { if (!sta->sta.txq[tid] || !(driver_release_tids & BIT(tid)) || -@@ -2447,7 +2439,7 @@ static void sta_set_tidstats(struct sta_ +@@ -2452,7 +2444,7 @@ static void sta_set_tidstats(struct sta_ tidstats->tx_msdu_failed = sta->deflink.status_stats.msdu_failed[tid]; } @@ -365,7 +377,7 @@ Signed-off-by: Johannes Berg spin_lock_bh(&local->fq.lock); rcu_read_lock(); -@@ -2775,9 +2767,6 @@ unsigned long ieee80211_sta_last_active( +@@ -2780,9 +2772,6 @@ unsigned long ieee80211_sta_last_active( static void sta_update_codel_params(struct sta_info *sta, u32 thr) { @@ -387,7 +399,7 @@ Signed-off-by: Johannes Berg * Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress. --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -1600,9 +1600,6 @@ int ieee80211_txq_setup_flows(struct iee +@@ -1606,9 +1606,6 @@ int ieee80211_txq_setup_flows(struct iee bool supp_vht = false; enum nl80211_band band; @@ -397,7 +409,7 @@ Signed-off-by: Johannes Berg ret = fq_init(fq, 4096); if (ret) return ret; -@@ -1650,9 +1647,6 @@ void ieee80211_txq_teardown_flows(struct +@@ -1656,9 +1653,6 @@ void ieee80211_txq_teardown_flows(struct { struct fq *fq = &local->fq; @@ -407,7 +419,7 @@ Signed-off-by: Johannes Berg kfree(local->cvars); local->cvars = NULL; -@@ -1669,8 +1663,7 @@ static bool ieee80211_queue_skb(struct i +@@ -1675,8 +1669,7 @@ static bool ieee80211_queue_skb(struct i struct ieee80211_vif *vif; struct txq_info *txqi; @@ -417,7 +429,7 @@ Signed-off-by: Johannes Berg return false; if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) -@@ -4193,12 +4186,7 @@ void __ieee80211_subif_start_xmit(struct +@@ -4201,12 +4194,7 @@ void __ieee80211_subif_start_xmit(struct if (IS_ERR(sta)) sta = NULL; @@ -431,7 +443,7 @@ Signed-off-by: Johannes Berg ieee80211_aggr_check(sdata, sta, skb); sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); -@@ -4509,11 +4497,7 @@ static void ieee80211_8023_xmit(struct i +@@ -4517,11 +4505,7 @@ static void ieee80211_8023_xmit(struct i struct tid_ampdu_tx *tid_tx; u8 tid; @@ -444,7 +456,7 @@ Signed-off-by: Johannes Berg if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) && test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) -@@ -4767,9 +4751,6 @@ void ieee80211_tx_pending(struct tasklet +@@ -4775,9 +4759,6 @@ void ieee80211_tx_pending(struct tasklet if (!txok) break; } @@ -454,7 +466,7 @@ Signed-off-by: Johannes Berg } spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); -@@ -5962,10 +5943,9 @@ int ieee80211_tx_control_port(struct wip +@@ -5970,10 +5951,9 @@ int ieee80211_tx_control_port(struct wip } if (!IS_ERR(sta)) { diff --git a/package/kernel/mac80211/patches/subsys/306-04-v6.2-wifi-realtek-remove-duplicated-wake_tx_queue.patch b/package/kernel/mac80211/patches/subsys/306-04-v6.2-wifi-realtek-remove-duplicated-wake_tx_queue.patch index f0dfc75a78..9afefa38cc 100644 --- a/package/kernel/mac80211/patches/subsys/306-04-v6.2-wifi-realtek-remove-duplicated-wake_tx_queue.patch +++ b/package/kernel/mac80211/patches/subsys/306-04-v6.2-wifi-realtek-remove-duplicated-wake_tx_queue.patch @@ -12,7 +12,7 @@ Signed-off-by: Johannes Berg --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c -@@ -896,7 +896,6 @@ static void rtw_ops_sta_rc_update(struct +@@ -892,7 +892,6 @@ static void rtw_ops_sta_rc_update(struct const struct ieee80211_ops rtw_ops = { .tx = rtw_ops_tx, @@ -22,7 +22,7 @@ Signed-off-by: Johannes Berg .stop = rtw_ops_stop, --- a/drivers/net/wireless/realtek/rtw89/mac80211.c +++ b/drivers/net/wireless/realtek/rtw89/mac80211.c -@@ -918,7 +918,6 @@ static int rtw89_ops_set_tid_config(stru +@@ -916,7 +916,6 @@ static int rtw89_ops_set_tid_config(stru const struct ieee80211_ops rtw89_ops = { .tx = rtw89_ops_tx, diff --git a/package/kernel/mac80211/patches/subsys/310-v6.2-mac80211-add-support-for-restricting-netdev-features.patch b/package/kernel/mac80211/patches/subsys/310-v6.2-mac80211-add-support-for-restricting-netdev-features.patch index 812b12189c..e3226571d5 100644 --- a/package/kernel/mac80211/patches/subsys/310-v6.2-mac80211-add-support-for-restricting-netdev-features.patch +++ b/package/kernel/mac80211/patches/subsys/310-v6.2-mac80211-add-support-for-restricting-netdev-features.patch @@ -59,7 +59,7 @@ Signed-off-by: Felix Fietkau flow = fq_find_fattest_flow(fq); --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1807,6 +1807,10 @@ struct ieee80211_vif_cfg { +@@ -1816,6 +1816,10 @@ struct ieee80211_vif_cfg { * @addr: address of this interface * @p2p: indicates whether this AP or STA interface is a p2p * interface, i.e. a GO or p2p-sta respectively @@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau * @driver_flags: flags/capabilities the driver has for this interface, * these need to be set (or cleared) when the interface is added * or, if supported by the driver, the interface type is changed -@@ -1846,6 +1850,7 @@ struct ieee80211_vif { +@@ -1855,6 +1859,7 @@ struct ieee80211_vif { struct ieee80211_txq *txq; @@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -2181,6 +2181,7 @@ int ieee80211_if_add(struct ieee80211_lo +@@ -2197,6 +2197,7 @@ int ieee80211_if_add(struct ieee80211_lo ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE; ndev->hw_features |= ndev->features & MAC80211_SUPPORTED_FEATURES_TX; @@ -90,7 +90,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -1356,7 +1356,11 @@ static struct txq_info *ieee80211_get_tx +@@ -1362,7 +1362,11 @@ static struct txq_info *ieee80211_get_tx static void ieee80211_set_skb_enqueue_time(struct sk_buff *skb) { @@ -103,7 +103,7 @@ Signed-off-by: Felix Fietkau } static u32 codel_skb_len_func(const struct sk_buff *skb) -@@ -3579,55 +3583,79 @@ ieee80211_xmit_fast_finish(struct ieee80 +@@ -3585,55 +3589,79 @@ ieee80211_xmit_fast_finish(struct ieee80 return TX_CONTINUE; } @@ -219,7 +219,7 @@ Signed-off-by: Felix Fietkau /* will not be crypto-handled beyond what we do here, so use false * as the may-encrypt argument for the resize to not account for -@@ -3636,10 +3664,8 @@ static bool ieee80211_xmit_fast(struct i +@@ -3642,10 +3670,8 @@ static bool ieee80211_xmit_fast(struct i if (unlikely(ieee80211_skb_resize(sdata, skb, max_t(int, extra_head + hw_headroom - skb_headroom(skb), 0), @@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau memcpy(ð, skb->data, ETH_HLEN - 2); hdr = skb_push(skb, extra_head); -@@ -3653,7 +3679,7 @@ static bool ieee80211_xmit_fast(struct i +@@ -3659,7 +3685,7 @@ static bool ieee80211_xmit_fast(struct i info->control.vif = &sdata->vif; info->flags = IEEE80211_TX_CTL_FIRST_FRAGMENT | IEEE80211_TX_CTL_DONTFRAG | @@ -241,7 +241,7 @@ Signed-off-by: Felix Fietkau info->control.flags = IEEE80211_TX_CTRL_FAST_XMIT | u32_encode_bits(IEEE80211_LINK_UNSPECIFIED, IEEE80211_TX_CTRL_MLO_LINK); -@@ -3677,16 +3703,14 @@ static bool ieee80211_xmit_fast(struct i +@@ -3683,16 +3709,14 @@ static bool ieee80211_xmit_fast(struct i tx.key = fast_tx->key; if (ieee80211_queue_skb(local, sdata, sta, skb)) @@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) sdata = container_of(sdata->bss, -@@ -3694,6 +3718,56 @@ static bool ieee80211_xmit_fast(struct i +@@ -3700,6 +3724,56 @@ static bool ieee80211_xmit_fast(struct i __skb_queue_tail(&tx.skbs, skb); ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false); @@ -318,7 +318,7 @@ Signed-off-by: Felix Fietkau return true; } -@@ -4201,31 +4275,14 @@ void __ieee80211_subif_start_xmit(struct +@@ -4209,31 +4283,14 @@ void __ieee80211_subif_start_xmit(struct goto out; } @@ -358,7 +358,7 @@ Signed-off-by: Felix Fietkau } skb_list_walk_safe(skb, skb, next) { -@@ -4443,9 +4500,11 @@ normal: +@@ -4451,9 +4508,11 @@ normal: return NETDEV_TX_OK; } @@ -373,7 +373,7 @@ Signed-off-by: Felix Fietkau { struct ieee80211_local *local = sdata->local; struct ieee80211_tx_control control = {}; -@@ -4454,14 +4513,6 @@ static bool ieee80211_tx_8023(struct iee +@@ -4462,14 +4521,6 @@ static bool ieee80211_tx_8023(struct iee unsigned long flags; int q = info->hw_queue; @@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau spin_lock_irqsave(&local->queue_stop_reason_lock, flags); if (local->queue_stop_reasons[q] || -@@ -4488,6 +4539,26 @@ static bool ieee80211_tx_8023(struct iee +@@ -4496,6 +4547,26 @@ static bool ieee80211_tx_8023(struct iee return true; } @@ -415,7 +415,7 @@ Signed-off-by: Felix Fietkau static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata, struct net_device *dev, struct sta_info *sta, struct ieee80211_key *key, struct sk_buff *skb) -@@ -4495,9 +4566,13 @@ static void ieee80211_8023_xmit(struct i +@@ -4503,9 +4574,13 @@ static void ieee80211_8023_xmit(struct i struct ieee80211_tx_info *info; struct ieee80211_local *local = sdata->local; struct tid_ampdu_tx *tid_tx; @@ -430,7 +430,7 @@ Signed-off-by: Felix Fietkau if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) && test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) -@@ -4507,9 +4582,6 @@ static void ieee80211_8023_xmit(struct i +@@ -4515,9 +4590,6 @@ static void ieee80211_8023_xmit(struct i if (unlikely(!skb)) return; @@ -440,7 +440,7 @@ Signed-off-by: Felix Fietkau ieee80211_aggr_check(sdata, sta, skb); tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; -@@ -4523,22 +4595,20 @@ static void ieee80211_8023_xmit(struct i +@@ -4531,22 +4603,20 @@ static void ieee80211_8023_xmit(struct i return; } @@ -471,7 +471,7 @@ Signed-off-by: Felix Fietkau if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) sdata = container_of(sdata->bss, -@@ -4550,6 +4620,24 @@ static void ieee80211_8023_xmit(struct i +@@ -4558,6 +4628,24 @@ static void ieee80211_8023_xmit(struct i if (key) info->control.hw_key = &key->conf; @@ -496,7 +496,7 @@ Signed-off-by: Felix Fietkau ieee80211_tx_8023(sdata, skb, sta, false); return; -@@ -4591,6 +4679,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8 +@@ -4599,6 +4687,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8 key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)) goto skip_offload; diff --git a/package/kernel/mac80211/patches/subsys/311-v6.2-wifi-mac80211-fix-and-simplify-unencrypted-drop-chec.patch b/package/kernel/mac80211/patches/subsys/311-v6.2-wifi-mac80211-fix-and-simplify-unencrypted-drop-chec.patch index 804b02eb30..1d35946ff8 100644 --- a/package/kernel/mac80211/patches/subsys/311-v6.2-wifi-mac80211-fix-and-simplify-unencrypted-drop-chec.patch +++ b/package/kernel/mac80211/patches/subsys/311-v6.2-wifi-mac80211-fix-and-simplify-unencrypted-drop-chec.patch @@ -26,7 +26,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2403,7 +2403,6 @@ static int ieee80211_802_1x_port_control +@@ -2405,7 +2405,6 @@ static int ieee80211_802_1x_port_control static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc) { @@ -34,7 +34,7 @@ Signed-off-by: Johannes Berg struct sk_buff *skb = rx->skb; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); -@@ -2414,31 +2413,6 @@ static int ieee80211_drop_unencrypted(st +@@ -2416,31 +2415,6 @@ static int ieee80211_drop_unencrypted(st if (status->flag & RX_FLAG_DECRYPTED) return 0; @@ -66,7 +66,7 @@ Signed-off-by: Johannes Berg /* Drop unencrypted frames if key is set. */ if (unlikely(!ieee80211_has_protected(fc) && !ieee80211_is_any_nullfunc(fc) && -@@ -2892,8 +2866,16 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 +@@ -2898,8 +2872,16 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 hdr = (struct ieee80211_hdr *) skb->data; mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen); diff --git a/package/kernel/mac80211/patches/subsys/314-v6.3-wifi-mac80211-remove-mesh-forwarding-congestion-chec.patch b/package/kernel/mac80211/patches/subsys/314-v6.3-wifi-mac80211-remove-mesh-forwarding-congestion-chec.patch index 515176f0de..95d4cf6ada 100644 --- a/package/kernel/mac80211/patches/subsys/314-v6.3-wifi-mac80211-remove-mesh-forwarding-congestion-chec.patch +++ b/package/kernel/mac80211/patches/subsys/314-v6.3-wifi-mac80211-remove-mesh-forwarding-congestion-chec.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -329,7 +329,6 @@ struct mesh_stats { +@@ -333,7 +333,6 @@ struct mesh_stats { __u32 fwded_frames; /* Mesh total forwarded frames */ __u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/ __u32 dropped_frames_no_route; /* Not transmitted, no route found */ @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau #define PREQ_Q_F_START 0x1 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2926,11 +2926,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 +@@ -2932,11 +2932,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 return RX_CONTINUE; ac = ieee802_1d_to_ac[skb->priority]; diff --git a/package/kernel/mac80211/patches/subsys/315-v6.3-wifi-mac80211-fix-receiving-A-MSDU-frames-on-mesh-in.patch b/package/kernel/mac80211/patches/subsys/315-v6.3-wifi-mac80211-fix-receiving-A-MSDU-frames-on-mesh-in.patch index 6aec9bc85f..cf1588aeb6 100644 --- a/package/kernel/mac80211/patches/subsys/315-v6.3-wifi-mac80211-fix-receiving-A-MSDU-frames-on-mesh-in.patch +++ b/package/kernel/mac80211/patches/subsys/315-v6.3-wifi-mac80211-fix-receiving-A-MSDU-frames-on-mesh-in.patch @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau struct rx_packet_hdr *rx_hdr; --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -6208,11 +6208,36 @@ static inline int ieee80211_data_to_8023 +@@ -6324,11 +6324,36 @@ static inline int ieee80211_data_to_8023 * @extra_headroom: The hardware extra headroom for SKBs in the @list. * @check_da: DA to check in the inner ethernet header, or NULL * @check_sa: SA to check in the inner ethernet header, or NULL @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2720,6 +2720,174 @@ ieee80211_deliver_skb(struct ieee80211_r +@@ -2726,6 +2726,174 @@ ieee80211_deliver_skb(struct ieee80211_r } } @@ -263,7 +263,7 @@ Signed-off-by: Felix Fietkau static ieee80211_rx_result debug_noinline __ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx, u8 data_offset) { -@@ -2728,8 +2896,10 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ +@@ -2734,8 +2902,10 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; __le16 fc = hdr->frame_control; struct sk_buff_head frame_list; @@ -274,7 +274,7 @@ Signed-off-by: Felix Fietkau if (unlikely(ieee80211_has_a4(hdr->frame_control))) { check_da = NULL; -@@ -2746,6 +2916,8 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ +@@ -2752,6 +2922,8 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ break; case NL80211_IFTYPE_MESH_POINT: check_sa = NULL; @@ -283,7 +283,7 @@ Signed-off-by: Felix Fietkau break; default: break; -@@ -2763,17 +2935,29 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ +@@ -2769,17 +2941,29 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr, rx->sdata->vif.type, rx->local->hw.extra_tx_headroom, @@ -316,7 +316,7 @@ Signed-off-by: Felix Fietkau } return RX_QUEUED; -@@ -2806,6 +2990,8 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx +@@ -2812,6 +2996,8 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx if (!rx->sdata->u.mgd.use_4addr) return RX_DROP_UNUSABLE; break; @@ -325,7 +325,7 @@ Signed-off-by: Felix Fietkau default: return RX_DROP_UNUSABLE; } -@@ -2834,155 +3020,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx +@@ -2840,155 +3026,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx return __ieee80211_rx_h_amsdu(rx, 0); } @@ -481,7 +481,7 @@ Signed-off-by: Felix Fietkau static ieee80211_rx_result debug_noinline ieee80211_rx_h_data(struct ieee80211_rx_data *rx) { -@@ -2991,6 +3028,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_ +@@ -2997,6 +3034,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_ struct net_device *dev = sdata->dev; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; __le16 fc = hdr->frame_control; @@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau bool port_control; int err; -@@ -3017,6 +3055,10 @@ ieee80211_rx_h_data(struct ieee80211_rx_ +@@ -3023,6 +3061,10 @@ ieee80211_rx_h_data(struct ieee80211_rx_ if (unlikely(err)) return RX_DROP_UNUSABLE; @@ -500,7 +500,7 @@ Signed-off-by: Felix Fietkau if (!ieee80211_frame_allowed(rx, fc)) return RX_DROP_MONITOR; -@@ -3987,10 +4029,6 @@ static void ieee80211_rx_handlers(struct +@@ -3997,10 +4039,6 @@ static void ieee80211_rx_handlers(struct CALL_RXH(ieee80211_rx_h_defragment); CALL_RXH(ieee80211_rx_h_michael_mic_verify); /* must be after MMIC verify so header is counted in MPDU mic */ diff --git a/package/kernel/mac80211/patches/subsys/316-v6.3-wifi-mac80211-add-a-workaround-for-receiving-non-sta.patch b/package/kernel/mac80211/patches/subsys/316-v6.3-wifi-mac80211-add-a-workaround-for-receiving-non-sta.patch index 6dc98ae16a..84c5d4077b 100644 --- a/package/kernel/mac80211/patches/subsys/316-v6.3-wifi-mac80211-add-a-workaround-for-receiving-non-sta.patch +++ b/package/kernel/mac80211/patches/subsys/316-v6.3-wifi-mac80211-add-a-workaround-for-receiving-non-sta.patch @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -6194,6 +6194,19 @@ static inline int ieee80211_data_to_8023 +@@ -6310,6 +6310,19 @@ static inline int ieee80211_data_to_8023 } /** @@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau * Decode an IEEE 802.11 A-MSDU and convert it to a list of 802.3 frames. --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2899,7 +2899,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ +@@ -2905,7 +2905,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ static ieee80211_rx_result res; struct ethhdr ethhdr; const u8 *check_da = ethhdr.h_dest, *check_sa = ethhdr.h_source; @@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau if (unlikely(ieee80211_has_a4(hdr->frame_control))) { check_da = NULL; -@@ -2917,7 +2916,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ +@@ -2923,7 +2922,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ case NL80211_IFTYPE_MESH_POINT: check_sa = NULL; check_da = NULL; @@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau break; default: break; -@@ -2932,10 +2930,21 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ +@@ -2938,10 +2936,21 @@ __ieee80211_rx_h_amsdu(struct ieee80211_ data_offset, true)) return RX_DROP_UNUSABLE; @@ -82,7 +82,7 @@ Signed-off-by: Felix Fietkau rx->skb = __skb_dequeue(&frame_list); --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -591,6 +591,9 @@ __sta_info_alloc(struct ieee80211_sub_if +@@ -594,6 +594,9 @@ __sta_info_alloc(struct ieee80211_sub_if sta->sta_state = IEEE80211_STA_NONE; diff --git a/package/kernel/mac80211/patches/subsys/318-wifi-mac80211-fix-race-in-mesh-sequence-number-assig.patch b/package/kernel/mac80211/patches/subsys/318-wifi-mac80211-fix-race-in-mesh-sequence-number-assig.patch index 7d01ffdfff..6bcbae7dab 100644 --- a/package/kernel/mac80211/patches/subsys/318-wifi-mac80211-fix-race-in-mesh-sequence-number-assig.patch +++ b/package/kernel/mac80211/patches/subsys/318-wifi-mac80211-fix-race-in-mesh-sequence-number-assig.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -696,7 +696,7 @@ struct ieee80211_if_mesh { +@@ -700,7 +700,7 @@ struct ieee80211_if_mesh { struct mesh_stats mshstats; struct mesh_config mshcfg; atomic_t estab_plinks; diff --git a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch index 968d2885f2..abc152aff3 100644 --- a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch +++ b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau /* Maximum number of broadcast/multicast frames to buffer when some of the * associated stations are using power saving. */ -@@ -656,6 +657,19 @@ struct mesh_table { +@@ -660,6 +661,19 @@ struct mesh_table { atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */ }; @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau struct ieee80211_if_mesh { struct timer_list housekeeping_timer; struct timer_list mesh_path_timer; -@@ -734,6 +748,7 @@ struct ieee80211_if_mesh { +@@ -738,6 +752,7 @@ struct ieee80211_if_mesh { struct mesh_table mpp_paths; /* Store paths for MPP&MAP */ int mesh_paths_generation; int mpp_paths_generation; @@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau }; #ifdef CPTCFG_MAC80211_MESH -@@ -2002,6 +2017,11 @@ int ieee80211_tx_control_port(struct wip +@@ -2007,6 +2022,11 @@ int ieee80211_tx_control_port(struct wip int link_id, u64 *cookie); int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev, const u8 *buf, size_t len); @@ -672,7 +672,7 @@ Signed-off-by: Felix Fietkau mesh_path_free_rcu(tbl, mpath); } -@@ -747,6 +1026,7 @@ void mesh_path_fix_nexthop(struct mesh_p +@@ -760,6 +1039,7 @@ void mesh_path_fix_nexthop(struct mesh_p mpath->exp_time = 0; mpath->flags = MESH_PATH_FIXED | MESH_PATH_SN_VALID; mesh_path_activate(mpath); @@ -680,7 +680,7 @@ Signed-off-by: Felix Fietkau spin_unlock_bh(&mpath->state_lock); ewma_mesh_fail_avg_init(&next_hop->mesh->fail_avg); /* init it at a low value - 0 start is tricky */ -@@ -758,6 +1038,7 @@ void mesh_pathtbl_init(struct ieee80211_ +@@ -771,6 +1051,7 @@ void mesh_pathtbl_init(struct ieee80211_ { mesh_table_init(&sdata->u.mesh.mesh_paths); mesh_table_init(&sdata->u.mesh.mpp_paths); @@ -688,7 +688,7 @@ Signed-off-by: Felix Fietkau } static -@@ -785,6 +1066,7 @@ void mesh_path_expire(struct ieee80211_s +@@ -798,6 +1079,7 @@ void mesh_path_expire(struct ieee80211_s void mesh_pathtbl_unregister(struct ieee80211_sub_if_data *sdata) { @@ -698,7 +698,7 @@ Signed-off-by: Felix Fietkau } --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2791,6 +2791,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2797,6 +2797,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ if (mesh_hdr->flags & MESH_FLAGS_AE) { struct mesh_path *mppath; char *proxied_addr; @@ -706,7 +706,7 @@ Signed-off-by: Felix Fietkau if (multicast) proxied_addr = mesh_hdr->eaddr1; -@@ -2806,11 +2807,18 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2812,11 +2813,18 @@ ieee80211_rx_mesh_data(struct ieee80211_ mpp_path_add(sdata, proxied_addr, eth->h_source); } else { spin_lock_bh(&mppath->state_lock); @@ -728,7 +728,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3022,6 +3022,9 @@ void ieee80211_check_fast_xmit(struct st +@@ -3028,6 +3028,9 @@ void ieee80211_check_fast_xmit(struct st if (!ieee80211_hw_check(&local->hw, SUPPORT_FAST_XMIT)) return; @@ -738,7 +738,7 @@ Signed-off-by: Felix Fietkau /* Locking here protects both the pointer itself, and against concurrent * invocations winning data access races to, e.g., the key pointer that * is used. -@@ -3403,6 +3406,9 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3409,6 +3412,9 @@ static bool ieee80211_amsdu_aggregate(st if (sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) return false; @@ -748,7 +748,7 @@ Signed-off-by: Felix Fietkau if (skb_is_gso(skb)) return false; -@@ -3635,10 +3641,11 @@ free: +@@ -3641,10 +3647,11 @@ free: return NULL; } @@ -764,7 +764,7 @@ Signed-off-by: Felix Fietkau { struct ieee80211_local *local = sdata->local; struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; -@@ -3647,7 +3654,6 @@ static void __ieee80211_xmit_fast(struct +@@ -3653,7 +3660,6 @@ static void __ieee80211_xmit_fast(struct ieee80211_tx_result r; int hw_headroom = sdata->local->hw.extra_tx_headroom; int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); @@ -772,7 +772,7 @@ Signed-off-by: Felix Fietkau skb = skb_share_check(skb, GFP_ATOMIC); if (unlikely(!skb)) -@@ -3667,11 +3673,10 @@ static void __ieee80211_xmit_fast(struct +@@ -3673,11 +3679,10 @@ static void __ieee80211_xmit_fast(struct ENCRYPT_NO))) goto free; @@ -786,7 +786,7 @@ Signed-off-by: Felix Fietkau info = IEEE80211_SKB_CB(skb); memset(info, 0, sizeof(*info)); -@@ -3690,7 +3695,8 @@ static void __ieee80211_xmit_fast(struct +@@ -3696,7 +3701,8 @@ static void __ieee80211_xmit_fast(struct #endif if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { @@ -796,7 +796,7 @@ Signed-off-by: Felix Fietkau *ieee80211_get_qos_ctl(hdr) = tid; } -@@ -3733,6 +3739,7 @@ static bool ieee80211_xmit_fast(struct i +@@ -3739,6 +3745,7 @@ static bool ieee80211_xmit_fast(struct i struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; struct tid_ampdu_tx *tid_tx = NULL; struct sk_buff *next; @@ -804,7 +804,7 @@ Signed-off-by: Felix Fietkau u8 tid = IEEE80211_NUM_TIDS; /* control port protocol needs a lot of special handling */ -@@ -3758,6 +3765,8 @@ static bool ieee80211_xmit_fast(struct i +@@ -3764,6 +3771,8 @@ static bool ieee80211_xmit_fast(struct i } } @@ -813,7 +813,7 @@ Signed-off-by: Felix Fietkau /* after this point (skb is modified) we cannot return false */ skb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata)); if (!skb) -@@ -3765,7 +3774,8 @@ static bool ieee80211_xmit_fast(struct i +@@ -3771,7 +3780,8 @@ static bool ieee80211_xmit_fast(struct i skb_list_walk_safe(skb, skb, next) { skb_mark_not_on_list(skb); @@ -823,7 +823,7 @@ Signed-off-by: Felix Fietkau } return true; -@@ -4252,8 +4262,15 @@ void __ieee80211_subif_start_xmit(struct +@@ -4260,8 +4270,15 @@ void __ieee80211_subif_start_xmit(struct return; } @@ -839,7 +839,7 @@ Signed-off-by: Felix Fietkau if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) goto out_free; -@@ -4263,8 +4280,6 @@ void __ieee80211_subif_start_xmit(struct +@@ -4271,8 +4288,6 @@ void __ieee80211_subif_start_xmit(struct skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); ieee80211_aggr_check(sdata, sta, skb); diff --git a/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch b/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch index 28b1ff1106..39a6b57b57 100644 --- a/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch +++ b/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2720,6 +2720,65 @@ ieee80211_deliver_skb(struct ieee80211_r +@@ -2726,6 +2726,65 @@ ieee80211_deliver_skb(struct ieee80211_r } } @@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau static ieee80211_rx_result ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta, struct sk_buff *skb) -@@ -2824,6 +2883,10 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2830,6 +2889,10 @@ ieee80211_rx_mesh_data(struct ieee80211_ skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]); @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control, eth->h_dest, eth->h_source); hdrlen = ieee80211_hdrlen(hdr.frame_control); -@@ -2862,6 +2925,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2868,6 +2931,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; info->control.vif = &sdata->vif; info->control.jiffies = jiffies; @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau if (multicast) { IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast); memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); -@@ -2883,7 +2947,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2889,7 +2953,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ } IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames); @@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau rx_accept: --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -2022,6 +2022,8 @@ void __ieee80211_xmit_fast(struct ieee80 +@@ -2027,6 +2027,8 @@ void __ieee80211_xmit_fast(struct ieee80 struct ieee80211_fast_tx *fast_tx, struct sk_buff *skb, bool ampdu, const u8 *da, const u8 *sa); @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -1191,10 +1191,8 @@ static bool ieee80211_tx_prep_agg(struct +@@ -1197,10 +1197,8 @@ static bool ieee80211_tx_prep_agg(struct return queued; } diff --git a/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch b/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch index e2b268ae4c..df9b48a4a8 100644 --- a/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch +++ b/package/kernel/mac80211/patches/subsys/321-mac80211-fix-mesh-forwarding.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2904,6 +2904,9 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2910,6 +2910,9 @@ ieee80211_rx_mesh_data(struct ieee80211_ if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr))) return RX_DROP_UNUSABLE; @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau } fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr)); -@@ -2918,7 +2921,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2924,7 +2927,7 @@ ieee80211_rx_mesh_data(struct ieee80211_ hdrlen += ETH_ALEN; else fwd_skb->protocol = htons(fwd_skb->len - hdrlen); diff --git a/package/kernel/mac80211/patches/subsys/322-wifi-mac80211-fix-mesh-path-discovery-based-on-unica.patch b/package/kernel/mac80211/patches/subsys/322-wifi-mac80211-fix-mesh-path-discovery-based-on-unica.patch index 292a89ef92..39f43b3bb4 100644 --- a/package/kernel/mac80211/patches/subsys/322-wifi-mac80211-fix-mesh-path-discovery-based-on-unica.patch +++ b/package/kernel/mac80211/patches/subsys/322-wifi-mac80211-fix-mesh-path-discovery-based-on-unica.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2824,17 +2824,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2830,17 +2830,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ mesh_rmc_check(sdata, eth->h_source, mesh_hdr)) return RX_DROP_MONITOR; @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau /* forward packet */ if (sdata->crypto_tx_tailroom_needed_cnt) tailroom = IEEE80211_ENCRYPT_TAILROOM; -@@ -2881,6 +2870,17 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2887,6 +2876,17 @@ ieee80211_rx_mesh_data(struct ieee80211_ rcu_read_unlock(); } diff --git a/package/kernel/mac80211/patches/subsys/323-v6.3-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch b/package/kernel/mac80211/patches/subsys/323-v6.3-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch index e23dc4d226..da16ab962b 100644 --- a/package/kernel/mac80211/patches/subsys/323-v6.3-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch +++ b/package/kernel/mac80211/patches/subsys/323-v6.3-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch @@ -44,7 +44,7 @@ Signed-off-by: Johannes Berg /** --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1252,6 +1252,21 @@ static int ieee80211_start_ap(struct wip +@@ -1255,6 +1255,21 @@ static int ieee80211_start_ap(struct wip prev_beacon_int = link_conf->beacon_int; link_conf->beacon_int = params->beacon_interval; diff --git a/package/kernel/mac80211/patches/subsys/324-v6.3-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch b/package/kernel/mac80211/patches/subsys/324-v6.3-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch index f843dba123..ea6e6f35c3 100644 --- a/package/kernel/mac80211/patches/subsys/324-v6.3-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch +++ b/package/kernel/mac80211/patches/subsys/324-v6.3-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch @@ -44,7 +44,7 @@ Signed-off-by: Johannes Berg /** --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1281,6 +1281,21 @@ static int ieee80211_start_ap(struct wip +@@ -1284,6 +1284,21 @@ static int ieee80211_start_ap(struct wip changed |= BSS_CHANGED_HE_BSS_COLOR; } diff --git a/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch index 1be5fcfbfa..a1a2634104 100644 --- a/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch +++ b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch @@ -13,7 +13,7 @@ Signed-off-by: Ryder Lee --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -5964,6 +5964,18 @@ void ieee80211_queue_delayed_work(struct +@@ -5977,6 +5977,18 @@ void ieee80211_queue_delayed_work(struct unsigned long delay); /** diff --git a/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch b/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch index 11f39c2d10..4251bfdb94 100644 --- a/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch +++ b/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -4564,6 +4564,12 @@ void ieee80211_check_fast_rx(struct sta_ +@@ -4580,6 +4580,12 @@ void ieee80211_check_fast_rx(struct sta_ } break; @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau default: goto clear; } -@@ -4772,6 +4778,7 @@ static bool ieee80211_invoke_fast_rx(str +@@ -4788,6 +4794,7 @@ static bool ieee80211_invoke_fast_rx(str struct sk_buff *skb = rx->skb; struct ieee80211_hdr *hdr = (void *)skb->data; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); @@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau int orig_len = skb->len; int hdrlen = ieee80211_hdrlen(hdr->frame_control); int snap_offs = hdrlen; -@@ -4833,7 +4840,8 @@ static bool ieee80211_invoke_fast_rx(str +@@ -4849,7 +4856,8 @@ static bool ieee80211_invoke_fast_rx(str snap_offs += IEEE80211_CCMP_HDR_LEN; } @@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau if (!pskb_may_pull(skb, snap_offs + sizeof(*payload))) return false; -@@ -4872,13 +4880,29 @@ static bool ieee80211_invoke_fast_rx(str +@@ -4888,13 +4896,29 @@ static bool ieee80211_invoke_fast_rx(str /* do the header conversion - first grab the addresses */ ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs); ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs); diff --git a/package/kernel/mac80211/patches/subsys/327-wifi-mac80211-add-support-for-letting-drivers-regist.patch b/package/kernel/mac80211/patches/subsys/327-wifi-mac80211-add-support-for-letting-drivers-regist.patch index ac290b5360..ba848583ce 100644 --- a/package/kernel/mac80211/patches/subsys/327-wifi-mac80211-add-support-for-letting-drivers-regist.patch +++ b/package/kernel/mac80211/patches/subsys/327-wifi-mac80211-add-support-for-letting-drivers-regist.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -4192,6 +4192,10 @@ struct ieee80211_prep_tx_info { +@@ -4201,6 +4201,10 @@ struct ieee80211_prep_tx_info { * Note that a sta can also be inserted or removed with valid links, * i.e. passed to @sta_add/@sta_state with sta->valid_links not zero. * In fact, cannot change from having valid_links and not having them. @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw, -@@ -4547,6 +4551,11 @@ struct ieee80211_ops { +@@ -4556,6 +4560,11 @@ struct ieee80211_ops { struct ieee80211_vif *vif, struct ieee80211_sta *sta, u16 old_links, u16 new_links); @@ -63,7 +63,7 @@ Signed-off-by: Felix Fietkau u16 old_links, u16 new_links, --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1939,7 +1939,8 @@ void ieee80211_color_collision_detection +@@ -1944,7 +1944,8 @@ void ieee80211_color_collision_detection /* interface handling */ #define MAC80211_SUPPORTED_FEATURES_TX (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \ NETIF_F_HW_CSUM | NETIF_F_SG | \ @@ -104,11 +104,11 @@ Signed-off-by: Felix Fietkau + .ndo_setup_tc = ieee80211_netdev_setup_tc, }; - static u16 ieee80211_monitor_select_queue(struct net_device *dev, -@@ -929,6 +945,7 @@ static const struct net_device_ops ieee8 - .ndo_set_mac_address = ieee80211_change_mac, - .ndo_get_stats64 = ieee80211_get_stats64, + #if LINUX_VERSION_IS_GEQ(5,2,0) +@@ -945,6 +961,7 @@ static const struct net_device_ops ieee8 + #if LINUX_VERSION_IS_GEQ(5,13,0) .ndo_fill_forward_path = ieee80211_netdev_fill_forward_path, + #endif + .ndo_setup_tc = ieee80211_netdev_setup_tc, }; diff --git a/package/kernel/mac80211/patches/subsys/329-wifi-mac80211-fix-receiving-mesh-packets-in-forwardi.patch b/package/kernel/mac80211/patches/subsys/329-wifi-mac80211-fix-receiving-mesh-packets-in-forwardi.patch index 6882694da8..8deaa1f358 100644 --- a/package/kernel/mac80211/patches/subsys/329-wifi-mac80211-fix-receiving-mesh-packets-in-forwardi.patch +++ b/package/kernel/mac80211/patches/subsys/329-wifi-mac80211-fix-receiving-mesh-packets-in-forwardi.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2828,14 +2828,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2834,14 +2834,6 @@ ieee80211_rx_mesh_data(struct ieee80211_ if (sdata->crypto_tx_tailroom_needed_cnt) tailroom = IEEE80211_ENCRYPT_TAILROOM; @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau if (mesh_hdr->flags & MESH_FLAGS_AE) { struct mesh_path *mppath; char *proxied_addr; -@@ -2874,6 +2866,14 @@ ieee80211_rx_mesh_data(struct ieee80211_ +@@ -2880,6 +2872,14 @@ ieee80211_rx_mesh_data(struct ieee80211_ if (ether_addr_equal(sdata->vif.addr, eth->h_dest)) goto rx_accept; diff --git a/package/kernel/mac80211/patches/subsys/330-wifi-ieee80211-correctly-mark-FTM-frames-non-buffera.patch b/package/kernel/mac80211/patches/subsys/330-wifi-ieee80211-correctly-mark-FTM-frames-non-buffera.patch index 079dd2a868..d36c886402 100644 --- a/package/kernel/mac80211/patches/subsys/330-wifi-ieee80211-correctly-mark-FTM-frames-non-buffera.patch +++ b/package/kernel/mac80211/patches/subsys/330-wifi-ieee80211-correctly-mark-FTM-frames-non-buffera.patch @@ -15,7 +15,7 @@ Reviewed-by: Peer, Ilan --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c -@@ -601,8 +601,9 @@ static void iwl_mvm_skb_prepare_status(s +@@ -605,8 +605,9 @@ static void iwl_mvm_skb_prepare_status(s static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm, struct ieee80211_tx_info *info, @@ -26,7 +26,7 @@ Reviewed-by: Peer, Ilan struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(info->control.vif); __le16 fc = hdr->frame_control; -@@ -621,7 +622,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st +@@ -625,7 +626,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st * reason 7 ("Class 3 frame received from nonassociated STA"). */ if (ieee80211_is_mgmt(fc) && @@ -35,7 +35,7 @@ Reviewed-by: Peer, Ilan ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc))) return mvm->probe_queue; -@@ -740,7 +741,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv +@@ -744,7 +745,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv else sta_id = mvmvif->mcast_sta.sta_id; @@ -67,7 +67,7 @@ Reviewed-by: Peer, Ilan * ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set * @seq_ctrl: frame sequence control bytes in little-endian byteorder */ -@@ -4121,6 +4107,44 @@ static inline u8 *ieee80211_get_DA(struc +@@ -4123,6 +4109,44 @@ static inline u8 *ieee80211_get_DA(struc } /** @@ -123,7 +123,7 @@ Reviewed-by: Peer, Ilan info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER; return TX_CONTINUE; } -@@ -1326,7 +1326,7 @@ static struct txq_info *ieee80211_get_tx +@@ -1332,7 +1332,7 @@ static struct txq_info *ieee80211_get_tx if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) && unlikely(!ieee80211_is_data_present(hdr->frame_control))) { if ((!ieee80211_is_mgmt(hdr->frame_control) || diff --git a/package/kernel/mac80211/patches/subsys/331-wifi-mac80211-flush-queues-on-STA-removal.patch b/package/kernel/mac80211/patches/subsys/331-wifi-mac80211-flush-queues-on-STA-removal.patch index 00232ec1b9..4dfda3b170 100644 --- a/package/kernel/mac80211/patches/subsys/331-wifi-mac80211-flush-queues-on-STA-removal.patch +++ b/package/kernel/mac80211/patches/subsys/331-wifi-mac80211-flush-queues-on-STA-removal.patch @@ -19,7 +19,7 @@ Reviewed-by: Greenman, Gregory --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -1271,6 +1271,14 @@ static void __sta_info_destroy_part2(str +@@ -1276,6 +1276,14 @@ static void __sta_info_destroy_part2(str WARN_ON_ONCE(ret); } diff --git a/package/kernel/mac80211/patches/subsys/332-wifi-iwlwifi-mvm-support-flush-on-AP-interfaces.patch b/package/kernel/mac80211/patches/subsys/332-wifi-iwlwifi-mvm-support-flush-on-AP-interfaces.patch index 3c31dfeddc..97b1454e2e 100644 --- a/package/kernel/mac80211/patches/subsys/332-wifi-iwlwifi-mvm-support-flush-on-AP-interfaces.patch +++ b/package/kernel/mac80211/patches/subsys/332-wifi-iwlwifi-mvm-support-flush-on-AP-interfaces.patch @@ -12,7 +12,7 @@ Reviewed-by: Greenman, Gregory --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c -@@ -4854,9 +4854,6 @@ static void iwl_mvm_mac_flush(struct iee +@@ -4844,9 +4844,6 @@ static void iwl_mvm_mac_flush(struct iee return; } @@ -22,7 +22,7 @@ Reviewed-by: Greenman, Gregory /* Make sure we're done with the deferred traffic before flushing */ flush_work(&mvm->add_stream_wk); -@@ -4874,9 +4871,6 @@ static void iwl_mvm_mac_flush(struct iee +@@ -4864,9 +4861,6 @@ static void iwl_mvm_mac_flush(struct iee if (mvmsta->vif != vif) continue; diff --git a/package/kernel/mac80211/patches/subsys/333-wifi-mac80211-add-flush_sta-method.patch b/package/kernel/mac80211/patches/subsys/333-wifi-mac80211-add-flush_sta-method.patch index 3bba0b7e66..0cbf19ca1a 100644 --- a/package/kernel/mac80211/patches/subsys/333-wifi-mac80211-add-flush_sta-method.patch +++ b/package/kernel/mac80211/patches/subsys/333-wifi-mac80211-add-flush_sta-method.patch @@ -12,7 +12,7 @@ Reviewed-by: Greenman, Gregory --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -3918,6 +3918,10 @@ struct ieee80211_prep_tx_info { +@@ -3927,6 +3927,10 @@ struct ieee80211_prep_tx_info { * Note that vif can be NULL. * The callback can sleep. * @@ -23,7 +23,7 @@ Reviewed-by: Greenman, Gregory * @channel_switch: Drivers that need (or want) to offload the channel * switch operation for CSAs received from the AP may implement this * callback. They must then call ieee80211_chswitch_done() to indicate -@@ -4372,6 +4376,8 @@ struct ieee80211_ops { +@@ -4381,6 +4385,8 @@ struct ieee80211_ops { #endif void (*flush)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop); @@ -58,7 +58,7 @@ Reviewed-by: Greenman, Gregory struct ieee80211_channel_switch *ch_switch) --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -1276,8 +1276,12 @@ static void __sta_info_destroy_part2(str +@@ -1281,8 +1281,12 @@ static void __sta_info_destroy_part2(str * frames sitting on hardware queues might be sent out without * any encryption at all. */ diff --git a/package/kernel/mac80211/patches/subsys/334-wifi-iwlwifi-mvm-support-new-flush_sta-method.patch b/package/kernel/mac80211/patches/subsys/334-wifi-iwlwifi-mvm-support-new-flush_sta-method.patch index 18f39d505f..eae5a38e2f 100644 --- a/package/kernel/mac80211/patches/subsys/334-wifi-iwlwifi-mvm-support-new-flush_sta-method.patch +++ b/package/kernel/mac80211/patches/subsys/334-wifi-iwlwifi-mvm-support-new-flush_sta-method.patch @@ -11,7 +11,7 @@ Reviewed-by: Greenman, Gregory --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c -@@ -4890,6 +4890,31 @@ static void iwl_mvm_mac_flush(struct iee +@@ -4880,6 +4880,31 @@ static void iwl_mvm_mac_flush(struct iee iwl_trans_wait_tx_queues_empty(mvm->trans, msk); } @@ -43,7 +43,7 @@ Reviewed-by: Greenman, Gregory static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey) { -@@ -5417,6 +5442,7 @@ const struct ieee80211_ops iwl_mvm_hw_op +@@ -5407,6 +5432,7 @@ const struct ieee80211_ops iwl_mvm_hw_op .mgd_complete_tx = iwl_mvm_mac_mgd_complete_tx, .mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover, .flush = iwl_mvm_mac_flush, diff --git a/package/kernel/mac80211/patches/subsys/335-wifi-mac80211-add-LDPC-related-flags-in-ieee80211_bs.patch b/package/kernel/mac80211/patches/subsys/335-wifi-mac80211-add-LDPC-related-flags-in-ieee80211_bs.patch index 1b379b76ae..4095ad4aca 100644 --- a/package/kernel/mac80211/patches/subsys/335-wifi-mac80211-add-LDPC-related-flags-in-ieee80211_bs.patch +++ b/package/kernel/mac80211/patches/subsys/335-wifi-mac80211-add-LDPC-related-flags-in-ieee80211_bs.patch @@ -34,7 +34,7 @@ Signed-off-by: Johannes Berg bool vht_mu_beamformer; --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1252,7 +1252,15 @@ static int ieee80211_start_ap(struct wip +@@ -1255,7 +1255,15 @@ static int ieee80211_start_ap(struct wip prev_beacon_int = link_conf->beacon_int; link_conf->beacon_int = params->beacon_interval; @@ -50,7 +50,7 @@ Signed-off-by: Johannes Berg link_conf->vht_su_beamformer = params->vht_cap->vht_cap_info & cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE); -@@ -1282,6 +1290,9 @@ static int ieee80211_start_ap(struct wip +@@ -1285,6 +1293,9 @@ static int ieee80211_start_ap(struct wip } if (params->he_cap) { diff --git a/package/kernel/mac80211/patches/subsys/336-v6.4-wifi-mac80211-generate-EMA-beacons-in-AP-mode.patch b/package/kernel/mac80211/patches/subsys/336-v6.4-wifi-mac80211-generate-EMA-beacons-in-AP-mode.patch index 088f468e37..64fdcf37c1 100644 --- a/package/kernel/mac80211/patches/subsys/336-v6.4-wifi-mac80211-generate-EMA-beacons-in-AP-mode.patch +++ b/package/kernel/mac80211/patches/subsys/336-v6.4-wifi-mac80211-generate-EMA-beacons-in-AP-mode.patch @@ -38,7 +38,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -5252,6 +5252,74 @@ ieee80211_beacon_get_template(struct iee +@@ -5265,6 +5265,74 @@ ieee80211_beacon_get_template(struct iee unsigned int link_id); /** @@ -115,7 +115,7 @@ Signed-off-by: Johannes Berg * @vif: &struct ieee80211_vif pointer from the add_interface callback. --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1122,11 +1122,11 @@ static int ieee80211_assign_beacon(struc +@@ -1125,11 +1125,11 @@ static int ieee80211_assign_beacon(struc if (params->mbssid_ies) { mbssid = params->mbssid_ies; size += struct_size(new->mbssid_ies, elem, mbssid->cnt); @@ -129,7 +129,7 @@ Signed-off-by: Johannes Berg } new = kzalloc(size, GFP_KERNEL); -@@ -3384,8 +3384,11 @@ cfg80211_beacon_dup(struct cfg80211_beac +@@ -3394,8 +3394,11 @@ cfg80211_beacon_dup(struct cfg80211_beac len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len + beacon->proberesp_ies_len + beacon->assocresp_ies_len + @@ -145,7 +145,7 @@ Signed-off-by: Johannes Berg if (!new_beacon) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1182,13 +1182,17 @@ ieee80211_vif_get_shift(struct ieee80211 +@@ -1186,13 +1186,17 @@ ieee80211_vif_get_shift(struct ieee80211 } static inline int @@ -168,7 +168,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -5205,13 +5205,20 @@ ieee80211_beacon_get_finish(struct ieee8 +@@ -5213,13 +5213,20 @@ ieee80211_beacon_get_finish(struct ieee8 } static void @@ -192,7 +192,7 @@ Signed-off-by: Johannes Berg for (i = 0; i < beacon->mbssid_ies->cnt; i++) skb_put_data(skb, beacon->mbssid_ies->elem[i].data, beacon->mbssid_ies->elem[i].len); -@@ -5224,7 +5231,8 @@ ieee80211_beacon_get_ap(struct ieee80211 +@@ -5232,7 +5239,8 @@ ieee80211_beacon_get_ap(struct ieee80211 struct ieee80211_mutable_offsets *offs, bool is_template, struct beacon_data *beacon, @@ -202,7 +202,7 @@ Signed-off-by: Johannes Berg { struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); -@@ -5243,7 +5251,9 @@ ieee80211_beacon_get_ap(struct ieee80211 +@@ -5251,7 +5259,9 @@ ieee80211_beacon_get_ap(struct ieee80211 /* headroom, head length, * tail length, maximum TIM length and multiple BSSID length */ @@ -213,7 +213,7 @@ Signed-off-by: Johannes Berg skb = dev_alloc_skb(local->tx_headroom + beacon->head_len + beacon->tail_len + 256 + local->hw.extra_beacon_tailroom + mbssid_len); -@@ -5261,7 +5271,7 @@ ieee80211_beacon_get_ap(struct ieee80211 +@@ -5269,7 +5279,7 @@ ieee80211_beacon_get_ap(struct ieee80211 offs->cntdwn_counter_offs[0] = beacon->cntdwn_counter_offsets[0]; if (mbssid_len) { @@ -222,7 +222,7 @@ Signed-off-by: Johannes Berg offs->mbssid_off = skb->len - mbssid_len; } -@@ -5280,12 +5290,51 @@ ieee80211_beacon_get_ap(struct ieee80211 +@@ -5288,12 +5298,51 @@ ieee80211_beacon_get_ap(struct ieee80211 return skb; } @@ -275,7 +275,7 @@ Signed-off-by: Johannes Berg { struct ieee80211_local *local = hw_to_local(hw); struct beacon_data *beacon = NULL; -@@ -5314,8 +5363,29 @@ __ieee80211_beacon_get(struct ieee80211_ +@@ -5322,8 +5371,29 @@ __ieee80211_beacon_get(struct ieee80211_ if (!beacon) goto out; @@ -307,7 +307,7 @@ Signed-off-by: Johannes Berg } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; struct ieee80211_hdr *hdr; -@@ -5403,10 +5473,50 @@ ieee80211_beacon_get_template(struct iee +@@ -5411,10 +5481,50 @@ ieee80211_beacon_get_template(struct iee struct ieee80211_mutable_offsets *offs, unsigned int link_id) { @@ -359,7 +359,7 @@ Signed-off-by: Johannes Berg struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 *tim_offset, u16 *tim_length, -@@ -5414,7 +5524,9 @@ struct sk_buff *ieee80211_beacon_get_tim +@@ -5422,7 +5532,9 @@ struct sk_buff *ieee80211_beacon_get_tim { struct ieee80211_mutable_offsets offs = {}; struct sk_buff *bcn = __ieee80211_beacon_get(hw, vif, &offs, false, diff --git a/package/kernel/mac80211/patches/subsys/337-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch b/package/kernel/mac80211/patches/subsys/337-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch deleted file mode 100644 index 0ef0aa2ef7..0000000000 --- a/package/kernel/mac80211/patches/subsys/337-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Felix Fietkau -Date: Wed, 3 Jan 2024 15:10:18 +0100 -Subject: [PATCH] wifi: mac80211: fix race condition on enabling fast-xmit - -fast-xmit must only be enabled after the sta has been uploaded to the driver, -otherwise it could end up passing the not-yet-uploaded sta via drv_tx calls -to the driver, leading to potential crashes because of uninitialized drv_priv -data. -Add a missing sta->uploaded check and re-check fast xmit after inserting a sta. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/sta_info.c -+++ b/net/mac80211/sta_info.c -@@ -886,6 +886,7 @@ static int sta_info_insert_finish(struct - - if (ieee80211_vif_is_mesh(&sdata->vif)) - mesh_accept_plinks_update(sdata); -+ ieee80211_check_fast_xmit(sta); - - return 0; - out_remove: ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3041,7 +3041,7 @@ void ieee80211_check_fast_xmit(struct st - sdata->vif.type == NL80211_IFTYPE_STATION) - goto out; - -- if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED)) -+ if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED) || !sta->uploaded) - goto out; - - if (test_sta_flag(sta, WLAN_STA_PS_STA) || diff --git a/package/kernel/mac80211/patches/subsys/340-cfg80211-allow-grace-period-for-DFS-available-after-.patch b/package/kernel/mac80211/patches/subsys/340-cfg80211-allow-grace-period-for-DFS-available-after-.patch index ad2e2e24c9..766eccfebf 100644 --- a/package/kernel/mac80211/patches/subsys/340-cfg80211-allow-grace-period-for-DFS-available-after-.patch +++ b/package/kernel/mac80211/patches/subsys/340-cfg80211-allow-grace-period-for-DFS-available-after-.patch @@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau { --- a/net/wireless/core.h +++ b/net/wireless/core.h -@@ -477,6 +477,8 @@ void cfg80211_set_dfs_state(struct wiphy +@@ -491,6 +491,8 @@ void cfg80211_set_dfs_state(struct wiphy enum nl80211_dfs_state dfs_state); void cfg80211_dfs_channels_update_work(struct work_struct *work); @@ -124,7 +124,7 @@ Signed-off-by: Felix Fietkau cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c -@@ -891,6 +891,8 @@ void cfg80211_dfs_channels_update_work(s +@@ -904,6 +904,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; @@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau } else { if (regulatory_pre_cac_allowed(wiphy) || cfg80211_any_wiphy_oper_chan(wiphy, c)) -@@ -898,11 +900,10 @@ void cfg80211_dfs_channels_update_work(s +@@ -911,11 +913,10 @@ void cfg80211_dfs_channels_update_work(s time_dfs_update = REG_PRE_CAC_EXPIRY_GRACE_MS; radar_event = NL80211_RADAR_PRE_CAC_EXPIRED; diff --git a/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch b/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch index d0551c509f..be332e2275 100644 --- a/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch +++ b/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch @@ -26,7 +26,7 @@ Signed-off-by: Johannes Berg --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6005,7 +6005,7 @@ done: +@@ -6010,7 +6010,7 @@ done: brcmf_dbg(CONN, "Report roaming result\n"); if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X && profile->is_ft) { @@ -37,7 +37,7 @@ Signed-off-by: Johannes Berg --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -7720,6 +7720,8 @@ void cfg80211_roamed(struct net_device * +@@ -7836,6 +7836,8 @@ void cfg80211_roamed(struct net_device * * * @dev: network device * @bssid: the BSSID of the AP @@ -46,7 +46,7 @@ Signed-off-by: Johannes Berg * @gfp: allocation flags * * This function should be called by a driver that supports 4 way handshake -@@ -7730,7 +7732,7 @@ void cfg80211_roamed(struct net_device * +@@ -7846,7 +7848,7 @@ void cfg80211_roamed(struct net_device * * indicate the 802.11 association. */ void cfg80211_port_authorized(struct net_device *dev, const u8 *bssid, @@ -76,7 +76,7 @@ Signed-off-by: Johannes Berg --- a/net/wireless/core.h +++ b/net/wireless/core.h -@@ -271,6 +271,8 @@ struct cfg80211_event { +@@ -277,6 +277,8 @@ struct cfg80211_event { } ij; struct { u8 bssid[ETH_ALEN]; @@ -85,7 +85,7 @@ Signed-off-by: Johannes Berg } pa; }; }; -@@ -409,7 +411,8 @@ int cfg80211_disconnect(struct cfg80211_ +@@ -421,7 +423,8 @@ int cfg80211_disconnect(struct cfg80211_ bool wextev); void __cfg80211_roamed(struct wireless_dev *wdev, struct cfg80211_roam_info *info); @@ -97,7 +97,7 @@ Signed-off-by: Johannes Berg void cfg80211_autodisconnect_wk(struct work_struct *work); --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -17936,7 +17936,8 @@ void nl80211_send_roamed(struct cfg80211 +@@ -17993,7 +17993,8 @@ void nl80211_send_roamed(struct cfg80211 } void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev, @@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg { struct sk_buff *msg; void *hdr; -@@ -17956,6 +17957,11 @@ void nl80211_send_port_authorized(struct +@@ -18013,6 +18014,11 @@ void nl80211_send_port_authorized(struct nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid)) goto nla_put_failure; diff --git a/package/kernel/mac80211/patches/subsys/342-v6.3-mac80211-support-minimal-EHT-rate-reporting-on-RX.patch b/package/kernel/mac80211/patches/subsys/342-v6.3-mac80211-support-minimal-EHT-rate-reporting-on-RX.patch index 0b1111505c..0a2b315e2a 100644 --- a/package/kernel/mac80211/patches/subsys/342-v6.3-mac80211-support-minimal-EHT-rate-reporting-on-RX.patch +++ b/package/kernel/mac80211/patches/subsys/342-v6.3-mac80211-support-minimal-EHT-rate-reporting-on-RX.patch @@ -18,7 +18,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1468,6 +1468,7 @@ enum mac80211_rx_encoding { +@@ -1477,6 +1477,7 @@ enum mac80211_rx_encoding { RX_ENC_HT, RX_ENC_VHT, RX_ENC_HE, @@ -26,7 +26,7 @@ Signed-off-by: Johannes Berg }; /** -@@ -1501,7 +1502,7 @@ enum mac80211_rx_encoding { +@@ -1510,7 +1511,7 @@ enum mac80211_rx_encoding { * @antenna: antenna used * @rate_idx: index of data rate into band's supported rates or MCS index if * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) @@ -35,7 +35,7 @@ Signed-off-by: Johannes Berg * @flag: %RX_FLAG_\* * @encoding: &enum mac80211_rx_encoding * @bw: &enum rate_info_bw -@@ -1509,6 +1510,8 @@ enum mac80211_rx_encoding { +@@ -1518,6 +1519,8 @@ enum mac80211_rx_encoding { * @he_ru: HE RU, from &enum nl80211_he_ru_alloc * @he_gi: HE GI, from &enum nl80211_he_gi * @he_dcm: HE DCM value @@ -44,7 +44,7 @@ Signed-off-by: Johannes Berg * @rx_flags: internal RX flags for mac80211 * @ampdu_reference: A-MPDU reference number, must be a different value for * each A-MPDU but the same for each subframe within one A-MPDU -@@ -1530,8 +1533,18 @@ struct ieee80211_rx_status { +@@ -1539,8 +1542,18 @@ struct ieee80211_rx_status { u32 flag; u16 freq: 13, freq_offset: 1; u8 enc_flags; @@ -67,7 +67,7 @@ Signed-off-by: Johannes Berg u8 rx_flags; --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -5328,6 +5328,15 @@ void ieee80211_rx_list(struct ieee80211_ +@@ -5358,6 +5358,15 @@ void ieee80211_rx_list(struct ieee80211_ status->rate_idx, status->nss)) goto drop; break; @@ -94,7 +94,7 @@ Signed-off-by: Johannes Berg */ #include -@@ -2385,6 +2385,13 @@ static void sta_stats_decode_rate(struct +@@ -2389,6 +2389,13 @@ static void sta_stats_decode_rate(struct rinfo->he_ru_alloc = STA_STATS_GET(HE_RU, rate); rinfo->he_dcm = STA_STATS_GET(HE_DCM, rate); break; @@ -157,7 +157,7 @@ Signed-off-by: Johannes Berg return STA_STATS_RATE_INVALID; --- a/net/mac80211/util.c +++ b/net/mac80211/util.c -@@ -3900,6 +3900,19 @@ u64 ieee80211_calculate_rx_timestamp(str +@@ -3898,6 +3898,19 @@ u64 ieee80211_calculate_rx_timestamp(str /* Fill cfg80211 rate info */ switch (status->encoding) { diff --git a/package/kernel/mac80211/patches/subsys/343-v6.3-wifi-mac80211-mlme-handle-EHT-channel-puncturing.patch b/package/kernel/mac80211/patches/subsys/343-v6.3-wifi-mac80211-mlme-handle-EHT-channel-puncturing.patch index b5bd501937..4a66e4b1f3 100644 --- a/package/kernel/mac80211/patches/subsys/343-v6.3-wifi-mac80211-mlme-handle-EHT-channel-puncturing.patch +++ b/package/kernel/mac80211/patches/subsys/343-v6.3-wifi-mac80211-mlme-handle-EHT-channel-puncturing.patch @@ -62,7 +62,7 @@ Signed-off-by: Johannes Berg bool mu_mimo_owner; --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -4184,7 +4184,7 @@ static int ieee80211_set_ap_chanwidth(st +@@ -4195,7 +4195,7 @@ static int ieee80211_set_ap_chanwidth(st struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_link_data *link; int ret; @@ -73,7 +73,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c -@@ -1916,7 +1916,7 @@ int ieee80211_link_use_reserved_context( +@@ -1935,7 +1935,7 @@ int ieee80211_link_use_reserved_context( int ieee80211_link_change_bandwidth(struct ieee80211_link_data *link, const struct cfg80211_chan_def *chandef, @@ -84,7 +84,7 @@ Signed-off-by: Johannes Berg struct ieee80211_bss_conf *link_conf = link->conf; --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -2491,7 +2491,7 @@ int ieee80211_link_unreserve_chanctx(str +@@ -2497,7 +2497,7 @@ int ieee80211_link_unreserve_chanctx(str int __must_check ieee80211_link_change_bandwidth(struct ieee80211_link_data *link, const struct cfg80211_chan_def *chandef, @@ -255,7 +255,7 @@ Signed-off-by: Johannes Berg { struct ieee80211_sub_if_data *sdata = link->sdata; struct ieee80211_local *local = sdata->local; -@@ -4111,6 +4246,7 @@ static bool ieee80211_assoc_config_link( +@@ -4140,6 +4275,7 @@ static bool ieee80211_assoc_config_link( link_sta); bss_conf->eht_support = link_sta->pub->eht_cap.has_eht; @@ -263,7 +263,7 @@ Signed-off-by: Johannes Berg } else { bss_conf->eht_support = false; } -@@ -5423,6 +5559,45 @@ static bool ieee80211_rx_our_beacon(cons +@@ -5452,6 +5588,45 @@ static bool ieee80211_rx_our_beacon(cons return ether_addr_equal(tx_bssid, bss->transmitted_bss->bssid); } @@ -309,7 +309,7 @@ Signed-off-by: Johannes Berg static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link, struct ieee80211_hdr *hdr, size_t len, struct ieee80211_rx_status *rx_status) -@@ -5439,7 +5614,7 @@ static void ieee80211_rx_mgmt_beacon(str +@@ -5468,7 +5643,7 @@ static void ieee80211_rx_mgmt_beacon(str struct ieee80211_channel *chan; struct link_sta_info *link_sta; struct sta_info *sta; @@ -318,7 +318,7 @@ Signed-off-by: Johannes Berg bool erp_valid; u8 erp_value = 0; u32 ncrc = 0; -@@ -5731,6 +5906,21 @@ static void ieee80211_rx_mgmt_beacon(str +@@ -5761,6 +5936,21 @@ static void ieee80211_rx_mgmt_beacon(str elems->pwr_constr_elem, elems->cisco_dtpc_elem); @@ -340,7 +340,7 @@ Signed-off-by: Johannes Berg ieee80211_link_info_change_notify(sdata, link, changed); free: kfree(elems); -@@ -6832,9 +7022,12 @@ ieee80211_setup_assoc_link(struct ieee80 +@@ -6862,9 +7052,12 @@ ieee80211_setup_assoc_link(struct ieee80 ieee80211_apply_htcap_overrides(sdata, &sta_ht_cap); } @@ -353,7 +353,7 @@ Signed-off-by: Johannes Berg const struct element *elem; u8 dtim_count = 0; -@@ -6863,6 +7056,31 @@ ieee80211_setup_assoc_link(struct ieee80 +@@ -6893,6 +7086,31 @@ ieee80211_setup_assoc_link(struct ieee80 link->conf->ema_ap = true; else link->conf->ema_ap = false; diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0001-wifi-cfg80211-move-puncturing-bitmap-validation-from.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0001-wifi-cfg80211-move-puncturing-bitmap-validation-from.patch index 31bc86197e..408b531a90 100644 --- a/package/kernel/mac80211/patches/subsys/344-v6.3-0001-wifi-cfg80211-move-puncturing-bitmap-validation-from.patch +++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0001-wifi-cfg80211-move-puncturing-bitmap-validation-from.patch @@ -22,7 +22,7 @@ Signed-off-by: Johannes Berg --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -8951,4 +8951,16 @@ static inline int cfg80211_color_change_ +@@ -9067,4 +9067,16 @@ static inline int cfg80211_color_change_ 0, 0); } @@ -120,7 +120,7 @@ Signed-off-by: Johannes Berg break; link->u.mgd.conn_flags |= ieee80211_chandef_downgrade(chandef); -@@ -5584,8 +5523,8 @@ static bool ieee80211_config_puncturing( +@@ -5613,8 +5552,8 @@ static bool ieee80211_config_puncturing( extracted == link->conf->eht_puncturing) return true; @@ -131,7 +131,7 @@ Signed-off-by: Johannes Berg link_info(link, "Got an invalid disable subchannel bitmap from AP %pM: bitmap = 0x%x, bw = 0x%x. disconnect\n", link->u.mgd.bssid, -@@ -7072,8 +7011,8 @@ ieee80211_setup_assoc_link(struct ieee80 +@@ -7102,8 +7041,8 @@ ieee80211_setup_assoc_link(struct ieee80 u16 bitmap; bitmap = get_unaligned_le16(disable_subchannel_bitmap); diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0002-wifi-nl80211-validate-and-configure-puncturing-bitma.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0002-wifi-nl80211-validate-and-configure-puncturing-bitma.patch index 6a84feeeba..be7ecba586 100644 --- a/package/kernel/mac80211/patches/subsys/344-v6.3-0002-wifi-nl80211-validate-and-configure-puncturing-bitma.patch +++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0002-wifi-nl80211-validate-and-configure-puncturing-bitma.patch @@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -1330,6 +1330,9 @@ struct cfg80211_unsol_bcast_probe_resp { +@@ -1333,6 +1333,9 @@ struct cfg80211_unsol_bcast_probe_resp { * @fils_discovery: FILS discovery transmission parameters * @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters * @mbssid_config: AP settings for multiple bssid @@ -38,7 +38,7 @@ Signed-off-by: Johannes Berg */ struct cfg80211_ap_settings { struct cfg80211_chan_def chandef; -@@ -1364,6 +1367,7 @@ struct cfg80211_ap_settings { +@@ -1367,6 +1370,7 @@ struct cfg80211_ap_settings { struct cfg80211_fils_discovery fils_discovery; struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp; struct cfg80211_mbssid_config mbssid_config; @@ -46,7 +46,7 @@ Signed-off-by: Johannes Berg }; /** -@@ -1381,6 +1385,9 @@ struct cfg80211_ap_settings { +@@ -1384,6 +1388,9 @@ struct cfg80211_ap_settings { * @radar_required: whether radar detection is required on the new channel * @block_tx: whether transmissions should be blocked while changing * @count: number of beacons until switch @@ -56,7 +56,7 @@ Signed-off-by: Johannes Berg */ struct cfg80211_csa_settings { struct cfg80211_chan_def chandef; -@@ -1393,6 +1400,7 @@ struct cfg80211_csa_settings { +@@ -1396,6 +1403,7 @@ struct cfg80211_csa_settings { bool radar_required; bool block_tx; u8 count; @@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg NUM_NL80211_EXT_FEATURES, --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -799,6 +799,7 @@ static const struct nla_policy nl80211_p +@@ -819,6 +819,7 @@ static const struct nla_policy nl80211_p [NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN), [NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG }, [NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT }, @@ -115,7 +115,7 @@ Signed-off-by: Johannes Berg }; /* policy for the key attributes */ -@@ -3167,6 +3168,21 @@ static bool nl80211_can_set_dev_channel( +@@ -3187,6 +3188,21 @@ static bool nl80211_can_set_dev_channel( wdev->iftype == NL80211_IFTYPE_P2P_GO; } @@ -137,7 +137,7 @@ Signed-off-by: Johannes Berg int nl80211_parse_chandef(struct cfg80211_registered_device *rdev, struct genl_info *info, struct cfg80211_chan_def *chandef) -@@ -5912,6 +5928,14 @@ static int nl80211_start_ap(struct sk_bu +@@ -5938,6 +5954,14 @@ static int nl80211_start_ap(struct sk_bu goto out; } @@ -152,7 +152,7 @@ Signed-off-by: Johannes Berg if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms->chandef, wdev->iftype)) { err = -EINVAL; -@@ -10050,6 +10074,14 @@ skip_beacons: +@@ -10076,6 +10100,14 @@ skip_beacons: if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX]) params.block_tx = true; diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0003-wifi-cfg80211-include-puncturing-bitmap-in-channel-s.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0003-wifi-cfg80211-include-puncturing-bitmap-in-channel-s.patch index e3872f31f3..2218df2962 100644 --- a/package/kernel/mac80211/patches/subsys/344-v6.3-0003-wifi-cfg80211-include-puncturing-bitmap-in-channel-s.patch +++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0003-wifi-cfg80211-include-puncturing-bitmap-in-channel-s.patch @@ -56,7 +56,7 @@ Signed-off-by: Johannes Berg --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -8325,13 +8325,14 @@ bool cfg80211_reg_can_beacon_relax(struc +@@ -8441,13 +8441,14 @@ bool cfg80211_reg_can_beacon_relax(struc * @dev: the device which switched channels * @chandef: the new channel definition * @link_id: the link ID for MLO, must be 0 for non-MLO @@ -72,7 +72,7 @@ Signed-off-by: Johannes Berg /* * cfg80211_ch_switch_started_notify - notify channel switch start -@@ -8340,6 +8341,7 @@ void cfg80211_ch_switch_notify(struct ne +@@ -8456,6 +8457,7 @@ void cfg80211_ch_switch_notify(struct ne * @link_id: the link ID for MLO, must be 0 for non-MLO * @count: the number of TBTTs until the channel switch happens * @quiet: whether or not immediate quiet was requested by the AP @@ -80,7 +80,7 @@ Signed-off-by: Johannes Berg * * Inform the userspace about the channel switch that has just * started, so that it can take appropriate actions (eg. starting -@@ -8348,7 +8350,7 @@ void cfg80211_ch_switch_notify(struct ne +@@ -8464,7 +8466,7 @@ void cfg80211_ch_switch_notify(struct ne void cfg80211_ch_switch_started_notify(struct net_device *dev, struct cfg80211_chan_def *chandef, unsigned int link_id, u8 count, @@ -91,7 +91,7 @@ Signed-off-by: Johannes Berg * ieee80211_operating_class_to_band - convert operating class to band --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -3600,7 +3600,8 @@ static int __ieee80211_csa_finalize(stru +@@ -3610,7 +3610,8 @@ static int __ieee80211_csa_finalize(stru if (err) return err; @@ -101,7 +101,7 @@ Signed-off-by: Johannes Berg return 0; } -@@ -3872,7 +3873,7 @@ __ieee80211_channel_switch(struct wiphy +@@ -3882,7 +3883,7 @@ __ieee80211_channel_switch(struct wiphy cfg80211_ch_switch_started_notify(sdata->dev, &sdata->deflink.csa_chandef, 0, @@ -112,7 +112,7 @@ Signed-off-by: Johannes Berg ieee80211_link_info_change_notify(sdata, &sdata->deflink, --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c -@@ -1778,7 +1778,7 @@ static void ieee80211_chswitch_post_beac +@@ -1784,7 +1784,7 @@ static void ieee80211_chswitch_post_beac return; } @@ -121,7 +121,7 @@ Signed-off-by: Johannes Berg } void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success) -@@ -1988,7 +1988,7 @@ ieee80211_sta_process_chanswitch(struct +@@ -1994,7 +1994,7 @@ ieee80211_sta_process_chanswitch(struct mutex_unlock(&local->mtx); cfg80211_ch_switch_started_notify(sdata->dev, &csa_ie.chandef, 0, @@ -132,7 +132,7 @@ Signed-off-by: Johannes Berg /* use driver's channel switch callback */ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -18973,7 +18973,7 @@ static void nl80211_ch_switch_notify(str +@@ -19054,7 +19054,7 @@ static void nl80211_ch_switch_notify(str struct cfg80211_chan_def *chandef, gfp_t gfp, enum nl80211_commands notif, @@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg { struct wireless_dev *wdev = netdev->ieee80211_ptr; struct sk_buff *msg; -@@ -19007,6 +19007,9 @@ static void nl80211_ch_switch_notify(str +@@ -19088,6 +19088,9 @@ static void nl80211_ch_switch_notify(str goto nla_put_failure; } @@ -151,7 +151,7 @@ Signed-off-by: Johannes Berg genlmsg_end(msg, hdr); genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, -@@ -19019,7 +19022,7 @@ static void nl80211_ch_switch_notify(str +@@ -19100,7 +19103,7 @@ static void nl80211_ch_switch_notify(str void cfg80211_ch_switch_notify(struct net_device *dev, struct cfg80211_chan_def *chandef, @@ -160,7 +160,7 @@ Signed-off-by: Johannes Berg { struct wireless_dev *wdev = dev->ieee80211_ptr; struct wiphy *wiphy = wdev->wiphy; -@@ -19028,7 +19031,7 @@ void cfg80211_ch_switch_notify(struct ne +@@ -19109,7 +19112,7 @@ void cfg80211_ch_switch_notify(struct ne ASSERT_WDEV_LOCK(wdev); WARN_INVALID_LINK_ID(wdev, link_id); @@ -169,7 +169,7 @@ Signed-off-by: Johannes Berg switch (wdev->iftype) { case NL80211_IFTYPE_STATION: -@@ -19056,14 +19059,15 @@ void cfg80211_ch_switch_notify(struct ne +@@ -19137,14 +19140,15 @@ void cfg80211_ch_switch_notify(struct ne cfg80211_sched_dfs_chan_update(rdev); nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL, @@ -187,7 +187,7 @@ Signed-off-by: Johannes Berg { struct wireless_dev *wdev = dev->ieee80211_ptr; struct wiphy *wiphy = wdev->wiphy; -@@ -19072,11 +19076,13 @@ void cfg80211_ch_switch_started_notify(s +@@ -19153,11 +19157,13 @@ void cfg80211_ch_switch_started_notify(s ASSERT_WDEV_LOCK(wdev); WARN_INVALID_LINK_ID(wdev, link_id); diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0004-wifi-mac80211-configure-puncturing-bitmap.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0004-wifi-mac80211-configure-puncturing-bitmap.patch index 06951b403d..0d16e89c63 100644 --- a/package/kernel/mac80211/patches/subsys/344-v6.3-0004-wifi-mac80211-configure-puncturing-bitmap.patch +++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0004-wifi-mac80211-configure-puncturing-bitmap.patch @@ -38,7 +38,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1220,7 +1220,7 @@ static int ieee80211_start_ap(struct wip +@@ -1223,7 +1223,7 @@ static int ieee80211_start_ap(struct wip struct ieee80211_local *local = sdata->local; struct beacon_data *old; struct ieee80211_sub_if_data *vlan; @@ -47,7 +47,7 @@ Signed-off-by: Johannes Berg BSS_CHANGED_BEACON_ENABLED | BSS_CHANGED_BEACON | BSS_CHANGED_P2P_PS | -@@ -1307,6 +1307,11 @@ static int ieee80211_start_ap(struct wip +@@ -1310,6 +1310,11 @@ static int ieee80211_start_ap(struct wip IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO; } @@ -59,7 +59,7 @@ Signed-off-by: Johannes Berg if (sdata->vif.type == NL80211_IFTYPE_AP && params->mbssid_config.tx_wdev) { err = ieee80211_set_ap_mbssid_options(sdata, -@@ -3559,6 +3564,12 @@ static int __ieee80211_csa_finalize(stru +@@ -3569,6 +3574,12 @@ static int __ieee80211_csa_finalize(stru lockdep_assert_held(&local->mtx); lockdep_assert_held(&local->chanctx_mtx); @@ -72,7 +72,7 @@ Signed-off-by: Johannes Berg /* * using reservation isn't immediate as it may be deferred until later * with multi-vif. once reservation is complete it will re-schedule the -@@ -3601,7 +3612,7 @@ static int __ieee80211_csa_finalize(stru +@@ -3611,7 +3622,7 @@ static int __ieee80211_csa_finalize(stru return err; cfg80211_ch_switch_notify(sdata->dev, &sdata->deflink.csa_chandef, 0, @@ -81,7 +81,7 @@ Signed-off-by: Johannes Berg return 0; } -@@ -3863,9 +3874,13 @@ __ieee80211_channel_switch(struct wiphy +@@ -3873,9 +3884,13 @@ __ieee80211_channel_switch(struct wiphy goto out; } @@ -95,7 +95,7 @@ Signed-off-by: Johannes Berg if (sdata->deflink.csa_block_tx) ieee80211_stop_vif_queues(local, sdata, -@@ -3873,7 +3888,8 @@ __ieee80211_channel_switch(struct wiphy +@@ -3883,7 +3898,8 @@ __ieee80211_channel_switch(struct wiphy cfg80211_ch_switch_started_notify(sdata->dev, &sdata->deflink.csa_chandef, 0, diff --git a/package/kernel/mac80211/patches/subsys/345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch b/package/kernel/mac80211/patches/subsys/345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch index 607f86f295..14577e27f7 100644 --- a/package/kernel/mac80211/patches/subsys/345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch +++ b/package/kernel/mac80211/patches/subsys/345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch @@ -43,7 +43,7 @@ Signed-off-by: Johannes Berg /** --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1310,6 +1310,22 @@ static int ieee80211_start_ap(struct wip +@@ -1313,6 +1313,22 @@ static int ieee80211_start_ap(struct wip if (params->eht_cap) { link_conf->eht_puncturing = params->punct_bitmap; changed |= BSS_CHANGED_EHT_PUNCTURING; diff --git a/package/kernel/mac80211/patches/subsys/346-v6.4-wifi-mac80211-warn-only-once-on-AP-probe.patch b/package/kernel/mac80211/patches/subsys/346-v6.4-wifi-mac80211-warn-only-once-on-AP-probe.patch index 3844ae6f7f..60d2ec2926 100644 --- a/package/kernel/mac80211/patches/subsys/346-v6.4-wifi-mac80211-warn-only-once-on-AP-probe.patch +++ b/package/kernel/mac80211/patches/subsys/346-v6.4-wifi-mac80211-warn-only-once-on-AP-probe.patch @@ -21,7 +21,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c -@@ -3233,7 +3233,7 @@ static void ieee80211_mgd_probe_ap(struc +@@ -3239,7 +3239,7 @@ static void ieee80211_mgd_probe_ap(struc struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; bool already = false; diff --git a/package/kernel/mac80211/patches/subsys/349-v6.5-wifi-mac80211-Add-getter-functions-for-vif-MLD-state.patch b/package/kernel/mac80211/patches/subsys/349-v6.5-wifi-mac80211-Add-getter-functions-for-vif-MLD-state.patch index 25f8a7cb57..3b9ab1624c 100644 --- a/package/kernel/mac80211/patches/subsys/349-v6.5-wifi-mac80211-Add-getter-functions-for-vif-MLD-state.patch +++ b/package/kernel/mac80211/patches/subsys/349-v6.5-wifi-mac80211-Add-getter-functions-for-vif-MLD-state.patch @@ -33,7 +33,7 @@ Signed-off-by: Johannes Berg --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1927,6 +1927,27 @@ struct ieee80211_vif { +@@ -1936,6 +1936,27 @@ struct ieee80211_vif { u8 drv_priv[] __aligned(sizeof(void *)); }; @@ -121,7 +121,7 @@ Signed-off-by: Johannes Berg ##__VA_ARGS__); \ --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1596,7 +1596,7 @@ ieee80211_get_sband(struct ieee80211_sub +@@ -1600,7 +1600,7 @@ ieee80211_get_sband(struct ieee80211_sub struct ieee80211_chanctx_conf *chanctx_conf; enum nl80211_band band; @@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg "destroying interface with valid links 0x%04x\n", sdata->vif.valid_links); -@@ -1818,7 +1818,7 @@ static int ieee80211_runtime_change_ifty +@@ -1834,7 +1834,7 @@ static int ieee80211_runtime_change_ifty return -EBUSY; /* for now, don't support changing while links exist */ @@ -172,7 +172,7 @@ Signed-off-by: Johannes Berg /* nothing to do */ --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c -@@ -1281,7 +1281,7 @@ static void ieee80211_assoc_add_ml_elem( +@@ -1287,7 +1287,7 @@ static void ieee80211_assoc_add_ml_elem( u8 *ml_elem_len; void *capab_pos; @@ -181,7 +181,7 @@ Signed-off-by: Johannes Berg return; ift_ext_capa = cfg80211_get_iftype_ext_capa(local->hw.wiphy, -@@ -1455,7 +1455,7 @@ static int ieee80211_send_assoc(struct i +@@ -1461,7 +1461,7 @@ static int ieee80211_send_assoc(struct i capab |= WLAN_CAPABILITY_PRIVACY; } @@ -190,7 +190,7 @@ Signed-off-by: Johannes Berg /* consider the multi-link element with STA profile */ size += sizeof(struct ieee80211_multi_link_elem); /* max common info field in basic multi-link element */ -@@ -1786,7 +1786,7 @@ void ieee80211_chswitch_done(struct ieee +@@ -1792,7 +1792,7 @@ void ieee80211_chswitch_done(struct ieee struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; @@ -199,7 +199,7 @@ Signed-off-by: Johannes Berg success = false; trace_api_chswitch_done(sdata, success); -@@ -2849,7 +2849,7 @@ static void ieee80211_set_associated(str +@@ -2855,7 +2855,7 @@ static void ieee80211_set_associated(str if (vif_cfg->arp_addr_cnt) vif_changed |= BSS_CHANGED_ARP_FILTER; @@ -208,7 +208,7 @@ Signed-off-by: Johannes Berg for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; link_id++) { -@@ -2880,7 +2880,7 @@ static void ieee80211_set_associated(str +@@ -2886,7 +2886,7 @@ static void ieee80211_set_associated(str mutex_unlock(&local->iflist_mtx); /* leave this here to not change ordering in non-MLO cases */ @@ -217,7 +217,7 @@ Signed-off-by: Johannes Berg ieee80211_recalc_smps(sdata, &sdata->deflink); ieee80211_recalc_ps_vif(sdata); -@@ -2976,7 +2976,7 @@ static void ieee80211_set_disassoc(struc +@@ -2982,7 +2982,7 @@ static void ieee80211_set_disassoc(struc sta_info_flush(sdata); /* finally reset all BSS / config parameters */ @@ -226,7 +226,7 @@ Signed-off-by: Johannes Berg changed |= ieee80211_reset_erp_info(sdata); ieee80211_led_assoc(local, 0); -@@ -3001,7 +3001,7 @@ static void ieee80211_set_disassoc(struc +@@ -3007,7 +3007,7 @@ static void ieee80211_set_disassoc(struc sizeof(sdata->vif.bss_conf.mu_group.membership)); memset(sdata->vif.bss_conf.mu_group.position, 0, sizeof(sdata->vif.bss_conf.mu_group.position)); @@ -235,7 +235,7 @@ Signed-off-by: Johannes Berg changed |= BSS_CHANGED_MU_GROUPS; sdata->vif.bss_conf.mu_mimo_owner = false; -@@ -3015,7 +3015,7 @@ static void ieee80211_set_disassoc(struc +@@ -3021,7 +3021,7 @@ static void ieee80211_set_disassoc(struc changed |= BSS_CHANGED_ARP_FILTER; sdata->vif.bss_conf.qos = false; @@ -244,7 +244,7 @@ Signed-off-by: Johannes Berg changed |= BSS_CHANGED_QOS; /* The BSSID (not really interesting) and HT changed */ changed |= BSS_CHANGED_BSSID | BSS_CHANGED_HT; -@@ -3185,7 +3185,7 @@ static void ieee80211_mgd_probe_ap_send( +@@ -3191,7 +3191,7 @@ static void ieee80211_mgd_probe_ap_send( u8 unicast_limit = max(1, max_probe_tries - 3); struct sta_info *sta; @@ -253,7 +253,7 @@ Signed-off-by: Johannes Berg return; /* -@@ -3233,7 +3233,7 @@ static void ieee80211_mgd_probe_ap(struc +@@ -3239,7 +3239,7 @@ static void ieee80211_mgd_probe_ap(struc struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; bool already = false; @@ -262,7 +262,7 @@ Signed-off-by: Johannes Berg return; if (!ieee80211_sdata_running(sdata)) -@@ -3308,7 +3308,7 @@ struct sk_buff *ieee80211_ap_probereq_ge +@@ -3314,7 +3314,7 @@ struct sk_buff *ieee80211_ap_probereq_ge int ssid_len; if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION || @@ -271,7 +271,7 @@ Signed-off-by: Johannes Berg return NULL; sdata_assert_lock(sdata); -@@ -3373,7 +3373,8 @@ static void __ieee80211_disconnect(struc +@@ -3379,7 +3379,8 @@ static void __ieee80211_disconnect(struc } /* in MLO assume we have a link where we can TX the frame */ @@ -281,7 +281,7 @@ Signed-off-by: Johannes Berg if (!ifmgd->driver_disconnect) { unsigned int link_id; -@@ -3572,7 +3573,7 @@ static void ieee80211_destroy_assoc_data +@@ -3578,7 +3579,7 @@ static void ieee80211_destroy_assoc_data for (i = 0; i < ARRAY_SIZE(data.bss); i++) data.bss[i] = assoc_data->link[i].bss; @@ -290,7 +290,7 @@ Signed-off-by: Johannes Berg data.ap_mld_addr = assoc_data->ap_addr; cfg80211_assoc_failure(sdata->dev, &data); -@@ -4950,7 +4951,7 @@ static bool ieee80211_assoc_success(stru +@@ -4979,7 +4980,7 @@ static bool ieee80211_assoc_success(stru if (WARN_ON(!sta)) goto out_err; @@ -299,7 +299,7 @@ Signed-off-by: Johannes Berg u16 valid_links = 0; for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; link_id++) { -@@ -4979,7 +4980,7 @@ static bool ieee80211_assoc_success(stru +@@ -5008,7 +5009,7 @@ static bool ieee80211_assoc_success(stru if (WARN_ON(!link)) goto out_err; @@ -308,7 +308,7 @@ Signed-off-by: Johannes Berg link_info(link, "local address %pM, AP link address %pM\n", link->conf->addr, -@@ -5211,7 +5212,7 @@ static void ieee80211_rx_mgmt_assoc_resp +@@ -5240,7 +5241,7 @@ static void ieee80211_rx_mgmt_assoc_resp ifmgd->broken_ap = true; } @@ -317,7 +317,7 @@ Signed-off-by: Johannes Berg if (!elems->multi_link) { sdata_info(sdata, "MLO association with %pM but no multi-link element in response!\n", -@@ -5275,7 +5276,7 @@ static void ieee80211_rx_mgmt_assoc_resp +@@ -5304,7 +5305,7 @@ static void ieee80211_rx_mgmt_assoc_resp resp.uapsd_queues |= ieee80211_ac_to_qos_mask[ac]; } @@ -326,7 +326,7 @@ Signed-off-by: Johannes Berg ether_addr_copy(ap_mld_addr, sdata->vif.cfg.ap_addr); resp.ap_mld_addr = ap_mld_addr; } -@@ -5600,7 +5601,7 @@ static void ieee80211_rx_mgmt_beacon(str +@@ -5629,7 +5630,7 @@ static void ieee80211_rx_mgmt_beacon(str rcu_read_unlock(); if (ifmgd->assoc_data && ifmgd->assoc_data->need_beacon && @@ -335,7 +335,7 @@ Signed-off-by: Johannes Berg ieee80211_rx_our_beacon(bssid, ifmgd->assoc_data->link[0].bss)) { parse_params.bss = ifmgd->assoc_data->link[0].bss; elems = ieee802_11_parse_elems_full(&parse_params); -@@ -6289,7 +6290,7 @@ static void ieee80211_sta_bcn_mon_timer( +@@ -6319,7 +6320,7 @@ static void ieee80211_sta_bcn_mon_timer( struct ieee80211_sub_if_data *sdata = from_timer(sdata, t, u.mgd.bcn_mon_timer); @@ -344,7 +344,7 @@ Signed-off-by: Johannes Berg return; if (sdata->vif.bss_conf.csa_active && -@@ -6313,7 +6314,7 @@ static void ieee80211_sta_conn_mon_timer +@@ -6343,7 +6344,7 @@ static void ieee80211_sta_conn_mon_timer struct sta_info *sta; unsigned long timeout; @@ -353,7 +353,7 @@ Signed-off-by: Johannes Berg return; if (sdata->vif.bss_conf.csa_active && -@@ -6868,7 +6869,7 @@ int ieee80211_mgd_auth(struct ieee80211_ +@@ -6898,7 +6899,7 @@ int ieee80211_mgd_auth(struct ieee80211_ return 0; err_clear: @@ -364,7 +364,7 @@ Signed-off-by: Johannes Berg BSS_CHANGED_BSSID); --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2524,7 +2524,7 @@ bool ieee80211_is_our_addr(struct ieee80 +@@ -2526,7 +2526,7 @@ bool ieee80211_is_our_addr(struct ieee80 if (ether_addr_equal(sdata->vif.addr, addr)) return true; @@ -375,7 +375,7 @@ Signed-off-by: Johannes Berg for (link_id = 0; link_id < ARRAY_SIZE(sdata->vif.link_conf); link_id++) { --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -860,7 +860,7 @@ ieee80211_tx_h_sequence(struct ieee80211 +@@ -866,7 +866,7 @@ ieee80211_tx_h_sequence(struct ieee80211 /* SNS11 from 802.11be 10.3.2.14 */ if (unlikely(is_multicast_ether_addr(hdr->addr1) && @@ -384,7 +384,7 @@ Signed-off-by: Johannes Berg info->control.vif->type == NL80211_IFTYPE_AP)) { if (info->control.flags & IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX) tx->sdata->mld_mcast_seq += 0x10; -@@ -2629,7 +2629,7 @@ static struct sk_buff *ieee80211_build_h +@@ -2635,7 +2635,7 @@ static struct sk_buff *ieee80211_build_h ethertype = (skb->data[12] << 8) | skb->data[13]; fc = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA); @@ -393,7 +393,7 @@ Signed-off-by: Johannes Berg chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); -@@ -2646,7 +2646,7 @@ static struct sk_buff *ieee80211_build_h +@@ -2652,7 +2652,7 @@ static struct sk_buff *ieee80211_build_h authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); wme_sta = sta->sta.wme; } @@ -402,7 +402,7 @@ Signed-off-by: Johannes Berg struct ieee80211_sub_if_data *ap_sdata; /* override chanctx_conf from AP (we don't have one) */ -@@ -2664,7 +2664,7 @@ static struct sk_buff *ieee80211_build_h +@@ -2670,7 +2670,7 @@ static struct sk_buff *ieee80211_build_h /* DA BSSID SA */ memcpy(hdr.addr1, skb->data, ETH_ALEN); @@ -411,7 +411,7 @@ Signed-off-by: Johannes Berg struct ieee80211_link_data *link; link_id = sta->deflink.link_id; -@@ -2816,7 +2816,7 @@ static struct sk_buff *ieee80211_build_h +@@ -2822,7 +2822,7 @@ static struct sk_buff *ieee80211_build_h } if (!chanctx_conf) { @@ -420,7 +420,7 @@ Signed-off-by: Johannes Berg ret = -ENOTCONN; goto free; } -@@ -3058,7 +3058,7 @@ void ieee80211_check_fast_xmit(struct st +@@ -3064,7 +3064,7 @@ void ieee80211_check_fast_xmit(struct st !ieee80211_hw_check(&local->hw, SUPPORTS_TX_FRAG)) goto out; @@ -429,7 +429,7 @@ Signed-off-by: Johannes Berg rcu_read_lock(); chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); -@@ -3129,7 +3129,7 @@ void ieee80211_check_fast_xmit(struct st +@@ -3135,7 +3135,7 @@ void ieee80211_check_fast_xmit(struct st fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS); /* DA BSSID SA */ build.da_offs = offsetof(struct ieee80211_hdr, addr1); @@ -438,7 +438,7 @@ Signed-off-by: Johannes Berg memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN); } else { unsigned int link_id = sta->deflink.link_id; -@@ -4499,7 +4499,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s +@@ -4507,7 +4507,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s __ieee80211_subif_start_xmit(skb, dev, 0, IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, NULL); @@ -447,7 +447,7 @@ Signed-off-by: Johannes Berg sdata->vif.type == NL80211_IFTYPE_AP && !ieee80211_hw_check(&sdata->local->hw, MLO_MCAST_MULTI_LINK_TX)) { ieee80211_mlo_multicast_tx(dev, skb); -@@ -4777,7 +4777,7 @@ static bool ieee80211_tx_pending_skb(str +@@ -4785,7 +4785,7 @@ static bool ieee80211_tx_pending_skb(str if (info->control.flags & IEEE80211_TX_INTCFL_NEED_TXPROCESSING) { /* update band only for non-MLD */ @@ -456,7 +456,7 @@ Signed-off-by: Johannes Berg chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); if (unlikely(!chanctx_conf)) { -@@ -6000,7 +6000,7 @@ void __ieee80211_tx_skb_tid_band(struct +@@ -6008,7 +6008,7 @@ void __ieee80211_tx_skb_tid_band(struct BUILD_BUG_ON(!FIELD_FIT(IEEE80211_TX_CTRL_MLO_LINK, IEEE80211_LINK_UNSPECIFIED)); @@ -465,7 +465,7 @@ Signed-off-by: Johannes Berg link = 0; } else if (link_id >= 0) { link = link_id; -@@ -6046,7 +6046,7 @@ void ieee80211_tx_skb_tid(struct ieee802 +@@ -6054,7 +6054,7 @@ void ieee80211_tx_skb_tid(struct ieee802 enum nl80211_band band; rcu_read_lock(); diff --git a/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch b/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch index c38fa13f03..69efa70a3f 100644 --- a/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch +++ b/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch @@ -16,7 +16,7 @@ and we should ignore this. --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -614,21 +614,6 @@ static int wiphy_verify_combinations(str +@@ -658,21 +658,6 @@ static int wiphy_verify_combinations(str c->limits[j].max > 1)) return -EINVAL; diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index 69b23acc79..ef50473670 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -4092,6 +4092,7 @@ struct mgmt_frame_regs { +@@ -4095,6 +4095,7 @@ struct mgmt_frame_regs { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting * functions to adjust rfkill hw state -@@ -4442,6 +4443,7 @@ struct cfg80211_ops { +@@ -4445,6 +4446,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -18,7 +18,7 @@ --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1705,6 +1705,7 @@ enum ieee80211_smps_mode { +@@ -1714,6 +1714,7 @@ enum ieee80211_smps_mode { * * @power_level: requested transmit power (in dBm), backward compatibility * value only that is set to the minimum of all interfaces @@ -26,7 +26,7 @@ * * @chandef: the channel definition to tune to * @radar_enabled: whether radar detection is enabled -@@ -1725,6 +1726,7 @@ enum ieee80211_smps_mode { +@@ -1734,6 +1735,7 @@ enum ieee80211_smps_mode { struct ieee80211_conf { u32 flags; int power_level, dynamic_ps_timeout; @@ -56,7 +56,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -3067,6 +3067,19 @@ static int ieee80211_get_tx_power(struct +@@ -3077,6 +3077,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -76,7 +76,7 @@ static void ieee80211_rfkill_poll(struct wiphy *wiphy) { struct ieee80211_local *local = wiphy_priv(wiphy); -@@ -4989,6 +5002,7 @@ const struct cfg80211_ops mac80211_confi +@@ -5007,6 +5020,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -86,7 +86,7 @@ CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1542,6 +1542,7 @@ struct ieee80211_local { +@@ -1546,6 +1546,7 @@ struct ieee80211_local { int dynamic_ps_forced_timeout; int user_power_level; /* in dBm, for all interfaces */ @@ -118,7 +118,7 @@ if (local->hw.conf.power_level != power) { changed |= IEEE80211_CONF_CHANGE_POWER; local->hw.conf.power_level = power; -@@ -762,6 +768,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -759,6 +765,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ IEEE80211_RADIOTAP_MCS_HAVE_BW; local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI | IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH; @@ -128,7 +128,7 @@ local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -800,6 +800,7 @@ static const struct nla_policy nl80211_p +@@ -820,6 +820,7 @@ static const struct nla_policy nl80211_p [NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG }, [NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT }, [NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_RANGE(NLA_U8, 0, 0xffff), @@ -136,7 +136,7 @@ }; /* policy for the key attributes */ -@@ -3527,6 +3528,22 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3547,6 +3548,22 @@ static int nl80211_set_wiphy(struct sk_b if (result) goto out; } diff --git a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch index 0e6e51884d..67cafe67a5 100644 --- a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch +++ b/package/kernel/mac80211/patches/subsys/780-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 -@@ -2364,6 +2364,13 @@ static void sta_stats_decode_rate(struct +@@ -2368,6 +2368,13 @@ static void sta_stats_decode_rate(struct sband = local->hw.wiphy->bands[band]; From e1eac53f74a75884fb2608b1530953292259e32e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Jul 2024 21:56:12 +0200 Subject: [PATCH 04/65] mt76: Fix PKG_MIRROR_HASH The PKG_MIRROR_HASH was updated to a wrong version. Fixes: f64576f367eb ("mt76: update to Git HEAD (2024-04-03)") Signed-off-by: Hauke Mehrtens --- package/kernel/mt76/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 3f48c76faa..6faad44b2a 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -10,7 +10,7 @@ PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2024-04-03 PKG_SOURCE_VERSION:=1e336a8582dce2ef32ddd440d423e9afef961e71 -PKG_MIRROR_HASH:=f3801af80d5f9c1aa266c9401d4dfa2d501df0382c81fd249150e17dddc70936 +PKG_MIRROR_HASH:=48e787bcf0c526d9511375a8a3a77c850de9deca79f6177d2eeea7ca8bd798e2 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From 7be58ccacc9caee6c3c4eb74e23b8a17adee93b8 Mon Sep 17 00:00:00 2001 From: Luis Mita Date: Thu, 30 May 2024 14:50:23 -0400 Subject: [PATCH 05/65] ramips: mt76x8: add support for Cudy TR1200 v1 Hardware: - SoC: MediaTek MT7628AN (MIPS 580MHz) - Flash: 16 MiB XMC 25QH128CH10 - RAM: 128 MiB ESMT M14D1G1664A - WLAN: 2.4 GHz (MT7628), 5 GHz (MT7613BEN 802.11ac) - Ethernet: 1x 10/100 Mbps WAN, 1x 10/100 LAN (MT7628) - USB 2.0 port - Buttons: 1 Reset button, 1 slider button - LEDs: 1x Red, 1x White - Serial console: unpopulated header, 115200 8n1 - Power: 5 VDC, 2 A MAC addresses: +---------+-------------------+-----------+ | | MAC | Algorithm | +---------+-------------------+-----------+ | WAN | 80:af:ca:xx:xx:x0 | label | | LAN | 80:af:ca:xx:xx:x0 | label | | WLAN 2g | 80:af:ca:xx:xx:x0 | label | | WLAN 5g | 80:af:ca:xx:xx:x2 | label+2 | +---------+-------------------+-----------+ Installation: The installation must be done via TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware to make installation easier, and so I recommend checking the Wiki for this device if there is a more convenient solution than the one below. To install using TFTP: 1. Upgrade to a beta firmware (signed by Cudy) that can be downloaded from the wiki. This is required in order to use an unlocked u-boot. 2. Connect to UART. 3. While the router is turning on, press 1. 4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an OpenWrt initramfs-kernel.bin firmware file as recovery.bin. 5. Press Enter three times. Verify the filename. 6. If you can reach LuCI or SSH now, just use the sysupgrade image with the 'Keep settings' option turned off. If you don't want to use the beta firmware nor the unlocked u-boot, you can install the firmware writing the sysupgrade image on the firmware partition of the SPI flash. Signed-off-by: Luis Mita (cherry picked from commit f1091ef7ac3596f1e401b918a36273672acbe389) Link: https://github.com/openwrt/openwrt/pull/15875 Signed-off-by: Hauke Mehrtens --- .../ramips/dts/mt7628an_cudy_tr1200-v1.dts | 198 ++++++++++++++++++ target/linux/ramips/image/mt76x8.mk | 11 + .../mt76x8/base-files/etc/board.d/02_network | 4 + 3 files changed, 213 insertions(+) create mode 100644 target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts diff --git a/target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts b/target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts new file mode 100644 index 0000000000..d087530782 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts @@ -0,0 +1,198 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an.dtsi" + +#include +#include +#include + +/ { + compatible = "cudy,tr1200", "mediatek,mt7628an-soc"; + model = "Cudy TR1200"; + + aliases { + led-boot = &led_status; + led-running = &led_status; + led-failsafe = &led_status; + led-upgrade = &led_status; + label-mac-device = ðernet; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + mode { + label = "mode"; + linux,input-type = ; + linux,code = ; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status: led_0 { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + + led_1 { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 43 GPIO_ACTIVE_LOW>; + }; + }; + + gpio_export { + compatible = "gpio-export"; + + usb { + gpio-export,name = "usb"; + gpio-export,output = <1>; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@fd0000 { + label = "debug"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "backup"; + reg = <0xfe000 0x10000>; + read-only; + }; + + partition@ff0000 { + label = "bdinfo"; + reg = <0xff0000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + compatible = "mac-base"; + reg = <0xde00 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "gpio", "wdt", "p0led_an", "wled_an"; + function = "gpio"; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00 2>; + nvmem-cell-names = "eeprom", "mac-address"; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_de00 0>; + nvmem-cell-names = "eeprom", "mac-address"; +}; + +ðernet { + nvmem-cells = <&macaddr_bdinfo_de00 0>; + nvmem-cell-names = "mac-address"; +}; + +&esw { + mediatek,portmap = <0x3d>; + mediatek,portdisable = <0x3c>; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 816009ac18..5b9a04d6f2 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -147,6 +147,17 @@ define Device/comfast_cf-wr758ac-v2 endef TARGET_DEVICES += comfast_cf-wr758ac-v2 +define Device/cudy_tr1200-v1 + IMAGE_SIZE := 15872k + DEVICE_VENDOR := Cudy + DEVICE_MODEL := TR1200 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ + kmod-mt7615e kmod-mt7663-firmware-ap + SUPPORTED_DEVICES += R46 +endef +TARGET_DEVICES += cudy_tr1200-v1 + define Device/cudy_wr1000 IMAGE_SIZE := 7872k IMAGES += factory.bin diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 6bcdea971b..504f69ece3 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -90,6 +90,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "4:lan" "6@eth0" ;; + cudy,tr1200) + ucidef_add_switch "switch0" \ + "0:lan" "1:wan" "6@eth0" + ;; cudy,wr1000) ucidef_add_switch "switch0" \ "2:lan:2" "3:lan:1" "4:wan" "6@eth0" From 3fcf619e76b9ce5c3d43501923e5f4e11334c600 Mon Sep 17 00:00:00 2001 From: Luis Mita Date: Thu, 6 Jun 2024 16:43:19 -0400 Subject: [PATCH 06/65] ramips: mt76x8: sync Cudy TR1200 v1 naming Cudy assigns hardware versions to its devices on its website, and the Cudy TR1200 router is now Cudy TR1200 v1. OpenWrt currently uses both variants, and this commit removes inconsistencies using only the new name. Signed-off-by: Luis Mita (cherry picked from commit d780d530dd89d135fffc6fb6598e6f7b28cd3921) Link: https://github.com/openwrt/openwrt/pull/15875 Signed-off-by: Hauke Mehrtens --- target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts | 4 ++-- target/linux/ramips/mt76x8/base-files/etc/board.d/02_network | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts b/target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts index d087530782..ae2bdd8a1c 100644 --- a/target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts +++ b/target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts @@ -7,8 +7,8 @@ #include / { - compatible = "cudy,tr1200", "mediatek,mt7628an-soc"; - model = "Cudy TR1200"; + compatible = "cudy,tr1200-v1", "mediatek,mt7628an-soc"; + model = "Cudy TR1200 v1"; aliases { led-boot = &led_status; diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 504f69ece3..e77bc82c93 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -90,7 +90,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "4:lan" "6@eth0" ;; - cudy,tr1200) + cudy,tr1200-v1) ucidef_add_switch "switch0" \ "0:lan" "1:wan" "6@eth0" ;; From b67b3a6ce66793f015178d648d0de9197453deca Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 1 Nov 2023 14:44:50 +0800 Subject: [PATCH 07/65] uboot-mediatek: add support for JDCloud RE-CP-03 The vendor U-Boot has enabled signature verification, so add a custom U-Boot build for OpenWrt. Signed-off-by: Tianling Shen (cherry picked from commit 6fa4fbbc5293886aa6bae6e0cac4b99a4c472fc4) --- package/boot/uboot-mediatek/Makefile | 13 + .../patches/440-add-jdcloud_re-cp-03.patch | 324 ++++++++++++++++++ 2 files changed, 337 insertions(+) create mode 100644 package/boot/uboot-mediatek/patches/440-add-jdcloud_re-cp-03.patch diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index 7fdad5c744..a15b88ec5e 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -417,6 +417,18 @@ define U-Boot/mt7986_glinet_gl-mt6000 DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4 endef +define U-Boot/mt7986_jdcloud_re-cp-03 + NAME:=JDCloud RE-CP-03 + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=jdcloud_re-cp-03 + UBOOT_CONFIG:=mt7986a_jdcloud_re-cp-03 + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=emmc + BL2_SOC:=mt7986 + BL2_DDRTYPE:=ddr4 + DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4 +endef + define U-Boot/mt7986_tplink_tl-xdr4288 NAME:=TP-LINK TL-XDR4288 BUILD_SUBTARGET:=filogic @@ -573,6 +585,7 @@ UBOOT_TARGETS := \ mt7986_bananapi_bpi-r3-snand \ mt7986_bananapi_bpi-r3-nor \ mt7986_glinet_gl-mt6000 \ + mt7986_jdcloud_re-cp-03 \ mt7986_tplink_tl-xdr4288 \ mt7986_tplink_tl-xdr6086 \ mt7986_tplink_tl-xdr6088 \ diff --git a/package/boot/uboot-mediatek/patches/440-add-jdcloud_re-cp-03.patch b/package/boot/uboot-mediatek/patches/440-add-jdcloud_re-cp-03.patch new file mode 100644 index 0000000000..e0f3a6e235 --- /dev/null +++ b/package/boot/uboot-mediatek/patches/440-add-jdcloud_re-cp-03.patch @@ -0,0 +1,324 @@ +--- /dev/null ++++ b/configs/mt7986a_jdcloud_re-cp-03_defconfig +@@ -0,0 +1,112 @@ ++CONFIG_ARM=y ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_ENV_SIZE=0x40000 ++CONFIG_ENV_OFFSET=0x400000 ++CONFIG_DEFAULT_DEVICE_TREE="mt7986a-jdcloud_re-cp-03" ++CONFIG_SYS_PROMPT="MT7986> " ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_TARGET_MT7986=y ++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00 ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=40000000 ++CONFIG_ENV_OFFSET_REDUND=0x440000 ++CONFIG_SYS_LOAD_ADDR=0x46000000 ++CONFIG_DEBUG_UART=y ++CONFIG_FIT=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_AUTOBOOT_MENU_SHOW=y ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-jdcloud_re-cp-03.dtb" ++CONFIG_LOGLEVEL=7 ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_LOG=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_HUSH_PARSER=y ++CONFIG_CMD_CPU=y ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_BOOTMENU=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_ENV_FLAGS=y ++CONFIG_CMD_STRINGS=y ++CONFIG_CMD_DM=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_PWM=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_PART=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_RARP=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_CDP=y ++CONFIG_CMD_SNTP=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_LINK_LOCAL=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_PSTORE=y ++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000 ++CONFIG_CMD_UUID=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FAT=y ++CONFIG_CMD_FS_GENERIC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_OF_EMBED=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_DEFAULT_ENV_FILE="jdcloud_re-cp-03_env" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_NETCONSOLE=y ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y ++CONFIG_SERVERIP="192.168.1.254" ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_CLK=y ++CONFIG_GPIO_HOG=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_MMC_HS200_SUPPORT=y ++CONFIG_MMC_MTK=y ++CONFIG_PHY_FIXED=y ++CONFIG_DM_MDIO=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PHY=y ++CONFIG_PHY_MTK_TPHY=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7622=y ++CONFIG_PINCTRL_MT7986=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_MTK=y ++CONFIG_RAM=y ++CONFIG_SCSI=y ++CONFIG_DM_SCSI=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y ++CONFIG_LMB_MAX_REGIONS=64 +--- /dev/null ++++ b/arch/arm/dts/mt7986a-jdcloud_re-cp-03.dts +@@ -0,0 +1,148 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++ ++/dts-v1/; ++#include ++#include "mt7986.dtsi" ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "JDCloud RE-CP-03"; ++ compatible = "mediatek,mt7986", "mediatek,mt7986-rfb"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ memory@40000000 { ++ device_type = "memory"; ++ reg = <0x40000000 0x40000000>; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ button-joylink { ++ label = "joylink"; ++ linux,code = ; ++ gpios = <&gpio 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ button-reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 9 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-leds { ++ compatible = "gpio-leds"; ++ ++ led-0 { ++ label = "blue:status"; ++ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; ++ default-state = "off"; ++ }; ++ ++ led-1 { ++ label = "red:status"; ++ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ ++ led-2 { ++ label = "green:status"; ++ gpios = <&gpio 12 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ }; ++ ++ reg_1p8v: regulator-1p8v { ++ compatible = "regulator-fixed"; ++ regulator-name = "fixed-1.8V"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ reg_3p3v: regulator-3p3v { ++ compatible = "regulator-fixed"; ++ regulator-name = "fixed-3.3V"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++}; ++ ++ð { ++ status = "okay"; ++ mediatek,gmac-id = <0>; ++ phy-mode = "2500base-x"; ++ mediatek,switch = "mt7531"; ++ reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ }; ++}; ++ ++&mmc0 { ++ bus-width = <8>; ++ cap-mmc-highspeed; ++ cap-mmc-hw-reset; ++ max-frequency = <200000000>; ++ non-removable; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_default>; ++ vmmc-supply = <®_3p3v>; ++ vqmmc-supply = <®_1p8v>; ++ status = "okay"; ++}; ++ ++&pinctrl { ++ mmc0_pins_default: mmc0default { ++ mux { ++ function = "flash"; ++ groups = "emmc_51"; ++ }; ++ ++ conf-cmd-dat { ++ pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", ++ "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", ++ "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; ++ input-enable; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-clk { ++ pins = "EMMC_CK"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ ++ conf-dsl { ++ pins = "EMMC_DSL"; ++ bias-pull-down = ; ++ }; ++ ++ conf-rst { ++ pins = "EMMC_RSTB"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; ++ ++&watchdog { ++ status = "disabled"; ++}; +--- /dev/null ++++ b/jdcloud_re-cp-03_env +@@ -0,0 +1,55 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootargs=root=/dev/mmcblk0p65 ++bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi ++bootconf=config-1 ++bootdelay=0 ++bootfile=openwrt-mediatek-filogic-jdcloud_re-cp-03-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-jdcloud_re-cp-03-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-jdcloud_re-cp-03-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-jdcloud_re-cp-03-squashfs-sysupgrade.itb ++bootled_pwr=red:status ++bootled_rec=blue:status ++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 ++bootmenu_default=0 ++bootmenu_delay=0 ++bootmenu_title= ( ( ( OpenWrt ) ) ) ++bootmenu_0=Initialize environment.=run _firstboot ++bootmenu_0d=Run default boot command.=run boot_default ++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return ++bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return ++bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to eMMC.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_7=Load BL2 preloader via TFTP then write to eMMC.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return ++bootmenu_8=Reboot.=reset ++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run emmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off ++boot_emmc=run boot_production ; run boot_recovery ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2 ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size ++mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200 ++part_default=production ++part_recovery=recovery ++reset_factory=eraseenv && reset ++emmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol ++emmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol ++emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0 ++emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800 ++emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol ++emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol ++_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" From 2a25de25fad7409321b9dc72e7f9661f0c681bfe Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 1 Nov 2023 14:46:15 +0800 Subject: [PATCH 08/65] mediatek: add support for JDCloud RE-CP-03 Hardware specification: SoC: MediaTek MT7986A 4x A53 Flash: 128GB eMMC RAM: 1GB DDR4 Ethernet: 4x 1GbE, 1x 2.5GbE (RTL8221B) Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset, Joylink Power: DC 12V 2A Flash instructions: 1. Download and flash the vendor migration firmware via webUI: https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7986-jdcloud_re-cp-03-vendor-migration.bin (Default address is 192.168.68.1, user root, no password) 2. After device has booted up, write new GPT table: dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-gpt.bin of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync 3. Erase and write new BL2: echo 0 > /sys/block/mmcblk0boot0/force_ro dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8192 conv=fsync dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-preloader.bin of=/dev/mmcblk0boot0 bs=512 conv=fsync 4. Erase and write new FIP: dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=13312 count=8192 conv=fsync dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-bl31-uboot.fip of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync 5. Set static IP on your PC: IP 192.168.1.254/24, GW 192.168.1.1 6. Serve OpenWrt initramfs image using TFTP server. 7. Cut off the power and re-engage, wait for TFTP recovery to complete. 8. After OpenWrt has booted, perform sysupgrade. 9. Additionally, if you want to have eMMC recovery boot feature: (Don't worry! You will always have TFTP recovery boot feature.) dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-initramfs-recovery.itb of=/dev/mmcblk0p4 bs=512 conv=fsync Signed-off-by: Tianling Shen (cherry picked from commit c0c3234e17207a9287a08757fc1752490144a1cd) --- .../uboot-envtools/files/mediatek_filogic | 5 + .../mediatek/dts/mt7986a-jdcloud-re-cp-03.dts | 294 ++++++++++++++++++ .../filogic/base-files/etc/board.d/02_network | 6 + .../etc/hotplug.d/firmware/11-mt76-caldata | 3 +- .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 3 + .../base-files/lib/upgrade/platform.sh | 5 + target/linux/mediatek/image/filogic.mk | 26 ++ 7 files changed, 341 insertions(+), 1 deletion(-) create mode 100644 target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index 30ae4895f7..1fdb99ad25 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -89,6 +89,11 @@ glinet,gl-mt6000) local envdev=$(find_mmc_part "u-boot-env") ubootenv_add_uci_config "$envdev" "0x0" "0x80000" ;; +jdcloud,re-cp-03) + local envdev=$(find_mmc_part "ubootenv" "mmcblk0") + ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1" + ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1" + ;; mercusys,mr90x-v1|\ routerich,ax3000) local envdev=/dev/mtd$(find_mtd_index "u-boot-env") diff --git a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts new file mode 100644 index 0000000000..b62c2f4215 --- /dev/null +++ b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts @@ -0,0 +1,294 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2023 Tianling Shen + */ + +/dts-v1/; +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model = "JDCloud RE-CP-03"; + compatible = "jdcloud,re-cp-03", "mediatek,mt7986a"; + + aliases { + led-boot = &red_led; + led-failsafe = &red_led; + led-running = &green_led; + led-upgrade = &green_led; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@40000000 { + reg = <0 0x40000000 0 0x40000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-joylink { + label = "joylink"; + linux,code = ; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + }; + + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 7 GPIO_ACTIVE_HIGH>; + }; + + red_led: led-1 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 11 GPIO_ACTIVE_HIGH>; + }; + + green_led: led-2 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 12 GPIO_ACTIVE_LOW>; + }; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&crypto { + status = "okay"; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "2500base-x"; + phy-handle = <&phy6>; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + }; +}; + +&mdio { + phy6: phy@6 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <6>; + + reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <50000>; + realtek,aldps-enable; + }; + + switch: switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&mmc0 { + bus-width = <8>; + cap-mmc-highspeed; + hs400-ds-delay = <0x14014>; + max-frequency = <200000000>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sd; + no-sdio; + non-removable; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + status = "okay"; +}; + +&pio { + mmc0_pins_default: mmc0-pins-default { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + mediatek,pull-down-adv = <2>; + }; + conf-ds { + pins = "EMMC_DSL"; + mediatek,pull-down-adv = <2>; + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + mediatek,pull-down-adv = <2>; + }; + conf-ds { + pins = "EMMC_DSL"; + mediatek,pull-down-adv = <2>; + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + }; + + wf_2g_5g_pins: wf-2g-5g-pins { + mux { + function = "wifi"; + groups = "wf_2g", "wf_5g"; + }; + conf { + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&trng { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + pinctrl-names = "default"; + pinctrl-0 = <&wf_2g_5g_pins>; + status = "okay"; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 4ebb5e29e7..7d2cd706a9 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -24,6 +24,7 @@ mediatek_setup_interfaces() ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" wan ;; asus,tuf-ax4200|\ + jdcloud,re-cp-03|\ mediatek,mt7981-rfb|\ unielec,u7981-01*|\ zbtlink,zbt-z8102ax) @@ -139,6 +140,11 @@ mediatek_setup_macs() lan_mac=$(macaddr_add "$wan_mac" 1) label_mac=$wan_mac ;; + jdcloud,re-cp-03) + wan_mac=$(mmc_get_mac_binary factory 0x2a) + lan_mac=$(mmc_get_mac_binary factory 0x24) + label_mac=$lan_mac + ;; mercusys,mr90x-v1) label_mac=$(get_mac_binary "/tmp/tp_data/default-mac" 0) lan_mac=$label_mac diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata index cbbf1871a5..22ab26608f 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata @@ -72,7 +72,8 @@ case "$FIRMWARE" in CI_UBIPART="UBI_DEV" caldata_extract_ubi "Factory" 0x0 0x1000 ;; - glinet,gl-mt6000) + glinet,gl-mt6000|\ + jdcloud,re-cp-03) caldata_extract_mmc "factory" 0x0 0x1000 ;; esac diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 992bcf4859..7cecd82f9f 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -90,6 +90,9 @@ case "$board" in # addresses on multiple VIFs with the other radio. Use label mac to set LA bit. [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(get_mac_label) > /sys${DEVPATH}/macaddress ;; + jdcloud,re-cp-03) + [ "$PHYNBR" = "1" ] && mmc_get_mac_binary factory 0xa > /sys${DEVPATH}/macaddress + ;; mercusys,mr90x-v1) addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0) [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index b43ee50a44..fb981376fc 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -134,6 +134,10 @@ platform_do_upgrade() { CI_KERNPART="fit" nand_do_upgrade "$1" ;; + jdcloud,re-cp-03) + CI_KERNPART="production" + emmc_do_upgrade "$1" + ;; mercusys,mr90x-v1) CI_UBIPART="ubi0" nand_do_upgrade "$1" @@ -215,6 +219,7 @@ platform_copy_config() { esac ;; glinet,gl-mt6000|\ + jdcloud,re-cp-03|\ ubnt,unifi-6-plus) emmc_copy_config ;; diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 8865f245db..c94aac9681 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -495,6 +495,32 @@ define Device/jcg_q30-pro endef TARGET_DEVICES += jcg_q30-pro +define Device/jdcloud_re-cp-03 + DEVICE_VENDOR := JDCloud + DEVICE_MODEL := RE-CP-03 + DEVICE_DTS := mt7986a-jdcloud-re-cp-03 + DEVICE_DTS_DIR := ../dts + DEVICE_DTC_FLAGS := --pad 4096 + DEVICE_DTS_LOADADDR := 0x43f00000 + DEVICE_PACKAGES := kmod-mt7986-firmware mt7986-wo-firmware \ + e2fsprogs f2fsck mkf2fs + KERNEL_LOADADDR := 0x44000000 + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + KERNEL_INITRAMFS_SUFFIX := -recovery.itb + IMAGES := sysupgrade.itb + IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m + IMAGE/sysupgrade.itb := append-kernel | \ + fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | \ + pad-rootfs | append-metadata + ARTIFACTS :=gpt.bin preloader.bin bl31-uboot.fip + ARTIFACT/gpt.bin := mt798x-gpt emmc + ARTIFACT/preloader.bin := mt7986-bl2 emmc-ddr4 + ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot jdcloud_re-cp-03 +endef +TARGET_DEVICES += jdcloud_re-cp-03 + define Device/mediatek_mt7981-rfb DEVICE_VENDOR := MediaTek DEVICE_MODEL := MT7981 rfb From 7bfdc4ea3a9ea06e4e35b812613b6958649711d8 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Thu, 2 Nov 2023 23:16:28 +0800 Subject: [PATCH 09/65] uboot-mediatek: add Netcore N60 support The vendor uboot requires special fit verification. So add a custom uboot build for this device. Signed-off-by: Chukun Pan (cherry picked from commit 0170666d89127585d30c3f1a8fdf641d9e8fbbbf) --- .../uboot-envtools/files/mediatek_filogic | 1 + package/boot/uboot-mediatek/Makefile | 13 + .../patches/429-add-netcore-n60.patch | 433 ++++++++++++++++++ 3 files changed, 447 insertions(+) create mode 100644 package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index 1fdb99ad25..e781554f7e 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -68,6 +68,7 @@ zbtlink,zbt-z8103ax) ;; h3c,magic-nx30-pro|\ jcg,q30-pro|\ +netcore,n60|\ qihoo,360t7|\ tplink,tl-xdr4288|\ tplink,tl-xdr6086|\ diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index a15b88ec5e..55f5ba713d 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -429,6 +429,18 @@ define U-Boot/mt7986_jdcloud_re-cp-03 DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4 endef +define U-Boot/mt7986_netcore_n60 + NAME:=Netcore N60 + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=netcore_n60 + UBOOT_CONFIG:=mt7986_netcore_n60 + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=spim-nand + BL2_SOC:=mt7986 + BL2_DDRTYPE:=ddr3 + DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3 +endef + define U-Boot/mt7986_tplink_tl-xdr4288 NAME:=TP-LINK TL-XDR4288 BUILD_SUBTARGET:=filogic @@ -586,6 +598,7 @@ UBOOT_TARGETS := \ mt7986_bananapi_bpi-r3-nor \ mt7986_glinet_gl-mt6000 \ mt7986_jdcloud_re-cp-03 \ + mt7986_netcore_n60 \ mt7986_tplink_tl-xdr4288 \ mt7986_tplink_tl-xdr6086 \ mt7986_tplink_tl-xdr6088 \ diff --git a/package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch b/package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch new file mode 100644 index 0000000000..2304fcd5ce --- /dev/null +++ b/package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch @@ -0,0 +1,433 @@ +--- /dev/null ++++ b/configs/mt7986_netcore_n60_defconfig +@@ -0,0 +1,182 @@ ++CONFIG_ARM=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TARGET_MT7986=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="mt7986a-netcore-n60" ++CONFIG_DEFAULT_ENV_FILE="netcore_n60_env" ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-netcore-n60.dtb" ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=40000000 ++CONFIG_DEBUG_UART=y ++CONFIG_SYS_LOAD_ADDR=0x46000000 ++CONFIG_SMBIOS_PRODUCT_NAME="" ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_MENU_SHOW=y ++CONFIG_CFB_CONSOLE_ANSI=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_GPIO_HOG=y ++CONFIG_CMD_ENV_FLAGS=y ++CONFIG_FIT=y ++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++CONFIG_LOGLEVEL=7 ++CONFIG_LOG=y ++CONFIG_SYS_PROMPT="MT7986> " ++CONFIG_CMD_BOOTMENU=y ++CONFIG_CMD_BOOTP=y ++CONFIG_CMD_BUTTON=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_CDP=y ++CONFIG_CMD_CPU=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_DM=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_ECHO=y ++CONFIG_CMD_ENV_READMEM=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FAT=y ++CONFIG_CMD_FDT=y ++CONFIG_CMD_FS_GENERIC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_ITEST=y ++CONFIG_CMD_LED=y ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_LINK_LOCAL=y ++# CONFIG_CMD_MBR is not set ++CONFIG_CMD_PCI=y ++CONFIG_CMD_PSTORE=y ++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000 ++CONFIG_CMD_SF_TEST=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_PWM=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_TFTPBOOT=y ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_UBI=y ++CONFIG_CMD_UBI_RENAME=y ++CONFIG_CMD_UBIFS=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_PART=y ++CONFIG_CMD_RARP=y ++CONFIG_CMD_SETEXPR=y ++CONFIG_CMD_SLEEP=y ++CONFIG_CMD_SNTP=y ++CONFIG_CMD_SOURCE=y ++CONFIG_CMD_STRINGS=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_UUID=y ++CONFIG_DISPLAY_CPUINFO=y ++CONFIG_DM_MTD=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_DM_USB=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_MTK=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_PARTITION_UUIDS=y ++CONFIG_NETCONSOLE=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_DM_GPIO=y ++CONFIG_DM_SCSI=y ++CONFIG_AHCI=y ++CONFIG_AHCI_PCI=y ++CONFIG_SCSI_AHCI=y ++CONFIG_SCSI=y ++CONFIG_CMD_SCSI=y ++CONFIG_PHY=y ++CONFIG_PHY_MTK_TPHY=y ++CONFIG_PHY_FIXED=y ++CONFIG_MTK_AHCI=y ++CONFIG_DM_ETH=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PCI=y ++# CONFIG_MMC is not set ++# CONFIG_DM_MMC is not set ++CONFIG_MTD=y ++CONFIG_MTD_UBI_FASTMAP=y ++CONFIG_DM_PCI=y ++CONFIG_PCIE_MEDIATEK=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7622=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00 ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_RAM=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_MTK_SPI_NAND=y ++CONFIG_MTK_SPI_NAND_MTD=y ++CONFIG_SYSRESET_WATCHDOG=y ++CONFIG_WDT_MTK=y ++CONFIG_LZO=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y ++CONFIG_RANDOM_UUID=y ++CONFIG_REGEX=y ++CONFIG_USB=y ++CONFIG_USB_HOST=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_MTK=y ++CONFIG_USB_STORAGE=y ++CONFIG_OF_EMBED=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_UBI=y ++CONFIG_ENV_UBI_PART="ubi" ++CONFIG_ENV_SIZE=0x1f000 ++CONFIG_ENV_SIZE_REDUND=0x1f000 ++CONFIG_ENV_UBI_VOLUME="ubootenv" ++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_PHY_FIXED=y ++CONFIG_DM_ETH=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7986=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_HEXDUMP=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_MTD_SPI_NAND=y ++CONFIG_MTK_SPIM=y ++CONFIG_CMD_MTD=y ++CONFIG_CMD_NAND=y ++CONFIG_CMD_NAND_TRIMFFS=y ++CONFIG_LMB_MAX_REGIONS=64 ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y ++CONFIG_SERVERIP="192.168.1.254" +--- /dev/null ++++ b/arch/arm/dts/mt7986a-netcore-n60.dts +@@ -0,0 +1,185 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (c) 2021 MediaTek Inc. ++ * Author: Sam Shih ++ */ ++ ++/dts-v1/; ++#include "mt7986.dtsi" ++#include ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "Netcore N60"; ++ compatible = "mediatek,mt7986", "mediatek,mt7986-rfb"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ memory@40000000 { ++ device_type = "memory"; ++ reg = <0x40000000 0x20000000>; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ factory { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 9 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ label = "wps"; ++ linux,code = ; ++ gpios = <&gpio 10 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ status_red { ++ label = "red:status"; ++ gpios = <&gpio 29 GPIO_ACTIVE_LOW>; ++ }; ++ ++ status_green { ++ label = "green:status"; ++ gpios = <&gpio 32 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ mediatek,force-highspeed; ++ status = "okay"; ++}; ++ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>; ++ status = "disabled"; ++}; ++ ++ð { ++ status = "okay"; ++ mediatek,gmac-id = <0>; ++ phy-mode = "2500base-x"; ++ mediatek,switch = "mt7531"; ++ reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ }; ++}; ++ ++&pinctrl { ++ spi_flash_pins: spi0-pins-func-1 { ++ mux { ++ function = "flash"; ++ groups = "spi0", "spi0_wp_hold"; ++ }; ++ ++ conf-pu { ++ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-pd { ++ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ }; ++ ++ spic_pins: spi1-pins-func-1 { ++ mux { ++ function = "spi"; ++ groups = "spi1_2"; ++ }; ++ }; ++ ++ uart1_pins: spi1-pins-func-3 { ++ mux { ++ function = "uart"; ++ groups = "uart1_2"; ++ }; ++ }; ++ ++ pwm_pins: pwm0-pins-func-1 { ++ mux { ++ function = "pwm"; ++ groups = "pwm0"; ++ }; ++ }; ++}; ++ ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_pins>; ++ status = "okay"; ++}; ++ ++&spi0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi_flash_pins>; ++ status = "okay"; ++ must_tx; ++ enhance_timing; ++ dma_ext; ++ ipm_design; ++ support_quad; ++ tick_dly = <1>; ++ sample_sel = <0>; ++ ++ spi_nand@1 { ++ compatible = "spi-nand"; ++ reg = <1>; ++ spi-max-frequency = <52000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "bl2"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ partition@100000 { ++ label = "orig-env"; ++ reg = <0x100000 0x80000>; ++ }; ++ ++ partition@160000 { ++ label = "factory"; ++ reg = <0x180000 0x200000>; ++ }; ++ ++ partition@380000 { ++ label = "fip"; ++ reg = <0x380000 0x200000>; ++ }; ++ ++ partition@580000 { ++ label = "ubi"; ++ reg = <0x580000 0x7280000>; ++ }; ++ }; ++ }; ++}; ++ ++&watchdog { ++ status = "disabled"; ++}; +--- /dev/null ++++ b/netcore_n60_env +@@ -0,0 +1,57 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi ++bootconf=config-1 ++bootdelay=0 ++bootfile=openwrt-mediatek-filogic-netcore_n60-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-netcore_n60-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-netcore_n60-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-netcore_n60-squashfs-sysupgrade.itb ++bootled_pwr=green:status ++bootled_rec=red:status ++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 ++bootmenu_default=0 ++bootmenu_delay=0 ++bootmenu_title= ( ( ( OpenWrt ) ) ) ++bootmenu_0=Initialize environment.=run _firstboot ++bootmenu_0d=Run default boot command.=run boot_default ++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return ++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return ++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return ++bootmenu_8=Reboot.=reset ++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off ++boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2 ++part_default=production ++part_recovery=recovery ++reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800 ++mtd_write_fip=mtd erase fip && mtd write fip $loadaddr ++mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr ++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format ++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset ++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi ++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs ++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery ++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data ++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize ++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize ++ethaddr_factory=mtd read factory 0x40080000 0x1fe000 0x1000 && env readmem -b ethaddr 0x40080f20 0x6 ; setenv ethaddr_factory ++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv ++_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" From 5632227f440bf8a217556651324e47d55694ff4f Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Fri, 3 Nov 2023 23:02:35 +0800 Subject: [PATCH 10/65] mediatek: filogic: add Netcore N60 support Hardware specification: SoC: MediaTek MT7986A 4x A53 Flash: ESMT F50L1G41LB 128MB RAM: W632GU6NB DDR3 256MB Ethernet: 1x 2.5G + 4x 1G WiFi1: MT7975N 2.4GHz 4T4R WiFi2: MT7975PN 5GHz 4T4R Button: Reset, WPS Power: DC 12V 2A Flash instructions: 1. Connect to the router using ssh or telnet, username: useradmin, password is the web login password of the router. 2. Use scp to upload bl31-uboot.fip and flash: "mtd write xxx-preloader.bin spi0.0" "mtd write xxx-bl31-uboot.fip FIP" "mtd erase ubi" 3. Connect to the router via the Lan port, set a static ip of your PC. (ip 192.168.1.254, gateway 192.168.1.1) 4. Download initramfs image, reboot router, waiting for tftp recovery to complete. 5. After openwrt boots up, perform sysupgrade. Note: 1. Back up all mtd partitions before flashing. Signed-off-by: Chukun Pan (cherry picked from commit 4ae474afbd023a3386f4276ca8f948a44b49ff1b) --- .../mediatek/dts/mt7986a-netcore-n60.dts | 284 ++++++++++++++++++ .../filogic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 3 +- .../base-files/lib/upgrade/platform.sh | 1 + target/linux/mediatek/image/filogic.mk | 24 ++ 5 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 target/linux/mediatek/dts/mt7986a-netcore-n60.dts diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts new file mode 100644 index 0000000000..b96b1e2ec0 --- /dev/null +++ b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts @@ -0,0 +1,284 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model = "Netcore N60"; + compatible = "netcore,n60", "mediatek,mt7986a"; + + aliases { + serial0 = &uart0; + label-mac-device = &gmac0; + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_blue; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory { + reg = <0 0x40000000 0 0x10000000>; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + + mesh { + label = "mesh"; + linux,code = ; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: status-red { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 29 GPIO_ACTIVE_LOW>; + }; + + led_status_blue: status-blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 32 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&crypto { + status = "okay"; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-handle = <&phy6>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_wan>; + nvmem-cell-names = "mac-address"; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + }; +}; + +&mdio { + reset-delay-us = <600>; + reset-post-delay-us = <20000>; + reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>; + + phy6: phy@6 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <6>; + mxl,led-config = <0x0 0x0 0x0 0x3f0>; + }; + + switch: switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + + port@1 { + reg = <1>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi_flash_pins>; + status = "okay"; + + flash@0 { + compatible = "spi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + + spi-max-frequency = <20000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x0000000 0x0100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x0100000 0x0080000>; + }; + + factory: partition@180000 { + label = "Factory"; + reg = <0x0180000 0x0200000>; + read-only; + }; + + partition@380000 { + label = "FIP"; + reg = <0x0380000 0x0200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x0580000 0x7280000>; + }; + }; + }; +}; + +&pio { + spi_flash_pins: spi-flash-pins-33-to-38 { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + conf-pu { + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + conf-pd { + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; + drive-strength = <8>; + mediatek,pull-down-adv = <0>; /* bias-disable */ + }; + }; + + wf_2g_5g_pins: wf_2g_5g-pins { + mux { + function = "wifi"; + groups = "wf_2g", "wf_5g"; + }; + conf { + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; +}; + +&trng { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&wf_2g_5g_pins>; + + mediatek,mtd-eeprom = <&factory 0x0>; +}; + +&factory { + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_lan: macaddr@1fef20 { + reg = <0x1fef20 0x6>; + }; + + macaddr_wan: macaddr@1fef26 { + reg = <0x1fef26 0x6>; + }; + }; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 7d2cd706a9..b4d8d0e9aa 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -26,6 +26,7 @@ mediatek_setup_interfaces() asus,tuf-ax4200|\ jdcloud,re-cp-03|\ mediatek,mt7981-rfb|\ + netcore,n60|\ unielec,u7981-01*|\ zbtlink,zbt-z8102ax) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1 diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 7cecd82f9f..62bbde6ba8 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -85,7 +85,8 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress ;; - jcg,q30-pro) + jcg,q30-pro|\ + netcore,n60) # Originally, phy1 is phy0 mac with LA bit set. However, this would conflict # addresses on multiple VIFs with the other radio. Use label mac to set LA bit. [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(get_mac_label) > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index fb981376fc..c26b672b1e 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -124,6 +124,7 @@ platform_do_upgrade() { h3c,magic-nx30-pro|\ jcg,q30-pro|\ mediatek,mt7981-rfb|\ + netcore,n60|\ qihoo,360t7|\ tplink,tl-xdr4288|\ tplink,tl-xdr6086|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index c94aac9681..83da1bb789 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -692,6 +692,30 @@ define Device/mercusys_mr90x-v1 endef TARGET_DEVICES += mercusys_mr90x-v1 +define Device/netcore_n60 + DEVICE_VENDOR := Netcore + DEVICE_MODEL := N60 + DEVICE_DTS := mt7986a-netcore-n60 + DEVICE_DTS_DIR := ../dts + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 + UBOOTENV_IN_UBI := 1 + IMAGES := sysupgrade.itb + KERNEL_INITRAMFS_SUFFIX := -recovery.itb + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + IMAGE/sysupgrade.itb := append-kernel | \ + fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata + DEVICE_PACKAGES := kmod-mt7986-firmware mt7986-wo-firmware + ARTIFACTS := preloader.bin bl31-uboot.fip + ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-ddr3 + ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot netcore_n60 +endef +TARGET_DEVICES += netcore_n60 + define Device/netgear_wax220 DEVICE_VENDOR := NETGEAR DEVICE_MODEL := WAX220 From feb5b072efe1e9777e69039d1b4a0c6c238cb75f Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 22 Jul 2023 17:40:56 +0200 Subject: [PATCH 11/65] mediatek: add missing SPDX header Signed-off-by: David Bauer (cherry picked from commit 36f7ececc21fe6698a75f5ce9fc3ebf6c96a1b97) --- target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts index c6dc1e5c4e..d222cebb4f 100644 --- a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) /dts-v1/; #include "mt7981.dtsi" From bed2272605b483d1ed896c1f564c49d677eac376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Fri, 6 Oct 2023 23:37:47 +0200 Subject: [PATCH 12/65] mac80211: fix flush during station removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes WARN_ONs when using AP_VLANs after station removal. The flush call passed AP_VLAN vif to driver, but because these vifs are virtual and not registered with drivers, we need to translate to the correct AP vif first. Fixes: openwrt#12420 Signed-off-by: Oldřich Jedlička [Rename to 360-wifi-mac80211-do-not-pass-ap_vlan-vif-pointer-to-dri.patch] (cherry picked from commit 3e738781a9712eaa81d5af0ecc8b55cbfe480c68) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- ...-not-pass-ap_vlan-vif-pointer-to-dri.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/360-wifi-mac80211-do-not-pass-ap_vlan-vif-pointer-to-dri.patch diff --git a/package/kernel/mac80211/patches/subsys/360-wifi-mac80211-do-not-pass-ap_vlan-vif-pointer-to-dri.patch b/package/kernel/mac80211/patches/subsys/360-wifi-mac80211-do-not-pass-ap_vlan-vif-pointer-to-dri.patch new file mode 100644 index 0000000000..4b65ef09dc --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/360-wifi-mac80211-do-not-pass-ap_vlan-vif-pointer-to-dri.patch @@ -0,0 +1,64 @@ +From ee0db868ee4d88493dfdc82f59e3b4e449ddddd5 Mon Sep 17 00:00:00 2001 +From: Oldřich Jedlička +Date: Sat, 4 Nov 2023 15:13:33 +0100 +Subject: wifi: mac80211: do not pass AP_VLAN vif pointer to drivers during + flush +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[ Upstream commit 3e3a2b645c043f7e3e488d5011478cefb69bbe8b ] + +This fixes WARN_ONs when using AP_VLANs after station removal. The flush +call passed AP_VLAN vif to driver, but because these vifs are virtual and +not registered with drivers, we need to translate to the correct AP vif +first. + +Closes: https://github.com/openwrt/openwrt/issues/12420 +Fixes: 0b75a1b1e42e ("wifi: mac80211: flush queues on STA removal") +Fixes: d00800a289c9 ("wifi: mac80211: add flush_sta method") +Tested-by: Konstantin Demin +Tested-by: Koen Vandeputte +Signed-off-by: Oldřich Jedlička +Link: https://lore.kernel.org/r/20231104141333.3710-1-oldium.pro@gmail.com +Signed-off-by: Johannes Berg +Signed-off-by: Sasha Levin +--- + net/mac80211/driver-ops.h | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/net/mac80211/driver-ops.h ++++ b/net/mac80211/driver-ops.h +@@ -21,7 +21,7 @@ + static inline struct ieee80211_sub_if_data * + get_bss_sdata(struct ieee80211_sub_if_data *sdata) + { +- if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) ++ if (sdata && sdata->vif.type == NL80211_IFTYPE_AP_VLAN) + sdata = container_of(sdata->bss, struct ieee80211_sub_if_data, + u.ap); + +@@ -604,10 +604,13 @@ static inline void drv_flush(struct ieee + struct ieee80211_sub_if_data *sdata, + u32 queues, bool drop) + { +- struct ieee80211_vif *vif = sdata ? &sdata->vif : NULL; ++ struct ieee80211_vif *vif; + + might_sleep(); + ++ sdata = get_bss_sdata(sdata); ++ vif = sdata ? &sdata->vif : NULL; ++ + if (sdata && !check_sdata_in_driver(sdata)) + return; + +@@ -623,6 +626,8 @@ static inline void drv_flush_sta(struct + { + might_sleep(); + ++ sdata = get_bss_sdata(sdata); ++ + if (sdata && !check_sdata_in_driver(sdata)) + return; + From c145f0f8f63b2e5578ecf3d9487eb864cdfedbd6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 11 Jul 2023 14:38:06 +0200 Subject: [PATCH 13/65] mac80211: add fix for receiving STP frames on mesh Fix length in ethernet header Signed-off-by: Felix Fietkau (cherry picked from commit 8f7be2a2ba79987bd150f5f4e266daf96fd94e32) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- ...x-receving-mesh-packets-without-RFC1.patch | 25 +++++++++++++++++++ ...Transition-Disable-policy-during-por.patch | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mac80211/patches/subsys/339-wifi-cfg80211-fix-receving-mesh-packets-without-RFC1.patch diff --git a/package/kernel/mac80211/patches/subsys/339-wifi-cfg80211-fix-receving-mesh-packets-without-RFC1.patch b/package/kernel/mac80211/patches/subsys/339-wifi-cfg80211-fix-receving-mesh-packets-without-RFC1.patch new file mode 100644 index 0000000000..e32c6ae1f3 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/339-wifi-cfg80211-fix-receving-mesh-packets-without-RFC1.patch @@ -0,0 +1,25 @@ +From: Felix Fietkau +Date: Tue, 11 Jul 2023 13:30:12 +0200 +Subject: [PATCH] wifi: cfg80211: fix receving mesh packets without RFC1042 + header + +Fix ethernet header length field after stripping the mesh header + +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/all/CT5GNZSK28AI.2K6M69OXM9RW5@syracuse/ +Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") +Reported-by: Nicolas Escande +Signed-off-by: Felix Fietkau +--- + +--- a/net/wireless/util.c ++++ b/net/wireless/util.c +@@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct + hdrlen += ETH_ALEN + 2; + else if (!pskb_may_pull(skb, hdrlen)) + return -EINVAL; ++ else ++ payload.eth.h_proto = htons(skb->len - hdrlen); + + mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN; + switch (payload.flags & MESH_FLAGS_AE) { diff --git a/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch b/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch index be332e2275..e8ce7f51a3 100644 --- a/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch +++ b/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch @@ -176,7 +176,7 @@ Signed-off-by: Johannes Berg * Use the wdev event list so that if there are pending --- a/net/wireless/util.c +++ b/net/wireless/util.c -@@ -1057,7 +1057,9 @@ void cfg80211_process_wdev_events(struct +@@ -1059,7 +1059,9 @@ void cfg80211_process_wdev_events(struct __cfg80211_leave(wiphy_to_rdev(wdev->wiphy), wdev); break; case EVENT_PORT_AUTHORIZED: From e82759fd67507920e7a7b01d169ebdac57ff2bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Owoc?= Date: Mon, 18 Mar 2024 21:53:51 +0100 Subject: [PATCH 14/65] mac80211: add missing config for third 160MHz width for 5GHz radio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this configuration it is not possible to run the radio using HE160 on channels 149-177. Fixes: #14906 Signed-off-by: Paweł Owoc (cherry picked from commit a91b79fd04d58e711273d08e0b1246942b2eec98) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 6a37cbb22e..a80d106afa 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -269,6 +269,7 @@ mac80211_hostapd_setup_base() { case "$channel" in 36|40|44|48|52|56|60|64) idx=50;; 100|104|108|112|116|120|124|128) idx=114;; + 149|153|157|161|165|169|173|177) idx=163;; esac fi enable_ac=1 From 1f701c9b0415df7fcf0aafb1f5ee3f70a8b9e00d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jun 2024 17:24:09 +0200 Subject: [PATCH 15/65] kernel: Extract kmod-nf-dup-inet The nf_dup_ipv4.ko and nf_dup_ipv6.ko kernel module were packaged by kmod-ipt-tee and kmod-nft-dup-inet at the same time. Extract them into a separate package used by both. Link: https://github.com/openwrt/openwrt/pull/15833 Signed-off-by: Christian Marangi (cherry picked from commit b0953c4fbf1bb0ad0844febe991636d05884c194) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- include/netfilter.mk | 2 -- package/kernel/linux/modules/netfilter.mk | 26 +++++++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/include/netfilter.mk b/include/netfilter.mk index 81488fe5c8..7d1f03891b 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -253,8 +253,6 @@ $(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED)) # tee $(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE)) -$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4),)) -$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6),)) # u32 diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 0d2f8a9140..e47f926a67 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -132,6 +132,22 @@ endef $(eval $(call KernelPackage,nf-conntrack6)) +define KernelPackage/nf-dup-inet + SUBMENU:=$(NF_MENU) + TITLE:=Netfilter nf_tables dup in ip/ip6/inet family support + HIDDEN:=1 + DEPENDS:=+kmod-nf-conntrack +IPV6:kmod-nf-conntrack6 + KCONFIG:= \ + CONFIG_NF_DUP_IPV4 \ + CONFIG_NF_DUP_IPV6 + FILES:= \ + $(LINUX_DIR)/net/ipv4/netfilter/nf_dup_ipv4.ko \ + $(LINUX_DIR)/net/ipv6/netfilter/nf_dup_ipv6.ko +endef + +$(eval $(call KernelPackage,nf-dup-inet)) + + define KernelPackage/nf-log SUBMENU:=$(NF_MENU) TITLE:=Netfilter Logging @@ -716,7 +732,7 @@ $(eval $(call KernelPackage,ipt-tproxy)) define KernelPackage/ipt-tee TITLE:=TEE support - DEPENDS:=+kmod-ipt-conntrack + DEPENDS:=+kmod-ipt-conntrack +kmod-nf-dup-inet KCONFIG:=$(KCONFIG_IPT_TEE) FILES:=$(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_TEE-m))) @@ -1150,18 +1166,14 @@ $(eval $(call KernelPackage,nft-bridge)) define KernelPackage/nft-dup-inet SUBMENU:=$(NF_MENU) TITLE:=Netfilter nf_tables dup in ip/ip6/inet family support - DEPENDS:=+kmod-nft-core +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6 + DEPENDS:=+kmod-nft-core +kmod-nf-dup-inet KCONFIG:= \ - CONFIG_NF_DUP_IPV4 \ - CONFIG_NF_DUP_IPV6 \ CONFIG_NFT_DUP_IPV4 \ CONFIG_NFT_DUP_IPV6 FILES:= \ - $(LINUX_DIR)/net/ipv4/netfilter/nf_dup_ipv4.ko \ - $(LINUX_DIR)/net/ipv6/netfilter/nf_dup_ipv6.ko \ $(LINUX_DIR)/net/ipv4/netfilter/nft_dup_ipv4.ko \ $(LINUX_DIR)/net/ipv6/netfilter/nft_dup_ipv6.ko - AUTOLOAD:=$(call AutoProbe,nf_dup_ipv4 nf_dup_ipv6 nft_dup_ipv4 nft_dup_ipv6) + AUTOLOAD:=$(call AutoProbe,nft_dup_ipv4 nft_dup_ipv6) endef $(eval $(call KernelPackage,nft-dup-inet)) From 7f833b818066f5d18e18513e1b3207099f294e62 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jun 2024 17:54:49 +0200 Subject: [PATCH 16/65] kernel: Fix kmod-lib-lz4 packaging The kernel provides two variants of the lz4 compression a normal version and a high compression mode version. The old kmod-lib-lz4 package contained the normal version plus one part of the lz4hc version. There was already code which selected the kmod-lib-lz4hc package which did not exists. I split this into 3 packages. kmod-lib-lz4 and kmod-lib-lz4hc for the normal the and high compression algorithm which contain the specific code and the kmod-lib-lz4-decompress which contains the common decompressor. New we are also packaging lz4hc.ko Link: https://github.com/openwrt/openwrt/pull/15833 Signed-off-by: Christian Marangi (cherry picked from commit fac507606d75eec04762013582273468eea7ed92) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/lib.mk | 43 +++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk index 299c5a8c35..bb92088a1d 100644 --- a/package/kernel/linux/modules/lib.mk +++ b/package/kernel/linux/modules/lib.mk @@ -146,21 +146,28 @@ endef $(eval $(call KernelPackage,lib-zstd)) +define KernelPackage/lib-lz4-decompress + SUBMENU:=$(LIB_MENU) + TITLE:=LZ4 decompress + HIDDEN:=1 + KCONFIG:=CONFIG_LZ4_DECOMPRESS + FILES:=$(LINUX_DIR)/lib/lz4/lz4_decompress.ko +endef + +$(eval $(call KernelPackage,lib-lz4-decompress)) + + define KernelPackage/lib-lz4 SUBMENU:=$(LIB_MENU) TITLE:=LZ4 support - DEPENDS:=+kmod-crypto-acompress + DEPENDS:=+kmod-crypto-acompress +kmod-lib-lz4-decompress KCONFIG:= \ CONFIG_CRYPTO_LZ4 \ - CONFIG_CRYPTO_LZ4HC \ - CONFIG_LZ4_COMPRESS \ - CONFIG_LZ4_DECOMPRESS + CONFIG_LZ4_COMPRESS FILES:= \ $(LINUX_DIR)/crypto/lz4.ko \ - $(LINUX_DIR)/lib/lz4/lz4_compress.ko \ - $(LINUX_DIR)/lib/lz4/lz4hc_compress.ko \ - $(LINUX_DIR)/lib/lz4/lz4_decompress.ko - AUTOLOAD:=$(call AutoProbe,lz4 lz4_compress lz4hc_compress lz4_decompress) + $(LINUX_DIR)/lib/lz4/lz4_compress.ko + AUTOLOAD:=$(call AutoProbe,lz4 lz4_compress) endef define KernelPackage/lib-lz4/description @@ -170,6 +177,26 @@ endef $(eval $(call KernelPackage,lib-lz4)) +define KernelPackage/lib-lz4hc + SUBMENU:=$(LIB_MENU) + TITLE:=LZ4HC support + DEPENDS:=+kmod-crypto-acompress +kmod-lib-lz4-decompress + KCONFIG:= \ + CONFIG_CRYPTO_LZ4HC \ + CONFIG_LZ4HC_COMPRESS + FILES:= \ + $(LINUX_DIR)/crypto/lz4hc.ko \ + $(LINUX_DIR)/lib/lz4/lz4hc_compress.ko + AUTOLOAD:=$(call AutoProbe,lz4hc lz4hc_compress) +endef + +define KernelPackage/lib-lz4hc/description + Kernel module for LZ4HC compression/decompression support +endef + +$(eval $(call KernelPackage,lib-lz4hc)) + + define KernelPackage/lib-842 SUBMENU:=$(LIB_MENU) TITLE:=842 support From 03299b3b5237a86b64ce373bc83f73b469a728c2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jun 2024 17:38:46 +0200 Subject: [PATCH 17/65] kernel: Add kmod-crypto-blake2b The kmod-fs-btrfs package has a soft dependency to kmod-crypto-blake2b The CONFIG_BTRFS_FS kernel build option selects CONFIG_CRYPTO_BLAKE2B, but we did not package it before. Link: https://github.com/openwrt/openwrt/pull/15833 Signed-off-by: Christian Marangi (cherry picked from commit f89091bba6be483e66c5ac14c477621f74aef203) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/crypto.mk | 12 ++++++++++++ package/kernel/linux/modules/fs.mk | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 248b4d68f9..82241056a5 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -80,6 +80,18 @@ endef $(eval $(call KernelPackage,crypto-authenc)) +define KernelPackage/crypto-blake2b + TITLE:=Support for BLAKE2b cryptographic hash function (RFC 7693) + DEPENDS:=+kmod-crypto-hash + KCONFIG:=CONFIG_CRYPTO_BLAKE2B + FILES:=$(LINUX_DIR)/crypto/blake2b_generic.ko + AUTOLOAD:=$(call AutoLoad,09,blake2b_generic) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-blake2b)) + + define KernelPackage/crypto-cbc TITLE:=Cipher Block Chaining CryptoAPI module DEPENDS:=+kmod-crypto-manager diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 9724fa7200..19a78cabbb 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -67,7 +67,7 @@ $(eval $(call KernelPackage,fs-autofs4)) define KernelPackage/fs-btrfs SUBMENU:=$(FS_MENU) TITLE:=BTRFS filesystem support - DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd + DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd +kmod-crypto-blake2b KCONFIG:=\ CONFIG_BTRFS_FS \ CONFIG_BTRFS_FS_CHECK_INTEGRITY=n From 9bf10898baba9c618d078bfddd37e4526a7fab61 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jun 2024 18:14:47 +0200 Subject: [PATCH 18/65] kernel: Add kmod-crypto-xxhash kxxhash_generic.ko is a soft dependency of kmod-fs-btrfs, but we did not package it. Extract the kmod-lib-xxhash and then package xxhash_generic.ko. Link: https://github.com/openwrt/openwrt/pull/15833 Signed-off-by: Christian Marangi (cherry picked from commit 2ebeda029490e308cc0e8f475e63280f960e74c4) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/crypto.mk | 12 ++++++++++++ package/kernel/linux/modules/fs.mk | 2 +- package/kernel/linux/modules/lib.mk | 19 ++++++++++++++----- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 82241056a5..c6b57387cf 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -1053,3 +1053,15 @@ endef $(eval $(call KernelPackage,crypto-xts)) + +define KernelPackage/crypto-xxhash + TITLE:=xxHash non-cryptographic hash algorithm + DEPENDS:=+kmod-crypto-hash +kmod-lib-xxhash + KCONFIG:=CONFIG_CRYPTO_XXHASH + FILES:=$(LINUX_DIR)/crypto/xxhash_generic.ko + AUTOLOAD:=$(call AutoLoad,09,xxhash_generic) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-xxhash)) + diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 19a78cabbb..a7fc4ce4d5 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -67,7 +67,7 @@ $(eval $(call KernelPackage,fs-autofs4)) define KernelPackage/fs-btrfs SUBMENU:=$(FS_MENU) TITLE:=BTRFS filesystem support - DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd +kmod-crypto-blake2b + DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd +kmod-crypto-blake2b +kmod-crypto-xxhash KCONFIG:=\ CONFIG_BTRFS_FS \ CONFIG_BTRFS_FS_CHECK_INTEGRITY=n diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk index bb92088a1d..149ce798a5 100644 --- a/package/kernel/linux/modules/lib.mk +++ b/package/kernel/linux/modules/lib.mk @@ -122,21 +122,30 @@ endef $(eval $(call KernelPackage,lib-lzo)) +define KernelPackage/lib-xxhash + SUBMENU:=$(LIB_MENU) + TITLE:=xxhash support + HIDDEN:=1 + KCONFIG:=CONFIG_XXHASH + FILES:=$(LINUX_DIR)/lib/xxhash.ko +endef + +$(eval $(call KernelPackage,lib-xxhash)) + + define KernelPackage/lib-zstd SUBMENU:=$(LIB_MENU) TITLE:=ZSTD support - DEPENDS:=+kmod-crypto-acompress + DEPENDS:=+kmod-crypto-acompress +kmod-lib-xxhash KCONFIG:= \ CONFIG_CRYPTO_ZSTD \ CONFIG_ZSTD_COMPRESS \ - CONFIG_ZSTD_DECOMPRESS \ - CONFIG_XXHASH + CONFIG_ZSTD_DECOMPRESS FILES:= \ $(LINUX_DIR)/crypto/zstd.ko \ - $(LINUX_DIR)/lib/xxhash.ko \ $(LINUX_DIR)/lib/zstd/zstd_compress.ko \ $(LINUX_DIR)/lib/zstd/zstd_decompress.ko - AUTOLOAD:=$(call AutoProbe,xxhash zstd zstd_compress zstd_decompress) + AUTOLOAD:=$(call AutoProbe,zstd zstd_compress zstd_decompress) endef define KernelPackage/lib-zstd/description From ffe97a61fcb00b022c699f7baf68ae208c94546c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jun 2024 18:23:13 +0200 Subject: [PATCH 19/65] kernel: Add kmod-mfd Package the mfd-core.ko kernel module. It is selected by the kmod-hwmon-gsc already. Link: https://github.com/openwrt/openwrt/pull/15833 Signed-off-by: Christian Marangi (cherry picked from commit 8b4fd1c0dece936dc2c79f2a17d824512e7e7df3) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/hwmon.mk | 2 +- package/kernel/linux/modules/other.mk | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index 29392548d4..b4ddcfdde8 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -116,7 +116,7 @@ define KernelPackage/hwmon-gsc $(LINUX_DIR)/drivers/mfd/gateworks-gsc.ko \ $(LINUX_DIR)/drivers/hwmon/gsc-hwmon.ko AUTOLOAD:=$(call AutoLoad,20,gsc-hwmon,1) - $(call AddDepends/hwmon,+kmod-i2c-core) + $(call AddDepends/hwmon,+kmod-i2c-core +kmod-mfd) endef define KernelPackage/hwmon-gsc/description diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 9c10b97501..5523829612 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -780,6 +780,18 @@ endef $(eval $(call KernelPackage,rtc-s35390a)) +define KernelPackage/mfd + SUBMENU:=$(OTHER_MENU) + TITLE:=Multifunction device drivers + HIDDEN:=1 + KCONFIG:=CONFIG_MFD_CORE + FILES:=$(LINUX_DIR)/drivers/mfd/mfd-core.ko + AUTOLOAD:=$(call AutoLoad,10,mfd-core) +endef + +$(eval $(call KernelPackage,mfd)) + + define KernelPackage/mtdtests SUBMENU:=$(OTHER_MENU) TITLE:=MTD subsystem tests From aa27bd70870d8c0992314ab26fc31c5bf7460aa4 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Thu, 20 Jun 2024 15:15:50 +0100 Subject: [PATCH 20/65] kernel: crypto: remove FCRYPT from miscellany It has its own dedicated knob Signed-off-by: Nathaniel Wesley Filardo Link: https://github.com/openwrt/openwrt/pull/15761 Signed-off-by: Robert Marko (cherry picked from commit 7d71c03ab188a58d74d6cdbeabb38b70ead2c74b) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/crypto.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index c6b57387cf..2e888742d0 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -712,7 +712,6 @@ define KernelPackage/crypto-misc CONFIG_CRYPTO_CAMELLIA \ CONFIG_CRYPTO_CAST5 \ CONFIG_CRYPTO_CAST6 \ - CONFIG_CRYPTO_FCRYPT \ CONFIG_CRYPTO_KHAZAD \ CONFIG_CRYPTO_SERPENT \ CONFIG_CRYPTO_TEA \ From 80a36594f9623dc471c6d866d3e688da39c143be Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Jun 2024 14:17:57 +0200 Subject: [PATCH 21/65] hostapd: use strdup on string passed to hostapd_add_iface The data is modified within hostapd_add_iface Signed-off-by: Felix Fietkau (cherry picked from commit 032d3fcf7a861b140435b6507b2b0b66361c92f8) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/network/services/hostapd/src/src/ap/ucode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index af97091be5..80c01b4b9b 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -86,12 +86,16 @@ static uc_value_t * uc_hostapd_add_iface(uc_vm_t *vm, size_t nargs) { uc_value_t *iface = uc_fn_arg(0); + char *data; int ret; if (ucv_type(iface) != UC_STRING) return ucv_int64_new(-1); - ret = hostapd_add_iface(interfaces, ucv_string_get(iface)); + data = strdup(ucv_string_get(iface)); + ret = hostapd_add_iface(interfaces, data); + free(data); + hostapd_ucode_update_interfaces(); return ucv_int64_new(ret); From 287e2565e2a4caccc8e04505585ba9e64b7e244b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Jun 2024 14:43:39 +0200 Subject: [PATCH 22/65] hostapd: fix crash on interface setup failure Add a missing NULL pointer check when deleting beacons Signed-off-by: Felix Fietkau (cherry picked from commit 3984fb0582083c5c0f511ed3a33eb17908eccb08) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- ...crash-when-adding-an-interface-fails.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch diff --git a/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch b/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch new file mode 100644 index 0000000000..44ba6c009c --- /dev/null +++ b/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch @@ -0,0 +1,21 @@ +From: Felix Fietkau +Date: Fri, 14 Jun 2024 14:41:16 +0200 +Subject: [PATCH] nl80211: fix crash when adding an interface fails + +When adding an interface fails early, the bss link is still NULL. +Avoid crashing on deleting beacons. + +Signed-off-by: Felix Fietkau +--- + +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c +@@ -3004,7 +3004,7 @@ static int wpa_driver_nl80211_del_beacon + struct nl_msg *msg; + struct wpa_driver_nl80211_data *drv = bss->drv; + +- if (!link->beacon_set) ++ if (!link || !link->beacon_set) + return 0; + + wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)", From f8690ca0db5e3c2ece966d8323c1a40bf62ec6d8 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 17 Jun 2024 13:19:52 +0200 Subject: [PATCH 23/65] scripts/ext-toolchain: add missing libc library specs Add missing libc library spec that weren't added to the ext-toolchain script when the library were introduced in the packages libs toolchain Makefile. Signed-off-by: Christian Marangi (cherry picked from commit 8cad52a267bffe384a119f3e5ae1892e8580a981) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- scripts/ext-toolchain.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh index fe1024c18e..894c44de72 100755 --- a/scripts/ext-toolchain.sh +++ b/scripts/ext-toolchain.sh @@ -40,6 +40,12 @@ LIB_SPECS=" ssp: libssp gfortran: libgfortran gomp: libgomp + atomic: libatomic + quadmath: libquadmath + asan: libasan + tasan: libtsan + lasan: liblsan + ubasan: libubsan " # Binary specs @@ -384,7 +390,7 @@ print_config() { fi local lib - for lib in C RT PTHREAD GCC STDCPP SSP GFORTRAN GOMP; do + for lib in C RT PTHREAD GCC STDCPP SSP GFORTRAN GOMP ATOMIC QUADMATH ASAN TSAN LSAN UBSAN; do local file local spec="" local llib="$(echo "$lib" | sed -e 's#.*#\L&#')" From 6928faa3505cc228860ca75dff8ac21247a34258 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 14 Jun 2024 16:01:34 -0700 Subject: [PATCH 24/65] tools/sparse: fix compilation with GCC14 Upstream backport. Get rid of PKG_RELEASE as it's irrelevant to tools. Signed-off-by: Rosen Penev (cherry picked from commit 253d777c968b8fd74e857bec4cd74267daae0010) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- tools/sparse/Makefile | 1 - tools/sparse/patches/010-llvm15.patch | 128 ++++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 tools/sparse/patches/010-llvm15.patch diff --git a/tools/sparse/Makefile b/tools/sparse/Makefile index e08bd1d05f..832b9bd540 100644 --- a/tools/sparse/Makefile +++ b/tools/sparse/Makefile @@ -8,7 +8,6 @@ PKG_NAME:=sparse PKG_VERSION:=0.6.4 PKG_HASH:=6ab28b4991bc6aedbd73550291360aa6ab3df41f59206a9bde9690208a6e387c -PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/devel/sparse/dist/ diff --git a/tools/sparse/patches/010-llvm15.patch b/tools/sparse/patches/010-llvm15.patch new file mode 100644 index 0000000000..54fddc7a90 --- /dev/null +++ b/tools/sparse/patches/010-llvm15.patch @@ -0,0 +1,128 @@ +From 0544c547682b878758eea731ef4b8e64e5ec91fb Mon Sep 17 00:00:00 2001 +From: Luc Van Oostenryck +Date: Sat, 20 Jan 2024 01:24:12 +0100 +Subject: llvm: fix LLVM 15 deprecation warnings + +LLVM 15 switched to opaque pointers by default and no longer supports typed pointers. +Remove deprecated LLVM calls and update test. + +Original-patch-by: Vladimir Petko +Signed-off-by: Luc Van Oostenryck +--- + sparse-llvm.c | 35 ++++++++++++++++++++++++++++++++++- + validation/backend/call-variadic.c | 16 ++++------------ + 2 files changed, 38 insertions(+), 13 deletions(-) + +--- a/sparse-llvm.c ++++ b/sparse-llvm.c +@@ -32,6 +32,20 @@ static LLVMTypeRef func_return_type(stru + return symbol_type(sym->ctype.base_type); + } + ++#if LLVM_VERSION_MAJOR > 14 ++// A call can be done either with a SYM_FN or a SYM_PTR (pointing to a SYM_FN). ++// Return the type corresponding to the SYM_FN. ++static LLVMTypeRef func_full_type(struct symbol *type) ++{ ++ if (type->type == SYM_NODE) { ++ struct symbol *btype = type->ctype.base_type; ++ if (btype->type == SYM_PTR) ++ type = btype->ctype.base_type; ++ } ++ return symbol_type(type); ++} ++#endif ++ + static LLVMTypeRef sym_func_type(struct symbol *sym) + { + int n_arg = symbol_list_size(sym->arguments); +@@ -302,7 +316,11 @@ static LLVMValueRef get_sym_value(LLVMMo + LLVMSetGlobalConstant(data, 1); + LLVMSetInitializer(data, LLVMConstString(strdup(s), strlen(s) + 1, true)); + ++#if LLVM_VERSION_MAJOR > 14 ++ result = LLVMConstGEP2(LLVMTypeOf(data), data, indices, ARRAY_SIZE(indices)); ++#else + result = LLVMConstGEP(data, indices, ARRAY_SIZE(indices)); ++#endif + return result; + } + default: +@@ -485,7 +503,11 @@ static LLVMValueRef calc_gep(LLVMBuilder + /* convert base to char* type */ + base = LLVMBuildPointerCast(builder, base, bytep, name); + /* addr = base + off */ ++#if LLVM_VERSION_MAJOR > 14 ++ addr = LLVMBuildInBoundsGEP2(builder, LLVMTypeOf(base), base, &off, 1, name); ++#else + addr = LLVMBuildInBoundsGEP(builder, base, &off, 1, name); ++#endif + /* convert back to the actual pointer type */ + addr = LLVMBuildPointerCast(builder, addr, type, name); + return addr; +@@ -711,7 +733,11 @@ static void output_op_load(struct functi + + /* perform load */ + pseudo_name(insn->target, name); ++#if LLVM_VERSION_MAJOR > 14 ++ target = LLVMBuildLoad2(fn->builder, symbol_type(insn->type), addr, name); ++#else + target = LLVMBuildLoad(fn->builder, addr, name); ++#endif + + insn->target->priv = target; + } +@@ -797,6 +823,7 @@ static void output_op_switch(struct func + static void output_op_call(struct function *fn, struct instruction *insn) + { + LLVMValueRef target, func; ++ struct symbol *fntype; + struct symbol *ctype; + int n_arg = 0, i; + struct pseudo *arg; +@@ -812,14 +839,20 @@ static void output_op_call(struct functi + else + func = pseudo_to_value(fn, ctype, insn->func); + i = 0; ++ fntype = ctype; // first symbol in the list is the function 'true' type + FOR_EACH_PTR(insn->arguments, arg) { +- NEXT_PTR_LIST(ctype); ++ NEXT_PTR_LIST(ctype); // the remaining ones are the arguments' type + args[i++] = pseudo_to_rvalue(fn, ctype, arg); + } END_FOR_EACH_PTR(arg); + FINISH_PTR_LIST(ctype); + + pseudo_name(insn->target, name); ++#if LLVM_VERSION_MAJOR > 14 ++ target = LLVMBuildCall2(fn->builder, func_full_type(fntype), func, args, n_arg, name); ++#else ++ (void) fntype; + target = LLVMBuildCall(fn->builder, func, args, n_arg, name); ++#endif + + insn->target->priv = target; + } +--- a/validation/backend/call-variadic.c ++++ b/validation/backend/call-variadic.c +@@ -11,17 +11,9 @@ int foo(const char *fmt, int a, long l, + /* + * check-name: call-variadic + * check-command: sparse-llvm-dis -m64 $file ++ * check-output-ignore ++ * check-output-contains: , ...) @print(\\(i8\\*\\|ptr\\) %ARG1., i32 120, i32 %ARG2., i32 8, i64 %ARG3., i64 0, \\(i32\\*\\|ptr\\) %ARG4., \\(i8\\*\\|ptr\\) null) ++ * check-output-contains: define i32 @foo( ++ * check-output-contains: declare i32 @print( + * +- * check-output-start +-; ModuleID = '' +-source_filename = "sparse" +- +-define i32 @foo(i8* %ARG1., i32 %ARG2., i64 %ARG3., i32* %ARG4.) { +-L0: +- %R5. = call i32 (i8*, ...) @print(i8* %ARG1., i32 120, i32 %ARG2., i32 8, i64 %ARG3., i64 0, i32* %ARG4., i8* null) +- ret i32 %R5. +-} +- +-declare i32 @print(i8*, ...) +- * check-output-end + */ From 0fb2ee44f99fe099617b59d7de2f09cef70cee6d Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sun, 2 Jun 2024 15:54:14 +0200 Subject: [PATCH 25/65] firmware: intel-microcode: update to 20240531 Debian changelog: intel-microcode (3.20240531.1) unstable; urgency=medium * New upstream microcode datafile 20240531 * Fix unspecified functional issues on Pentium Silver N/J5xxx, Celeron N/J4xxx * Updated Microcodes: sig 0x000706a1, pf_mask 0x01, 2024-04-19, rev 0x0042, size 76800 * source: update symlinks to reflect id of the latest release, 20240531 -- Henrique de Moraes Holschuh Sat, 01 Jun 2024 11:49:47 -0300 intel-microcode (3.20240514.1) unstable; urgency=medium * New upstream microcode datafile 20240514 * Mitigations for INTEL-SA-01051 (CVE-2023-45733) Hardware logic contains race conditions in some Intel Processors may allow an authenticated user to potentially enable partial information disclosure via local access. * Mitigations for INTEL-SA-01052 (CVE-2023-46103) Sequence of processor instructions leads to unexpected behavior in Intel Core Ultra Processors may allow an authenticated user to potentially enable denial of service via local access. * Mitigations for INTEL-SA-01036 (CVE-2023-45745, CVE-2023-47855) Improper input validation in some Intel TDX module software before version 1.5.05.46.698 may allow a privileged user to potentially enable escalation of privilege via local access. * Fix for unspecified functional issues on 4th gen and 5th gen Xeon Scalable, 12th, 13th and 14th gen Intel Core processors, as well as for Core i3 N-series processors. * Updated microcodes: sig 0x000806f8, pf_mask 0x87, 2024-02-05, rev 0x2b0005c0, size 581632 sig 0x000806f7, pf_mask 0x87, 2024-02-05, rev 0x2b0005c0 sig 0x000806f6, pf_mask 0x87, 2024-02-05, rev 0x2b0005c0 sig 0x000806f5, pf_mask 0x87, 2024-02-05, rev 0x2b0005c0 sig 0x000806f4, pf_mask 0x87, 2024-02-05, rev 0x2b0005c0 sig 0x000806f8, pf_mask 0x10, 2024-02-05, rev 0x2c000390, size 614400 sig 0x000806f6, pf_mask 0x10, 2024-02-05, rev 0x2c000390 sig 0x000806f5, pf_mask 0x10, 2024-02-05, rev 0x2c000390 sig 0x000806f4, pf_mask 0x10, 2024-02-05, rev 0x2c000390 sig 0x00090672, pf_mask 0x07, 2023-12-05, rev 0x0035, size 224256 sig 0x00090675, pf_mask 0x07, 2023-12-05, rev 0x0035 sig 0x000b06f2, pf_mask 0x07, 2023-12-05, rev 0x0035 sig 0x000b06f5, pf_mask 0x07, 2023-12-05, rev 0x0035 sig 0x000906a3, pf_mask 0x80, 2023-12-05, rev 0x0433, size 222208 sig 0x000906a4, pf_mask 0x80, 2023-12-05, rev 0x0433 sig 0x000906a4, pf_mask 0x40, 2023-12-07, rev 0x0007, size 119808 sig 0x000b0671, pf_mask 0x32, 2024-01-25, rev 0x0123, size 215040 sig 0x000b06e0, pf_mask 0x11, 2023-12-07, rev 0x0017, size 138240 sig 0x000c06f2, pf_mask 0x87, 2024-02-05, rev 0x21000230, size 552960 sig 0x000c06f1, pf_mask 0x87, 2024-02-05, rev 0x21000230 * source: update symlinks to reflect id of the latest release, 20240514 -- Henrique de Moraes Holschuh Thu, 16 May 2024 21:40:52 -0300 Signed-off-by: Christian Lamparter (cherry picked from commit 7d9b9762c95f5630857d8b08567fc1d72eb23217) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/firmware/intel-microcode/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 91a697c673..bdd8ae73d8 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=intel-microcode -PKG_VERSION:=20240312 +PKG_VERSION:=20240531 PKG_RELEASE:=1 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/non-free-firmware/i/intel-microcode/ -PKG_HASH:=25f53bab1bf0c84aba927a77a97a9f1147c94199fa95b5187d874f839f022808 +PKG_HASH:=808cbb57a790dab7060b59b31e70e54ac47d3798d75e9784ed57a65b9f951fc4 PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1 PKG_CPE_ID:=cpe:/a:intel:microcode From 9f3f5cff301407472e16c0033ad0544e8a57ce51 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 10 Jun 2024 23:39:36 +0100 Subject: [PATCH 26/65] mt76: mt7996: select required kernel and hostap options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Select DRIVER_11AX_SUPPORT and KERNEL_RELAY also for kmod-mt7996 to prevent build failure if only this driver is selected during build and end up with (most) required hostap features (IEEE 802.11be rates are not yet supported). Reported-by: Arınç ÜNAL Signed-off-by: Daniel Golle (cherry picked from commit 83311b747012e0675f96af18793e92cb8320c707) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/kernel/mt76/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 6faad44b2a..d3f78abb1f 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -318,7 +318,7 @@ endef define KernelPackage/mt7996e $(KernelPackage/mt76-default) TITLE:=MediaTek MT7996E wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core + DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko AUTOLOAD:=$(call AutoProbe,mt7996e) endef From 04b0f1e7f16b0870ddf4c7c1241aecc6d3d1a721 Mon Sep 17 00:00:00 2001 From: Qingfang Deng Date: Fri, 7 Jun 2024 17:55:38 +0800 Subject: [PATCH 27/65] config: kernel: remove KASAN_EXTRA The option has been removed from the kernel since 5.1. Signed-off-by: Qingfang Deng (cherry picked from commit 60ea3d6d46954553b7b50460dfe6b86878fe5990) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- config/Config-kernel.in | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 42755a4d59..ea828ae9cb 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -157,16 +157,6 @@ config KERNEL_KASAN Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB (the resulting kernel does not boot). -config KERNEL_KASAN_EXTRA - bool "KAsan: extra checks" - depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL - help - This enables further checks in the kernel address sanitizer, for now - it only includes the address-use-after-scope check that can lead - to excessive kernel stack usage, frame size warnings and longer - compile time. - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more - config KERNEL_KASAN_VMALLOC bool "Back mappings in vmalloc space with real shadow memory" depends on KERNEL_KASAN From 5a4231814b566cd8e27d06529388e558456d958e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 31 May 2024 14:39:51 +0200 Subject: [PATCH 28/65] tegra: Activate CONFIG_SND_DRIVERS The option CONFIG_SND_DRIVERS is activated by default in the generic configuration, do not deactivate it for tegra. This fixes the build of the kmod-sound-dummy package on tegra. (cherry picked from commit 21213c8156ccca90c135910b2ae2cdf40b8d98c3) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- target/linux/tegra/config-5.15 | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/tegra/config-5.15 b/target/linux/tegra/config-5.15 index 257ffda252..3434bd7a9a 100644 --- a/target/linux/tegra/config-5.15 +++ b/target/linux/tegra/config-5.15 @@ -386,7 +386,6 @@ CONFIG_SMP_ON_UP=y CONFIG_SND=y # CONFIG_SND_COMPRESS_OFFLOAD is not set CONFIG_SND_DMAENGINE_PCM=y -# CONFIG_SND_DRIVERS is not set # CONFIG_SND_HDA_TEGRA is not set CONFIG_SND_JACK=y CONFIG_SND_JACK_INPUT_DEV=y From 4df592f7a34166a57dab2ab7570ce3fe2ebd3118 Mon Sep 17 00:00:00 2001 From: Sahil Dhiman Date: Sat, 25 May 2024 15:27:12 +0530 Subject: [PATCH 29/65] scripts: Add GNU ftp mirror redirector for GNU and Savannah Add GNU's redirector which automatically redirect user to nearby online mirror. Signed-off-by: Sahil Dhiman Link: https://github.com/openwrt/openwrt/pull/15557 Signed-off-by: Robert Marko (cherry picked from commit 6510eb3b5d612ea7a70c4a8d9b83639e3b46e221) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- scripts/download.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/download.pl b/scripts/download.pl index 676c6e9e6b..ff0f41cfe9 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -273,6 +273,7 @@ foreach my $mirror (@ARGV) { push @mirrors, "https://raw.githubusercontent.com/$1"; } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { + push @mirrors, "https://ftpmirror.gnu.org/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1"; push @mirrors, "https://mirror.netcologne.de/gnu/$1"; push @mirrors, "http://ftp.kddilabs.jp/GNU/gnu/$1"; @@ -285,6 +286,7 @@ foreach my $mirror (@ARGV) { push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1"; push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1"; } elsif ($mirror =~ /^\@SAVANNAH\/(.+)$/) { + push @mirrors, "https://download.savannah.nongnu.org/releases/$1"; push @mirrors, "https://mirror.netcologne.de/savannah/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/nongnu/$1"; push @mirrors, "http://ftp.acc.umu.se/mirror/gnu.org/savannah/$1"; From add63dd508639357883ca9d7512d7738c2a721d2 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 8 May 2024 22:04:55 +0100 Subject: [PATCH 30/65] linux-firmware: realtek: update rtl8821ae firmware A newer version, rtl8821aefw_29.bin, has been available for over 7 years [1]. Let's use it. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=f70e4df2b384d21e36a7c30a591639592692e0ec Signed-off-by: Rui Salvaterra (cherry picked from commit 2b8e875a85802f6281df134e2231308f6c928796) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/firmware/linux-firmware/realtek.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/firmware/linux-firmware/realtek.mk b/package/firmware/linux-firmware/realtek.mk index 6d9238b8a4..d3b9592d12 100644 --- a/package/firmware/linux-firmware/realtek.mk +++ b/package/firmware/linux-firmware/realtek.mk @@ -112,7 +112,7 @@ $(eval $(call BuildPackage,rtl8761bu-firmware)) Package/rtl8821ae-firmware = $(call Package/firmware-default,RealTek RTL8821AE firmware) define Package/rtl8821ae-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8821aefw.bin $(1)/lib/firmware/rtlwifi + $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8821aefw_29.bin $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8821aefw_wowlan.bin $(1)/lib/firmware/rtlwifi endef $(eval $(call BuildPackage,rtl8821ae-firmware)) From ccac75a37f13e77071d4b481aad1aa7fbb8a4c29 Mon Sep 17 00:00:00 2001 From: Thomas Winkler Date: Fri, 10 Nov 2023 22:48:59 +0100 Subject: [PATCH 31/65] base-files: fix uid/gid auto-enumeration to avoid 16-bit limit uid/gid range should be limited to 16bit unsigned integer range to avoid "wraparound" issues with permissions where jffs2 is employed for storage and chown 65536 (first auto-created user) becomes equivalent to chown 0 Fixes: #13927 Signed-off-by: Thomas Winkler (cherry picked from commit 140b48a9e93909873bee777ca5bdf49fe4f01271) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/base-files/files/lib/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 50aed53b06..c688ac77ee 100644 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -371,7 +371,7 @@ group_add_next() { return fi gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group) - gid=65536 + gid=32768 while echo "$gids" | grep -q "^$gid$"; do gid=$((gid + 1)) done @@ -402,7 +402,7 @@ user_add() { local rc [ -z "$uid" ] && { uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd) - uid=65536 + uid=32768 while echo "$uids" | grep -q "^$uid$"; do uid=$((uid + 1)) done From 3941633dd788df2bdcb5bb26ed5cb374e5f6076a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Apr 2024 22:46:13 +0200 Subject: [PATCH 32/65] uencrypt: Fix compile warnings keylen and ivlen are of type long and not size_t. (cherry picked from commit 0fd9acb47165e9ef07b3fa0e4f381ebe5365464c) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/utils/uencrypt/src/uencrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/utils/uencrypt/src/uencrypt.c b/package/utils/uencrypt/src/uencrypt.c index 36e17e220b..a49db6e2d9 100644 --- a/package/utils/uencrypt/src/uencrypt.c +++ b/package/utils/uencrypt/src/uencrypt.c @@ -85,12 +85,12 @@ int main(int argc, char *argv[]) } } if (ivlen != get_cipher_ivsize(cipher)) { - fprintf(stderr, "Error: IV must be %d bytes; given IV is %zd bytes.\n", + fprintf(stderr, "Error: IV must be %d bytes; given IV is %ld bytes.\n", get_cipher_ivsize(cipher), ivlen); exit(EXIT_FAILURE); } if (keylen != get_cipher_keysize(cipher)) { - fprintf(stderr, "Error: key must be %d bytes; given key is %zd bytes.\n", + fprintf(stderr, "Error: key must be %d bytes; given key is %ld bytes.\n", get_cipher_keysize(cipher), keylen); exit(EXIT_FAILURE); } From dee4309bdfba8b95c6399bd2f4c10a66350e679c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 21 Apr 2024 17:40:09 +0200 Subject: [PATCH 33/65] mbedtls: Update to 2.28.8 This contains a fix for: CVE-2024-28960: An issue was discovered in Mbed TLS 2.18.0 through 2.28.x before 2.28.8 and 3.x before 3.6.0, and Mbed Crypto. The PSA Crypto API mishandles shared memory. (cherry picked from commit 360ac07eb933feaf29bb031f788f0bf81c473be7) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/libs/mbedtls/Makefile | 6 +++--- .../patches/100-x509-crt-verify-SAN-iPAddress.patch | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index ad13bbe846..c3b9a9a2be 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.28.7 -PKG_RELEASE:=2 +PKG_VERSION:=2.28.8 +PKG_RELEASE:=1 PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=1df6073f0cf6a4e1953890bf5e0de2a8c7e6be50d6d6c69fa9fefcb1d14e981a +PKG_HASH:=4fef7de0d8d542510d726d643350acb3cdb9dc76ad45611b59c9aa08372b4213 PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=gpl-2.0.txt diff --git a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch index 4ad2e8c7db..808450c0dd 100644 --- a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch +++ b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch @@ -11,7 +11,7 @@ Signed-off-by: Glenn Strauss --- a/include/mbedtls/x509_crt.h +++ b/include/mbedtls/x509_crt.h -@@ -608,7 +608,7 @@ int mbedtls_x509_crt_verify_info(char *b +@@ -596,7 +596,7 @@ int mbedtls_x509_crt_verify_info(char *b * \param cn The expected Common Name. This will be checked to be * present in the certificate's subjectAltNames extension or, * if this extension is absent, as a CN component in its @@ -22,7 +22,7 @@ Signed-off-by: Glenn Strauss * If the verification couldn't be completed, the flag value is --- a/library/x509_crt.c +++ b/library/x509_crt.c -@@ -57,6 +57,10 @@ +@@ -45,6 +45,10 @@ #if defined(MBEDTLS_HAVE_TIME) #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) @@ -33,7 +33,7 @@ Signed-off-by: Glenn Strauss #include #else #include -@@ -3002,6 +3006,61 @@ find_parent: +@@ -2990,6 +2994,61 @@ find_parent: } } @@ -95,7 +95,7 @@ Signed-off-by: Glenn Strauss /* * Check for CN match */ -@@ -3022,24 +3081,51 @@ static int x509_crt_check_cn(const mbedt +@@ -3010,24 +3069,51 @@ static int x509_crt_check_cn(const mbedt return -1; } @@ -158,7 +158,7 @@ Signed-off-by: Glenn Strauss } /* -@@ -3050,31 +3136,23 @@ static void x509_crt_verify_name(const m +@@ -3038,31 +3124,23 @@ static void x509_crt_verify_name(const m uint32_t *flags) { const mbedtls_x509_name *name; From d0c7b19db8993c23fc0bd989bef982fc000ea2f2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 10 Apr 2024 13:46:40 +0200 Subject: [PATCH 34/65] hostapd: fix a crash corner case On some setup failures, iface->bss can be NULL Signed-off-by: Felix Fietkau (cherry picked from commit 1ee5b7e506f937e16737472eed02bc5409716304) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/network/services/hostapd/src/src/ap/ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index 80c01b4b9b..f961b6a097 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -51,7 +51,7 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u int i; list = ucv_array_new(vm); - for (i = 0; i < iface->num_bss; i++) { + for (i = 0; iface->bss && i < iface->num_bss; i++) { struct hostapd_data *hapd = iface->bss[i]; uc_value_t *val = hostapd_ucode_bss_get_uval(hapd); From 7d135dc038b0986522c68545d648fcb6a3fb1874 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 4 Apr 2024 13:45:33 +0200 Subject: [PATCH 35/65] libxml2: add host build dependency on libiconv-full Fixes build on macOS Signed-off-by: Felix Fietkau (cherry picked from commit 4ef13c4a49708d361df663a6e42e6e114a71c020) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/libs/libxml2/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile index 86fa370771..efd33a5278 100644 --- a/package/libs/libxml2/Makefile +++ b/package/libs/libxml2/Makefile @@ -11,6 +11,7 @@ PKG_HASH:=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2 +HOST_BUILD_DEPENDS := libiconv-full/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk From 7448f7a2d56f0d7d868fb89899df5528ab69db41 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Mon, 25 Mar 2024 20:56:06 -0500 Subject: [PATCH 36/65] config: Enable ext4 journaling by default. Not having a journal by default is a major "gotcha". Because openwrt does not fsck on boot, a power loss without journaling can result in a dirty filesystem that openwrt will mount as read-only which requires intervention to restore the router to working order. Signed-off-by: Jordan Woyak (cherry picked from commit f9f2426e398cf74d1098ae40317bfba677ac7560) Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- config/Config-images.in | 1 + 1 file changed, 1 insertion(+) diff --git a/config/Config-images.in b/config/Config-images.in index ea7b3d37c3..c32fa00c5f 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -127,6 +127,7 @@ menu "Target Images" config TARGET_EXT4_JOURNAL bool "Create a journaling filesystem" depends on TARGET_ROOTFS_EXT4FS + default y help Create an ext4 filesystem with a journal. From 242f193f34ca9bd244b2ead6c6c0af1cc21fc0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 4 Mar 2024 07:16:19 +0000 Subject: [PATCH 37/65] linux-firmware: package Intel AX201 firmware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alexander reported following: iwlwifi 0000:00:14.3: Detected crf-id 0x3617, cnv-id 0x20000302 wfpm id 0x80000000 iwlwifi 0000:00:14.3: PCI dev a0f0/0074, rev=0x351, rfid=0x10a100 iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-77.ucode failed with error -2 It seems, that as of the current date, the highest firmware API version supported by Linux 6.8-rc7 is still 77. Closes: #14771 Signed-off-by: Petr Štetiar (cherry picked from commit 8db83d4cc0fb4544ddec5fb50de73b8b4f64fb3d) [Reduce to API version 72 for older mac80211] Link: https://github.com/openwrt/openwrt/pull/15898 Signed-off-by: Hauke Mehrtens --- package/firmware/linux-firmware/intel.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/firmware/linux-firmware/intel.mk b/package/firmware/linux-firmware/intel.mk index cb7b7f4ae4..bc8660de73 100644 --- a/package/firmware/linux-firmware/intel.mk +++ b/package/firmware/linux-firmware/intel.mk @@ -177,6 +177,13 @@ define Package/iwlwifi-firmware-ax200/install endef $(eval $(call BuildPackage,iwlwifi-firmware-ax200)) +Package/iwlwifi-firmware-ax201 = $(call Package/firmware-default,Intel AX201 firmware) +define Package/iwlwifi-firmware-ax201/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-QuZ-a0-hr-b0-72.ucode $(1)/lib/firmware +endef +$(eval $(call BuildPackage,iwlwifi-firmware-ax201)) + Package/iwlwifi-firmware-ax210 = $(call Package/firmware-default,Intel AX210 firmware) define Package/iwlwifi-firmware-ax210/install $(INSTALL_DIR) $(1)/lib/firmware From 7764d482d9a28e7c33e7efe3a1c0214ec29045ff Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Jul 2024 23:25:22 +0200 Subject: [PATCH 38/65] kernel: bump 5.15 to 5.15.162 Removed because they are upstream: mediatek/patches-5.15/702-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=a03c3a34692f8400a85ec1cc2b058c6880bb7e7b realtek/patches-5.15/020-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=a03c3a34692f8400a85ec1cc2b058c6880bb7e7b Link: https://github.com/openwrt/openwrt/pull/15901 Signed-off-by: Hauke Mehrtens --- include/kernel-5.15 | 4 +- .../910-unaligned_access_hacks.patch | 6 +-- ...070-MMC-added-alternative-MMC-driver.patch | 4 +- ...is7xx-Don-t-spin-if-no-data-received.patch | 2 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...ore-event-ring-segment-table-entries.patch | 2 +- ...6is7xx-Fix-for-hardware-flow-control.patch | 6 +-- ...-interface-in-mode6-for-18-bit-color.patch | 2 +- ...-Add-a-timing-for-the-Raspberry-Pi-7.patch | 4 +- ...-quirks-add-link-TRB-quirk-for-VL805.patch | 4 +- ...t-TRBS_PER_SEGMENT-define-in-runtime.patch | 6 +-- ...usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch | 4 +- ...nel-simple-add-Geekworm-MZP280-Panel.patch | 2 +- ...uirk-for-Superspeed-bulk-OUT-transfe.patch | 10 ++-- ...ework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch | 6 +-- ...support-for-performing-fake-doorbell.patch | 2 +- ...s-automatically-detect-CPU-frequency.patch | 2 +- ...-bmips-automatically-detect-RAM-size.patch | 4 +- .../203-mips-bmips-dma-fix-CBR-address.patch | 7 +-- ...gs-support-to-xdp_return_-buff-frame.patch | 6 +-- ...icro-stmmac-move-dma-conf-to-dedicat.patch | 2 +- ...e-implement-soft-state-polling-setup.patch | 2 +- ...t-sfp-move-quirk-handling-into-sfp.c.patch | 2 +- ...net-usb-ax88179_178a-add-TSO-feature.patch | 6 +-- .../721-net-add-packet-mangeling.patch | 4 +- ...-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch | 4 +- .../790-SFP-GE-T-ignore-TX_FAULT.patch | 4 +- .../generic/hack-5.15/902-debloat_proc.patch | 2 +- .../pending-5.15/630-packet_socket_type.patch | 6 +-- .../pending-5.15/655-increase_skb_pad.patch | 2 +- ...ng-with-source-address-failed-policy.patch | 22 ++++---- ...les-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- ...pool-and-page-referenced-frags-in-GR.patch | 2 +- ...-t-learn-non-unicast-L2-destinations.patch | 30 ----------- .../0001-MIPS-lantiq-add-pcie-driver.patch | 2 +- ...pers-to-extract-clause-45-regad-and-.patch | 53 ------------------- ...pers-to-extract-clause-45-regad-and-.patch | 53 ------------------- ...sfp-re-probe-modules-on-DEV_UP-event.patch | 2 +- 38 files changed, 75 insertions(+), 210 deletions(-) delete mode 100644 target/linux/generic/pending-5.15/779-net-vxlan-don-t-learn-non-unicast-L2-destinations.patch delete mode 100644 target/linux/mediatek/patches-5.15/702-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch delete mode 100644 target/linux/realtek/patches-5.15/020-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index a03ed80f9f..02ccce117b 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .161 -LINUX_KERNEL_HASH-5.15.161 = d629f78680dc4b65e3d78b61406fb7757b960c83c206e63ad8c2606b3e3c474c +LINUX_VERSION-5.15 = .162 +LINUX_KERNEL_HASH-5.15.162 = 91bfc0ea152ce7b102a0b79d35a7c92843874ebf085c99d2ba8b4d85e62b1a7c diff --git a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch index 3c15a016ff..f0a25f4a2f 100644 --- a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch @@ -259,7 +259,7 @@ SVN-Revision: 35130 #include #include #include -@@ -944,10 +945,10 @@ static void tcp_v6_send_response(const s +@@ -946,10 +947,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { @@ -337,7 +337,7 @@ SVN-Revision: 35130 #endif /* _LINUX_TYPES_H */ --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c -@@ -1480,8 +1480,8 @@ struct sk_buff *inet_gro_receive(struct +@@ -1489,8 +1489,8 @@ struct sk_buff *inet_gro_receive(struct if (unlikely(ip_fast_csum((u8 *)iph, 5))) goto out_unlock; @@ -751,7 +751,7 @@ SVN-Revision: 35130 EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4175,14 +4175,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -4192,14 +4192,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch index f32e6887bf..570ab6c18b 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch @@ -1984,7 +1984,7 @@ bcm2835-mmc: uninitialized_var is no more #define MAX_TUNING_LOOP 40 -@@ -3188,7 +3188,7 @@ static void sdhci_timeout_timer(struct t +@@ -3191,7 +3191,7 @@ static void sdhci_timeout_timer(struct t spin_lock_irqsave(&host->lock, flags); if (host->cmd && !sdhci_data_line_cmd(host->cmd)) { @@ -1993,7 +1993,7 @@ bcm2835-mmc: uninitialized_var is no more mmc_hostname(host->mmc)); sdhci_dumpregs(host); -@@ -3210,7 +3210,7 @@ static void sdhci_timeout_data_timer(str +@@ -3213,7 +3213,7 @@ static void sdhci_timeout_data_timer(str if (host->data || host->data_cmd || (host->cmd && sdhci_data_line_cmd(host->cmd))) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch b/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch index 778d18557a..237d6d3326 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch @@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -710,6 +710,8 @@ static bool sc16is7xx_port_irq(struct sc +@@ -723,6 +723,8 @@ static bool sc16is7xx_port_irq(struct sc if (rxlen) sc16is7xx_handle_rx(port, rxlen, iir); diff --git a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 4ec54a03ee..72e4cfad0d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1323,6 +1326,9 @@ +@@ -1324,6 +1327,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm27xx/patches-5.15/950-0166-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.15/950-0166-xhci-Use-more-event-ring-segment-table-entries.patch index a9bbab4c26..d7bcce3b1a 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0166-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0166-xhci-Use-more-event-ring-segment-table-entries.patch @@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell val); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1674,8 +1674,8 @@ struct urb_priv { +@@ -1675,8 +1675,8 @@ struct urb_priv { * Each segment table entry is 4*32bits long. 1K seems like an ok size: * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, * meaning 64 ring segments. diff --git a/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch b/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch index 0e15117438..be78f983b3 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -525,8 +525,9 @@ static int sc16is7xx_set_baud(struct uar +@@ -537,8 +537,9 @@ static int sc16is7xx_set_baud(struct uar /* Enable enhanced features */ regcache_cache_bypass(s->regmap, true); @@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell regcache_cache_bypass(s->regmap, false); /* Put LCR back to the normal mode */ -@@ -856,7 +857,7 @@ static unsigned int sc16is7xx_get_mctrl( +@@ -869,7 +870,7 @@ static unsigned int sc16is7xx_get_mctrl( /* DCD and DSR are not wired and CTS/RTS is handled automatically * so just indicate DSR and CAR asserted */ @@ -47,7 +47,7 @@ Signed-off-by: Phil Elwell } static void sc16is7xx_set_mctrl(struct uart_port *port, unsigned int mctrl) -@@ -943,14 +944,19 @@ static void sc16is7xx_set_termios(struct +@@ -956,14 +957,19 @@ static void sc16is7xx_set_termios(struct regcache_cache_bypass(s->regmap, true); sc16is7xx_port_write(port, SC16IS7XX_XON1_REG, termios->c_cc[VSTART]); sc16is7xx_port_write(port, SC16IS7XX_XOFF1_REG, termios->c_cc[VSTOP]); diff --git a/target/linux/bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch b/target/linux/bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch index 4cd6826ae3..082b245cf5 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch @@ -157,7 +157,7 @@ Signed-off-by: Joerg Quinten static const struct drm_display_mode innolux_at070tn92_mode = { .clock = 33333, .hdisplay = 800, -@@ -4672,6 +4704,9 @@ static const struct of_device_id platfor +@@ -4673,6 +4705,9 @@ static const struct of_device_id platfor .compatible = "innolux,at043tn24", .data = &innolux_at043tn24, }, { diff --git a/target/linux/bcm27xx/patches-5.15/950-0479-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch b/target/linux/bcm27xx/patches-5.15/950-0479-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch index 8c9b6e2b5b..50af5509bc 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0479-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0479-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch @@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c -@@ -3769,6 +3769,31 @@ static const struct panel_desc qishenglo +@@ -3770,6 +3770,31 @@ static const struct panel_desc qishenglo .connector_type = DRM_MODE_CONNECTOR_DPI, }; @@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson static const struct display_timing rocktech_rk070er9427_timing = { .pixelclock = { 26400000, 33300000, 46800000 }, .hactive = { 800, 800, 800 }, -@@ -4851,6 +4876,9 @@ static const struct of_device_id platfor +@@ -4852,6 +4877,9 @@ static const struct of_device_id platfor .compatible = "qishenglong,gopher2b-lcd", .data = &qishenglong_gopher2b_lcd, }, { diff --git a/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 78b01e9ba5..eb44439f5f 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -294,8 +294,10 @@ static void xhci_pci_quirks(struct devic +@@ -301,8 +301,10 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; @@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell addr = xhci_trb_virt_to_dma(new_seg, new_deq); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1908,6 +1908,7 @@ struct xhci_hcd { +@@ -1909,6 +1909,7 @@ struct xhci_hcd { #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) #define XHCI_ZHAOXIN_HOST BIT_ULL(46) diff --git a/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch b/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch index d026c86174..285e726c2a 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch @@ -205,7 +205,7 @@ Signed-off-by: Jonathan Bell xhci_err(xhci, "Tried to move enqueue past ring segment\n"); return; } -@@ -3215,7 +3218,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd +@@ -3246,7 +3249,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd * that clears the EHB. */ while (xhci_handle_event(xhci) > 0) { @@ -214,7 +214,7 @@ Signed-off-by: Jonathan Bell continue; xhci_update_erst_dequeue(xhci, event_ring_deq); event_ring_deq = xhci->event_ring->dequeue; -@@ -3357,7 +3360,8 @@ static int prepare_ring(struct xhci_hcd +@@ -3388,7 +3391,8 @@ static int prepare_ring(struct xhci_hcd } } @@ -248,7 +248,7 @@ Signed-off-by: Jonathan Bell * when the cycle bit is set to 1. --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1636,6 +1636,7 @@ struct xhci_ring { +@@ -1637,6 +1637,7 @@ struct xhci_ring { unsigned int num_trbs_free; unsigned int num_trbs_free_temp; unsigned int bounce_buf_len; diff --git a/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch b/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch index 4e23eaf936..514692e849 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell cycle_state, type, max_packet, flags); --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -297,6 +297,7 @@ static void xhci_pci_quirks(struct devic +@@ -304,6 +304,7 @@ static void xhci_pci_quirks(struct devic if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) { xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; @@ -63,7 +63,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1910,6 +1910,7 @@ struct xhci_hcd { +@@ -1911,6 +1911,7 @@ struct xhci_hcd { #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) #define XHCI_ZHAOXIN_HOST BIT_ULL(46) #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) diff --git a/target/linux/bcm27xx/patches-5.15/950-0686-drm-panel-simple-add-Geekworm-MZP280-Panel.patch b/target/linux/bcm27xx/patches-5.15/950-0686-drm-panel-simple-add-Geekworm-MZP280-Panel.patch index df9f3dd98a..446c9a3398 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0686-drm-panel-simple-add-Geekworm-MZP280-Panel.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0686-drm-panel-simple-add-Geekworm-MZP280-Panel.patch @@ -46,7 +46,7 @@ Acked-by: Maxime Ripard static const struct drm_display_mode giantplus_gpg482739qs5_mode = { .clock = 9000, .hdisplay = 480, -@@ -4714,6 +4740,9 @@ static const struct of_device_id platfor +@@ -4715,6 +4741,9 @@ static const struct of_device_id platfor .compatible = "friendlyarm,hd702e", .data = &friendlyarm_hd702e, }, { diff --git a/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch b/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch index b18689dd9a..9c24005fe8 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch @@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -298,6 +298,7 @@ static void xhci_pci_quirks(struct devic +@@ -305,6 +305,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; xhci->quirks |= XHCI_VLI_TRB_CACHE_BUG; @@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3670,14 +3670,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3701,14 +3701,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd * unsigned int num_trbs; unsigned int start_cycle, num_sgs = 0; unsigned int enqd_len, block_len, trb_buff_len, full_len; @@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell full_len = urb->transfer_buffer_length; /* If we have scatter/gather list, we use it. */ if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) { -@@ -3714,6 +3715,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3745,6 +3746,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd * start_cycle = ring->cycle_state; send_addr = addr; @@ -72,7 +72,7 @@ Signed-off-by: Jonathan Bell /* Queue the TRBs, even if they are zero-length */ for (enqd_len = 0; first_trb || enqd_len < full_len; enqd_len += trb_buff_len) { -@@ -3726,6 +3738,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3757,6 +3769,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd * if (enqd_len + trb_buff_len > full_len) trb_buff_len = full_len - enqd_len; @@ -86,7 +86,7 @@ Signed-off-by: Jonathan Bell first_trb = false; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1911,6 +1911,7 @@ struct xhci_hcd { +@@ -1912,6 +1912,7 @@ struct xhci_hcd { #define XHCI_ZHAOXIN_HOST BIT_ULL(46) #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48) diff --git a/target/linux/bcm27xx/patches-5.15/950-0747-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-5.15/950-0747-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch index 69b6da023e..c4d9bcfd42 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0747-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0747-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch @@ -13,7 +13,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3670,7 +3670,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3701,7 +3701,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * unsigned int num_trbs; unsigned int start_cycle, num_sgs = 0; unsigned int enqd_len, block_len, trb_buff_len, full_len; @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell u32 field, length_field, remainder, maxpacket; u64 addr, send_addr; -@@ -3716,14 +3716,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3747,14 +3747,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd * send_addr = addr; if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG && @@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell } /* Queue the TRBs, even if they are zero-length */ -@@ -3738,7 +3733,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3769,7 +3764,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * if (enqd_len + trb_buff_len > full_len) trb_buff_len = full_len - enqd_len; diff --git a/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 49277ab251..c1578e3b64 100644 --- a/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -109,7 +109,7 @@ it on BCM4708 family. --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1908,6 +1908,7 @@ struct xhci_hcd { +@@ -1909,6 +1909,7 @@ struct xhci_hcd { #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) #define XHCI_ZHAOXIN_HOST BIT_ULL(46) diff --git a/target/linux/bmips/patches-5.15/200-mips-bmips-automatically-detect-CPU-frequency.patch b/target/linux/bmips/patches-5.15/200-mips-bmips-automatically-detect-CPU-frequency.patch index e2b73e6ac4..6ac18e2a43 100644 --- a/target/linux/bmips/patches-5.15/200-mips-bmips-automatically-detect-CPU-frequency.patch +++ b/target/linux/bmips/patches-5.15/200-mips-bmips-automatically-detect-CPU-frequency.patch @@ -68,7 +68,7 @@ Signed-off-by: Álvaro Fernández Rojas struct bmips_quirk { const char *compatible; void (*quirk_fn)(void); -@@ -142,17 +181,161 @@ const char *get_system_type(void) +@@ -143,17 +182,161 @@ const char *get_system_type(void) return "Generic BMIPS kernel"; } diff --git a/target/linux/bmips/patches-5.15/201-mips-bmips-automatically-detect-RAM-size.patch b/target/linux/bmips/patches-5.15/201-mips-bmips-automatically-detect-RAM-size.patch index c0bdb0d5ce..22cb84d606 100644 --- a/target/linux/bmips/patches-5.15/201-mips-bmips-automatically-detect-RAM-size.patch +++ b/target/linux/bmips/patches-5.15/201-mips-bmips-automatically-detect-RAM-size.patch @@ -84,7 +84,7 @@ Signed-off-by: Álvaro Fernández Rojas struct bmips_quirk { const char *compatible; void (*quirk_fn)(void); -@@ -340,9 +366,90 @@ void __init plat_time_init(void) +@@ -341,9 +367,90 @@ void __init plat_time_init(void) mips_hpt_frequency = freq; } @@ -175,7 +175,7 @@ Signed-off-by: Álvaro Fernández Rojas const struct bmips_quirk *q; set_io_port_base(0); -@@ -360,6 +467,18 @@ void __init plat_mem_setup(void) +@@ -361,6 +468,18 @@ void __init plat_mem_setup(void) __dt_setup_arch(dtb); diff --git a/target/linux/bmips/patches-5.15/203-mips-bmips-dma-fix-CBR-address.patch b/target/linux/bmips/patches-5.15/203-mips-bmips-dma-fix-CBR-address.patch index 57bf395e2e..f4152fc034 100644 --- a/target/linux/bmips/patches-5.15/203-mips-bmips-dma-fix-CBR-address.patch +++ b/target/linux/bmips/patches-5.15/203-mips-bmips-dma-fix-CBR-address.patch @@ -57,7 +57,7 @@ Signed-off-by: Álvaro Fernández Rojas static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000; -@@ -170,12 +170,6 @@ static void bcm6358_quirks(void) +@@ -170,13 +170,6 @@ static void bcm6358_quirks(void) * disable SMP for now */ bmips_smp_enabled = 0; @@ -66,11 +66,12 @@ Signed-off-by: Álvaro Fernández Rojas - * RAC flush causes kernel panics on BCM6358 when booting from TP1 - * because the bootloader is not initializing it properly. - */ -- bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)); +- bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)) || +- !!BMIPS_GET_CBR(); } static void bcm6368_quirks(void) -@@ -198,6 +192,11 @@ static const struct bmips_quirk bmips_qu +@@ -199,6 +192,11 @@ static const struct bmips_quirk bmips_qu void __init prom_init(void) { diff --git a/target/linux/generic/backport-5.15/606-v5.18-xdp-add-frags-support-to-xdp_return_-buff-frame.patch b/target/linux/generic/backport-5.15/606-v5.18-xdp-add-frags-support-to-xdp_return_-buff-frame.patch index e126b21417..1cb3c56263 100644 --- a/target/linux/generic/backport-5.15/606-v5.18-xdp-add-frags-support-to-xdp_return_-buff-frame.patch +++ b/target/linux/generic/backport-5.15/606-v5.18-xdp-add-frags-support-to-xdp_return_-buff-frame.patch @@ -48,7 +48,7 @@ Signed-off-by: Alexei Starovoitov int xdp_rxq_info_reg(struct xdp_rxq_info *xdp_rxq, --- a/net/core/xdp.c +++ b/net/core/xdp.c -@@ -409,12 +409,38 @@ static void __xdp_return(void *data, str +@@ -407,12 +407,38 @@ static void __xdp_return(void *data, str void xdp_return_frame(struct xdp_frame *xdpf) { @@ -87,7 +87,7 @@ Signed-off-by: Alexei Starovoitov __xdp_return(xdpf->data, &xdpf->mem, true, NULL); } EXPORT_SYMBOL_GPL(xdp_return_frame_rx_napi); -@@ -450,7 +476,7 @@ void xdp_return_frame_bulk(struct xdp_fr +@@ -448,7 +474,7 @@ void xdp_return_frame_bulk(struct xdp_fr struct xdp_mem_allocator *xa; if (mem->type != MEM_TYPE_PAGE_POOL) { @@ -96,7 +96,7 @@ Signed-off-by: Alexei Starovoitov return; } -@@ -469,12 +495,38 @@ void xdp_return_frame_bulk(struct xdp_fr +@@ -467,12 +493,38 @@ void xdp_return_frame_bulk(struct xdp_fr bq->xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params); } diff --git a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch index 1b5a8a700b..2582570e88 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch @@ -1270,7 +1270,7 @@ Signed-off-by: Jakub Kicinski if (i >= priv->plat->tx_queues_to_use) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c -@@ -971,13 +971,13 @@ static int tc_setup_etf(struct stmmac_pr +@@ -972,13 +972,13 @@ static int tc_setup_etf(struct stmmac_pr return -EOPNOTSUPP; if (qopt->queue >= priv->plat->tx_queues_to_use) return -EINVAL; diff --git a/target/linux/generic/backport-5.15/783-v6.1-net-sfp-re-implement-soft-state-polling-setup.patch b/target/linux/generic/backport-5.15/783-v6.1-net-sfp-re-implement-soft-state-polling-setup.patch index 77cd336d36..2a2fd0215c 100644 --- a/target/linux/generic/backport-5.15/783-v6.1-net-sfp-re-implement-soft-state-polling-setup.patch +++ b/target/linux/generic/backport-5.15/783-v6.1-net-sfp-re-implement-soft-state-polling-setup.patch @@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski if (!memcmp(id.base.vendor_name, "ALCATELLUCENT ", 16) && !memcmp(id.base.vendor_pn, "3FE46541AA ", 16)) sfp->module_t_start_up = T_START_UP_BAD_GPON; -@@ -2568,6 +2580,8 @@ static int sfp_probe(struct platform_dev +@@ -2567,6 +2579,8 @@ static int sfp_probe(struct platform_dev return PTR_ERR(sfp->gpio[i]); } diff --git a/target/linux/generic/backport-5.15/784-v6.1-net-sfp-move-quirk-handling-into-sfp.c.patch b/target/linux/generic/backport-5.15/784-v6.1-net-sfp-move-quirk-handling-into-sfp.c.patch index 02fa28c5af..2e3dd6acb5 100644 --- a/target/linux/generic/backport-5.15/784-v6.1-net-sfp-move-quirk-handling-into-sfp.c.patch +++ b/target/linux/generic/backport-5.15/784-v6.1-net-sfp-move-quirk-handling-into-sfp.c.patch @@ -254,7 +254,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -2077,7 +2168,8 @@ static void sfp_sm_module(struct sfp *sf +@@ -2076,7 +2167,8 @@ static void sfp_sm_module(struct sfp *sf break; /* Report the module insertion to the upstream device */ diff --git a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch index b2af169b92..99682a0bf2 100644 --- a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch +++ b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c -@@ -1333,11 +1333,12 @@ static int ax88179_bind(struct usbnet *d +@@ -1334,11 +1334,12 @@ static int ax88179_bind(struct usbnet *d dev->mii.phy_id = 0x03; dev->mii.supports_gmii = 1; @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller ax88179_reset(dev); -@@ -1502,17 +1503,19 @@ ax88179_tx_fixup(struct usbnet *dev, str +@@ -1503,17 +1504,19 @@ ax88179_tx_fixup(struct usbnet *dev, str { u32 tx_hdr1, tx_hdr2; int frame_size = dev->maxpacket; @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller if ((skb_header_cloned(skb) || headroom < 0) && pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) { dev_kfree_skb_any(skb); -@@ -1523,6 +1526,8 @@ ax88179_tx_fixup(struct usbnet *dev, str +@@ -1524,6 +1527,8 @@ ax88179_tx_fixup(struct usbnet *dev, str put_unaligned_le32(tx_hdr1, ptr); put_unaligned_le32(tx_hdr2, ptr + 4); diff --git a/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch index 70a0a1ef60..7e966604a6 100644 --- a/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2870,6 +2870,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2872,6 +2872,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -82,7 +82,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -3020,16 +3024,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -3022,16 +3026,6 @@ static inline struct sk_buff *dev_alloc_ } diff --git a/target/linux/generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch b/target/linux/generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch index bff41aa2a4..f2d8d6d720 100644 --- a/target/linux/generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch +++ b/target/linux/generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch @@ -27,7 +27,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c -@@ -4215,12 +4215,10 @@ static irqreturn_t dpni_irq0_handler_thr +@@ -4219,12 +4219,10 @@ static irqreturn_t dpni_irq0_handler_thr dpaa2_eth_set_mac_addr(netdev_priv(net_dev)); dpaa2_eth_update_tx_fqids(priv); @@ -40,7 +40,7 @@ Signed-off-by: Russell King } return IRQ_HANDLED; -@@ -4516,9 +4514,7 @@ static int dpaa2_eth_remove(struct fsl_m +@@ -4520,9 +4518,7 @@ static int dpaa2_eth_remove(struct fsl_m #endif unregister_netdev(net_dev); diff --git a/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch b/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch index e7372b31d1..7a0a3717ee 100644 --- a/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch +++ b/target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch @@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle // Lantech 8330-262D-E can operate at 2500base-X, but // incorrectly report 2500MBd NRZ in their EEPROM .vendor = "Lantech", -@@ -2319,7 +2324,8 @@ static void sfp_sm_main(struct sfp *sfp, +@@ -2318,7 +2323,8 @@ static void sfp_sm_main(struct sfp *sfp, * or t_start_up, so assume there is a fault. */ sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT, @@ -48,7 +48,7 @@ Signed-off-by: Daniel Golle } else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) { init_done: sfp->sm_phy_retries = R_PHY_RETRY; -@@ -2542,10 +2548,12 @@ static void sfp_check_state(struct sfp * +@@ -2541,10 +2547,12 @@ static void sfp_check_state(struct sfp * mutex_lock(&sfp->st_mutex); state = sfp_get_state(sfp); changed = state ^ sfp->state; diff --git a/target/linux/generic/hack-5.15/902-debloat_proc.patch b/target/linux/generic/hack-5.15/902-debloat_proc.patch index 4404d3456e..a161ed90d5 100644 --- a/target/linux/generic/hack-5.15/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.15/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3900,6 +3900,8 @@ static __net_initdata struct pernet_oper +@@ -3894,6 +3894,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-5.15/630-packet_socket_type.patch b/target/linux/generic/pending-5.15/630-packet_socket_type.patch index 486ba9dee9..85434c93dc 100644 --- a/target/linux/generic/pending-5.15/630-packet_socket_type.patch +++ b/target/linux/generic/pending-5.15/630-packet_socket_type.patch @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3345,6 +3347,7 @@ static int packet_create(struct net *net +@@ -3343,6 +3345,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3982,6 +3985,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3980,6 +3983,16 @@ packet_setsockopt(struct socket *sock, i WRITE_ONCE(po->xmit, val ? packet_direct_xmit : dev_queue_xmit); return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -4038,6 +4051,13 @@ static int packet_getsockopt(struct sock +@@ -4036,6 +4049,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-5.15/655-increase_skb_pad.patch b/target/linux/generic/pending-5.15/655-increase_skb_pad.patch index e9075f43c8..82b7547a44 100644 --- a/target/linux/generic/pending-5.15/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-5.15/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2836,7 +2836,7 @@ static inline int pskb_network_may_pull( +@@ -2838,7 +2838,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index d4e274e9a4..1f0f68cce6 100644 --- a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -1034,6 +1048,7 @@ static const int fib6_prop[RTN_MAX + 1] +@@ -1036,6 +1050,7 @@ static const int fib6_prop[RTN_MAX + 1] [RTN_BLACKHOLE] = -EINVAL, [RTN_UNREACHABLE] = -EHOSTUNREACH, [RTN_PROHIBIT] = -EACCES, @@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski [RTN_THROW] = -EAGAIN, [RTN_NAT] = -EINVAL, [RTN_XRESOLVE] = -EINVAL, -@@ -1069,6 +1084,10 @@ static void ip6_rt_init_dst_reject(struc +@@ -1071,6 +1086,10 @@ static void ip6_rt_init_dst_reject(struc rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -4561,6 +4580,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -4564,6 +4583,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -5048,7 +5078,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -5051,7 +5081,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -6295,6 +6326,8 @@ static int ip6_route_dev_notify(struct n +@@ -6298,6 +6329,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -6306,6 +6339,7 @@ static int ip6_route_dev_notify(struct n +@@ -6309,6 +6342,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -6497,6 +6531,8 @@ static int __net_init ip6_route_net_init +@@ -6500,6 +6534,8 @@ static int __net_init ip6_route_net_init #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.fib6_has_custom_rules = false; @@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, sizeof(*net->ipv6.ip6_prohibit_entry), GFP_KERNEL); -@@ -6507,11 +6543,21 @@ static int __net_init ip6_route_net_init +@@ -6510,11 +6546,21 @@ static int __net_init ip6_route_net_init ip6_template_metrics, true); INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); @@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); -@@ -6538,6 +6584,8 @@ out: +@@ -6541,6 +6587,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -6557,6 +6605,7 @@ static void __net_exit ip6_route_net_exi +@@ -6560,6 +6608,7 @@ static void __net_exit ip6_route_net_exi kfree(net->ipv6.ip6_null_entry); #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); @@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski kfree(net->ipv6.ip6_blk_hole_entry); #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); -@@ -6640,6 +6689,9 @@ void __init ip6_route_init_special_entri +@@ -6643,6 +6692,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 3037a724bf..23c0875aed 100644 --- a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -7811,7 +7811,7 @@ static int nft_register_flowtable_net_ho +@@ -7810,7 +7810,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch b/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch index ec3e57031b..62ead9566b 100644 --- a/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch +++ b/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch @@ -17,7 +17,7 @@ Signed-off-by: Alexander Duyck --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -4371,6 +4371,15 @@ int skb_gro_receive(struct sk_buff *p, s +@@ -4395,6 +4395,15 @@ int skb_gro_receive(struct sk_buff *p, s if (unlikely(p->len + len >= 65536 || NAPI_GRO_CB(skb)->flush)) return -E2BIG; diff --git a/target/linux/generic/pending-5.15/779-net-vxlan-don-t-learn-non-unicast-L2-destinations.patch b/target/linux/generic/pending-5.15/779-net-vxlan-don-t-learn-non-unicast-L2-destinations.patch deleted file mode 100644 index 6c1f596759..0000000000 --- a/target/linux/generic/pending-5.15/779-net-vxlan-don-t-learn-non-unicast-L2-destinations.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3f1a227cb071f65f6ecc4db9f399649869735a7c Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Sat, 17 Feb 2024 22:34:59 +0100 -Subject: [PATCH] net vxlan: don't learn non-unicast L2 destinations - -This patch avoids learning non-unicast targets in the vxlan FDB. -They are non-unicast and thus should be sent to the broadcast-IPv6 -instead of a unicast address. - -Link: https://lore.kernel.org/netdev/15ee0cc7-9252-466b-8ce7-5225d605dde8@david-bauer.net/ -Link: https://github.com/freifunk-gluon/gluon/issues/3191 - -Signed-off-by: David Bauer ---- - drivers/net/vxlan.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/net/vxlan/vxlan_core.c -+++ b/drivers/net/vxlan/vxlan_core.c -@@ -1493,6 +1493,10 @@ static bool vxlan_snoop(struct net_devic - struct vxlan_fdb *f; - u32 ifindex = 0; - -+ /* Don't learn broadcast packets */ -+ if (is_multicast_ether_addr(src_mac) || is_zero_ether_addr(src_mac)) -+ return false; -+ - #if IS_ENABLED(CONFIG_IPV6) - if (src_ip->sa.sa_family == AF_INET6 && - (ipv6_addr_type(&src_ip->sin6.sin6_addr) & IPV6_ADDR_LINKLOCAL)) diff --git a/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch index b0f8492d1b..301e985d0b 100644 --- a/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch @@ -5479,7 +5479,7 @@ Signed-off-by: John Crispin (transaction layer end-to-end CRC checking). --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -1483,6 +1483,8 @@ void pci_walk_bus(struct pci_bus *top, i +@@ -1492,6 +1492,8 @@ void pci_walk_bus(struct pci_bus *top, i void *userdata); int pci_cfg_space_size(struct pci_dev *dev); unsigned char pci_bus_max_busnr(struct pci_bus *bus); diff --git a/target/linux/mediatek/patches-5.15/702-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch b/target/linux/mediatek/patches-5.15/702-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch deleted file mode 100644 index da33aaa72f..0000000000 --- a/target/linux/mediatek/patches-5.15/702-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch +++ /dev/null @@ -1,53 +0,0 @@ -From c6af53f038aa32cec12e8a305ba07c7ef168f1b0 Mon Sep 17 00:00:00 2001 -From: "Russell King (Oracle)" -Date: Tue, 4 Jan 2022 12:07:00 +0000 -Subject: [PATCH 2/3] net: mdio: add helpers to extract clause 45 regad and - devad fields - -Add a couple of helpers and definitions to extract the clause 45 regad -and devad fields from the regnum passed into MDIO drivers. - -Tested-by: Daniel Golle -Reviewed-by: Andrew Lunn -Signed-off-by: Russell King (Oracle) -Signed-off-by: Daniel Golle -Signed-off-by: David S. Miller ---- - include/linux/mdio.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/include/linux/mdio.h -+++ b/include/linux/mdio.h -@@ -7,6 +7,7 @@ - #define __LINUX_MDIO_H__ - - #include -+#include - #include - - /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit -@@ -14,6 +15,7 @@ - */ - #define MII_ADDR_C45 (1<<30) - #define MII_DEVADDR_C45_SHIFT 16 -+#define MII_DEVADDR_C45_MASK GENMASK(20, 16) - #define MII_REGADDR_C45_MASK GENMASK(15, 0) - - struct gpio_desc; -@@ -355,6 +357,16 @@ static inline u32 mdiobus_c45_addr(int d - return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum; - } - -+static inline u16 mdiobus_c45_regad(u32 regnum) -+{ -+ return FIELD_GET(MII_REGADDR_C45_MASK, regnum); -+} -+ -+static inline u16 mdiobus_c45_devad(u32 regnum) -+{ -+ return FIELD_GET(MII_DEVADDR_C45_MASK, regnum); -+} -+ - static inline int __mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad, - u16 regnum) - { diff --git a/target/linux/realtek/patches-5.15/020-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch b/target/linux/realtek/patches-5.15/020-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch deleted file mode 100644 index da33aaa72f..0000000000 --- a/target/linux/realtek/patches-5.15/020-v5.17-net-mdio-add-helpers-to-extract-clause-45-regad-and-.patch +++ /dev/null @@ -1,53 +0,0 @@ -From c6af53f038aa32cec12e8a305ba07c7ef168f1b0 Mon Sep 17 00:00:00 2001 -From: "Russell King (Oracle)" -Date: Tue, 4 Jan 2022 12:07:00 +0000 -Subject: [PATCH 2/3] net: mdio: add helpers to extract clause 45 regad and - devad fields - -Add a couple of helpers and definitions to extract the clause 45 regad -and devad fields from the regnum passed into MDIO drivers. - -Tested-by: Daniel Golle -Reviewed-by: Andrew Lunn -Signed-off-by: Russell King (Oracle) -Signed-off-by: Daniel Golle -Signed-off-by: David S. Miller ---- - include/linux/mdio.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/include/linux/mdio.h -+++ b/include/linux/mdio.h -@@ -7,6 +7,7 @@ - #define __LINUX_MDIO_H__ - - #include -+#include - #include - - /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit -@@ -14,6 +15,7 @@ - */ - #define MII_ADDR_C45 (1<<30) - #define MII_DEVADDR_C45_SHIFT 16 -+#define MII_DEVADDR_C45_MASK GENMASK(20, 16) - #define MII_REGADDR_C45_MASK GENMASK(15, 0) - - struct gpio_desc; -@@ -355,6 +357,16 @@ static inline u32 mdiobus_c45_addr(int d - return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum; - } - -+static inline u16 mdiobus_c45_regad(u32 regnum) -+{ -+ return FIELD_GET(MII_REGADDR_C45_MASK, regnum); -+} -+ -+static inline u16 mdiobus_c45_devad(u32 regnum) -+{ -+ return FIELD_GET(MII_DEVADDR_C45_MASK, regnum); -+} -+ - static inline int __mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad, - u16 regnum) - { diff --git a/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch b/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch index 378563a9e3..f44f7013af 100644 --- a/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch +++ b/target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch @@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -2160,6 +2160,13 @@ static void sfp_sm_module(struct sfp *sf +@@ -2159,6 +2159,13 @@ static void sfp_sm_module(struct sfp *sf return; } From 1dd9f26183c46f16e78067b4d28b126b548f3f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Thu, 18 May 2023 11:56:35 +0200 Subject: [PATCH 39/65] mediatek: filogic: set wan label in preinit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement the functionality of target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch in userspace, since the driver patch has been rejected as a generic solution: https://github.com/openwrt/openwrt/pull/11435 Signed-off-by: Bjørn Mork (cherry picked from commit 1dd1ac2c356ad37366dde64b624e5eb489b19393) --- .../base-files/lib/preinit/04_set_netdev_label | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label new file mode 100644 index 0000000000..f8b6f155de --- /dev/null +++ b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label @@ -0,0 +1,15 @@ +set_netdev_labels() { + local dir + local label + local netdev + + for dir in /sys/class/net/*; do + [ -r "$dir/of_node/label" ] || continue + label="$(cat "$dir/of_node/label")" + netdev="$(basename $dir)" + [ "$netdev" = "$label" ] && continue + ip link set "$netdev" name "$label" + done +} + +boot_hook_add preinit_main set_netdev_labels From cb2cda24e7fdcdd4850c5aec6c76416ce7f89491 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 30 May 2024 14:38:56 +0100 Subject: [PATCH 40/65] mediatek: filogic: avoid sub-shell invovation in netdev rename loop Rename network devices to their label set in DT without invocation of a sub-shell. Signed-off-by: Daniel Golle (cherry picked from commit 983222605ce6fabb036fbbd5797b6689ed082136) --- .../filogic/base-files/lib/preinit/04_set_netdev_label | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label index f8b6f155de..110e023b96 100644 --- a/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label +++ b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label @@ -5,8 +5,8 @@ set_netdev_labels() { for dir in /sys/class/net/*; do [ -r "$dir/of_node/label" ] || continue - label="$(cat "$dir/of_node/label")" - netdev="$(basename $dir)" + read -r label < "$dir/of_node/label" + netdev="${dir##*/}" [ "$netdev" = "$label" ] && continue ip link set "$netdev" name "$label" done From c43900349752721feb83d002dd34c66bf99f94f8 Mon Sep 17 00:00:00 2001 From: Roland Reinl Date: Tue, 26 Dec 2023 08:31:15 +0100 Subject: [PATCH 41/65] filogic: Add LED driver for GCA230718 Add basic support for the LED driver for GCA230718. - I didn't find any documentation or driver for it, so the information below is purely based on my investigations - If there is already I driver for it, please tell me. Maybe I didn't search enough - I implemented a kernel module (leds-gca230718) to access the LEDs via DTS - The LED controller supports PWM for brightness control and ramp control for smooth blinking. This is not implemented in the driver - The LED controller supports toggling (on -> off -> on -> off) where the brightness of the LEDs can be set individually for each on cycle - Until now, only simple active/inactive control is implemented (like when the LEDs would have been connected via GPIO) - Controlling the LEDs requires three sequences sent to the chip. Each sequence consists of - A reset command (0x81 0xE4) written to register 0x00 - A control command (for example 0x0C 0x02 0x01 0x00 0x00 0x00 0xFF 0x01 0x00 0x00 0x00 0xFF 0x87 written to register 0x03) - The reset command is always the same - In the control command - byte 0 is always the same - byte 1 (0x02 in the example above) must be changed in every sequence: 0x02 -> 0x01 -> 0x03) - byte 2 is set to 0x01 which disables toggling. 0x02 would be LED toggling without ramp control, 0x03 would be toggling with ramp control - byte 3 to 6 define the brightness values for the LEDs (R,G,B,W) for the first on cycle when toggling - byte 7 defines the toggling frequency (if toggling enabled) - byte 8 to 11 define the brightness values for the LEDs (R,G,B,W) for the second on cycle when toggling - byte 12 is constant 0x87 Signed-off-by: Roland Reinl (cherry picked from commit 0682974aa8da4855ca373d195cb6365913fc1f8e) --- package/kernel/leds-gca230718/Makefile | 34 +++ package/kernel/leds-gca230718/src/Makefile | 1 + .../leds-gca230718/src/leds-gca230718.c | 227 ++++++++++++++++++ 3 files changed, 262 insertions(+) create mode 100644 package/kernel/leds-gca230718/Makefile create mode 100644 package/kernel/leds-gca230718/src/Makefile create mode 100644 package/kernel/leds-gca230718/src/leds-gca230718.c diff --git a/package/kernel/leds-gca230718/Makefile b/package/kernel/leds-gca230718/Makefile new file mode 100644 index 0000000000..a1ae3bc319 --- /dev/null +++ b/package/kernel/leds-gca230718/Makefile @@ -0,0 +1,34 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=leds-gca230718 +PKG_RELEASE:=1 +PKG_LICENSE:=GPL-2.0 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/leds-gca230718 + SUBMENU:=LED modules + TITLE:=GCA230718 LED support (e.g. for D-Link M30) + FILES:= \ + $(PKG_BUILD_DIR)/leds-gca230718.ko + AUTOLOAD:=$(call AutoProbe,leds-gca230718,1) + DEPENDS:=@TARGET_mediatek_filogic +endef + +define KernelPackage/leds-gca230718/description + GCA230718 LED support (e.g. for D-Link M30) using I2C. +endef + +define Build/Compile + $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules +endef + +$(eval $(call KernelPackage,leds-gca230718)) diff --git a/package/kernel/leds-gca230718/src/Makefile b/package/kernel/leds-gca230718/src/Makefile new file mode 100644 index 0000000000..eaa4eef219 --- /dev/null +++ b/package/kernel/leds-gca230718/src/Makefile @@ -0,0 +1 @@ +obj-m := leds-gca230718.o diff --git a/package/kernel/leds-gca230718/src/leds-gca230718.c b/package/kernel/leds-gca230718/src/leds-gca230718.c new file mode 100644 index 0000000000..d759453cd9 --- /dev/null +++ b/package/kernel/leds-gca230718/src/leds-gca230718.c @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * GCA230718 LED support (e.g. for D-Link M30) using I2C + * + * Copyright 2022 Roland Reinl + * + * This driver can control RGBW LEDs which are connected to a GCA230718. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define GCA230718_MAX_LEDS (4u) + +#define GCA230718_OPMODE_DISABLED (0x00u) +#define GCA230718_OPMODE_NO_TOGGLE (0x01u) +#define GCA230718_OPMODE_TOGGLE_RAMP_CONTROL_DISABLED (0x02u) +#define GCA230718_OPMODE_TOGGLE_RAMP_CONTROL_ENSABLED (0x03u) + +#define GCA230718_1ST_SEQUENCE_BYTE_1 (0x02u) +#define GCA230718_2ND_SEQUENCE_BYTE_1 (0x01u) +#define GCA230718_3RD_SEQUENCE_BYTE_1 (0x03u) + +struct gca230718_led +{ + enum led_brightness brightness; + struct i2c_client *client; + struct led_classdev ledClassDev; +}; + +struct gca230718_private +{ + struct mutex lock; + struct gca230718_led leds[GCA230718_MAX_LEDS]; +}; + +static void gca230718_init_private_led_data(struct gca230718_private* data) +{ + u8 ledIndex; + for (ledIndex = 0; ledIndex < GCA230718_MAX_LEDS; ledIndex++) + { + data->leds[ledIndex].client = NULL; + } +} + +static void gca230718_send_sequence(struct i2c_client *client, u8 byte0, struct gca230718_private* gca230718_privateData) +{ + int status = 0; + u8 ledIndex; + const u8 resetCommand[2] = { 0x81, 0xE4 }; + const u8 resetCommandRegister = 0x00; + + u8 controlCommand[13]; + const u8 controlCommandRegister = 0x03; + + controlCommand[0] = 0x0C; /* Unknown */ + controlCommand[1] = byte0; + controlCommand[2] = GCA230718_OPMODE_NO_TOGGLE; + /* Byte 3-6 are set below to the brighness value of the individual LEDs */ + controlCommand[7] = 0x01; /* Frequency, doesn't care as long as GCA230718_OPMODE_NO_TOGGLE is used above */ + /* Byte 8-11 are set below to the brighness value of the individual LEDs */ + controlCommand[12] = 0x87; + + for (ledIndex = 0; ledIndex < GCA230718_MAX_LEDS; ledIndex++) + { + controlCommand[3 + ledIndex] = gca230718_privateData->leds[ledIndex].brightness; + controlCommand[8 + ledIndex] = gca230718_privateData->leds[ledIndex].brightness; + } + + mutex_lock(&(gca230718_privateData->lock)); + + if ((status = i2c_smbus_write_i2c_block_data(client, resetCommandRegister, sizeof(resetCommand), resetCommand)) != 0) + { + pr_info("Error %i during call of i2c_smbus_write_i2c_block_data for reset command\n", status); + } + else if ((status = i2c_smbus_write_i2c_block_data(client, controlCommandRegister, sizeof(controlCommand), controlCommand)) != 0) + { + pr_info("Error %i during call of i2c_smbus_write_i2c_block_data for control command\n", status); + } + + mutex_unlock(&(gca230718_privateData->lock)); +} + +static int gca230718_set_brightness(struct led_classdev *led_cdev, enum led_brightness value) +{ + struct gca230718_led* led; + struct i2c_client* client; + + led = container_of(led_cdev, struct gca230718_led, ledClassDev); + client = led->client; + + if (client != NULL) + { + struct gca230718_private* gca230718_privateData; + + led->brightness = value; + gca230718_privateData = i2c_get_clientdata(client); + + gca230718_send_sequence(client, GCA230718_2ND_SEQUENCE_BYTE_1, gca230718_privateData); + } + + return 0; +} + +static int gca230718_probe(struct i2c_client *client, const struct i2c_device_id *id) +{ + int status = 0; + struct gca230718_private* gca230718_privateData; + + pr_info("Enter gca230718_probe for device address %u\n", client->addr); + gca230718_privateData = devm_kzalloc(&(client->dev), sizeof(struct gca230718_private), GFP_KERNEL); + + if (gca230718_privateData == NULL) + { + pr_info("Error during allocating memory for private data\n"); + status = -ENOMEM; + } + else + { + struct device_node* ledNode; + mutex_init(&gca230718_privateData->lock); + gca230718_init_private_led_data(gca230718_privateData); + i2c_set_clientdata(client, gca230718_privateData); + + for_each_child_of_node(client->dev.of_node, ledNode) + { + u32 regValue = 0; + if (of_property_read_u32(ledNode, "reg", ®Value) != 0) + { + pr_info("Missing entry \"reg\" in node %s\n", ledNode->name); + } + else if (regValue >= GCA230718_MAX_LEDS) + { + pr_info("Invalid entry \"reg\" in node %s (%u)\n", ledNode->name, regValue); + } + else + { + struct led_classdev* ledClassDev = &(gca230718_privateData->leds[regValue].ledClassDev); + struct led_init_data init_data = {}; + + gca230718_privateData->leds[regValue].client = client; + init_data.fwnode = of_fwnode_handle(ledNode); + + pr_info("Creating LED for node %s: reg=%u\n", ledNode->name, regValue); + + ledClassDev->name = of_get_property(ledNode, "label", NULL); + if (ledClassDev->name == NULL) + { + ledClassDev->name = ledNode->name; + } + + ledClassDev->brightness = LED_OFF; + ledClassDev->max_brightness = LED_FULL; + ledClassDev->brightness_set_blocking = gca230718_set_brightness; + + if (devm_led_classdev_register_ext(&(client->dev), ledClassDev, &init_data) != 0) + { + pr_info("Error during call of devm_led_classdev_register_ext"); + } + } + } + } + + if (status == 0) + { + /* + Send full initialization sequence. + Afterwards only GCA230718_2ND_SEQUENCE_BYTE_1 must be send to upddate the brightness values. + */ + gca230718_send_sequence(client, GCA230718_1ST_SEQUENCE_BYTE_1, gca230718_privateData); + gca230718_send_sequence(client, GCA230718_2ND_SEQUENCE_BYTE_1, gca230718_privateData); + gca230718_send_sequence(client, GCA230718_3RD_SEQUENCE_BYTE_1, gca230718_privateData); + } + + return status; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0) +static void gca230718_remove(struct i2c_client *client) +#else +static int gca230718_remove(struct i2c_client *client) +#endif +{ + struct gca230718_private* gca230718_privateData; + gca230718_privateData = i2c_get_clientdata(client); + mutex_destroy(&gca230718_privateData->lock); + gca230718_init_private_led_data(gca230718_privateData); + +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0) + return 0; +#endif +} + +static const struct i2c_device_id gca230718_i2c_ids[] = { + { "gca230718", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(i2c, gca230718_i2c_ids); + +static const struct of_device_id gca230718_dt_ids[] = { + { .compatible = "unknown,gca230718" }, + {}, +}; +MODULE_DEVICE_TABLE(of, gca230718_dt_ids); + +static struct i2c_driver gca230718_driver = { + .probe = gca230718_probe, + .remove = gca230718_remove, + .id_table = gca230718_i2c_ids, + .driver = { + .name = KBUILD_MODNAME, + .of_match_table = gca230718_dt_ids, + }, +}; + +module_i2c_driver(gca230718_driver); + +MODULE_AUTHOR("Roland Reinl "); +MODULE_DESCRIPTION("GCA230718 LED support (e.g. for D-Link M30) using I2C"); +MODULE_LICENSE("GPL"); From 08f95e83e42a0b566d6146d5e999113fca5a6dc8 Mon Sep 17 00:00:00 2001 From: Roland Reinl Date: Sat, 30 Mar 2024 17:59:14 +0100 Subject: [PATCH 42/65] mediatek: Moved recovery image creation to include/image-commands.mk The recovery image is reqired for D-Link M30 as well. So I moved it to include/image-commands.mk to be able to use it for MT7622 and filogic devices. Signed-off-by: Roland Reinl (cherry picked from commit 0e2b7e3bd674d2dd69ed8daf483cac5509cec9f0) --- include/image-commands.mk | 37 +++++++++++++++++++++++ target/linux/mediatek/image/mt7622.mk | 42 ++++++++++----------------- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 6666eddf8f..12cbbb2c2c 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -226,6 +226,43 @@ define Build/copy-file cat "$(1)" > "$@" endef +# Create a header for a D-Link AI series recovery image and add it at the beginning of the image +# Currently supported: AQUILA M30, EAGLE M32 and R32 +# Arguments: +# 1: Start string of the header +# 2: Firmware version +# 3: Block start address +# 4: Block length +# 5: Device FMID +define Build/dlink-ai-recovery-header + $(eval header_start=$(word 1,$(1))) + $(eval firmware_version=$(word 2,$(1))) + $(eval block_start=$(word 3,$(1))) + $(eval block_length=$(word 4,$(1))) + $(eval device_fmid=$(word 5,$(1))) +# create $@.header without the checksum + echo -en "$(header_start)\x00\x00" > "$@.header" +# Calculate checksum over data area ($@) and append it to the header. +# The checksum is the 2byte-sum over the whole data area. +# Every overflow during the checksum calculation must increment the current checksum value by 1. + od -v -w2 -tu2 -An --endian little "$@" | awk '{ s+=$$1; } END { s%=65535; printf "%c%c",s%256,s/256; }' >> "$@.header" + echo -en "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00" >> "$@.header" + echo -en "$(firmware_version)" >> "$@.header" +# Only one block supported: Erase start/length is identical to data start/length + echo -en "$(block_start)$(block_length)$(block_start)$(block_length)" >> "$@.header" +# Only zeros + echo -en "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" >> "$@.header" +# Last 16 bytes, but without checksum + echo -en "\x42\x48\x02\x00\x00\x00\x08\x00\x00\x00\x00\x00" >> "$@.header" + echo -en "$(device_fmid)" >> "$@.header" +# Calculate and append checksum: The checksum must be set so that the 2byte-sum of the whole header is 0. +# Every overflow during the checksum calculation must increment the current checksum value by 1. + od -v -w2 -tu2 -An --endian little "$@.header" | awk '{s+=65535-$$1;}END{s%=65535;printf "%c%c",s%256,s/256;}' >> "$@.header" + cat "$@.header" "$@" > "$@.new" + mv "$@.new" "$@" + rm "$@.header" +endef + define Build/dlink-sge-image $(STAGING_DIR_HOST)/bin/dlink-sge-image $(1) $@ $@.enc mv $@.enc $@ diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk index e3a9dd510f..ce95be1c0c 100644 --- a/target/linux/mediatek/image/mt7622.mk +++ b/target/linux/mediatek/image/mt7622.mk @@ -35,31 +35,19 @@ define Build/bl31-uboot cat $(STAGING_DIR_IMAGE)/mt7622_$1-u-boot.fip >> $@ endef -# Append header to a D-Link M32/R32 Kernel 1 partition -define Build/m32-r32-recovery-header-kernel1 - $(eval header_start=$(word 1,$(1))) -# create $@.header without the checksum - echo -en "$(header_start)\x00\x00" > "$@.header" -# Calculate checksum over data area ($@) and append it to the header. -# The checksum is the 2byte-sum over the whole data area. -# Every overflow during the checksum calculation must increment the current checksum value by 1. - od -v -w2 -tu2 -An --endian little "$@" | awk '{ s+=$$1; } END { s%=65535; printf "%c%c",s%256,s/256; }' >> "$@.header" - echo -en "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x8D\x57\x30\x0B" >> "$@.header" -# Byte 0-3: Erase Start 0x002C0000 -# Byte 4-7: Erase Length 0x02D00000 -# Byte 8-11: Data offset: 0x002C0000 -# Byte 12-15: Data Length: 0x02D00000 - echo -en "\x00\x00\x2C\x00\x00\x00\xD0\x02\x00\x00\x2C\x00\x00\x00\xD0\x02" >> "$@.header" -# Only zeros - echo -en "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" >> "$@.header" -# Last 16 bytes, but without checksum - echo -en "\x42\x48\x02\x00\x00\x00\x08\x00\x00\x00\x00\x00\x60\x6E" >> "$@.header" -# Calculate and append checksum: The checksum must be set so that the 2byte-sum of the whole header is 0. -# Every overflow during the checksum calculation must increment the current checksum value by 1. - od -v -w2 -tu2 -An --endian little "$@.header" | awk '{s+=65535-$$1;}END{s%=65535;printf "%c%c",s%256,s/256;}' >> "$@.header" - cat "$@.header" "$@" > "$@.new" - mv "$@.new" "$@" - rm "$@.header" +define Build/uboot-bin + cat $(STAGING_DIR_IMAGE)/mt7622_$1-u-boot.bin >> $@ +endef + +define Build/uboot-fit + $(TOPDIR)/scripts/mkits.sh \ + -D $(DEVICE_NAME) -o $@.its -k $@ \ + -C $(word 1,$(1)) \ + -a 0x41e00000 -e 0x41e00000 \ + -c "config-1" \ + -A $(LINUX_KARCH) -v u-boot + PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + @mv $@.new $@ endef define Build/mt7622-gpt @@ -205,7 +193,7 @@ define Device/dlink_eagle-pro-ai-m32-a1 $(Device/dlink_eagle-pro-ai-ax3200-a1) DEVICE_MODEL := EAGLE PRO AI M32 DEVICE_DTS := mt7622-dlink-eagle-pro-ai-m32-a1 - IMAGE/recovery.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | pad-to $$(IMAGE_SIZE) | m32-r32-recovery-header-kernel1 DLK6E6010001 + IMAGE/recovery.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6010001 \x8D\x57\x30\x0B \x00\x00\x2C\x00 \x00\x00\xD0\x02 \x60\x6E endef TARGET_DEVICES += dlink_eagle-pro-ai-m32-a1 @@ -213,7 +201,7 @@ define Device/dlink_eagle-pro-ai-r32-a1 $(Device/dlink_eagle-pro-ai-ax3200-a1) DEVICE_MODEL := EAGLE PRO AI R32 DEVICE_DTS := mt7622-dlink-eagle-pro-ai-r32-a1 - IMAGE/recovery.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | pad-to $$(IMAGE_SIZE) | m32-r32-recovery-header-kernel1 DLK6E6015001 + IMAGE/recovery.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6015001 \x8D\x57\x30\x0B \x00\x00\x2C\x00 \x00\x00\xD0\x02 \x60\x6E endef TARGET_DEVICES += dlink_eagle-pro-ai-r32-a1 From 6e51ff88b0533050b3441786552bfeb4bf45e0b4 Mon Sep 17 00:00:00 2001 From: Roland Reinl Date: Sun, 24 Dec 2023 14:42:23 +0100 Subject: [PATCH 43/65] filogic: Add support for D-Link AQUILA PRO AI M30 Specification: - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX) - MT7531 switch - 512MB RAM - 128MB NAND flash with two UBI partitions with identical size - 1 multi color LED (red, green, blue, white) connected via GCA230718 - 3 buttons (WPS, reset, LED on/off) - 1 1Gbit WAN port - 4 1Gbit LAN ports Disassembly: - There are four screws at the bottom: 2 under the rubber feets, 2 under the label. - After removing the screws, the white plastic part can be shifted out of the blue part. - Be careful because the antennas are mounted on the side and the top of the white part. Serial Interface - The serial interface can be connected to the 4 pin holes on the side of the board. - Pins (from front to rear): - 3.3V - RX - TX - GND - Settings: 115200, 8N1 MAC addresses: - WAN MAC is stored in partition "Odm" at offset 0x81 - LAN (as printed on the device) is WAN MAC + 1 - WLAN MAC (2.4 GHz) is WAN MAC + 2 - WLAN MAC (5GHz) is WAN MAC + 3 Flashing via Recovery Web Interface: - The recovery web interface always flashes to the currently active partition. - If OpenWrt is flahsed to the second partition, it will not boot. - Ensure that you have an OEM image available (encrypted and decrypted version). Decryption is described in the end. - Set your IP address to 192.168.200.10, subnetmask 255.255.255.0 - Press the reset button while powering on the device - Keep the reset button pressed until the LED blinks red - Open a Chromium based and goto http://192.168.200.1 (recovery web interface) - Download openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-squashfs-recovery.bin - The recovery web interface always reports successful flashing, even if it fails - After flashing, the recovery web interface will try to forward the browser to 192.168.0.1 (can be ignored) - If OpenWrt was flashed to the first partition, OpenWrt will boot (The status LED will start blinking white and stay white in the end). In this case you're done and can use OpenWrt. - If OpenWrt was flashed to the second partition, OpenWrt won't boot (The status LED will stay red forever). In this case, the following steps are reuqired: - Start the web recovery interface again and flash the **decrypted OEM image**. This will be flashed to the second partition as well. The OEM firmware web interface is afterwards accessible via http://192.168.200.1. - Now flash the **encrypted OEM image** via OEM firmware web interface. In this case, the new firmware is flashed to the first partition. After flashing and the following reboot, the OEM firmware web interface should still be accessible via http://192.168.200.1. - Start the web recovery interface again and flash the OpenWrt recovery image. Now it will be flashed to the first partition, OpenWrt will boot correctly afterwards and is accessible via 192.168.1.1. Flashing via U-Boot: - Open the case, connect to the UART console - Set your IP address to 192.168.200.2, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router - Run a tftp server which provides openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-initramfs-kernel.bin. - Power on the device and select "7. Load image" in the U-Boot menu - Enter image file, tftp server IP and device IP (if they differ from the default). - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface) - Perform a sysupgrade using openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-squashfs-sysupgrade.bin - Reboot the device. OpenWrt should start from flash now Revert back to stock using the Recovery Web Interface: - Set your IP address to 192.168.200.2, subnetmask 255.255.255.0 - Press the reset button while powering on the device - Keep the reset button pressed until the LED blinks red - Open a Chromium based and goto http://192.168.200.1 (recovery web interface) - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below. Decrypting a D-Link firmware image: - Download https://github.com/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c - Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util - Run ./m32-firmware-util M30 --DecryptFactoryImage - Example for firmware M30A1_FW101B05: ./m32-firmware-util M30 --DecryptFactoryImage M30A1_FW101B05\(0725091522\).bin M30A1_FW101B05\(0725091522\)_decrypted.bin Flashing via OEM web interface is not possible, as it will change the active partition and OpenWrt is only running on the first UBI partition. Controlling the LEDs: - The LEDs are controlled by a chip called "GCA230718" which is connected to the main CPU via I2C (address 0x40) - I didn't find any documentation or driver for it, so the information below is purely based on my investigations - If there is already I driver for it, please tell me. Maybe I didn't search enough - I implemented a kernel module (leds-gca230718) to access the LEDs via DTS - The LED controller supports PWM for brightness control and ramp control for smooth blinking. This is not implemented in the driver - The LED controller supports toggling (on -> off -> on -> off) where the brightness of the LEDs can be set individually for each on cycle - Until now, only simple active/inactive control is implemented (like when the LEDs would have been connected via GPIO) - Controlling the LEDs requires three sequences sent to the chip. Each sequence consists of - A reset command (0x81 0xE4) written to register 0x00 - A control command (for example 0x0C 0x02 0x01 0x00 0x00 0x00 0xFF 0x01 0x00 0x00 0x00 0xFF 0x87 written to register 0x03) - The reset command is always the same - In the control command - byte 0 is always the same - byte 1 (0x02 in the example above) must be changed in every sequence: 0x02 -> 0x01 -> 0x03) - byte 2 is set to 0x01 which disables toggling. 0x02 would be LED toggling without ramp control, 0x03 would be toggling with ramp control - byte 3 to 6 define the brightness values for the LEDs (R,G,B,W) for the first on cycle when toggling - byte 7 defines the toggling frequency (if toggling enabled) - byte 8 to 11 define the brightness values for the LEDs (R,G,B,W) for the second on cycle when toggling - byte 12 is constant 0x87 Comparison to M32/R32: - The algorithms for decrypting the OEM firmware are the same for M30/M32/R32, only the keys differ - The keys are available in the GPL sources for the M32 - The M32/R32 contained raw data in the firmware images (kernel, rootfs), the R30 uses a sysupgrade tar instead - Creation of the recovery image is quite similar, only the header start string changes. So mostly takeover from M32/R32 for that. - Turned out that the bytes at offset 0x0E and 0x0F in the recovery image header are the checksum over the data area - This checksum was not checked in the recovery web interface of M32/R32 devices, but is now active in R30 - I adapted the recovery image creation to also calculate the checksum over the data area - The recovery image header for M30 contains addresses which don't match the memory layout in the DTS. The same addresses are also present in the OEM images - The recovery web interface either calculates the correct addresses from it or has it's own logic to determine where which information must be written Signed-off-by: Roland Reinl (cherry picked from commit 29cca6cfee4bc732f9bf7eca0cae9e56cd3c0f2f) --- .../uboot-envtools/files/mediatek_filogic | 3 + .../mt7981b-dlink-aquila-pro-ai-m30-a1.dts | 310 ++++++++++++++++++ .../filogic/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 4 + .../filogic/base-files/etc/init.d/bootcount | 7 + target/linux/mediatek/image/filogic.mk | 15 + 6 files changed, 342 insertions(+) create mode 100644 target/linux/mediatek/dts/mt7981b-dlink-aquila-pro-ai-m30-a1.dts diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index e781554f7e..85114ec938 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -66,6 +66,9 @@ zbtlink,zbt-z8102ax|\ zbtlink,zbt-z8103ax) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" ;; +dlink,aquila-pro-ai-m30-a1) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" + ;; h3c,magic-nx30-pro|\ jcg,q30-pro|\ netcore,n60|\ diff --git a/target/linux/mediatek/dts/mt7981b-dlink-aquila-pro-ai-m30-a1.dts b/target/linux/mediatek/dts/mt7981b-dlink-aquila-pro-ai-m30-a1.dts new file mode 100644 index 0000000000..dc14fce2b6 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-dlink-aquila-pro-ai-m30-a1.dts @@ -0,0 +1,310 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include "mt7981.dtsi" + +/ { + model = "D-Link AQUILA PRO AI M30 A1"; + compatible = "dlink,aquila-pro-ai-m30-a1", "mediatek,mt7981"; + + aliases { + label-mac-device = &gmac0; + led-boot = &led_status_white; + led-failsafe = &led_status_red; + led-running = &led_status_white; + led-upgrade = &led_status_blue; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + }; + + button-wps { + label = "wps"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + button-leds-on-off { + label = "leds-on-off"; + linux,code = ; + gpios = <&pio 4 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +ð { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_odm 1>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + label = "internet"; + + nvmem-cells = <&macaddr_odm 0>; + nvmem-cell-names = "mac-address"; + }; +}; + +&mdio_bus { + switch: switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + + port@1 { + reg = <1>; + label = "lan2"; + }; + + port@2 { + reg = <2>; + label = "lan3"; + }; + + port@3 { + reg = <3>; + label = "lan4"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand@0 { + compatible = "spi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + mediatek,nmbm; + mediatek,bmt-max-ratio = <1>; + mediatek,bmt-max-reserved-blocks = <64>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x00 0x100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "Factory"; + reg = <0x180000 0x200000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; + }; + + partition@380000 { + label = "FIP"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x3200000>; + }; + + partition@3780000 { + label = "ubi1"; + reg = <0x3780000 0x3200000>; + read-only; + }; + + partition@6980000 { + label = "Odm"; + reg = <0x6980000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_odm: macaddr@81 { + compatible = "mac-base"; + reg = <0x81 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + + }; + + partition@69c0000 { + label = "Config1"; + reg = <0x69c0000 0x80000>; + read-only; + }; + + partition@6a40000 { + label = "Config2"; + reg = <0x6a40000 0x80000>; + read-only; + }; + + partition@6ac0000 { + label = "Storage"; + reg = <0x6ac0000 0xA00000>; + read-only; + }; + }; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = ; + bias-pull-down = ; + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = ; + bias-pull-down = ; + }; + }; + + i2c_pins_g0: i2c-pins-g0 { + mux { + function = "i2c"; + groups = "i2c0_1"; + }; + }; +}; + +&wifi { + status = "okay"; + + nvmem-cells = <&eeprom_factory_0>, <&macaddr_odm 2>; + nvmem-cell-names = "eeprom", "mac-address"; +}; + +&i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins_g0>; + + gca230718@40 { + compatible = "unknown,gca230718"; + reg = <0x40>; + + led_status_red: led@0 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <0>; + }; + + led@1 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <1>; + }; + + led_status_blue: led@2 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <2>; + }; + + led_status_white: led@3 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <3>; + }; + }; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index b4d8d0e9aa..421b911fbd 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -49,6 +49,9 @@ mediatek_setup_interfaces() glinet,gl-mt3000) ucidef_set_interfaces_lan_wan eth1 eth0 ;; + dlink,aquila-pro-ai-m30-a1) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" internet + ;; glinet,gl-mt6000|\ tplink,tl-xdr4288|\ tplink,tl-xdr6088) diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 62bbde6ba8..717014cdc4 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -75,6 +75,10 @@ case "$board" in [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress ;; + dlink,aquila-pro-ai-m30-a1) + addr=$(mtd_get_mac_binary "Odm" 0x81) + [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress + ;; glinet,gl-mt6000) addr=$(mmc_get_mac_binary factory 0x04) [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount b/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount index c52d004c63..e186589f28 100644 --- a/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount +++ b/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount @@ -5,6 +5,13 @@ START=99 boot() { case $(board_name) in + dlink,aquila-pro-ai-m30-a1) + if grep -q bootpart=ubi0 /proc/cmdline; then + fw_setenv bootpart 0 + else + fw_setenv bootpart 1 + fi + ;; zyxel,ex5700-telenor) fw_setenv uboot_bootcount 0 ;; diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 83da1bb789..70eb6039fd 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -415,6 +415,21 @@ define Device/cudy_wr3000-v1 endef TARGET_DEVICES += cudy_wr3000-v1 +define Device/dlink_aquila-pro-ai-m30-a1 + DEVICE_VENDOR := D-Link + DEVICE_MODEL := AQUILA PRO AI M30 + DEVICE_VARIANT := A1 + DEVICE_DTS := mt7981b-dlink-aquila-pro-ai-m30-a1 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-leds-gca230718 kmod-mt7981-firmware mt7981-wo-firmware + KERNEL_IN_UBI := 1 + IMAGES += recovery.bin + IMAGE_SIZE := 51200k + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + IMAGE/recovery.bin := sysupgrade-tar | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6110001 \x6A\x28\xEE\x0B \x00\x00\x2C\x00 \x00\x00\x20\x03 \x61\x6E +endef +TARGET_DEVICES += dlink_aquila-pro-ai-m30-a1 + define Device/glinet_gl-mt3000 DEVICE_VENDOR := GL.iNet DEVICE_MODEL := GL-MT3000 From e573b6b557ed45b4737f37db071aba8d23beaf3b Mon Sep 17 00:00:00 2001 From: Alexey Bartenev <41exey@proton.me> Date: Wed, 31 May 2023 10:50:23 -0400 Subject: [PATCH 44/65] ramips: add support for D-Link DIR-806A B1 router MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit General specification: SoC Type: MediaTek MT7620A (580MHz) ROM: 8 MB SPI-NOR (MX25L6406E) RAM: 64 MB DDR (W9751G6KB-25) Switch: MediaTek MT7530 Ethernet: 5 ports - 5×100MbE (WAN, LAN1-4) Wireless: 2.4 GHz (MediaTek RT5390): b/g/n Wireless: 5 GHz (MediaTek MT7610EN): ac/n Buttons: 2 button (POWER, WPS/RESET) Bootloader: U-Boot 1.1.3 Power: 12 VDC, 0.5 A MACs: | LAN | [Factory + 0x04] - 2 | | WLAN 2.4g | [Factory + 0x04] - 1 | | WLAN 5g | [Factory + 0x8004] - 3 | | WAN | [Factory + 0x04] - 2 | OEM easy installation: 1. Use a PC to browse to http://192.168.0.1. 2. Go to the System section and open the Firmware Update section. 3. Under the Local Update at the right, click on the CHOOSE FILE... 4. When a modal window appears, choose the firmware file and click on the Open. 5. Next click on the UPDATE FIRMWARE button and upload the firmware image. Wait for the router to flash and reboot. OEM installation using the TFTP method (need level converter): 1. Download the latest firmware image. 2. Set up a Tftp server on a PC (e.g. Tftpd32) and place the firmware image to the root directory of the server. 3. Power off the router and use a twisted pair cable to connect the PC to any of the router's LAN ports. 4. Configure the network adapter of the PC to use IP address 192.168.0.180 and subnet mask 255.255.255.0. 5. Connect serial port (57600 8N1) and turn on the router. 6. Then interrupt "U-Boot Boot Menu" by hitting 2 key (select "2: Load system code then write to Flash via TFTP."). 7. Press Y key when show "Warning!! Erase Linux in Flash then burn new one. Are you sure? (Y/N)" Input device IP (192.168.0.1) ==:192.168.0.1 Input server IP (192.168.0.180) ==:192.168.0.180 Input Linux Kernel filename () ==:firmware_name The router should download the firmware via TFTP and complete flashing in a few minutes. After flashing is complete, use the PC to browse to http://192.168.1.1 or ssh to proceed with the configuration. Signed-off-by: Alexey Bartenev <41exey@proton.me> (cherry picked from commit ce998cb6e161db9c9e868fd570da9189f05fde3e) --- package/boot/uboot-envtools/files/ramips | 3 +- .../ramips/dts/mt7620a_dlink_dir-806a-b1.dts | 165 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 13 ++ .../mt7620/base-files/etc/board.d/01_leds | 3 + .../mt7620/base-files/etc/board.d/02_network | 1 + 5 files changed, 184 insertions(+), 1 deletion(-) create mode 100755 target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 1df42c22ef..8247798937 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -32,7 +32,8 @@ allnet,all5002|\ yuncore,ax820) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ;; -arcadyan,we420223-99) +arcadyan,we420223-99|\ +dlink,dir-806a-b1) ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000" ;; ampedwireless,ally-00x19k|\ diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts new file mode 100755 index 0000000000..b7fc063b7f --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts @@ -0,0 +1,165 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a.dtsi" + +#include +#include +#include + +/ { + compatible = "dlink,dir-806a-b1", "ralink,mt7620a-soc"; + model = "D-Link DIR-806A B1"; + + aliases { + led-boot = &wps_led; + led-failsafe = &wps_led; + led-running = &wps_led; + led-upgrade = &wps_led; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; // #12 + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + wifi_led: 2.4g { + label = "green:wlan"; + color = ; + function = LED_FUNCTION_WLAN; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; // #72 + }; + + wps_led: wps { + label = "green:wps"; + color = ; + function = LED_FUNCTION_WPS; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; // #39 + }; + + }; + +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <48000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ALL"; + reg = <0x0 0x800000>; + read-only; + }; + + partition@0_1 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "Factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uartf", "ephy"; + function = "gpio"; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-2)>; +}; + +&wmac { + pinctrl-names = "default", "pa_gpio"; + pinctrl-0 = <&pa_pins>; + pinctrl-1 = <&pa_gpio_pins>; + + ralink,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-1)>; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + + nvmem-cells = <&macaddr_factory_8004>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-3)>; + + led { + led-active-low; + }; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 30b7aea32d..5fc501e1d8 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -224,6 +224,19 @@ define Device/dlink_dir-510l endef TARGET_DEVICES += dlink_dir-510l +define Device/dlink_dir-806a-b1 + SOC := mt7620a + IMAGE_SIZE := 7872k + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DIR-806A + DEVICE_VARIANT := B1 + DEVICE_PACKAGES += kmod-mt76x0e + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size | \ + sign-dlink-ru cef285a2e29e40b2baab31277d44298b +endef +TARGET_DEVICES += dlink_dir-806a-b1 + define Device/dlink_dir-810l SOC := mt7620a DEVICE_PACKAGES := kmod-mt76x0e diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 41500d84a6..a5c9bd82c9 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -44,6 +44,9 @@ comfast,cf-wr800n) ucidef_set_led_netdev "lan" "lan" "white:ethernet" eth0.1 ucidef_set_led_netdev "wifi_led" "wifi" "white:wifi" "wlan0" ;; +dlink,dir-806a-b1) + ucidef_set_led_netdev "wifi_led" "2.4g" "green:wlan" "phy1-ap0" + ;; dlink,dir-810l|\ trendnet,tew-810dr) ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10" diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index bbe8627c0f..65ad861e6a 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -79,6 +79,7 @@ ramips_setup_interfaces() asus,rt-ac54u|\ asus,rt-n14u|\ bdcom,wap2100-sk|\ + dlink,dir-806a-b1|\ domywifi,dm202|\ domywifi,dm203|\ domywifi,dw22d|\ From b20da12ecadf70ae03a880ed4aed73d984d01876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= Date: Sat, 17 Jun 2023 21:59:26 +0300 Subject: [PATCH 45/65] ramips: add wan2 support for MQmaker WiTi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PHY of the wan2 port on MQmaker WiTi is wired to the second MAC of the SoC. Rename the wan interface to wan1 and define it under the switch node, effectively disabling the PHY muxing of the MT7530 switch's phy4. Define the PHY of the wan2 port and adjust the gmac1 node accordingly. Now that the PHY muxing feature is not being used anymore, the wan2 port can be used to achieve 2 Gbps total bandwidth to the CPU. Tested-by: Demetris Ierokipides Signed-off-by: Arınç ÜNAL (cherry picked from commit 8bf9a8a5e6e35afcb8b7aaebfea6fb91e76c9d81) --- .../linux/ramips/dts/mt7621_mqmaker_witi.dts | 18 ++++++++++++++---- .../mt7621/base-files/etc/board.d/02_network | 3 +++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts index 16cebbad74..d785d741b1 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -102,8 +102,9 @@ &gmac1 { status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; + label = "wan2"; + phy-mode = "rgmii-rxid"; + phy-handle = <ðphy5>; nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; @@ -111,8 +112,8 @@ }; &mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; + ethphy5: ethernet-phy@5 { + reg = <5>; }; }; @@ -137,6 +138,15 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan1"; + + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; + }; }; }; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 8aabf41928..9f7cc3510c 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -115,6 +115,9 @@ ramips_setup_interfaces() mikrotik,routerboard-760igs) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan sfp" ;; + mqmaker,witi) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan1 wan2" + ;; tozed,zlt-s12-pro) ucidef_set_interface_lan "lan1 lan2 lan3 wan" ucidef_set_interface "wwan" device "/dev/ttyUSB0" protocol "ncm" From 29280638e8cbfcd8935dbedcc5fe594a81a5e634 Mon Sep 17 00:00:00 2001 From: Wenli Looi Date: Thu, 30 Mar 2023 22:28:23 +0000 Subject: [PATCH 46/65] ramips: add support for Netgear EAX12 series Netgear EAX12, EAX11v2, EAX15v2 are wall-plug 802.11ax (Wi-Fi 6) extenders that share the SoC, WiFi chip, and image format with the WAX202. Specifications: * MT7621, 256 MiB RAM, 128 MiB NAND * MT7915: 2.4/5 GHz 2x2 802.11ax (DBDC) * Ethernet: 1 port 10/100/1000 * UART: 115200 baud (labeled on board) All LEDs and buttons appear to work without state_default. Installation: * Flash the factory image through the stock web interface, or TFTP to the bootloader. NMRP can be used to TFTP without opening the case. Revert to stock firmware: * Flash the stock firmware to the bootloader using TFTP/NMRP. References in GPL source: https://www.downloads.netgear.com/files/GPL/EAX12_EAX11v2_EAX15v2_GPL_V1.0.3.34_src.tar.gz * target/linux/ramips/dts/mt7621-rfb-ax-nand.dts DTS file for this device. Signed-off-by: Wenli Looi (cherry picked from commit 32ea8a9a7e4b1319607ae398e9bf7d8e3c4cd756) --- package/boot/uboot-envtools/files/ramips | 1 + .../linux/ramips/dts/mt7621_netgear_eax12.dts | 189 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 26 +++ .../mt7621/base-files/etc/board.d/01_leds | 4 + .../mt7621/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 5 + .../mt7621/base-files/lib/upgrade/platform.sh | 1 + 7 files changed, 231 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_netgear_eax12.dts diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 8247798937..eccdd4255a 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -75,6 +75,7 @@ h3c,tx1801-plus|\ h3c,tx1806|\ jcg,q20|\ linksys,e7350|\ +netgear,eax12|\ netgear,wax202|\ zyxel,wsm20) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" diff --git a/target/linux/ramips/dts/mt7621_netgear_eax12.dts b/target/linux/ramips/dts/mt7621_netgear_eax12.dts new file mode 100644 index 0000000000..d5ad404be0 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_netgear_eax12.dts @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "netgear,eax12", "mediatek,mt7621-soc"; + model = "Netgear EAX12"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_red; + led-running = &led_power_green; + led-upgrade = &led_power_red; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_green { + label = "green:power"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + led_power_red: power_red { + label = "red:power"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + client_green { + label = "green:client"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + client_red { + label = "red:client"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + router_green { + label = "green:router"; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + }; + + router_red { + label = "red:router"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + + wps_green { + label = "green:wps"; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + }; + + eth_green { + label = "green:eth"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + }; + + eth_yellow { + label = "yellow:eth"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "Config"; + reg = <0x80000 0x80000>; + read-only; + }; + + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label = "firmware"; + reg = <0x180000 0x3800000>; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x3400000>; + }; + }; + + partition@2780000 { + label = "firmware_backup"; + reg = <0x3980000 0x3800000>; + read-only; + }; + + partition@4d80000 { + label = "CFG"; + reg = <0x7180000 0x200000>; + read-only; + }; + + partition@5580000 { + label = "RAE"; + reg = <0x7380000 0x600000>; + read-only; + }; + + partition@5980000 { + label = "POT"; + reg = <0x7980000 0x020000>; + read-only; + }; + + partition@6780000 { + label = "LOG"; + reg = <0x79A0000 0x40000>; + read-only; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 1a8df617b5..c1fbc40b7e 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1712,6 +1712,32 @@ define Device/mts_wg430223 endef TARGET_DEVICES += mts_wg430223 +define Device/netgear_eax12 + $(Device/nand) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := EAX12 + DEVICE_ALT0_VENDOR := NETGEAR + DEVICE_ALT0_MODEL := EAX11 + DEVICE_ALT0_VARIANT := v2 + DEVICE_ALT1_VENDOR := NETGEAR + DEVICE_ALT1_MODEL := EAX15 + DEVICE_ALT1_VARIANT := v2 + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools + NETGEAR_ENC_MODEL := EAX12 + NETGEAR_ENC_REGION := US + NETGEAR_ENC_HW_ID_LIST := 1010000004540000_NETGEAR + NETGEAR_ENC_MODEL_LIST := EAX12;EAX11v2;EAX15v2 + IMAGE_SIZE := 57344k + KERNEL_LOADADDR := 0x82000000 + KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \ + append-squashfs4-fakeroot + IMAGES += factory.img + IMAGE/factory.img := append-kernel | pad-to $$(KERNEL_SIZE) | \ + append-ubi | check-size | netgear-encrypted-factory +endef +TARGET_DEVICES += netgear_eax12 + define Device/netgear_ex6150 $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index ae46ddb79f..4ea07da8b0 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -157,6 +157,10 @@ mikrotik,routerboard-m11g) mtc,wr1201) ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "br-lan" ;; +netgear,eax12) + ucidef_set_led_netdev "eth_act" "LAN act" "yellow:eth" "lan" "tx rx" + ucidef_set_led_netdev "eth_link" "LAN link" "green:eth" "lan" "link" + ;; netgear,r6220|\ netgear,r6260|\ netgear,r6350|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 9f7cc3510c..71e6f93862 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -42,6 +42,7 @@ ramips_setup_interfaces() linksys,re7000|\ mikrotik,ltap-2hnd|\ mikrotik,routerboard-m11g|\ + netgear,eax12|\ netgear,ex6150|\ sercomm,na502|\ sercomm,na502s|\ @@ -301,6 +302,10 @@ ramips_setup_macs() label_mac=$wan_mac lan_mac=$(macaddr_add "$wan_mac" 2) ;; + netgear,eax12) + lan_mac=$(mtd_get_mac_ascii Config mac) + label_mac=$lan_mac + ;; netgear,wax202) lan_mac=$(mtd_get_mac_ascii Config mac) wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 0e4541a421..c09203270c 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -130,6 +130,11 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress ;; + netgear,eax12) + hw_mac_addr=$(mtd_get_mac_ascii Config mac) + [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress + ;; netgear,wax202) hw_mac_addr=$(mtd_get_mac_ascii Config mac) [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index 8b35b5d32a..5c3ad73366 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -89,6 +89,7 @@ platform_do_upgrade() { linksys,ea8100-v1|\ linksys,ea8100-v2|\ mts,wg430223|\ + netgear,eax12|\ netgear,r6220|\ netgear,r6260|\ netgear,r6350|\ From 07742a7243ad5b6d759c56907143d71639c20cd8 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 2 Mar 2023 21:45:50 +0100 Subject: [PATCH 47/65] ramips: add Edimax BR-6208AC V2 support Specifications: - Device: Edimax BR-6208AC V2 - SoC: MT7620A - Flash: 16 MiB - RAM: 64 MiB - Switch: 1 WAN, 3 LAN (10/100 Mbps) - WiFi: MT7620 2.4 GHz + MT7610E 5 GHz - LEDs: 1x POWER (green, not configurable) 1x Firmware (green, configurable) 1x Internet (green, configurable) 1x VPN (green, configurable) 1x 2.4G (green, not configurable) 1x 5G (green, not configurable) Normal installation: - Upload the sysupgrade image via the default web interface Installation with U-Boot and TFTP: - Requires a TFTP server which provides the sysupgrade image - Requires a connection to the serial port of the device, rate 57600 Signed-off-by: Stefan Weil (cherry picked from commit 8d06bc175154db42a0550212a4b8474008939b34) --- .../dts/mt7620a_edimax_br-6208ac-v2.dts | 217 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 16 ++ .../mt7620/base-files/etc/board.d/01_leds | 7 + .../mt7620/base-files/etc/board.d/02_network | 5 + 4 files changed, 245 insertions(+) create mode 100644 target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts new file mode 100644 index 0000000000..5f1c01b35e --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2023 Stefan Weil + */ + +#include "mt7620a.dtsi" + +#include +#include +#include +#include + +/ { + compatible = "edimax,br-6208ac-v2", "ralink,mt7620a-soc"; + model = "Edimax BR-6208AC v2"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_firmware; + }; + + keys { + compatible = "gpio-keys"; + + // Vendor firmware: /proc/RESET_BUTTON + reset_wps { + label = "reset_wps"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + // Vendor firmware: /proc/driver/led + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + // RALINK_REG_PIO3924DATA 39-24 + led_internet: internet { + label = "green:internet"; + color = ; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + + // RALINK_REG_PIO7140DATA 44-40 + led_wlan_2_4ghz: wlan_2_4ghz { + label = "green:wlan2g"; + color = ; + function = LED_FUNCTION_WLAN; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + // RALINK_REG_PIO7140DATA 43-40 + led_wlan_5ghz: wlan_5ghz { + label = "green:wlan5g"; + color = ; + function = LED_FUNCTION_WLAN; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + // RALINK_REG_PIO7140DATA 42-40 + led_firmware: firmware { + label = "green:firmware"; + color = ; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + // default-state = "keep"; + }; + + // RALINK_REG_PIO7140DATA 41-40 + led_vpn: vpn { + label = "green:vpn"; + color = ; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gdma { + status = "okay"; +}; + +// Vendor firmware: RALINK_REG_PIO7140 - gpio0: gpio@600 +// Vendor firmware: RALINK_REG_PIO3924 - gpio1: gpio@638 +// Vendor firmware: RALINK_REG_PIO7140 - gpio2: gpio@660 +// Vendor firmware: RALINK_REG_PIO72 - gpio3: gpio@688 + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + // Vendor partitions: + // 0x000000000000-0x000000030000 : "Bootloader" + // 0x000000030000-0x000000040000 : "Config" + // 0x000000040000-0x000000050000 : "Factory" + // 0x000000050000-0x000000070000 : "Cimage" + // 0x000000070000-0x000000fe0000 : "Uimage" + // 0x000000070000-0x000000190000 : "Kernel" + // 0x000000190000-0x000000fe0000 : "RootFS" + // 0x000000fe0000-0x000001000000 : "FreeSpace" + + // Bootloader + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + // Config + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + // Factory + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + // Cimage + partition@50000 { + label = "cimage"; + reg = <0x50000 0x20000>; + read-only; + }; + + partition@70000 { + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,offset = ; + openwrt,partition-magic = ; + label = "firmware"; + reg = <0x00070000 0x00f70000>; + }; + + // FreeSpace + partition@fe0000 { + label = "freespace"; + reg = <0xfe0000 0x20000>; + read-only; + }; + }; + }; +}; + +&state_default { + gpio { + // TODO: "spi refclk"? + groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; + function = "gpio"; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; + + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 5fc501e1d8..61b79c962d 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -394,6 +394,22 @@ define Device/dovado_tiny-ac endef TARGET_DEVICES += dovado_tiny-ac +define Device/edimax_br-6208ac-v2 + SOC := mt7620a + DEVICE_VENDOR := Edimax + DEVICE_MODEL := BR-6208AC + DEVICE_VARIANT := V2 + BLOCKSIZE := 64k + IMAGE_SIZE := 7744k + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ + edimax-header -s CSYS -m RN71 -f 0x70000 -S 0x01100000 | pad-rootfs | \ + check-size | append-metadata + DEVICE_PACKAGES := kmod-mt76x2 kmod-mt76x0e kmod-phy-realtek \ + kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ + uboot-envtools +endef +TARGET_DEVICES += edimax_br-6208ac-v2 + define Device/edimax_br-6478ac-v2 SOC := mt7620a DEVICE_VENDOR := Edimax diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index a5c9bd82c9..c4f7fcbb87 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -101,6 +101,13 @@ domywifi,dw22d) dovado,tiny-ac) ucidef_set_led_netdev "wifi_led" "wifi" "orange:wifi" "wlan0" ;; +edimax,br-6208ac-v2) + ucidef_set_led_netdev "wan" "Internet" "green:internet" "eth0.2" "tx rx" + ucidef_set_led_netdev "wifi_led" "WLAN 2.4 GHz" "green:wlan2g" "wlan1" + ucidef_set_led_netdev "wifi_led" "WLAN 5 GHz" "green:wlan5g" "wlan1" + ucidef_set_led_netdev "wifi_led" "Firmware" "green:firmware" "wlan1" + ucidef_set_led_netdev "lan" "VPN" "green:vpn" "switch0" "0x20" + ;; edimax,br-6478ac-v2|\ edimax,ew-7478apc) ucidef_set_led_netdev "wifi_led" "wifi" "blue:wlan" "wlan0" diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 65ad861e6a..cbfb8a1d86 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -145,6 +145,10 @@ ramips_setup_interfaces() "5:lan" "6@eth0" ucidef_add_switch_attr "switch1" "enable" "false" ;; + edimax,br-6208ac-v2) + ucidef_add_switch "switch0" \ + "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" + ;; edimax,br-6478ac-v2|\ lb-link,bl-w1200|\ tplink,archer-c2-v1) @@ -276,6 +280,7 @@ ramips_setup_macs() asus,rt-n12p|\ asus,rt-n14u|\ bdcom,wap2100-sk|\ + edimax,br-6208ac-v2|\ edimax,ew-7478apc|\ fon,fon2601|\ head-weblink,hdrm200|\ From a812b70bf2ea886d8788af181d094a6d00b77c68 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 8 Jul 2024 13:10:52 +0200 Subject: [PATCH 48/65] image: make images and artifacts dependent of initramfs There is currently a BIG bug in how the images dependency is handled and recent Per Device Rootfs made this more clear and less statistical. There is currently no dependency between images/artifacts build with initramfs build. This cause whatever additional image that depends on an initramfs image to fail as it might happen that image and initramfs build are called at the same time and the additional image is called before initramfs build has finished. Each image-command assume the source image to be taken from the /bin directory but that is only copied from the /tmp directory only at the end of the process. Artifacts currently depends on image with the use of the BOARD-NAME-images Makefile target, but this is not the case for initramfs that also define a -images Makefile target but that is not accounted in images (that might depend on some initramfs images) To actually fix this, introduce a new Makefile target, -initramfs-images and make image and artifacts build to depend on this. Since initramfs images are optional, this dependency is actived only when initramfs image are built. With this change we correctly enforce the build order: - Initramfs Images (optional) - Images - Artifacts (cherry picked from commit cc6a0abcabf718df872c0f6876d1121d3dd09953) [ rebased on openwrt-23.05 ] Signed-off-by: Christian Marangi --- include/image.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/image.mk b/include/image.mk index 97cde011ce..e979b1a36b 100644 --- a/include/image.mk +++ b/include/image.mk @@ -511,7 +511,7 @@ define Device/Build/initramfs $$(if $$(CONFIG_JSON_OVERVIEW_IMAGE_INFO), $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,)) $(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare - $(1)-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)) + $(1)-initramfs-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)) $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) cp $$^ $$@ @@ -639,7 +639,7 @@ define Device/Build/image ifndef IB $$(ROOTFS/$(1)/$(3)): $(if $(TARGET_PER_DEVICE_ROOTFS),target-dir-$$(ROOTFS_ID/$(3))) endif - $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3)) + $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3)) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(3)-initramfs-images) @rm -f $$@ [ -f $$(word 1,$$^) -a -f $$(word 2,$$^) ] $$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2)))) @@ -695,7 +695,7 @@ define Device/Build/artifact $(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json, \ $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)) $(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1))) - $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(2)-images + $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(2)-initramfs-images) $(2)-images @rm -f $$@ $$(call concat_cmd,$(ARTIFACT/$(1))) From d53f1caeb0859c627919e924f333118fafc503d2 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Tue, 9 Jul 2024 04:41:21 +0200 Subject: [PATCH 49/65] image: exclude initramfs-images dependency with IB Exclude initramfs-images dependency with IB as the target is not defined in such context. Fixes: cc6a0abcabf7 ("image: make images and artifacts dependent of initramfs") Signed-off-by: Christian Marangi (cherry picked from commit e5d23b5aa5346de30befc2b05000a3967ca5b460) --- include/image.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/image.mk b/include/image.mk index e979b1a36b..a547c88dd9 100644 --- a/include/image.mk +++ b/include/image.mk @@ -639,7 +639,7 @@ define Device/Build/image ifndef IB $$(ROOTFS/$(1)/$(3)): $(if $(TARGET_PER_DEVICE_ROOTFS),target-dir-$$(ROOTFS_ID/$(3))) endif - $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3)) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(3)-initramfs-images) + $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3)) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(if $(IB),,$(3)-initramfs-images)) @rm -f $$@ [ -f $$(word 1,$$^) -a -f $$(word 2,$$^) ] $$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2)))) @@ -695,7 +695,7 @@ define Device/Build/artifact $(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json, \ $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)) $(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1))) - $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(2)-initramfs-images) $(2)-images + $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(if $(IB),,$(2)-initramfs-images)) $(2)-images @rm -f $$@ $$(call concat_cmd,$(ARTIFACT/$(1))) From ca9b71c469b6d73eb4031398b6725fbcc07085e9 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 28 May 2024 23:48:16 +0100 Subject: [PATCH 50/65] generic: move accepted patches for mtk_eth_soc to backport-5.15 In preparation to update mtk_eth_soc move accepted patches from mediatek target to backport folder, so other patches on top can be applied more easily. Signed-off-by: Daniel Golle (cherry picked from commit 8730f9e5365956887b75632df29c4b2305cd82e4) --- ...atek-split-tx-and-rx-fields-in-mtk_.patch} | 110 +++++++++--------- ...atek-use-QDMA-instead-of-ADMAv2-on-.patch} | 33 +++--- ..._eth_soc-add-code-for-offloading-flo.patch | 2 +- ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 2 +- ..._eth_soc-compile-out-netsys-v2-code-.patch | 4 +- ..._eth_soc-add-paths-and-SerDes-modes-.patch | 12 +- 6 files changed, 87 insertions(+), 76 deletions(-) rename target/linux/{mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch => generic/backport-5.15/751-00a-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch} (83%) rename target/linux/{mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch => generic/backport-5.15/751-00b-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch} (73%) diff --git a/target/linux/mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch b/target/linux/generic/backport-5.15/751-00a-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch similarity index 83% rename from target/linux/mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch rename to target/linux/generic/backport-5.15/751-00a-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch index ef9a33116f..eee1790205 100644 --- a/target/linux/mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch +++ b/target/linux/generic/backport-5.15/751-00a-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch @@ -1,13 +1,19 @@ +From 5d0fad48d2dec175ecb999974b94203c577973ef Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi -Date: Thu, 2 Nov 2023 16:47:07 +0100 -Subject: [PATCH net-next 1/2] net: ethernet: mediatek: split tx and rx fields - in mtk_soc_data struct +Date: Wed, 8 May 2024 11:43:34 +0100 +Subject: [PATCH] net: ethernet: mediatek: split tx and rx fields in + mtk_soc_data struct Split tx and rx fields in mtk_soc_data struct. This is a preliminary -patch to roll back to QDMA for MT7986 SoC in order to fix a hw hang -if the device receives a corrupted packet. +patch to roll back to ADMAv1 for MT7986 and MT7981 SoC in order to fix a +hw hang if the device receives a corrupted packet when using ADMAv2.0. +Fixes: 197c9e9b17b1 ("net: ethernet: mtk_eth_soc: introduce support for mt7986 chipset") Signed-off-by: Lorenzo Bianconi +Signed-off-by: Daniel Golle +Reviewed-by: Przemek Kitszel +Link: https://lore.kernel.org/r/70a799b1f060ec2f57883e88ccb420ac0fb0abb5.1715164770.git.daniel@makrotopia.org +Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 210 ++++++++++++-------- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 29 +-- @@ -15,7 +21,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1239,7 +1239,7 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -1078,7 +1078,7 @@ static int mtk_init_fq_dma(struct mtk_et eth->scratch_ring = eth->sram_base; else eth->scratch_ring = dma_alloc_coherent(eth->dma_dev, @@ -24,7 +30,7 @@ Signed-off-by: Lorenzo Bianconi ð->phy_scratch_ring, GFP_KERNEL); if (unlikely(!eth->scratch_ring)) -@@ -1255,16 +1255,16 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -1094,16 +1094,16 @@ static int mtk_init_fq_dma(struct mtk_et if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr))) return -ENOMEM; @@ -44,7 +50,7 @@ Signed-off-by: Lorenzo Bianconi txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); txd->txd4 = 0; -@@ -1511,7 +1511,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1350,7 +1350,7 @@ static int mtk_tx_map(struct sk_buff *sk if (itxd == ring->last_free) return -ENOMEM; @@ -53,7 +59,7 @@ Signed-off-by: Lorenzo Bianconi memset(itx_buf, 0, sizeof(*itx_buf)); txd_info.addr = dma_map_single(eth->dma_dev, skb->data, txd_info.size, -@@ -1552,7 +1552,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1391,7 +1391,7 @@ static int mtk_tx_map(struct sk_buff *sk memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); txd_info.size = min_t(unsigned int, frag_size, @@ -62,7 +68,7 @@ Signed-off-by: Lorenzo Bianconi txd_info.qid = queue; txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 && !(frag_size - txd_info.size); -@@ -1565,7 +1565,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1404,7 +1404,7 @@ static int mtk_tx_map(struct sk_buff *sk mtk_tx_set_dma_desc(dev, txd, &txd_info); tx_buf = mtk_desc_to_tx_buf(ring, txd, @@ -71,7 +77,7 @@ Signed-off-by: Lorenzo Bianconi if (new_desc) memset(tx_buf, 0, sizeof(*tx_buf)); tx_buf->data = (void *)MTK_DMA_DUMMY_DESC; -@@ -1608,7 +1608,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1447,7 +1447,7 @@ static int mtk_tx_map(struct sk_buff *sk } else { int next_idx; @@ -80,7 +86,7 @@ Signed-off-by: Lorenzo Bianconi ring->dma_size); mtk_w32(eth, next_idx, MT7628_TX_CTX_IDX0); } -@@ -1617,7 +1617,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1456,7 +1456,7 @@ static int mtk_tx_map(struct sk_buff *sk err_dma: do { @@ -89,7 +95,7 @@ Signed-off-by: Lorenzo Bianconi /* unmap dma */ mtk_tx_unmap(eth, tx_buf, false); -@@ -1642,7 +1642,7 @@ static int mtk_cal_txd_req(struct mtk_et +@@ -1481,7 +1481,7 @@ static int mtk_cal_txd_req(struct mtk_et for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { frag = &skb_shinfo(skb)->frags[i]; nfrags += DIV_ROUND_UP(skb_frag_size(frag), @@ -98,7 +104,7 @@ Signed-off-by: Lorenzo Bianconi } } else { nfrags += skb_shinfo(skb)->nr_frags; -@@ -1783,7 +1783,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri +@@ -1588,7 +1588,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri ring = ð->rx_ring[i]; idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size); @@ -107,7 +113,7 @@ Signed-off-by: Lorenzo Bianconi if (rxd->rxd2 & RX_DMA_DONE) { ring->calc_idx_update = true; return ring; -@@ -1951,7 +1951,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1756,7 +1756,7 @@ static int mtk_xdp_submit_frame(struct m } htxd = txd; @@ -116,7 +122,7 @@ Signed-off-by: Lorenzo Bianconi memset(tx_buf, 0, sizeof(*tx_buf)); htx_buf = tx_buf; -@@ -1971,7 +1971,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1776,7 +1776,7 @@ static int mtk_xdp_submit_frame(struct m goto unmap; tx_buf = mtk_desc_to_tx_buf(ring, txd, @@ -125,7 +131,7 @@ Signed-off-by: Lorenzo Bianconi memset(tx_buf, 0, sizeof(*tx_buf)); n_desc++; } -@@ -2008,7 +2008,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1813,7 +1813,7 @@ static int mtk_xdp_submit_frame(struct m } else { int idx; @@ -134,7 +140,7 @@ Signed-off-by: Lorenzo Bianconi mtk_w32(eth, NEXT_DESP_IDX(idx, ring->dma_size), MT7628_TX_CTX_IDX0); } -@@ -2020,7 +2020,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1825,7 +1825,7 @@ static int mtk_xdp_submit_frame(struct m unmap: while (htxd != txd) { txd_pdma = qdma_to_pdma(ring, htxd); @@ -143,7 +149,7 @@ Signed-off-by: Lorenzo Bianconi mtk_tx_unmap(eth, tx_buf, false); htxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU; -@@ -2148,7 +2148,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1953,7 +1953,7 @@ static int mtk_poll_rx(struct napi_struc goto rx_done; idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size); @@ -152,7 +158,7 @@ Signed-off-by: Lorenzo Bianconi data = ring->data[idx]; if (!mtk_rx_get_desc(eth, &trxd, rxd)) -@@ -2283,7 +2283,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2088,7 +2088,7 @@ static int mtk_poll_rx(struct napi_struc rxdcsum = &trxd.rxd4; } @@ -161,7 +167,7 @@ Signed-off-by: Lorenzo Bianconi skb->ip_summed = CHECKSUM_UNNECESSARY; else skb_checksum_none_assert(skb); -@@ -2404,7 +2404,7 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2209,7 +2209,7 @@ static int mtk_poll_tx_qdma(struct mtk_e break; tx_buf = mtk_desc_to_tx_buf(ring, desc, @@ -170,7 +176,7 @@ Signed-off-by: Lorenzo Bianconi if (!tx_buf->data) break; -@@ -2452,7 +2452,7 @@ static int mtk_poll_tx_pdma(struct mtk_e +@@ -2257,7 +2257,7 @@ static int mtk_poll_tx_pdma(struct mtk_e } mtk_tx_unmap(eth, tx_buf, true); @@ -179,7 +185,7 @@ Signed-off-by: Lorenzo Bianconi ring->last_free = desc; atomic_inc(&ring->free_count); -@@ -2541,7 +2541,7 @@ static int mtk_napi_rx(struct napi_struc +@@ -2346,7 +2346,7 @@ static int mtk_napi_rx(struct napi_struc do { int rx_done; @@ -188,7 +194,7 @@ Signed-off-by: Lorenzo Bianconi reg_map->pdma.irq_status); rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth); rx_done_total += rx_done; -@@ -2557,10 +2557,10 @@ static int mtk_napi_rx(struct napi_struc +@@ -2362,10 +2362,10 @@ static int mtk_napi_rx(struct napi_struc return budget; } while (mtk_r32(eth, reg_map->pdma.irq_status) & @@ -201,7 +207,7 @@ Signed-off-by: Lorenzo Bianconi return rx_done_total; } -@@ -2569,7 +2569,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2374,7 +2374,7 @@ static int mtk_tx_alloc(struct mtk_eth * { const struct mtk_soc_data *soc = eth->soc; struct mtk_tx_ring *ring = ð->tx_ring; @@ -210,7 +216,7 @@ Signed-off-by: Lorenzo Bianconi struct mtk_tx_dma_v2 *txd; int ring_size; u32 ofs, val; -@@ -2692,14 +2692,14 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2497,14 +2497,14 @@ static void mtk_tx_clean(struct mtk_eth } if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && ring->dma) { dma_free_coherent(eth->dma_dev, @@ -227,7 +233,7 @@ Signed-off-by: Lorenzo Bianconi ring->dma_pdma, ring->phys_pdma); ring->dma_pdma = NULL; } -@@ -2754,15 +2754,15 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2559,15 +2559,15 @@ static int mtk_rx_alloc(struct mtk_eth * if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SRAM) || rx_flag != MTK_RX_FLAGS_NORMAL) { ring->dma = dma_alloc_coherent(eth->dma_dev, @@ -247,7 +253,7 @@ Signed-off-by: Lorenzo Bianconi } if (!ring->dma) -@@ -2773,7 +2773,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2578,7 +2578,7 @@ static int mtk_rx_alloc(struct mtk_eth * dma_addr_t dma_addr; void *data; @@ -256,7 +262,7 @@ Signed-off-by: Lorenzo Bianconi if (ring->page_pool) { data = mtk_page_pool_get_buff(ring->page_pool, &dma_addr, GFP_KERNEL); -@@ -2862,7 +2862,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2667,7 +2667,7 @@ static void mtk_rx_clean(struct mtk_eth if (!ring->data[i]) continue; @@ -265,7 +271,7 @@ Signed-off-by: Lorenzo Bianconi if (!rxd->rxd1) continue; -@@ -2879,7 +2879,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2684,7 +2684,7 @@ static void mtk_rx_clean(struct mtk_eth if (!in_sram && ring->dma) { dma_free_coherent(eth->dma_dev, @@ -274,7 +280,7 @@ Signed-off-by: Lorenzo Bianconi ring->dma, ring->phys); ring->dma = NULL; } -@@ -3242,7 +3242,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -3047,7 +3047,7 @@ static void mtk_dma_free(struct mtk_eth netdev_reset_queue(eth->netdev[i]); if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) { dma_free_coherent(eth->dma_dev, @@ -283,16 +289,16 @@ Signed-off-by: Lorenzo Bianconi eth->scratch_ring, eth->phy_scratch_ring); eth->scratch_ring = NULL; eth->phy_scratch_ring = 0; -@@ -3292,7 +3292,7 @@ static irqreturn_t mtk_handle_irq_rx(int - +@@ -3098,7 +3098,7 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { + __napi_schedule(ð->rx_napi); - mtk_rx_irq_disable(eth, eth->soc->txrx.rx_irq_done_mask); + mtk_rx_irq_disable(eth, eth->soc->rx.irq_done_mask); - __napi_schedule(ð->rx_napi); } -@@ -3318,9 +3318,9 @@ static irqreturn_t mtk_handle_irq(int ir + return IRQ_HANDLED; +@@ -3123,9 +3123,9 @@ static irqreturn_t mtk_handle_irq(int ir const struct mtk_reg_map *reg_map = eth->soc->reg_map; if (mtk_r32(eth, reg_map->pdma.irq_mask) & @@ -304,7 +310,7 @@ Signed-off-by: Lorenzo Bianconi mtk_handle_irq_rx(irq, _eth); } if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) { -@@ -3338,10 +3338,10 @@ static void mtk_poll_controller(struct n +@@ -3143,10 +3143,10 @@ static void mtk_poll_controller(struct n struct mtk_eth *eth = mac->hw; mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); @@ -317,7 +323,7 @@ Signed-off-by: Lorenzo Bianconi } #endif -@@ -3506,7 +3506,7 @@ static int mtk_open(struct net_device *d +@@ -3308,7 +3308,7 @@ static int mtk_open(struct net_device *d napi_enable(ð->tx_napi); napi_enable(ð->rx_napi); mtk_tx_irq_enable(eth, MTK_TX_DONE_INT); @@ -326,7 +332,7 @@ Signed-off-by: Lorenzo Bianconi refcount_set(ð->dma_refcnt, 1); } else -@@ -3589,7 +3589,7 @@ static int mtk_stop(struct net_device *d +@@ -3391,7 +3391,7 @@ static int mtk_stop(struct net_device *d mtk_gdm_config(eth, MTK_GDMA_DROP_ALL); mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); @@ -335,7 +341,7 @@ Signed-off-by: Lorenzo Bianconi napi_disable(ð->tx_napi); napi_disable(ð->rx_napi); -@@ -4065,9 +4065,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3867,9 +3867,9 @@ static int mtk_hw_init(struct mtk_eth *e /* FE int grouping */ mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp); @@ -347,7 +353,7 @@ Signed-off-by: Lorenzo Bianconi mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); if (mtk_is_netsys_v3_or_greater(eth)) { -@@ -5167,11 +5167,15 @@ static const struct mtk_soc_data mt2701_ +@@ -4944,11 +4944,15 @@ static const struct mtk_soc_data mt2701_ .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, .version = 1, @@ -368,7 +374,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5187,11 +5191,15 @@ static const struct mtk_soc_data mt7621_ +@@ -4964,11 +4968,15 @@ static const struct mtk_soc_data mt7621_ .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, @@ -389,7 +395,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5209,11 +5217,15 @@ static const struct mtk_soc_data mt7622_ +@@ -4986,11 +4994,15 @@ static const struct mtk_soc_data mt7622_ .hash_offset = 2, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, @@ -410,7 +416,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5230,11 +5242,15 @@ static const struct mtk_soc_data mt7623_ +@@ -5007,11 +5019,15 @@ static const struct mtk_soc_data mt7623_ .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .disable_pll_modes = true, @@ -431,7 +437,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5249,11 +5265,15 @@ static const struct mtk_soc_data mt7629_ +@@ -5026,11 +5042,15 @@ static const struct mtk_soc_data mt7629_ .required_pctl = false, .has_accounting = true, .version = 1, @@ -452,7 +458,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5271,11 +5291,15 @@ static const struct mtk_soc_data mt7981_ +@@ -5048,11 +5068,15 @@ static const struct mtk_soc_data mt7981_ .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, @@ -473,7 +479,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, }, -@@ -5293,11 +5317,15 @@ static const struct mtk_soc_data mt7986_ +@@ -5070,11 +5094,15 @@ static const struct mtk_soc_data mt7986_ .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, @@ -494,7 +500,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, }, -@@ -5315,11 +5343,15 @@ static const struct mtk_soc_data mt7988_ +@@ -5092,11 +5120,15 @@ static const struct mtk_soc_data mt7988_ .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V3_SIZE, @@ -515,7 +521,7 @@ Signed-off-by: Lorenzo Bianconi .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, }, -@@ -5332,11 +5364,15 @@ static const struct mtk_soc_data rt5350_ +@@ -5109,11 +5141,15 @@ static const struct mtk_soc_data rt5350_ .required_clks = MT7628_CLKS_BITMAP, .required_pctl = false, .version = 1, @@ -538,7 +544,7 @@ Signed-off-by: Lorenzo Bianconi }, --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -326,8 +326,8 @@ +@@ -327,8 +327,8 @@ /* QDMA descriptor txd3 */ #define TX_DMA_OWNER_CPU BIT(31) #define TX_DMA_LS0 BIT(30) @@ -549,7 +555,7 @@ Signed-off-by: Lorenzo Bianconi #define TX_DMA_SWC BIT(14) #define TX_DMA_PQID GENMASK(3, 0) #define TX_DMA_ADDR64_MASK GENMASK(3, 0) -@@ -347,8 +347,8 @@ +@@ -348,8 +348,8 @@ /* QDMA descriptor rxd2 */ #define RX_DMA_DONE BIT(31) #define RX_DMA_LSO BIT(30) @@ -560,7 +566,7 @@ Signed-off-by: Lorenzo Bianconi #define RX_DMA_VTAG BIT(15) #define RX_DMA_ADDR64_MASK GENMASK(3, 0) #if IS_ENABLED(CONFIG_64BIT) -@@ -1279,10 +1279,9 @@ struct mtk_reg_map { +@@ -1150,10 +1150,9 @@ struct mtk_reg_map { * @foe_entry_size Foe table entry size. * @has_accounting Bool indicating support for accounting of * offloaded flows. @@ -574,7 +580,7 @@ Signed-off-by: Lorenzo Bianconi * @dma_max_len Max DMA tx/rx buffer length. * @dma_len_offset Tx/Rx DMA length field offset. */ -@@ -1300,13 +1299,17 @@ struct mtk_soc_data { +@@ -1171,13 +1170,17 @@ struct mtk_soc_data { bool has_accounting; bool disable_pll_modes; struct { diff --git a/target/linux/mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch b/target/linux/generic/backport-5.15/751-00b-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch similarity index 73% rename from target/linux/mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch rename to target/linux/generic/backport-5.15/751-00b-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch index b93aa99f2d..7f27848c6e 100644 --- a/target/linux/mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch +++ b/target/linux/generic/backport-5.15/751-00b-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch @@ -1,16 +1,21 @@ +From 4d572e867bdb372bb4add39a0fa495c6a9c9a8da Mon Sep 17 00:00:00 2001 From: Daniel Golle -Date: Tue, 10 Oct 2023 21:06:43 +0200 -Subject: [PATCH net-next 2/2] net: ethernet: mediatek: use QDMA instead of - ADMAv2 on MT7981 and MT7986 +Date: Wed, 8 May 2024 11:43:56 +0100 +Subject: [PATCH] net: ethernet: mediatek: use ADMAv1 instead of ADMAv2.0 on + MT7981 and MT7986 -ADMA is plagued by RX hangs which can't easily detected and happen upon -receival of a corrupted package. -Use QDMA just like on netsys v1 which is also still present and usable, and -doesn't suffer from that problem. +ADMAv2.0 is plagued by RX hangs which can't easily detected and happen upon +receival of a corrupted Ethernet frame. +Use ADMAv1 instead which is also still present and usable, and doesn't +suffer from that problem. + +Fixes: 197c9e9b17b1 ("net: ethernet: mtk_eth_soc: introduce support for mt7986 chipset") Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Golle +Link: https://lore.kernel.org/r/57cef74bbd0c243366ad1ff4221e3f72f437ec80.1715164770.git.daniel@makrotopia.org +Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 46 ++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) @@ -44,7 +49,7 @@ Signed-off-by: Daniel Golle }, .qdma = { .qtx_cfg = 0x4400, -@@ -1207,7 +1207,7 @@ static bool mtk_rx_get_desc(struct mtk_e +@@ -1046,7 +1046,7 @@ static bool mtk_rx_get_desc(struct mtk_e rxd->rxd1 = READ_ONCE(dma_rxd->rxd1); rxd->rxd3 = READ_ONCE(dma_rxd->rxd3); rxd->rxd4 = READ_ONCE(dma_rxd->rxd4); @@ -53,7 +58,7 @@ Signed-off-by: Daniel Golle rxd->rxd5 = READ_ONCE(dma_rxd->rxd5); rxd->rxd6 = READ_ONCE(dma_rxd->rxd6); } -@@ -2155,7 +2155,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1960,7 +1960,7 @@ static int mtk_poll_rx(struct napi_struc break; /* find out which mac the packet come from. values start at 1 */ @@ -62,7 +67,7 @@ Signed-off-by: Daniel Golle u32 val = RX_DMA_GET_SPORT_V2(trxd.rxd5); switch (val) { -@@ -2267,7 +2267,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2072,7 +2072,7 @@ static int mtk_poll_rx(struct napi_struc skb->dev = netdev; bytes += skb->len; @@ -71,7 +76,7 @@ Signed-off-by: Daniel Golle reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5); hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY; if (hash != MTK_RXD5_FOE_ENTRY) -@@ -2808,7 +2808,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2613,7 +2613,7 @@ static int mtk_rx_alloc(struct mtk_eth * rxd->rxd3 = 0; rxd->rxd4 = 0; @@ -80,7 +85,7 @@ Signed-off-by: Daniel Golle rxd->rxd5 = 0; rxd->rxd6 = 0; rxd->rxd7 = 0; -@@ -4011,7 +4011,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3813,7 +3813,7 @@ static int mtk_hw_init(struct mtk_eth *e else mtk_hw_reset(eth); @@ -89,7 +94,7 @@ Signed-off-by: Daniel Golle /* Set FE to PDMAv2 if necessary */ val = mtk_r32(eth, MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); -@@ -5297,11 +5297,11 @@ static const struct mtk_soc_data mt7981_ +@@ -5074,11 +5074,11 @@ static const struct mtk_soc_data mt7981_ .dma_len_offset = 8, }, .rx = { @@ -105,7 +110,7 @@ Signed-off-by: Daniel Golle }, }; -@@ -5323,11 +5323,11 @@ static const struct mtk_soc_data mt7986_ +@@ -5100,11 +5100,11 @@ static const struct mtk_soc_data mt7986_ .dma_len_offset = 8, }, .rx = { diff --git a/target/linux/generic/backport-5.15/751-01-v6.4-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch b/target/linux/generic/backport-5.15/751-01-v6.4-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch index 0182526e10..cf4646dc48 100644 --- a/target/linux/generic/backport-5.15/751-01-v6.4-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch +++ b/target/linux/generic/backport-5.15/751-01-v6.4-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -1432,6 +1432,9 @@ int mtk_gmac_rgmii_path_setup(struct mtk +@@ -1435,6 +1435,9 @@ int mtk_gmac_rgmii_path_setup(struct mtk int mtk_eth_offload_init(struct mtk_eth *eth); int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data); diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index 0580cf1a84..bb3975f7d5 100644 --- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { - __napi_schedule(ð->rx_napi); - mtk_rx_irq_disable(eth, eth->soc->txrx.rx_irq_done_mask); + mtk_rx_irq_disable(eth, eth->soc->rx.irq_done_mask); + __napi_schedule(ð->rx_napi); } diff --git a/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch index 1d84ea9ced..decf647bce 100644 --- a/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch +++ b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -1323,6 +1323,22 @@ struct mtk_mac { +@@ -1326,6 +1326,22 @@ struct mtk_mac { /* the struct describing the SoC. these are declared in the soc_xyz.c files */ extern const struct of_device_id of_mtk_match[]; @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau static inline bool mtk_is_netsys_v1(struct mtk_eth *eth) { return eth->soc->version == 1; -@@ -1337,6 +1353,7 @@ static inline bool mtk_is_netsys_v3_or_g +@@ -1340,6 +1356,7 @@ static inline bool mtk_is_netsys_v3_or_g { return eth->soc->version > 2; } diff --git a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch index fba50f0e06..53c98ccc77 100644 --- a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch +++ b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch @@ -766,7 +766,7 @@ Signed-off-by: Daniel Golle struct mtk_tx_dma_desc_info { dma_addr_t addr; -@@ -1184,6 +1311,24 @@ struct mtk_soc_data { +@@ -1187,6 +1314,24 @@ struct mtk_soc_data { /* currently no SoC has more than 3 macs */ #define MTK_MAX_DEVS 3 @@ -791,7 +791,7 @@ Signed-off-by: Daniel Golle /* struct mtk_eth - This is the main datasructure for holding the state * of the driver * @dev: The device pointer -@@ -1204,6 +1349,12 @@ struct mtk_soc_data { +@@ -1207,6 +1352,12 @@ struct mtk_soc_data { * @infra: The register map pointing at the range used to setup * SGMII and GePHY path * @sgmii_pcs: Pointers to mtk-pcs-lynxi phylink_pcs instances @@ -804,7 +804,7 @@ Signed-off-by: Daniel Golle * @pctl: The register map pointing at the range used to setup * GMAC port drive/slew values * @dma_refcnt: track how many netdevs are using the DMA engine -@@ -1247,6 +1398,10 @@ struct mtk_eth { +@@ -1250,6 +1401,10 @@ struct mtk_eth { struct regmap *ethsys; struct regmap *infra; struct phylink_pcs *sgmii_pcs[MTK_MAX_DEVS]; @@ -815,7 +815,7 @@ Signed-off-by: Daniel Golle struct regmap *pctl; bool hwlro; refcount_t dma_refcnt; -@@ -1434,6 +1589,19 @@ static inline u32 mtk_get_ib2_multicast_ +@@ -1437,6 +1592,19 @@ static inline u32 mtk_get_ib2_multicast_ return MTK_FOE_IB2_MULTICAST; } @@ -835,7 +835,7 @@ Signed-off-by: Daniel Golle /* read the hardware status register */ void mtk_stats_update_mac(struct mtk_mac *mac); -@@ -1442,8 +1610,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne +@@ -1445,8 +1613,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg); int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id); @@ -846,7 +846,7 @@ Signed-off-by: Daniel Golle int mtk_eth_offload_init(struct mtk_eth *eth); int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type, -@@ -1453,5 +1623,63 @@ int mtk_flow_offload_cmd(struct mtk_eth +@@ -1456,5 +1626,63 @@ int mtk_flow_offload_cmd(struct mtk_eth void mtk_flow_offload_cleanup(struct mtk_eth *eth, struct list_head *list); void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev); From e4d4715929b4557d786041f6a04f14a75979dbe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 10 Jul 2024 00:29:06 +0200 Subject: [PATCH 51/65] kernel: backport mtd_wed/mtk_eth_soc patch for devices with more than 4GB of dram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- ..._wed-add-support-for-devices-with-mo.patch | 91 +++++++++++++++++++ ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 6 +- ..._eth_soc-work-around-issue-with-send.patch | 6 +- ..._eth_soc-fix-remaining-throughput-re.patch | 2 +- ..._eth_soc-add-paths-and-SerDes-modes-.patch | 4 +- ..._eth_soc-set-coherent-mask-to-get-PP.patch | 2 +- ...tk_wed-move-dlm-a-dedicated-dts-node.patch | 4 +- 7 files changed, 103 insertions(+), 12 deletions(-) create mode 100644 target/linux/generic/backport-5.15/752-24-v6.8-net-ethernet-mtk_wed-add-support-for-devices-with-mo.patch diff --git a/target/linux/generic/backport-5.15/752-24-v6.8-net-ethernet-mtk_wed-add-support-for-devices-with-mo.patch b/target/linux/generic/backport-5.15/752-24-v6.8-net-ethernet-mtk_wed-add-support-for-devices-with-mo.patch new file mode 100644 index 0000000000..be885e7f16 --- /dev/null +++ b/target/linux/generic/backport-5.15/752-24-v6.8-net-ethernet-mtk_wed-add-support-for-devices-with-mo.patch @@ -0,0 +1,91 @@ +From 5f5997322584b6257543d4d103f81484b8006d84 Mon Sep 17 00:00:00 2001 +From: Lorenzo Bianconi +Date: Fri, 17 Nov 2023 17:42:59 +0100 +Subject: [PATCH 4/5] net: ethernet: mtk_wed: add support for devices with more + than 4GB of dram + +Introduce WED offloading support for boards with more than 4GB of +memory. + +Co-developed-by: Sujuan Chen +Signed-off-by: Sujuan Chen +Signed-off-by: Lorenzo Bianconi +Link: https://lore.kernel.org/r/1c7efdf5d384ea7af3c0209723e40b2ee0f956bf.1700239272.git.lorenzo@kernel.org +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++- + drivers/net/ethernet/mediatek/mtk_wed.c | 8 +++++--- + drivers/net/ethernet/mediatek/mtk_wed_wo.c | 3 ++- + 3 files changed, 11 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -1098,15 +1098,18 @@ static int mtk_init_fq_dma(struct mtk_et + phy_ring_tail = eth->phy_scratch_ring + soc->tx.desc_size * (cnt - 1); + + for (i = 0; i < cnt; i++) { ++ dma_addr_t addr = dma_addr + i * MTK_QDMA_PAGE_SIZE; + struct mtk_tx_dma_v2 *txd; + + txd = eth->scratch_ring + i * soc->tx.desc_size; +- txd->txd1 = dma_addr + i * MTK_QDMA_PAGE_SIZE; ++ txd->txd1 = addr; + if (i < cnt - 1) + txd->txd2 = eth->phy_scratch_ring + + (i + 1) * soc->tx.desc_size; + + txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); ++ if (MTK_HAS_CAPS(soc->caps, MTK_36BIT_DMA)) ++ txd->txd3 |= TX_DMA_PREP_ADDR64(addr); + txd->txd4 = 0; + if (mtk_is_netsys_v2_or_greater(eth)) { + txd->txd5 = 0; +--- a/drivers/net/ethernet/mediatek/mtk_wed.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed.c +@@ -690,10 +690,11 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d + + for (s = 0; s < MTK_WED_BUF_PER_PAGE; s++) { + struct mtk_wdma_desc *desc = desc_ptr; ++ u32 ctrl; + + desc->buf0 = cpu_to_le32(buf_phys); + if (!mtk_wed_is_v3_or_greater(dev->hw)) { +- u32 txd_size, ctrl; ++ u32 txd_size; + + txd_size = dev->wlan.init_buf(buf, buf_phys, + token++); +@@ -707,11 +708,11 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d + ctrl |= MTK_WDMA_DESC_CTRL_LAST_SEG0 | + FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1_V2, + MTK_WED_BUF_SIZE - txd_size); +- desc->ctrl = cpu_to_le32(ctrl); + desc->info = 0; + } else { +- desc->ctrl = cpu_to_le32(token << 16); ++ ctrl = token << 16 | TX_DMA_PREP_ADDR64(buf_phys); + } ++ desc->ctrl = cpu_to_le32(ctrl); + + desc_ptr += desc_size; + buf += MTK_WED_BUF_SIZE; +@@ -810,6 +811,7 @@ mtk_wed_hwrro_buffer_alloc(struct mtk_we + buf_phys = page_phys; + for (s = 0; s < MTK_WED_RX_BUF_PER_PAGE; s++) { + desc->buf0 = cpu_to_le32(buf_phys); ++ desc->token = cpu_to_le32(RX_DMA_PREP_ADDR64(buf_phys)); + buf_phys += MTK_WED_PAGE_BUF_SIZE; + desc++; + } +--- a/drivers/net/ethernet/mediatek/mtk_wed_wo.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.c +@@ -143,7 +143,8 @@ mtk_wed_wo_queue_refill(struct mtk_wed_w + dma_addr_t addr; + void *buf; + +- buf = page_frag_alloc(&q->cache, q->buf_size, GFP_ATOMIC); ++ buf = page_frag_alloc(&q->cache, q->buf_size, ++ GFP_ATOMIC | GFP_DMA32); + if (!buf) + break; + diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index bb3975f7d5..32a7675eae 100644 --- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3098,8 +3098,8 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -3101,8 +3101,8 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -3111,8 +3111,8 @@ static irqreturn_t mtk_handle_irq_tx(int +@@ -3114,8 +3114,8 @@ static irqreturn_t mtk_handle_irq_tx(int eth->tx_events++; if (likely(napi_schedule_prep(ð->tx_napi))) { @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -4886,6 +4886,8 @@ static int mtk_probe(struct platform_dev +@@ -4889,6 +4889,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch index 56edb63234..02166f6c82 100644 --- a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch +++ b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1516,12 +1516,28 @@ static void mtk_wake_queue(struct mtk_et +@@ -1519,12 +1519,28 @@ static void mtk_wake_queue(struct mtk_et } } @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau bool gso = false; int tx_num; -@@ -1543,6 +1559,18 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1546,6 +1562,18 @@ static netdev_tx_t mtk_start_xmit(struct return NETDEV_TX_BUSY; } @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau /* TSO: fill MSS info in tcp checksum field */ if (skb_is_gso(skb)) { if (skb_cow_head(skb, 0)) { -@@ -1558,8 +1586,14 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1561,8 +1589,14 @@ static netdev_tx_t mtk_start_xmit(struct } } diff --git a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch index 2de28b11dd..a1a42bfa8d 100644 --- a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch +++ b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau switch (speed) { case SPEED_2500: case SPEED_1000: -@@ -3291,6 +3292,9 @@ found: +@@ -3294,6 +3295,9 @@ found: if (dp->index >= MTK_QDMA_NUM_QUEUES) return NOTIFY_DONE; diff --git a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch index 53c98ccc77..8ba0d86e1b 100644 --- a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch +++ b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch @@ -479,7 +479,7 @@ Signed-off-by: Daniel Golle static const struct phylink_mac_ops mtk_phylink_ops = { .validate = phylink_generic_validate, .mac_select_pcs = mtk_mac_select_pcs, -@@ -4561,8 +4676,21 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4564,8 +4679,21 @@ static int mtk_add_mac(struct mtk_eth *e phy_interface_zero(mac->phylink_config.supported_interfaces); __set_bit(PHY_INTERFACE_MODE_INTERNAL, mac->phylink_config.supported_interfaces); @@ -501,7 +501,7 @@ Signed-off-by: Daniel Golle phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(mac->of_node), phy_mode, &mtk_phylink_ops); -@@ -4755,6 +4883,13 @@ static int mtk_probe(struct platform_dev +@@ -4758,6 +4886,13 @@ static int mtk_probe(struct platform_dev if (err) return err; diff --git a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch index cb67dd5973..69e85c987c 100644 --- a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch +++ b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch @@ -32,7 +32,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4831,7 +4831,10 @@ static int mtk_probe(struct platform_dev +@@ -4834,7 +4834,10 @@ static int mtk_probe(struct platform_dev } if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA)) { diff --git a/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch b/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch index c92fcd43ce..abb6591b7d 100644 --- a/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch +++ b/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch @@ -22,7 +22,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -1320,6 +1320,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device +@@ -1322,6 +1322,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device struct device_node *np; int index; @@ -47,7 +47,7 @@ Signed-off-by: Lorenzo Bianconi index = of_property_match_string(dev->hw->node, "memory-region-names", "wo-dlm"); if (index < 0) -@@ -1336,6 +1354,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device +@@ -1338,6 +1356,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device return -ENODEV; dev->rro.miod_phys = rmem->base; From 93ce299d67231c6e744cdb18f2fe7407bd00242e Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 16 Jun 2024 13:20:37 +0100 Subject: [PATCH 52/65] generic: 6.6: backport upstream commits for mtk_eth_soc Backport commit for mtk_eth_soc: * net: ethernet: mtk_eth_soc: handle dma buffer size soc specific (torvalds/linux@c57e558194430d10d5e5f4acd8a8655b68dade13) Refresh pending patches which require that. Signed-off-by: Daniel Golle (cherry picked from commit 98ddfbc56a7ffd5afef7776244998030675faa24) --- ..._eth_soc-handle-dma-buffer-size-soc-.patch | 364 ++++++++++++++++++ ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 6 +- ..._eth_soc-compile-out-netsys-v2-code-.patch | 4 +- ..._eth_soc-work-around-issue-with-send.patch | 8 +- ...rnet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch | 2 +- ..._eth_soc-fix-remaining-throughput-re.patch | 2 +- ..._eth_soc-add-paths-and-SerDes-modes-.patch | 42 +- ..._eth_soc-set-coherent-mask-to-get-PP.patch | 2 +- ..._eth_soc-implement-Clause-45-MDIO-ac.patch | 2 +- 9 files changed, 398 insertions(+), 34 deletions(-) create mode 100644 target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch diff --git a/target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch b/target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch new file mode 100644 index 0000000000..7a98ad5999 --- /dev/null +++ b/target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch @@ -0,0 +1,364 @@ +From c57e558194430d10d5e5f4acd8a8655b68dade13 Mon Sep 17 00:00:00 2001 +From: Frank Wunderlich +Date: Mon, 3 Jun 2024 21:25:05 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: handle dma buffer size soc + specific + +The mainline MTK ethernet driver suffers long time from rarly but +annoying tx queue timeouts. We think that this is caused by fixed +dma sizes hardcoded for all SoCs. + +We suspect this problem arises from a low level of free TX DMADs, +the TX Ring alomost full. + +The transmit timeout is caused by the Tx queue not waking up. The +Tx queue stops when the free counter is less than ring->thres, and +it will wake up once the free counter is greater than ring->thres. +If the CPU is too late to wake up the Tx queues, it may cause a +transmit timeout. +Therefore, we increased the TX and RX DMADs to improve this error +situation. + +Use the dma-size implementation from SDK in a per SoC manner. In +difference to SDK we have no RSS feature yet, so all RX/TX sizes +should be raised from 512 to 2048 byte except fqdma on mt7988 to +avoid the tx timeout issue. + +Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet") +Suggested-by: Daniel Golle +Signed-off-by: Frank Wunderlich +Reviewed-by: Jacob Keller +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 104 +++++++++++++------- + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 9 +- + 2 files changed, 77 insertions(+), 36 deletions(-) + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -1071,9 +1071,9 @@ static int mtk_init_fq_dma(struct mtk_et + { + const struct mtk_soc_data *soc = eth->soc; + dma_addr_t phy_ring_tail; +- int cnt = MTK_QDMA_RING_SIZE; ++ int cnt = soc->tx.fq_dma_size; + dma_addr_t dma_addr; +- int i; ++ int i, j, len; + + if (MTK_HAS_CAPS(eth->soc->caps, MTK_SRAM)) + eth->scratch_ring = eth->sram_base; +@@ -1082,40 +1082,46 @@ static int mtk_init_fq_dma(struct mtk_et + cnt * soc->tx.desc_size, + ð->phy_scratch_ring, + GFP_KERNEL); ++ + if (unlikely(!eth->scratch_ring)) + return -ENOMEM; + +- eth->scratch_head = kcalloc(cnt, MTK_QDMA_PAGE_SIZE, GFP_KERNEL); +- if (unlikely(!eth->scratch_head)) +- return -ENOMEM; ++ phy_ring_tail = eth->phy_scratch_ring + soc->tx.desc_size * (cnt - 1); + +- dma_addr = dma_map_single(eth->dma_dev, +- eth->scratch_head, cnt * MTK_QDMA_PAGE_SIZE, +- DMA_FROM_DEVICE); +- if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr))) +- return -ENOMEM; ++ for (j = 0; j < DIV_ROUND_UP(soc->tx.fq_dma_size, MTK_FQ_DMA_LENGTH); j++) { ++ len = min_t(int, cnt - j * MTK_FQ_DMA_LENGTH, MTK_FQ_DMA_LENGTH); ++ eth->scratch_head[j] = kcalloc(len, MTK_QDMA_PAGE_SIZE, GFP_KERNEL); + +- phy_ring_tail = eth->phy_scratch_ring + soc->tx.desc_size * (cnt - 1); ++ if (unlikely(!eth->scratch_head[j])) ++ return -ENOMEM; + +- for (i = 0; i < cnt; i++) { +- dma_addr_t addr = dma_addr + i * MTK_QDMA_PAGE_SIZE; +- struct mtk_tx_dma_v2 *txd; +- +- txd = eth->scratch_ring + i * soc->tx.desc_size; +- txd->txd1 = addr; +- if (i < cnt - 1) +- txd->txd2 = eth->phy_scratch_ring + +- (i + 1) * soc->tx.desc_size; +- +- txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); +- if (MTK_HAS_CAPS(soc->caps, MTK_36BIT_DMA)) +- txd->txd3 |= TX_DMA_PREP_ADDR64(addr); +- txd->txd4 = 0; +- if (mtk_is_netsys_v2_or_greater(eth)) { +- txd->txd5 = 0; +- txd->txd6 = 0; +- txd->txd7 = 0; +- txd->txd8 = 0; ++ dma_addr = dma_map_single(eth->dma_dev, ++ eth->scratch_head[j], len * MTK_QDMA_PAGE_SIZE, ++ DMA_FROM_DEVICE); ++ ++ if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr))) ++ return -ENOMEM; ++ ++ for (i = 0; i < cnt; i++) { ++ struct mtk_tx_dma_v2 *txd; ++ ++ txd = eth->scratch_ring + (j * MTK_FQ_DMA_LENGTH + i) * soc->tx.desc_size; ++ txd->txd1 = dma_addr + i * MTK_QDMA_PAGE_SIZE; ++ if (j * MTK_FQ_DMA_LENGTH + i < cnt) ++ txd->txd2 = eth->phy_scratch_ring + ++ (j * MTK_FQ_DMA_LENGTH + i + 1) * soc->tx.desc_size; ++ ++ txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); ++ if (MTK_HAS_CAPS(soc->caps, MTK_36BIT_DMA)) ++ txd->txd3 |= TX_DMA_PREP_ADDR64(dma_addr + i * MTK_QDMA_PAGE_SIZE); ++ ++ txd->txd4 = 0; ++ if (mtk_is_netsys_v2_or_greater(eth)) { ++ txd->txd5 = 0; ++ txd->txd6 = 0; ++ txd->txd7 = 0; ++ txd->txd8 = 0; ++ } + } + } + +@@ -2386,7 +2392,7 @@ static int mtk_tx_alloc(struct mtk_eth * + if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) + ring_size = MTK_QDMA_RING_SIZE; + else +- ring_size = MTK_DMA_SIZE; ++ ring_size = soc->tx.dma_size; + + ring->buf = kcalloc(ring_size, sizeof(*ring->buf), + GFP_KERNEL); +@@ -2394,8 +2400,8 @@ static int mtk_tx_alloc(struct mtk_eth * + goto no_tx_mem; + + if (MTK_HAS_CAPS(soc->caps, MTK_SRAM)) { +- ring->dma = eth->sram_base + ring_size * sz; +- ring->phys = eth->phy_scratch_ring + ring_size * (dma_addr_t)sz; ++ ring->dma = eth->sram_base + soc->tx.fq_dma_size * sz; ++ ring->phys = eth->phy_scratch_ring + soc->tx.fq_dma_size * (dma_addr_t)sz; + } else { + ring->dma = dma_alloc_coherent(eth->dma_dev, ring_size * sz, + &ring->phys, GFP_KERNEL); +@@ -2517,6 +2523,7 @@ static void mtk_tx_clean(struct mtk_eth + static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag) + { + const struct mtk_reg_map *reg_map = eth->soc->reg_map; ++ const struct mtk_soc_data *soc = eth->soc; + struct mtk_rx_ring *ring; + int rx_data_len, rx_dma_size, tx_ring_size; + int i; +@@ -2524,7 +2531,7 @@ static int mtk_rx_alloc(struct mtk_eth * + if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) + tx_ring_size = MTK_QDMA_RING_SIZE; + else +- tx_ring_size = MTK_DMA_SIZE; ++ tx_ring_size = soc->tx.dma_size; + + if (rx_flag == MTK_RX_FLAGS_QDMA) { + if (ring_no) +@@ -2539,7 +2546,7 @@ static int mtk_rx_alloc(struct mtk_eth * + rx_dma_size = MTK_HW_LRO_DMA_SIZE; + } else { + rx_data_len = ETH_DATA_LEN; +- rx_dma_size = MTK_DMA_SIZE; ++ rx_dma_size = soc->rx.dma_size; + } + + ring->frag_size = mtk_max_frag_size(rx_data_len); +@@ -3066,7 +3073,10 @@ static void mtk_dma_free(struct mtk_eth + mtk_rx_clean(eth, ð->rx_ring[i], false); + } + +- kfree(eth->scratch_head); ++ for (i = 0; i < DIV_ROUND_UP(soc->tx.fq_dma_size, MTK_FQ_DMA_LENGTH); i++) { ++ kfree(eth->scratch_head[i]); ++ eth->scratch_head[i] = NULL; ++ } + } + + static bool mtk_hw_reset_check(struct mtk_eth *eth) +@@ -4952,11 +4962,14 @@ static const struct mtk_soc_data mt2701_ + .desc_size = sizeof(struct mtk_tx_dma), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), + .irq_done_mask = MTK_RX_DONE_INT, + .dma_l4_valid = RX_DMA_L4_VALID, ++ .dma_size = MTK_DMA_SIZE(2K), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, + }, +@@ -4976,11 +4989,14 @@ static const struct mtk_soc_data mt7621_ + .desc_size = sizeof(struct mtk_tx_dma), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), + .irq_done_mask = MTK_RX_DONE_INT, + .dma_l4_valid = RX_DMA_L4_VALID, ++ .dma_size = MTK_DMA_SIZE(2K), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, + }, +@@ -5002,11 +5018,14 @@ static const struct mtk_soc_data mt7622_ + .desc_size = sizeof(struct mtk_tx_dma), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), + .irq_done_mask = MTK_RX_DONE_INT, + .dma_l4_valid = RX_DMA_L4_VALID, ++ .dma_size = MTK_DMA_SIZE(2K), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, + }, +@@ -5027,11 +5046,14 @@ static const struct mtk_soc_data mt7623_ + .desc_size = sizeof(struct mtk_tx_dma), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), + .irq_done_mask = MTK_RX_DONE_INT, + .dma_l4_valid = RX_DMA_L4_VALID, ++ .dma_size = MTK_DMA_SIZE(2K), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, + }, +@@ -5050,11 +5072,14 @@ static const struct mtk_soc_data mt7629_ + .desc_size = sizeof(struct mtk_tx_dma), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), + .irq_done_mask = MTK_RX_DONE_INT, + .dma_l4_valid = RX_DMA_L4_VALID, ++ .dma_size = MTK_DMA_SIZE(2K), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, + }, +@@ -5076,6 +5101,8 @@ static const struct mtk_soc_data mt7981_ + .desc_size = sizeof(struct mtk_tx_dma_v2), + .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, + .dma_len_offset = 8, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), +@@ -5083,6 +5110,7 @@ static const struct mtk_soc_data mt7981_ + .dma_l4_valid = RX_DMA_L4_VALID_V2, + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), + }, + }; + +@@ -5102,6 +5130,8 @@ static const struct mtk_soc_data mt7986_ + .desc_size = sizeof(struct mtk_tx_dma_v2), + .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, + .dma_len_offset = 8, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), +@@ -5109,6 +5139,7 @@ static const struct mtk_soc_data mt7986_ + .dma_l4_valid = RX_DMA_L4_VALID_V2, + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), + }, + }; + +@@ -5128,6 +5159,8 @@ static const struct mtk_soc_data mt7988_ + .desc_size = sizeof(struct mtk_tx_dma_v2), + .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, + .dma_len_offset = 8, ++ .dma_size = MTK_DMA_SIZE(2K), ++ .fq_dma_size = MTK_DMA_SIZE(4K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma_v2), +@@ -5135,6 +5168,7 @@ static const struct mtk_soc_data mt7988_ + .dma_l4_valid = RX_DMA_L4_VALID_V2, + .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, + .dma_len_offset = 8, ++ .dma_size = MTK_DMA_SIZE(2K), + }, + }; + +@@ -5149,6 +5183,7 @@ static const struct mtk_soc_data rt5350_ + .desc_size = sizeof(struct mtk_tx_dma), + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), + }, + .rx = { + .desc_size = sizeof(struct mtk_rx_dma), +@@ -5156,6 +5191,7 @@ static const struct mtk_soc_data rt5350_ + .dma_l4_valid = RX_DMA_L4_VALID_PDMA, + .dma_max_len = MTK_TX_DMA_BUF_LEN, + .dma_len_offset = 16, ++ .dma_size = MTK_DMA_SIZE(2K), + }, + }; + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +@@ -32,7 +32,9 @@ + #define MTK_TX_DMA_BUF_LEN 0x3fff + #define MTK_TX_DMA_BUF_LEN_V2 0xffff + #define MTK_QDMA_RING_SIZE 2048 +-#define MTK_DMA_SIZE 512 ++#define MTK_DMA_SIZE(x) (SZ_##x) ++#define MTK_FQ_DMA_HEAD 32 ++#define MTK_FQ_DMA_LENGTH 2048 + #define MTK_RX_ETH_HLEN (VLAN_ETH_HLEN + ETH_FCS_LEN) + #define MTK_RX_HLEN (NET_SKB_PAD + MTK_RX_ETH_HLEN + NET_IP_ALIGN) + #define MTK_DMA_DUMMY_DESC 0xffffffff +@@ -1173,6 +1175,8 @@ struct mtk_soc_data { + u32 desc_size; + u32 dma_max_len; + u32 dma_len_offset; ++ u32 dma_size; ++ u32 fq_dma_size; + } tx; + struct { + u32 desc_size; +@@ -1180,6 +1184,7 @@ struct mtk_soc_data { + u32 dma_l4_valid; + u32 dma_max_len; + u32 dma_len_offset; ++ u32 dma_size; + } rx; + }; + +@@ -1261,7 +1266,7 @@ struct mtk_eth { + struct napi_struct rx_napi; + void *scratch_ring; + dma_addr_t phy_scratch_ring; +- void *scratch_head; ++ void *scratch_head[MTK_FQ_DMA_HEAD]; + struct clk *clks[MTK_CLK_MAX]; + + struct mii_bus *mii_bus; diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index 32a7675eae..cee9f8ad1e 100644 --- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3101,8 +3101,8 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -3111,8 +3111,8 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -3114,8 +3114,8 @@ static irqreturn_t mtk_handle_irq_tx(int +@@ -3124,8 +3124,8 @@ static irqreturn_t mtk_handle_irq_tx(int eth->tx_events++; if (likely(napi_schedule_prep(ð->tx_napi))) { @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -4889,6 +4889,8 @@ static int mtk_probe(struct platform_dev +@@ -4899,6 +4899,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch index decf647bce..7115b6e944 100644 --- a/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch +++ b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -1326,6 +1326,22 @@ struct mtk_mac { +@@ -1331,6 +1331,22 @@ struct mtk_mac { /* the struct describing the SoC. these are declared in the soc_xyz.c files */ extern const struct of_device_id of_mtk_match[]; @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau static inline bool mtk_is_netsys_v1(struct mtk_eth *eth) { return eth->soc->version == 1; -@@ -1340,6 +1356,7 @@ static inline bool mtk_is_netsys_v3_or_g +@@ -1345,6 +1361,7 @@ static inline bool mtk_is_netsys_v3_or_g { return eth->soc->version > 2; } diff --git a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch index 02166f6c82..f80fe10822 100644 --- a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch +++ b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1519,12 +1519,28 @@ static void mtk_wake_queue(struct mtk_et +@@ -1525,12 +1525,28 @@ static void mtk_wake_queue(struct mtk_et } } @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau bool gso = false; int tx_num; -@@ -1546,6 +1562,18 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1552,6 +1568,18 @@ static netdev_tx_t mtk_start_xmit(struct return NETDEV_TX_BUSY; } @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau /* TSO: fill MSS info in tcp checksum field */ if (skb_is_gso(skb)) { if (skb_cow_head(skb, 0)) { -@@ -1561,8 +1589,14 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1567,8 +1595,14 @@ static netdev_tx_t mtk_start_xmit(struct } } @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau netif_tx_stop_all_queues(dev); --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -268,7 +268,7 @@ +@@ -270,7 +270,7 @@ #define MTK_CHK_DDONE_EN BIT(28) #define MTK_DMAD_WR_WDONE BIT(26) #define MTK_WCOMP_EN BIT(24) diff --git a/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch b/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch index 11a81dd0bf..bd7a1b96f2 100644 --- a/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch +++ b/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -47,8 +47,7 @@ +@@ -49,8 +49,7 @@ #define MTK_HW_FEATURES (NETIF_F_IP_CSUM | \ NETIF_F_RXCSUM | \ NETIF_F_HW_VLAN_CTAG_TX | \ diff --git a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch index a1a42bfa8d..878c1cb9dc 100644 --- a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch +++ b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau switch (speed) { case SPEED_2500: case SPEED_1000: -@@ -3294,6 +3295,9 @@ found: +@@ -3304,6 +3305,9 @@ found: if (dp->index >= MTK_QDMA_NUM_QUEUES) return NOTIFY_DONE; diff --git a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch index 8ba0d86e1b..52648f08f0 100644 --- a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch +++ b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch @@ -479,7 +479,7 @@ Signed-off-by: Daniel Golle static const struct phylink_mac_ops mtk_phylink_ops = { .validate = phylink_generic_validate, .mac_select_pcs = mtk_mac_select_pcs, -@@ -4564,8 +4679,21 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4574,8 +4689,21 @@ static int mtk_add_mac(struct mtk_eth *e phy_interface_zero(mac->phylink_config.supported_interfaces); __set_bit(PHY_INTERFACE_MODE_INTERNAL, mac->phylink_config.supported_interfaces); @@ -501,7 +501,7 @@ Signed-off-by: Daniel Golle phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(mac->of_node), phy_mode, &mtk_phylink_ops); -@@ -4758,6 +4886,13 @@ static int mtk_probe(struct platform_dev +@@ -4768,6 +4896,13 @@ static int mtk_probe(struct platform_dev if (err) return err; @@ -517,7 +517,7 @@ Signed-off-by: Daniel Golle if (eth->soc->required_pctl) { --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -499,6 +499,21 @@ +@@ -501,6 +501,21 @@ #define INTF_MODE_RGMII_1000 (TRGMII_MODE | TRGMII_CENTRAL_ALIGNED) #define INTF_MODE_RGMII_10_100 0 @@ -539,7 +539,7 @@ Signed-off-by: Daniel Golle /* GPIO port control registers for GMAC 2*/ #define GPIO_OD33_CTRL8 0x4c0 #define GPIO_BIAS_CTRL 0xed0 -@@ -524,6 +539,7 @@ +@@ -526,6 +541,7 @@ #define SYSCFG0_SGMII_GMAC2 ((3 << 8) & SYSCFG0_SGMII_MASK) #define SYSCFG0_SGMII_GMAC1_V2 BIT(9) #define SYSCFG0_SGMII_GMAC2_V2 BIT(8) @@ -547,7 +547,7 @@ Signed-off-by: Daniel Golle /* ethernet subsystem clock register */ -@@ -556,12 +572,74 @@ +@@ -558,12 +574,74 @@ #define ETHSYS_DMA_AG_MAP_QDMA BIT(1) #define ETHSYS_DMA_AG_MAP_PPE BIT(2) @@ -622,7 +622,7 @@ Signed-off-by: Daniel Golle #define USB_PHY_SWITCH_REG 0x218 #define QPHY_SEL_MASK GENMASK(1, 0) #define SGMII_QPHY_SEL 0x2 -@@ -586,6 +664,8 @@ +@@ -588,6 +666,8 @@ #define MT7628_SDM_RBCNT (MT7628_SDM_OFFSET + 0x10c) #define MT7628_SDM_CS_ERR (MT7628_SDM_OFFSET + 0x110) @@ -631,7 +631,7 @@ Signed-off-by: Daniel Golle #define MTK_FE_CDM1_FSM 0x220 #define MTK_FE_CDM2_FSM 0x224 #define MTK_FE_CDM3_FSM 0x238 -@@ -594,6 +674,11 @@ +@@ -596,6 +676,11 @@ #define MTK_FE_CDM6_FSM 0x328 #define MTK_FE_GDM1_FSM 0x228 #define MTK_FE_GDM2_FSM 0x22C @@ -643,7 +643,7 @@ Signed-off-by: Daniel Golle #define MTK_MAC_FSM(x) (0x1010C + ((x) * 0x100)) -@@ -940,6 +1025,8 @@ enum mkt_eth_capabilities { +@@ -942,6 +1027,8 @@ enum mkt_eth_capabilities { MTK_RGMII_BIT = 0, MTK_TRGMII_BIT, MTK_SGMII_BIT, @@ -652,7 +652,7 @@ Signed-off-by: Daniel Golle MTK_ESW_BIT, MTK_GEPHY_BIT, MTK_MUX_BIT, -@@ -960,8 +1047,11 @@ enum mkt_eth_capabilities { +@@ -962,8 +1049,11 @@ enum mkt_eth_capabilities { MTK_ETH_MUX_GDM1_TO_GMAC1_ESW_BIT, MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY_BIT, MTK_ETH_MUX_U3_GMAC2_TO_QPHY_BIT, @@ -664,7 +664,7 @@ Signed-off-by: Daniel Golle /* PATH BITS */ MTK_ETH_PATH_GMAC1_RGMII_BIT, -@@ -969,14 +1059,21 @@ enum mkt_eth_capabilities { +@@ -971,14 +1061,21 @@ enum mkt_eth_capabilities { MTK_ETH_PATH_GMAC1_SGMII_BIT, MTK_ETH_PATH_GMAC2_RGMII_BIT, MTK_ETH_PATH_GMAC2_SGMII_BIT, @@ -686,7 +686,7 @@ Signed-off-by: Daniel Golle #define MTK_ESW BIT_ULL(MTK_ESW_BIT) #define MTK_GEPHY BIT_ULL(MTK_GEPHY_BIT) #define MTK_MUX BIT_ULL(MTK_MUX_BIT) -@@ -999,10 +1096,16 @@ enum mkt_eth_capabilities { +@@ -1001,10 +1098,16 @@ enum mkt_eth_capabilities { BIT_ULL(MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY_BIT) #define MTK_ETH_MUX_U3_GMAC2_TO_QPHY \ BIT_ULL(MTK_ETH_MUX_U3_GMAC2_TO_QPHY_BIT) @@ -703,7 +703,7 @@ Signed-off-by: Daniel Golle /* Supported path present on SoCs */ #define MTK_ETH_PATH_GMAC1_RGMII BIT_ULL(MTK_ETH_PATH_GMAC1_RGMII_BIT) -@@ -1010,8 +1113,13 @@ enum mkt_eth_capabilities { +@@ -1012,8 +1115,13 @@ enum mkt_eth_capabilities { #define MTK_ETH_PATH_GMAC1_SGMII BIT_ULL(MTK_ETH_PATH_GMAC1_SGMII_BIT) #define MTK_ETH_PATH_GMAC2_RGMII BIT_ULL(MTK_ETH_PATH_GMAC2_RGMII_BIT) #define MTK_ETH_PATH_GMAC2_SGMII BIT_ULL(MTK_ETH_PATH_GMAC2_SGMII_BIT) @@ -717,7 +717,7 @@ Signed-off-by: Daniel Golle #define MTK_GMAC1_RGMII (MTK_ETH_PATH_GMAC1_RGMII | MTK_RGMII) #define MTK_GMAC1_TRGMII (MTK_ETH_PATH_GMAC1_TRGMII | MTK_TRGMII) -@@ -1019,7 +1127,12 @@ enum mkt_eth_capabilities { +@@ -1021,7 +1129,12 @@ enum mkt_eth_capabilities { #define MTK_GMAC2_RGMII (MTK_ETH_PATH_GMAC2_RGMII | MTK_RGMII) #define MTK_GMAC2_SGMII (MTK_ETH_PATH_GMAC2_SGMII | MTK_SGMII) #define MTK_GMAC2_GEPHY (MTK_ETH_PATH_GMAC2_GEPHY | MTK_GEPHY) @@ -730,7 +730,7 @@ Signed-off-by: Daniel Golle /* MUXes present on SoCs */ /* 0: GDM1 -> GMAC1, 1: GDM1 -> ESW */ -@@ -1038,10 +1151,20 @@ enum mkt_eth_capabilities { +@@ -1040,10 +1153,20 @@ enum mkt_eth_capabilities { (MTK_ETH_MUX_GMAC1_GMAC2_TO_SGMII_RGMII | MTK_MUX | \ MTK_SHARED_SGMII) @@ -751,7 +751,7 @@ Signed-off-by: Daniel Golle #define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x)) #define MT7621_CAPS (MTK_GMAC1_RGMII | MTK_GMAC1_TRGMII | \ -@@ -1073,8 +1196,12 @@ enum mkt_eth_capabilities { +@@ -1075,8 +1198,12 @@ enum mkt_eth_capabilities { MTK_MUX_GMAC12_TO_GEPHY_SGMII | MTK_QDMA | \ MTK_RSTCTRL_PPE1 | MTK_SRAM) @@ -766,7 +766,7 @@ Signed-off-by: Daniel Golle struct mtk_tx_dma_desc_info { dma_addr_t addr; -@@ -1187,6 +1314,24 @@ struct mtk_soc_data { +@@ -1192,6 +1319,24 @@ struct mtk_soc_data { /* currently no SoC has more than 3 macs */ #define MTK_MAX_DEVS 3 @@ -791,7 +791,7 @@ Signed-off-by: Daniel Golle /* struct mtk_eth - This is the main datasructure for holding the state * of the driver * @dev: The device pointer -@@ -1207,6 +1352,12 @@ struct mtk_soc_data { +@@ -1212,6 +1357,12 @@ struct mtk_soc_data { * @infra: The register map pointing at the range used to setup * SGMII and GePHY path * @sgmii_pcs: Pointers to mtk-pcs-lynxi phylink_pcs instances @@ -804,7 +804,7 @@ Signed-off-by: Daniel Golle * @pctl: The register map pointing at the range used to setup * GMAC port drive/slew values * @dma_refcnt: track how many netdevs are using the DMA engine -@@ -1250,6 +1401,10 @@ struct mtk_eth { +@@ -1255,6 +1406,10 @@ struct mtk_eth { struct regmap *ethsys; struct regmap *infra; struct phylink_pcs *sgmii_pcs[MTK_MAX_DEVS]; @@ -815,7 +815,7 @@ Signed-off-by: Daniel Golle struct regmap *pctl; bool hwlro; refcount_t dma_refcnt; -@@ -1437,6 +1592,19 @@ static inline u32 mtk_get_ib2_multicast_ +@@ -1442,6 +1597,19 @@ static inline u32 mtk_get_ib2_multicast_ return MTK_FOE_IB2_MULTICAST; } @@ -835,7 +835,7 @@ Signed-off-by: Daniel Golle /* read the hardware status register */ void mtk_stats_update_mac(struct mtk_mac *mac); -@@ -1445,8 +1613,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne +@@ -1450,8 +1618,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg); int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id); @@ -846,7 +846,7 @@ Signed-off-by: Daniel Golle int mtk_eth_offload_init(struct mtk_eth *eth); int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type, -@@ -1456,5 +1626,63 @@ int mtk_flow_offload_cmd(struct mtk_eth +@@ -1461,5 +1631,63 @@ int mtk_flow_offload_cmd(struct mtk_eth void mtk_flow_offload_cleanup(struct mtk_eth *eth, struct list_head *list); void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev); diff --git a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch index 69e85c987c..9fda58c8ab 100644 --- a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch +++ b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch @@ -32,7 +32,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4834,7 +4834,10 @@ static int mtk_probe(struct platform_dev +@@ -4844,7 +4844,10 @@ static int mtk_probe(struct platform_dev } if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA)) { diff --git a/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch b/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch index 3f73277aa6..7cbf8f7235 100644 --- a/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch +++ b/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch @@ -113,7 +113,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -402,9 +402,12 @@ +@@ -404,9 +404,12 @@ #define PHY_IAC_ADDR_MASK GENMASK(24, 20) #define PHY_IAC_ADDR(x) FIELD_PREP(PHY_IAC_ADDR_MASK, (x)) #define PHY_IAC_CMD_MASK GENMASK(19, 18) From 8c46dd1295615de1a02b7b7c75c3271fa1b473fa Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 6 Jul 2024 04:02:31 +0100 Subject: [PATCH 53/65] generic: 5.15: mtk_eth_soc: import accepted patches Import patch accepted upstream. Initial import: - net: ethernet: mtk_ppe: Change PPE entries number to 16K Signed-off-by: Daniel Golle (cherry picked from commit 27b6838afacfcd79be52b2563b870ae7b3caf8f6) --- ...eth_soc-handle-dma-buffer-size-soc-.patch} | 0 ..._ppe-Change-PPE-entries-number-to-16.patch | 29 +++++++++++++++++++ 2 files changed, 29 insertions(+) rename target/linux/generic/backport-5.15/{754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch => 752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch} (100%) create mode 100644 target/linux/generic/backport-5.15/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch diff --git a/target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch b/target/linux/generic/backport-5.15/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch similarity index 100% rename from target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch rename to target/linux/generic/backport-5.15/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch diff --git a/target/linux/generic/backport-5.15/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch b/target/linux/generic/backport-5.15/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch new file mode 100644 index 0000000000..c6b332f370 --- /dev/null +++ b/target/linux/generic/backport-5.15/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch @@ -0,0 +1,29 @@ +From ca18300e00d584d5693127eb60c108b84883b8ac Mon Sep 17 00:00:00 2001 +From: Shengyu Qu +Date: Fri, 5 Jul 2024 01:26:26 +0800 +Subject: [PATCH] net: ethernet: mtk_ppe: Change PPE entries number to 16K + +MT7981,7986 and 7988 all supports 32768 PPE entries, and MT7621/MT7620 +supports 16384 PPE entries, but only set to 8192 entries in driver. So +incrase max entries to 16384 instead. + +Signed-off-by: Elad Yifee +Signed-off-by: Shengyu Qu +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/TY3P286MB261103F937DE4EEB0F88437D98DE2@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/mediatek/mtk_ppe.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_ppe.h ++++ b/drivers/net/ethernet/mediatek/mtk_ppe.h +@@ -8,7 +8,7 @@ + #include + #include + +-#define MTK_PPE_ENTRIES_SHIFT 3 ++#define MTK_PPE_ENTRIES_SHIFT 4 + #define MTK_PPE_ENTRIES (1024 << MTK_PPE_ENTRIES_SHIFT) + #define MTK_PPE_HASH_MASK (MTK_PPE_ENTRIES - 1) + #define MTK_PPE_WAIT_TIMEOUT_US 1000000 From 97e6cc4387fc31264b7a81c20af3856f8fa0abf2 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 4 Jul 2024 02:19:01 +0100 Subject: [PATCH 54/65] generic: 6.6: mtk_eth_soc: add support for flow-control settings Add patch implementing operations to get and set flow-control link parameters of mtk_eth_soc via ethtool. Signed-off-by: Daniel Golle (cherry picked from commit 4a2f712f85b5e29c5763e92a0cc47265580157a3) --- ..._eth_soc-implement-.-get-set-_pausep.patch | 55 +++++++++++++++++++ ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 2 +- ..._eth_soc-add-paths-and-SerDes-modes-.patch | 4 +- ..._eth_soc-set-coherent-mask-to-get-PP.patch | 2 +- 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 target/linux/generic/backport-5.15/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch diff --git a/target/linux/generic/backport-5.15/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch b/target/linux/generic/backport-5.15/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch new file mode 100644 index 0000000000..1045e4d5f8 --- /dev/null +++ b/target/linux/generic/backport-5.15/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch @@ -0,0 +1,55 @@ +From 064fbc4e9b5a6dbda7fe7b67dc7e9e95d31f8d75 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Thu, 4 Jul 2024 11:14:55 +0100 +Subject: [PATCH] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam + ethtool ops + +Implement operations to get and set flow-control link parameters. +Both is done by simply calling phylink_ethtool_{get,set}_pauseparam(). +Fix whitespace in mtk_ethtool_ops while at it. + +Signed-off-by: Daniel Golle +Reviewed-by: Michal Kubiak +Reviewed-by: Russell King (Oracle) +Tested-by: Rui Salvaterra +Link: https://patch.msgid.link/e3ece47323444631d6cb479f32af0dfd6d145be0.1720088047.git.daniel@makrotopia.org +Signed-off-by: Jakub Kicinski +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -4361,6 +4361,20 @@ static int mtk_set_rxnfc(struct net_devi + return ret; + } + ++static void mtk_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause) ++{ ++ struct mtk_mac *mac = netdev_priv(dev); ++ ++ phylink_ethtool_get_pauseparam(mac->phylink, pause); ++} ++ ++static int mtk_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause) ++{ ++ struct mtk_mac *mac = netdev_priv(dev); ++ ++ return phylink_ethtool_set_pauseparam(mac->phylink, pause); ++} ++ + static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb, + struct net_device *sb_dev) + { +@@ -4389,8 +4403,10 @@ static const struct ethtool_ops mtk_etht + .get_strings = mtk_get_strings, + .get_sset_count = mtk_get_sset_count, + .get_ethtool_stats = mtk_get_ethtool_stats, ++ .get_pauseparam = mtk_get_pauseparam, ++ .set_pauseparam = mtk_set_pauseparam, + .get_rxnfc = mtk_get_rxnfc, +- .set_rxnfc = mtk_set_rxnfc, ++ .set_rxnfc = mtk_set_rxnfc, + }; + + static const struct net_device_ops mtk_netdev_ops = { diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index cee9f8ad1e..63e94abb73 100644 --- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -4899,6 +4899,8 @@ static int mtk_probe(struct platform_dev +@@ -4915,6 +4915,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch index 52648f08f0..0be9d5ff9b 100644 --- a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch +++ b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch @@ -479,7 +479,7 @@ Signed-off-by: Daniel Golle static const struct phylink_mac_ops mtk_phylink_ops = { .validate = phylink_generic_validate, .mac_select_pcs = mtk_mac_select_pcs, -@@ -4574,8 +4689,21 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4590,8 +4705,21 @@ static int mtk_add_mac(struct mtk_eth *e phy_interface_zero(mac->phylink_config.supported_interfaces); __set_bit(PHY_INTERFACE_MODE_INTERNAL, mac->phylink_config.supported_interfaces); @@ -501,7 +501,7 @@ Signed-off-by: Daniel Golle phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(mac->of_node), phy_mode, &mtk_phylink_ops); -@@ -4768,6 +4896,13 @@ static int mtk_probe(struct platform_dev +@@ -4784,6 +4912,13 @@ static int mtk_probe(struct platform_dev if (err) return err; diff --git a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch index 9fda58c8ab..6729006299 100644 --- a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch +++ b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch @@ -32,7 +32,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4844,7 +4844,10 @@ static int mtk_probe(struct platform_dev +@@ -4860,7 +4860,10 @@ static int mtk_probe(struct platform_dev } if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA)) { From 738294315e3a136a76a41623108a0f0e581c3fe1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 19 Jan 2024 14:48:05 +0100 Subject: [PATCH 55/65] mediatek: fix WED + wifi reset The WLAN + WED reset sequence relies on being able to receive interrupts from the card, in order to synchronize individual steps with the firmware. When WED is stopped, leave interrupts running and rely on the driver turning off unwanted ones. WED DMA also needs to be disabled before resetting. Signed-off-by: Felix Fietkau (cherry picked from commit 2c5b3bee38eb0d76f5afe90f9969b73e19d28685) --- ...ernet-mtk_eth_soc-fix-WED-wifi-reset.patch | 49 +++++++++++++++++++ ...eth_soc-handle-dma-buffer-size-soc-.patch} | 0 ...ppe-Change-PPE-entries-number-to-16.patch} | 0 ...eth_soc-implement-.-get-set-_pausep.patch} | 0 ...tk_wed-move-dlm-a-dedicated-dts-node.patch | 4 +- 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 target/linux/generic/backport-5.15/753-v6.9-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch rename target/linux/generic/backport-5.15/{752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch => 754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch} (100%) rename target/linux/generic/backport-5.15/{752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch => 754-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch} (100%) rename target/linux/generic/backport-5.15/{752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch => 754-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch} (100%) diff --git a/target/linux/generic/backport-5.15/753-v6.9-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch b/target/linux/generic/backport-5.15/753-v6.9-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch new file mode 100644 index 0000000000..71ae446033 --- /dev/null +++ b/target/linux/generic/backport-5.15/753-v6.9-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch @@ -0,0 +1,49 @@ +From: Felix Fietkau +Date: Thu, 18 Jan 2024 12:51:32 +0100 +Subject: [PATCH] net: ethernet: mtk_eth_soc: fix WED + wifi reset + +The WLAN + WED reset sequence relies on being able to receive interrupts from +the card, in order to synchronize individual steps with the firmware. +When WED is stopped, leave interrupts running and rely on the driver turning +off unwanted ones. +WED DMA also needs to be disabled before resetting. + +Fixes: f78cd9c783e0 ("net: ethernet: mtk_wed: update mtk_wed_stop") +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/ethernet/mediatek/mtk_wed.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed.c +@@ -1073,13 +1073,13 @@ mtk_wed_dma_disable(struct mtk_wed_devic + static void + mtk_wed_stop(struct mtk_wed_device *dev) + { ++ mtk_wed_dma_disable(dev); + mtk_wed_set_ext_int(dev, false); + + wed_w32(dev, MTK_WED_WPDMA_INT_TRIGGER, 0); + wed_w32(dev, MTK_WED_WDMA_INT_TRIGGER, 0); + wdma_w32(dev, MTK_WDMA_INT_MASK, 0); + wdma_w32(dev, MTK_WDMA_INT_GRP2, 0); +- wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0); + + if (!mtk_wed_get_rx_capa(dev)) + return; +@@ -1092,7 +1092,6 @@ static void + mtk_wed_deinit(struct mtk_wed_device *dev) + { + mtk_wed_stop(dev); +- mtk_wed_dma_disable(dev); + + wed_clr(dev, MTK_WED_CTRL, + MTK_WED_CTRL_WDMA_INT_AGENT_EN | +@@ -2604,9 +2603,6 @@ mtk_wed_irq_get(struct mtk_wed_device *d + static void + mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask) + { +- if (!dev->running) +- return; +- + mtk_wed_set_ext_int(dev, !!mask); + wed_w32(dev, MTK_WED_INT_MASK, mask); + } diff --git a/target/linux/generic/backport-5.15/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch b/target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch similarity index 100% rename from target/linux/generic/backport-5.15/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch rename to target/linux/generic/backport-5.15/754-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch diff --git a/target/linux/generic/backport-5.15/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch b/target/linux/generic/backport-5.15/754-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch similarity index 100% rename from target/linux/generic/backport-5.15/752-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch rename to target/linux/generic/backport-5.15/754-29-v6.10-net-ethernet-mtk_ppe-Change-PPE-entries-number-to-16.patch diff --git a/target/linux/generic/backport-5.15/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch b/target/linux/generic/backport-5.15/754-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch similarity index 100% rename from target/linux/generic/backport-5.15/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch rename to target/linux/generic/backport-5.15/754-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch diff --git a/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch b/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch index abb6591b7d..0701743ffb 100644 --- a/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch +++ b/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch @@ -22,7 +22,7 @@ Signed-off-by: Lorenzo Bianconi --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c -@@ -1322,6 +1322,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device +@@ -1321,6 +1321,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device struct device_node *np; int index; @@ -47,7 +47,7 @@ Signed-off-by: Lorenzo Bianconi index = of_property_match_string(dev->hw->node, "memory-region-names", "wo-dlm"); if (index < 0) -@@ -1338,6 +1356,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device +@@ -1337,6 +1355,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device return -ENODEV; dev->rro.miod_phys = rmem->base; From 5c21ab2f8a9332892162a8b1b28fe19898cd5466 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 10 Jul 2024 23:03:33 +0200 Subject: [PATCH 56/65] ramips: Refresh kernel patches The last patches broke this patch, refresh it again. Signed-off-by: Hauke Mehrtens --- .../700-net-ethernet-mediatek-support-net-labels.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch index ff492e7f6c..e648e74a6c 100644 --- a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch +++ b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: René van Dorst --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4557,6 +4557,7 @@ static const struct net_device_ops mtk_n +@@ -4586,6 +4586,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,7 +22,7 @@ Signed-off-by: René van Dorst const __be32 *_id = of_get_property(np, "reg", NULL); phy_interface_t phy_mode; struct phylink *phylink; -@@ -4728,6 +4729,9 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4757,6 +4758,9 @@ static int mtk_add_mac(struct mtk_eth *e register_netdevice_notifier(&mac->device_notifier); } From 42dada571342723cce6acc1b2d9a36514e672ddb Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 19 Mar 2024 15:44:44 +0100 Subject: [PATCH 57/65] wireless-regdb: add missing license information Add the missing license information PKG_LICENSE and PKG_LICENSE_FILES. Signed-off-by: Florian Eckert (cherry picked from commit 7a3deadf91a356b6b0ac25771854f8fa1c3e6980) Link: https://github.com/openwrt/openwrt/pull/15918 Signed-off-by: Hauke Mehrtens --- package/firmware/wireless-regdb/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile index 91c54372a2..5b95ec59de 100644 --- a/package/firmware/wireless-regdb/Makefile +++ b/package/firmware/wireless-regdb/Makefile @@ -3,6 +3,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wireless-regdb PKG_VERSION:=2024.05.08 PKG_RELEASE:=1 +PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/ From 9b12d414767880c302984c074d669021b6524046 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 13 Mar 2024 12:41:38 +0100 Subject: [PATCH 58/65] ca-certificates: add missing license information The package has no licence information. So let's fix it. Signed-off-by: Florian Eckert (cherry picked from commit 0da116f25b1a80ac9429fd7d13ee30130494f19e) Link: https://github.com/openwrt/openwrt/pull/15918 Signed-off-by: Hauke Mehrtens --- package/system/ca-certificates/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile index ec588cc65b..9aab6a0945 100644 --- a/package/system/ca-certificates/Makefile +++ b/package/system/ca-certificates/Makefile @@ -11,6 +11,9 @@ PKG_VERSION:=20230311 PKG_RELEASE:=1 PKG_MAINTAINER:= +PKG_LICENSE:=GPL-2.0-or-later MPL-2.0 +PKG_LICENSE_FILES:=debian/copyright + PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/main/c/ca-certificates PKG_HASH:=83de934afa186e279d1ed08ea0d73f5cf43a6fbfb5f00874b6db3711c64576f3 From f5d64e36fb4ab55faad4bdecae1a08751ff46b01 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 15 Mar 2024 11:57:14 +0100 Subject: [PATCH 59/65] mac80211: add missing license information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lincense information for the packages mac80211 are missing. This commit adds the missing information. Signed-off-by: Florian Eckert Signed-off-by: Petr Štetiar [backport] (cherry picked from commit 3128157ec71c7be5c2e26a04b1f4b5080ebf870a) Link: https://github.com/openwrt/openwrt/pull/15918 Signed-off-by: Hauke Mehrtens --- package/kernel/mac80211/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 42365e516c..58cf19da56 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -12,6 +12,9 @@ PKG_NAME:=mac80211 PKG_VERSION:=6.1.97-1 PKG_RELEASE:=1 +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.97/ PKG_HASH:=8e9ae2d02f373252dd61f5c6a81c88eec67ca773464d9ef3d844752dc6775540 From 6f72d62a5316eed4688645930fab822c6b19c91c Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 21 Mar 2024 12:55:01 +0100 Subject: [PATCH 60/65] kernel: update deprecated license information Update the deprecated license information from GPL-2.0 to GPL-2.0-only as written in the COPYING file of the linux source tree. Also add the 'COPYING' file to the PKG_LICENSE_FILES variable. Signed-off-by: Florian Eckert (cherry picked from commit 879826154fd3e5ec353117a9c00cecf5e38c4a16) Link: https://github.com/openwrt/openwrt/pull/15918 Signed-off-by: Hauke Mehrtens --- package/kernel/linux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/Makefile b/package/kernel/linux/Makefile index ff91760270..b9f547ed61 100644 --- a/package/kernel/linux/Makefile +++ b/package/kernel/linux/Makefile @@ -16,8 +16,8 @@ SUBTARGETS = $(sort $(filter-out feeds,$(notdir $(wildcard $(TOPDIR)/target/linu SUBTARGET_MODULES = $(foreach t,$(SUBTARGETS),$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(t)/modules.mk $(TOPDIR)/target/linux/$(t)/modules.mk))) SCAN_DEPS=modules/*.mk $(SUBTARGET_MODULES) $(TOPDIR)/include/netfilter.mk -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING export SHELL:=/bin/sh .ONESHELL: From 437d1988b17edd5ca8948a4baa1a375428d24140 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 13 Mar 2024 13:21:34 +0100 Subject: [PATCH 61/65] linux-firmware: add LICENSE_FILES and LICENSE file handling The firmware blobs have all different licenses from the different manufacturers of the binary blobs. This information is contained in the upstream 'linux-firmware' repositroy. This commit extends the package handling so that this information can be added as an additional argument during packages generation. Signed-off-by: Florian Eckert (cherry picked from commit 5c14de1d7e715ef882f34925ee6702b847efcbbd) Link: https://github.com/openwrt/openwrt/pull/15918 Signed-off-by: Hauke Mehrtens --- package/firmware/linux-firmware/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index ef6cd075de..361d8b55ee 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -30,6 +30,8 @@ define Package/firmware-default URL:=http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git TITLE:=$(1) DEPENDS:=$(2) + LICENSE_FILES:=$(3) + LICENSE:=$(4) endef define Build/Compile From 130aa676757da7a95bd5b180f571983589b17d86 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 13 Mar 2024 13:22:20 +0100 Subject: [PATCH 62/65] linux-firmware: add missing LICENSE_FILES info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Where it is clear which lincense the firmware package has, the missing information are added. Signed-off-by: Florian Eckert Signed-off-by: Petr Štetiar [backport] (cherry picked from commit 535d487c41fa09b02c215799449fcd571d1dacac) Link: https://github.com/openwrt/openwrt/pull/15918 Signed-off-by: Hauke Mehrtens --- package/firmware/linux-firmware/amd.mk | 6 ++-- package/firmware/linux-firmware/broadcom.mk | 18 +++++------ package/firmware/linux-firmware/marvell.mk | 12 ++++---- package/firmware/linux-firmware/mediatek.mk | 12 ++++---- package/firmware/linux-firmware/qca.mk | 6 ++-- package/firmware/linux-firmware/qca_ath10k.mk | 30 +++++++++---------- package/firmware/linux-firmware/qca_ath11k.mk | 6 ++-- package/firmware/linux-firmware/realtek.mk | 16 +++++----- package/firmware/linux-firmware/ti.mk | 4 +-- 9 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package/firmware/linux-firmware/amd.mk b/package/firmware/linux-firmware/amd.mk index 68b305e862..b669cf1b35 100644 --- a/package/firmware/linux-firmware/amd.mk +++ b/package/firmware/linux-firmware/amd.mk @@ -1,4 +1,4 @@ -Package/amd64-microcode = $(call Package/firmware-default,AMD64 CPU microcode,@TARGET_x86) +Package/amd64-microcode = $(call Package/firmware-default,AMD64 CPU microcode,@TARGET_x86,LICENSE.amd-ucode) define Package/amd64-microcode/install $(INSTALL_DIR) $(1)/lib/firmware/amd-ucode $(CP) \ @@ -8,7 +8,7 @@ endef $(eval $(call BuildPackage,amd64-microcode)) -Package/amdgpu-firmware = $(call Package/firmware-default,AMDGPU Video Driver firmware) +Package/amdgpu-firmware = $(call Package/firmware-default,AMDGPU Video Driver firmware,,LICENSE.amdgpura) define Package/amdgpu-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/amdgpu $(CP) \ @@ -18,7 +18,7 @@ endef $(eval $(call BuildPackage,amdgpu-firmware)) -Package/radeon-firmware = $(call Package/firmware-default,Radeon Video Driver firmware) +Package/radeon-firmware = $(call Package/firmware-default,Radeon Video Driver firmware,,LICENSE.radeon) define Package/radeon-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/radeon $(CP) \ diff --git a/package/firmware/linux-firmware/broadcom.mk b/package/firmware/linux-firmware/broadcom.mk index 48d986e218..8f5d32fddd 100644 --- a/package/firmware/linux-firmware/broadcom.mk +++ b/package/firmware/linux-firmware/broadcom.mk @@ -1,4 +1,4 @@ -Package/brcmfmac-firmware-4339-sdio = $(call Package/firmware-default,Broadcom 4339 FullMAC SDIO firmware) +Package/brcmfmac-firmware-4339-sdio = $(call Package/firmware-default,Broadcom 4339 FullMAC SDIO firmware,,LICENCE.cypressb) define Package/brcmfmac-firmware-4339-sdio/install $(INSTALL_DIR) $(1)/lib/firmware/cypress $(INSTALL_DATA) \ @@ -11,7 +11,7 @@ define Package/brcmfmac-firmware-4339-sdio/install endef $(eval $(call BuildPackage,brcmfmac-firmware-4339-sdio)) -Package/brcmfmac-firmware-43602a1-pcie = $(call Package/firmware-default,Broadcom 43602a1 FullMAC PCIe firmware) +Package/brcmfmac-firmware-43602a1-pcie = $(call Package/firmware-default,Broadcom 43602a1 FullMAC PCIe firmware,,LICENCE.broadcom_bcm43xx) define Package/brcmfmac-firmware-43602a1-pcie/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ @@ -20,7 +20,7 @@ define Package/brcmfmac-firmware-43602a1-pcie/install endef $(eval $(call BuildPackage,brcmfmac-firmware-43602a1-pcie)) -Package/brcmfmac-firmware-4366b1-pcie = $(call Package/firmware-default,Broadcom 4366b1 FullMAC PCIe firmware) +Package/brcmfmac-firmware-4366b1-pcie = $(call Package/firmware-default,Broadcom 4366b1 FullMAC PCIe firmware,,LICENCE.broadcom_bcm43xx) define Package/brcmfmac-firmware-4366b1-pcie/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ @@ -29,7 +29,7 @@ define Package/brcmfmac-firmware-4366b1-pcie/install endef $(eval $(call BuildPackage,brcmfmac-firmware-4366b1-pcie)) -Package/brcmfmac-firmware-4366c0-pcie = $(call Package/firmware-default,Broadcom 4366c0 FullMAC PCIe firmware) +Package/brcmfmac-firmware-4366c0-pcie = $(call Package/firmware-default,Broadcom 4366c0 FullMAC PCIe firmware,,LICENCE.broadcom_bcm43xx) define Package/brcmfmac-firmware-4366c0-pcie/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ @@ -38,7 +38,7 @@ define Package/brcmfmac-firmware-4366c0-pcie/install endef $(eval $(call BuildPackage,brcmfmac-firmware-4366c0-pcie)) -Package/brcmfmac-firmware-4329-sdio = $(call Package/firmware-default,Broadcom BCM4329 FullMac SDIO firmware) +Package/brcmfmac-firmware-4329-sdio = $(call Package/firmware-default,Broadcom BCM4329 FullMac SDIO firmware,,LICENCE.broadcom_bcm43xx) define Package/brcmfmac-firmware-4329-sdio/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ @@ -47,7 +47,7 @@ define Package/brcmfmac-firmware-4329-sdio/install endef $(eval $(call BuildPackage,brcmfmac-firmware-4329-sdio)) -Package/brcmfmac-nvram-43430-sdio = $(call Package/firmware-default,Broadcom BCM43430 SDIO NVRAM) +Package/brcmfmac-nvram-43430-sdio = $(call Package/firmware-default,Broadcom BCM43430 SDIO NVRAM,,LICENCE.broadcom_bcm43xx) define Package/brcmfmac-nvram-43430-sdio/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ @@ -95,7 +95,7 @@ define Package/brcmfmac-nvram-43430-sdio/install endef $(eval $(call BuildPackage,brcmfmac-nvram-43430-sdio)) -Package/brcmfmac-firmware-43430a0-sdio = $(call Package/firmware-default,Broadcom BCM43430a0 FullMac SDIO firmware) +Package/brcmfmac-firmware-43430a0-sdio = $(call Package/firmware-default,Broadcom BCM43430a0 FullMac SDIO firmware,,LICENCE.broadcom_bcm43xx) define Package/brcmfmac-firmware-43430a0-sdio/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ @@ -104,7 +104,7 @@ define Package/brcmfmac-firmware-43430a0-sdio/install endef $(eval $(call BuildPackage,brcmfmac-firmware-43430a0-sdio)) -Package/brcmfmac-nvram-43455-sdio = $(call Package/firmware-default,Broadcom BCM43455 SDIO NVRAM) +Package/brcmfmac-nvram-43455-sdio = $(call Package/firmware-default,Broadcom BCM43455 SDIO NVRAM,,LICENCE.broadcom_bcm43xx) define Package/brcmfmac-nvram-43455-sdio/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ @@ -161,7 +161,7 @@ define Package/brcmfmac-firmware-usb/install endef $(eval $(call BuildPackage,brcmfmac-firmware-usb)) -Package/brcmsmac-firmware = $(call Package/firmware-default,Broadcom BCM43xx softmac PCIe firmware) +Package/brcmsmac-firmware = $(call Package/firmware-default,Broadcom BCM43xx softmac PCIe firmware,,LICENCE.broadcom_bcm43xx) define Package/brcmsmac-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ diff --git a/package/firmware/linux-firmware/marvell.mk b/package/firmware/linux-firmware/marvell.mk index 78edac0ff3..17d85a3f11 100644 --- a/package/firmware/linux-firmware/marvell.mk +++ b/package/firmware/linux-firmware/marvell.mk @@ -1,4 +1,4 @@ -Package/mwl8k-firmware = $(call Package/firmware-default,Marvell 8366/8687 firmware) +Package/mwl8k-firmware = $(call Package/firmware-default,Marvell 8366/8687 firmware,,LICENCE.Marvell) define Package/mwl8k-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mwl8k $(INSTALL_DATA) \ @@ -11,7 +11,7 @@ define Package/mwl8k-firmware/install endef $(eval $(call BuildPackage,mwl8k-firmware)) -Package/mwifiex-pcie-firmware = $(call Package/firmware-default,Marvell 8897 firmware) +Package/mwifiex-pcie-firmware = $(call Package/firmware-default,Marvell 8897 firmware,,LICENCE.Marvell) define Package/mwifiex-pcie-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mrvl $(INSTALL_DATA) \ @@ -20,7 +20,7 @@ define Package/mwifiex-pcie-firmware/install endef $(eval $(call BuildPackage,mwifiex-pcie-firmware)) -Package/mwifiex-sdio-firmware = $(call Package/firmware-default,Marvell 8887/8997 firmware) +Package/mwifiex-sdio-firmware = $(call Package/firmware-default,Marvell 8887/8997 firmware,,LICENCE.Marvell) define Package/mwifiex-sdio-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mrvl $(INSTALL_DATA) \ @@ -31,7 +31,7 @@ define Package/mwifiex-sdio-firmware/install endef $(eval $(call BuildPackage,mwifiex-sdio-firmware)) -Package/libertas-usb-firmware = $(call Package/firmware-default,Marvell 8388/8682 USB firmware) +Package/libertas-usb-firmware = $(call Package/firmware-default,Marvell 8388/8682 USB firmware,,LICENCE.Marvell) define Package/libertas-usb-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/libertas $(INSTALL_DATA) \ @@ -41,7 +41,7 @@ define Package/libertas-usb-firmware/install endef $(eval $(call BuildPackage,libertas-usb-firmware)) -Package/libertas-sdio-firmware = $(call Package/firmware-default,Marvell 8385/8686/8688 SDIO firmware) +Package/libertas-sdio-firmware = $(call Package/firmware-default,Marvell 8385/8686/8688 SDIO firmware,,LICENCE.Marvell) define Package/libertas-sdio-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/libertas $(INSTALL_DATA) \ @@ -60,7 +60,7 @@ define Package/libertas-sdio-firmware/install endef $(eval $(call BuildPackage,libertas-sdio-firmware)) -Package/libertas-spi-firmware = $(call Package/firmware-default,Marvell 8686 SPI firmware) +Package/libertas-spi-firmware = $(call Package/firmware-default,Marvell 8686 SPI firmware,,LICENCE.Marvell) define Package/libertas-spi-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/libertas $(INSTALL_DATA) \ diff --git a/package/firmware/linux-firmware/mediatek.mk b/package/firmware/linux-firmware/mediatek.mk index a0eccb8f4d..e4310aea8d 100644 --- a/package/firmware/linux-firmware/mediatek.mk +++ b/package/firmware/linux-firmware/mediatek.mk @@ -1,4 +1,4 @@ -Package/mt7601u-firmware = $(call Package/firmware-default,MediaTek MT7601U firmware) +Package/mt7601u-firmware = $(call Package/firmware-default,MediaTek MT7601U firmware,,LICENCE.mediatek) define Package/mt7601u-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek $(INSTALL_DATA) \ @@ -42,7 +42,7 @@ define Package/rt73-usb-firmware/install endef $(eval $(call BuildPackage,rt73-usb-firmware)) -Package/mt7622bt-firmware = $(call Package/firmware-default,mt7622bt firmware) +Package/mt7622bt-firmware = $(call Package/firmware-default,mt7622bt firmware,,LICENCE.mediatek) define Package/mt7622bt-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek $(INSTALL_DATA) \ @@ -51,7 +51,7 @@ define Package/mt7622bt-firmware/install endef $(eval $(call BuildPackage,mt7622bt-firmware)) -Package/mt7921bt-firmware = $(call Package/firmware-default,mt7921bt firmware) +Package/mt7921bt-firmware = $(call Package/firmware-default,mt7921bt firmware,,LICENCE.mediatek) define Package/mt7921bt-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek $(INSTALL_DATA) \ @@ -60,7 +60,7 @@ define Package/mt7921bt-firmware/install endef $(eval $(call BuildPackage,mt7921bt-firmware)) -Package/mt7922bt-firmware = $(call Package/firmware-default,mt7922bt firmware) +Package/mt7922bt-firmware = $(call Package/firmware-default,mt7922bt firmware,,LICENCE.mediatek) define Package/mt7922bt-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek $(INSTALL_DATA) \ @@ -69,7 +69,7 @@ define Package/mt7922bt-firmware/install endef $(eval $(call BuildPackage,mt7922bt-firmware)) -Package/mt7981-wo-firmware = $(call Package/firmware-default,MT7981 offload firmware) +Package/mt7981-wo-firmware = $(call Package/firmware-default,MT7981 offload firmware,,LICENCE.mediatek) define Package/mt7981-wo-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek $(INSTALL_DATA) \ @@ -78,7 +78,7 @@ define Package/mt7981-wo-firmware/install endef $(eval $(call BuildPackage,mt7981-wo-firmware)) -Package/mt7986-wo-firmware = $(call Package/firmware-default,MT7986 offload firmware) +Package/mt7986-wo-firmware = $(call Package/firmware-default,MT7986 offload firmware,,LICENCE.mediatek) define Package/mt7986-wo-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek $(INSTALL_DATA) \ diff --git a/package/firmware/linux-firmware/qca.mk b/package/firmware/linux-firmware/qca.mk index 71b484d5c7..5f44fe45e3 100644 --- a/package/firmware/linux-firmware/qca.mk +++ b/package/firmware/linux-firmware/qca.mk @@ -1,4 +1,4 @@ -Package/ar3k-firmware = $(call Package/firmware-default,ath3k firmware) +Package/ar3k-firmware = $(call Package/firmware-default,ath3k firmware,,LICENSE.QualcommAtheros_ar3k) define Package/ar3k-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/ar3k $(CP) \ @@ -21,7 +21,7 @@ define Package/ath6k-firmware/install endef $(eval $(call BuildPackage,ath6k-firmware)) -Package/ath9k-htc-firmware = $(call Package/firmware-default,AR9271/AR7010 firmware) +Package/ath9k-htc-firmware = $(call Package/firmware-default,AR9271/AR7010 firmware,,LICENCE.open-ath9k-htc-firmware) define Package/ath9k-htc-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/ath9k_htc $(INSTALL_DATA) \ @@ -31,7 +31,7 @@ define Package/ath9k-htc-firmware/install endef $(eval $(call BuildPackage,ath9k-htc-firmware)) -Package/carl9170-firmware = $(call Package/firmware-default,AR9170 firmware) +Package/carl9170-firmware = $(call Package/firmware-default,AR9170 firmware,,carl9170fw/GPL) define Package/carl9170-firmware/install $(INSTALL_DIR) $(1)/lib/firmware $(INSTALL_DATA) $(PKG_BUILD_DIR)/carl9170-1.fw $(1)/lib/firmware diff --git a/package/firmware/linux-firmware/qca_ath10k.mk b/package/firmware/linux-firmware/qca_ath10k.mk index 25a1571ad6..b3bfe8a391 100644 --- a/package/firmware/linux-firmware/qca_ath10k.mk +++ b/package/firmware/linux-firmware/qca_ath10k.mk @@ -1,4 +1,4 @@ -Package/ath10k-board-qca4019 = $(call Package/firmware-default,ath10k qca4019 board firmware) +Package/ath10k-board-qca4019 = $(call Package/firmware-default,ath10k qca4019 board firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-board-qca4019/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0 $(INSTALL_DATA) \ @@ -6,7 +6,7 @@ define Package/ath10k-board-qca4019/install $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ endef $(eval $(call BuildPackage,ath10k-board-qca4019)) -Package/ath10k-firmware-qca4019 = $(call Package/firmware-default,ath10k qca4019 firmware) +Package/ath10k-firmware-qca4019 = $(call Package/firmware-default,ath10k qca4019 firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca4019/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0 $(INSTALL_DATA) \ @@ -15,7 +15,7 @@ define Package/ath10k-firmware-qca4019/install endef $(eval $(call BuildPackage,ath10k-firmware-qca4019)) -Package/ath10k-board-qca9377 = $(call Package/firmware-default,ath10k qca9377 board firmware) +Package/ath10k-board-qca9377 = $(call Package/firmware-default,ath10k qca9377 board firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-board-qca9377/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9377/hw1.0 $(INSTALL_DATA) \ @@ -23,7 +23,7 @@ define Package/ath10k-board-qca9377/install $(1)/lib/firmware/ath10k/QCA9377/hw1.0/ endef $(eval $(call BuildPackage,ath10k-board-qca9377)) -Package/ath10k-firmware-qca9377 = $(call Package/firmware-default,ath10k qca9377 firmware,+ath10k-board-qca9377) +Package/ath10k-firmware-qca9377 = $(call Package/firmware-default,ath10k qca9377 firmware,+ath10k-board-qca9377,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca9377/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9377/hw1.0 $(INSTALL_DATA) \ @@ -32,7 +32,7 @@ define Package/ath10k-firmware-qca9377/install endef $(eval $(call BuildPackage,ath10k-firmware-qca9377)) -Package/ath10k-board-qca9887 = $(call Package/firmware-default,ath10k qca9887 board firmware) +Package/ath10k-board-qca9887 = $(call Package/firmware-default,ath10k qca9887 board firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-board-qca9887/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0 $(INSTALL_DATA) \ @@ -40,7 +40,7 @@ define Package/ath10k-board-qca9887/install $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin endef $(eval $(call BuildPackage,ath10k-board-qca9887)) -Package/ath10k-firmware-qca9887 = $(call Package/firmware-default,ath10k qca9887 firmware,+ath10k-board-qca9887) +Package/ath10k-firmware-qca9887 = $(call Package/firmware-default,ath10k qca9887 firmware,+ath10k-board-qca9887,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca9887/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0 $(INSTALL_DATA) \ @@ -49,7 +49,7 @@ define Package/ath10k-firmware-qca9887/install endef $(eval $(call BuildPackage,ath10k-firmware-qca9887)) -Package/ath10k-board-qca9888 = $(call Package/firmware-default,ath10k qca9888 board firmware) +Package/ath10k-board-qca9888 = $(call Package/firmware-default,ath10k qca9888 board firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-board-qca9888/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0 $(INSTALL_DATA) \ @@ -57,7 +57,7 @@ define Package/ath10k-board-qca9888/install $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin endef $(eval $(call BuildPackage,ath10k-board-qca9888)) -Package/ath10k-firmware-qca9888 = $(call Package/firmware-default,ath10k qca9888 firmware,+ath10k-board-qca9888) +Package/ath10k-firmware-qca9888 = $(call Package/firmware-default,ath10k qca9888 firmware,+ath10k-board-qca9888,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca9888/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0 $(INSTALL_DATA) \ @@ -66,7 +66,7 @@ define Package/ath10k-firmware-qca9888/install endef $(eval $(call BuildPackage,ath10k-firmware-qca9888)) -Package/ath10k-board-qca988x = $(call Package/firmware-default,ath10k qca988x board firmware) +Package/ath10k-board-qca988x = $(call Package/firmware-default,ath10k qca988x board firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-board-qca988x/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0 $(INSTALL_DATA) \ @@ -74,7 +74,7 @@ define Package/ath10k-board-qca988x/install $(1)/lib/firmware/ath10k/QCA988X/hw2.0/ endef $(eval $(call BuildPackage,ath10k-board-qca988x)) -Package/ath10k-firmware-qca988x = $(call Package/firmware-default,ath10k qca988x firmware,+ath10k-board-qca988x) +Package/ath10k-firmware-qca988x = $(call Package/firmware-default,ath10k qca988x firmware,+ath10k-board-qca988x,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca988x/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0 $(INSTALL_DATA) \ @@ -83,7 +83,7 @@ define Package/ath10k-firmware-qca988x/install endef $(eval $(call BuildPackage,ath10k-firmware-qca988x)) -Package/ath10k-firmware-qca6174 = $(call Package/firmware-default,ath10k qca6174 firmware) +Package/ath10k-firmware-qca6174 = $(call Package/firmware-default,ath10k qca6174 firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca6174/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA6174/hw2.1 $(INSTALL_DATA) \ @@ -102,7 +102,7 @@ define Package/ath10k-firmware-qca6174/install endef $(eval $(call BuildPackage,ath10k-firmware-qca6174)) -Package/ath10k-board-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 board firmware) +Package/ath10k-board-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 board firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-board-qca99x0/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0 $(INSTALL_DATA) \ @@ -111,7 +111,7 @@ define Package/ath10k-board-qca99x0/install endef $(eval $(call BuildPackage,ath10k-board-qca99x0)) -Package/ath10k-firmware-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 firmware,+ath10k-board-qca99x0) +Package/ath10k-firmware-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 firmware,+ath10k-board-qca99x0,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca99x0/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0 $(INSTALL_DATA) \ @@ -120,7 +120,7 @@ define Package/ath10k-firmware-qca99x0/install endef $(eval $(call BuildPackage,ath10k-firmware-qca99x0)) -Package/ath10k-board-qca9984 = $(call Package/firmware-default,ath10k qca9984 board firmware) +Package/ath10k-board-qca9984 = $(call Package/firmware-default,ath10k qca9984 board firmware,,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-board-qca9984/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0 $(INSTALL_DATA) \ @@ -128,7 +128,7 @@ define Package/ath10k-board-qca9984/install $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin endef $(eval $(call BuildPackage,ath10k-board-qca9984)) -Package/ath10k-firmware-qca9984 = $(call Package/firmware-default,ath10k qca9984 firmware,+ath10k-board-qca9984) +Package/ath10k-firmware-qca9984 = $(call Package/firmware-default,ath10k qca9984 firmware,+ath10k-board-qca9984,LICENSE.QualcommAtheros_ath10k) define Package/ath10k-firmware-qca9984/install $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0 $(INSTALL_DATA) \ diff --git a/package/firmware/linux-firmware/qca_ath11k.mk b/package/firmware/linux-firmware/qca_ath11k.mk index b8f6ab8605..3571198d1b 100644 --- a/package/firmware/linux-firmware/qca_ath11k.mk +++ b/package/firmware/linux-firmware/qca_ath11k.mk @@ -1,4 +1,4 @@ -Package/ath11k-firmware-qca6390 = $(call Package/firmware-default,QCA6390 ath11k firmware) +Package/ath11k-firmware-qca6390 = $(call Package/firmware-default,QCA6390 ath11k firmware,,LICENCE.atheros_firmware) define Package/ath11k-firmware-qca6390/install $(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCA6390/hw2.0 $(INSTALL_DATA) \ @@ -6,7 +6,7 @@ define Package/ath11k-firmware-qca6390/install endef $(eval $(call BuildPackage,ath11k-firmware-qca6390)) -Package/ath11k-firmware-wcn6750 = $(call Package/firmware-default,WCN6750 ath11k firmware) +Package/ath11k-firmware-wcn6750 = $(call Package/firmware-default,WCN6750 ath11k firmware,,LICENCE.atheros_firmware) define Package/ath11k-firmware-wcn6750/install $(INSTALL_DIR) $(1)/lib/firmware/ath11k/WCN6750/hw1.0 $(INSTALL_DATA) \ @@ -14,7 +14,7 @@ define Package/ath11k-firmware-wcn6750/install endef $(eval $(call BuildPackage,ath11k-firmware-wcn6750)) -Package/ath11k-firmware-wcn6855 = $(call Package/firmware-default,WCN6855 ath11k firmware) +Package/ath11k-firmware-wcn6855 = $(call Package/firmware-default,WCN6855 ath11k firmware,,LICENCE.atheros_firmware) define Package/ath11k-firmware-wcn6855/install $(INSTALL_DIR) $(1)/lib/firmware/ath11k/WCN6855/hw2.0 $(INSTALL_DATA) \ diff --git a/package/firmware/linux-firmware/realtek.mk b/package/firmware/linux-firmware/realtek.mk index d3b9592d12..26e2b048b6 100644 --- a/package/firmware/linux-firmware/realtek.mk +++ b/package/firmware/linux-firmware/realtek.mk @@ -20,7 +20,7 @@ define Package/r8169-firmware/install endef $(eval $(call BuildPackage,r8169-firmware)) -Package/rtl8188eu-firmware = $(call Package/firmware-default,RealTek RTL8188EU firmware) +Package/rtl8188eu-firmware = $(call Package/firmware-default,RealTek RTL8188EU firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8188eu-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(CP) \ @@ -38,7 +38,7 @@ define Package/rtl8192ce-firmware/install endef $(eval $(call BuildPackage,rtl8192ce-firmware)) -Package/rtl8192cu-firmware = $(call Package/firmware-default,RealTek RTL8192CU firmware) +Package/rtl8192cu-firmware = $(call Package/firmware-default,RealTek RTL8192CU firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8192cu-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8192cufw.bin $(1)/lib/firmware/rtlwifi @@ -48,28 +48,28 @@ define Package/rtl8192cu-firmware/install endef $(eval $(call BuildPackage,rtl8192cu-firmware)) -Package/rtl8192de-firmware = $(call Package/firmware-default,RealTek RTL8192DE firmware) +Package/rtl8192de-firmware = $(call Package/firmware-default,RealTek RTL8192DE firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8192de-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8192defw.bin $(1)/lib/firmware/rtlwifi endef $(eval $(call BuildPackage,rtl8192de-firmware)) -Package/rtl8192eu-firmware = $(call Package/firmware-default,RealTek RTL8192EU firmware) +Package/rtl8192eu-firmware = $(call Package/firmware-default,RealTek RTL8192EU firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8192eu-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8192eu_nic.bin $(1)/lib/firmware/rtlwifi endef $(eval $(call BuildPackage,rtl8192eu-firmware)) -Package/rtl8192se-firmware = $(call Package/firmware-default,RealTek RTL8192SE firmware) +Package/rtl8192se-firmware = $(call Package/firmware-default,RealTek RTL8192SE firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8192se-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8192sefw.bin $(1)/lib/firmware/rtlwifi endef $(eval $(call BuildPackage,rtl8192se-firmware)) -Package/rtl8723au-firmware = $(call Package/firmware-default,RealTek RTL8723AU firmware) +Package/rtl8723au-firmware = $(call Package/firmware-default,RealTek RTL8723AU firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8723au-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8723aufw_A.bin $(1)/lib/firmware/rtlwifi @@ -78,7 +78,7 @@ define Package/rtl8723au-firmware/install endef $(eval $(call BuildPackage,rtl8723au-firmware)) -Package/rtl8723bu-firmware = $(call Package/firmware-default,RealTek RTL8723BU firmware) +Package/rtl8723bu-firmware = $(call Package/firmware-default,RealTek RTL8723BU firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8723bu-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8723bu_nic.bin $(1)/lib/firmware/rtlwifi @@ -109,7 +109,7 @@ define Package/rtl8761bu-firmware/install endef $(eval $(call BuildPackage,rtl8761bu-firmware)) -Package/rtl8821ae-firmware = $(call Package/firmware-default,RealTek RTL8821AE firmware) +Package/rtl8821ae-firmware = $(call Package/firmware-default,RealTek RTL8821AE firmware,,LICENCE.rtlwifi_firmware.txt) define Package/rtl8821ae-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8821aefw_29.bin $(1)/lib/firmware/rtlwifi diff --git a/package/firmware/linux-firmware/ti.mk b/package/firmware/linux-firmware/ti.mk index 2b9710706b..a4f28ef048 100644 --- a/package/firmware/linux-firmware/ti.mk +++ b/package/firmware/linux-firmware/ti.mk @@ -1,4 +1,4 @@ -Package/wl12xx-firmware = $(call Package/firmware-default,TI WL12xx firmware) +Package/wl12xx-firmware = $(call Package/firmware-default,TI WL12xx firmware,,LICENCE.ti-connectivity) define Package/wl12xx-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity $(INSTALL_DATA) \ @@ -15,7 +15,7 @@ define Package/wl12xx-firmware/install endef $(eval $(call BuildPackage,wl12xx-firmware)) -Package/wl18xx-firmware = $(call Package/firmware-default,TI WL18xx firmware) +Package/wl18xx-firmware = $(call Package/firmware-default,TI WL18xx firmware,,LICENCE.ti-connectivity) define Package/wl18xx-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity $(INSTALL_DATA) \ From 2b1ed7b33d42637c13947aa32e320ef787bb27cb Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 12 Sep 2023 15:17:23 +0200 Subject: [PATCH 63/65] mac80211: fix mesh id corruption on 32 bit systems increase size of ifmsh->mbss_changed Signed-off-by: Felix Fietkau (cherry picked from commit 20bd3502d3a841457cc06b3aa45646258fdcba9e) Link: https://github.com/openwrt/openwrt/pull/15836 [Moved the patch to the end of the patch queue] Signed-off-by: Hauke Mehrtens --- ...mesh-id-corruption-on-32-bit-systems.patch | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/361-mac80211-fix-mesh-id-corruption-on-32-bit-systems.patch diff --git a/package/kernel/mac80211/patches/subsys/361-mac80211-fix-mesh-id-corruption-on-32-bit-systems.patch b/package/kernel/mac80211/patches/subsys/361-mac80211-fix-mesh-id-corruption-on-32-bit-systems.patch new file mode 100644 index 0000000000..4e3cd106d3 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/361-mac80211-fix-mesh-id-corruption-on-32-bit-systems.patch @@ -0,0 +1,62 @@ +From: Felix Fietkau +Date: Tue, 12 Sep 2023 15:09:27 +0200 +Subject: [PATCH] mac80211: fix mesh id corruption on 32 bit systems +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Since the changed field size was increased to u64, mesh_bss_info_changed +pulls invalid bits from the first 3 bytes of the mesh id, clears them, and +passes them on to ieee80211_link_info_change_notify, because +ifmsh->mbss_changed was not updated to match its size. +Fix this by turning into ifmsh->mbss_changed into an unsigned long array with +64 bit size. + +Fixes: 15ddba5f4311 ("wifi: mac80211: consistently use u64 for BSS changes") +Reported-by: Thomas Hühn +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -680,7 +680,7 @@ struct ieee80211_if_mesh { + struct timer_list mesh_path_root_timer; + + unsigned long wrkq_flags; +- unsigned long mbss_changed; ++ unsigned long mbss_changed[64 / BITS_PER_LONG]; + + bool userspace_handles_dfs; + +--- a/net/mac80211/mesh.c ++++ b/net/mac80211/mesh.c +@@ -1106,7 +1106,7 @@ void ieee80211_mbss_info_change_notify(s + + /* if we race with running work, worst case this work becomes a noop */ + for_each_set_bit(bit, &bits, sizeof(changed) * BITS_PER_BYTE) +- set_bit(bit, &ifmsh->mbss_changed); ++ set_bit(bit, ifmsh->mbss_changed); + set_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags); + ieee80211_queue_work(&sdata->local->hw, &sdata->work); + } +@@ -1188,7 +1188,7 @@ void ieee80211_stop_mesh(struct ieee8021 + + /* clear any mesh work (for next join) we may have accrued */ + ifmsh->wrkq_flags = 0; +- ifmsh->mbss_changed = 0; ++ memset(ifmsh->mbss_changed, 0, sizeof(ifmsh->mbss_changed)); + + local->fif_other_bss--; + atomic_dec(&local->iff_allmultis); +@@ -1653,9 +1653,9 @@ static void mesh_bss_info_changed(struct + struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; + u32 bit, changed = 0; + +- for_each_set_bit(bit, &ifmsh->mbss_changed, ++ for_each_set_bit(bit, ifmsh->mbss_changed, + sizeof(changed) * BITS_PER_BYTE) { +- clear_bit(bit, &ifmsh->mbss_changed); ++ clear_bit(bit, ifmsh->mbss_changed); + changed |= BIT(bit); + } + From 78858e5d6cab0e900d534738c70820e69e43ecda Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 8 Jul 2024 00:05:14 +0800 Subject: [PATCH 64/65] ramips: limit max spi clock frequency to 50 MHz In the past few years, we have received several reports about SPI Flash not working properly. This is caused by excessively fast clock frequency. It's really annoying to fix them one by one. Let's reduce these aggressive frequencies to 50 MHz. This is a safe and suggested value in the vendor SDK. Signed-off-by: Shiji Yang (cherry picked from commit 73eeac49be566d389df728b5335f7146d03d2f90) Link: https://github.com/openwrt/openwrt/pull/15919 Signed-off-by: Hauke Mehrtens --- target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts | 2 +- target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts | 2 +- target/linux/ramips/dts/mt7620a_domywifi.dtsi | 2 +- target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi | 2 +- target/linux/ramips/dts/mt7620a_netcore_nw5212.dts | 2 +- target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi | 2 +- target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts | 2 +- target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi | 2 +- target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts | 2 +- target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi | 2 +- target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts | 2 +- target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi | 2 +- target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts | 2 +- target/linux/ramips/dts/mt7621_jcg_y2.dts | 2 +- target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts | 2 +- target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts | 2 +- target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts | 2 +- target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi | 2 +- target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts | 2 +- target/linux/ramips/dts/mt7621_yuncore_ax820.dts | 2 +- target/linux/ramips/dts/mt7621_yuncore_fap640.dts | 2 +- target/linux/ramips/dts/mt7621_yuncore_fap690.dts | 2 +- target/linux/ramips/dts/mt7628an_duzun_dm06.dts | 2 +- target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi | 2 +- target/linux/ramips/dts/mt7628an_motorola_mwr03.dts | 2 +- target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi | 2 +- target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts index 2884bfdb04..c7893c3a62 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts @@ -98,7 +98,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index 8ae566d448..38ec42ac13 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -93,7 +93,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7620a_domywifi.dtsi b/target/linux/ramips/dts/mt7620a_domywifi.dtsi index 9a96b0a275..b71908bdcc 100644 --- a/target/linux/ramips/dts/mt7620a_domywifi.dtsi +++ b/target/linux/ramips/dts/mt7620a_domywifi.dtsi @@ -93,7 +93,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 4c24857df1..d390abe55a 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -31,7 +31,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts index 25287ebc0b..06422ef9ad 100644 --- a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts +++ b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts @@ -73,7 +73,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi index a8a900eac1..266b199c38 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi @@ -48,7 +48,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions: partitions { diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index 4e123c32bd..5f907233f3 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -53,7 +53,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi b/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi index cb12505201..8bb2314240 100644 --- a/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi +++ b/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi @@ -160,7 +160,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index 95868c9be9..e35c2b5c0e 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -78,7 +78,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index 5af7b343d9..d0d636b09d 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -59,7 +59,7 @@ flash0: flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts index 3ae441f8e3..b0c847f84d 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts +++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts @@ -105,7 +105,7 @@ compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi index b00fbeb47f..51f2c31113 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi +++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi @@ -65,7 +65,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index 5d346be1d2..dd95f2de4b 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -63,7 +63,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts index f8ae9b41df..6390203c57 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -41,7 +41,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts index 38cd1cd8fd..f5be9b7c87 100644 --- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts @@ -55,7 +55,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <104000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index c626df1ef4..6c94fd8f19 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -96,7 +96,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts index b7475ec15b..04450783ad 100644 --- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts +++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts @@ -88,7 +88,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index cfd2344d21..ca4b83bee3 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -42,7 +42,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index ec81839d1d..74490de781 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -63,7 +63,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <104000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index 1aba94a912..7f948d921c 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -87,7 +87,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts index d525dde385..14a1b5d4f9 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts @@ -95,7 +95,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts index a998b95d4c..ef64e178b0 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts @@ -65,7 +65,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts index b9a105b0e3..82f0cd74cd 100644 --- a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts +++ b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts @@ -96,7 +96,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <60000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi index bfc510e06f..3ad6140543 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi @@ -36,7 +36,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts index 2179c48b22..383e86517b 100644 --- a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts +++ b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts @@ -47,7 +47,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index e6374e7bac..cbfd220b98 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -65,7 +65,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <86000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions: partitions { diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts index d044be395a..ebaa6e107b 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts @@ -53,7 +53,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <60000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; From 0cdbbd8868030f7b1dc0e7f9fcff58bb3a702adf Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 10 Jul 2024 23:52:41 +0200 Subject: [PATCH 65/65] wireless-regdb: Update to version 2024.07.04 Changes: 2a768c4 wireless-regdb: Update regulatory rules for Mongolia (MN) on 6GHz 04875d9 wireless-regdb: Update regulatory rules for Saudi Arabia (SA) on 6GHz b7bced8 wireless-regdb: Update regulatory rules for South Africa (ZA) on 6GHz 7bc8615 wireless-regdb: Update regulatory info for Thailand (TH) on 6GHz f901fa9 wireless-regdb: Update regulatory info for Malaysia (MY) for 2022 d72d288 wireless-regdb: Update regulatory info for Morocco (MA) on 6GHz 414face wireless-regdb: Update regulatory info for Chile (CL) on 6GHz 1156a08 wireless-regdb: Update regulatory info for Mexico (MX) on 6GHz cc6cf7c wireless-regdb: Update regulatory info for Iceland (IS) on 6GHz ce03cc0 wireless-regdb: Update regulatory info for Mauritius(MU) on 6GHz 7e37778 wireless-regdb: Update regulatory info for Argentina (AR) on 6GHz 56f3a43 wireless-regdb: Update regulatory info for United Arab Emirates (AE) on 6GHz 3cb8b91 wireless-regdb: Update regulatory info for Colombia (CO) on 6GHz 3682ce5 wireless-regdb: Update regulatory info for Costa Rica (CR) for 2021 dd4ffe7 wireless-regdb: Update regulatory info for Dominican Republic (DO) on 6GHz f8ef7da wireless-regdb: Update regulatory info for Liechtenstein (LI) on 6GHz a9ecabe wireless-regdb: Update regulatory info for Jordan (JO) for 2022 5a9fdad wireless-regdb: Update regulatory info for Kenya (KE) for 2022 19326c3 wireless-regdb: Update regulatory info for Macao (MO) for 2024 4838054 wireless-regdb: update regulatory database based on preceding changes Link: https://github.com/openwrt/openwrt/pull/15921 Signed-off-by: Hauke Mehrtens (cherry picked from commit 0a24fd91556e7bd4751676b5ce6324193b7a4aca) --- package/firmware/wireless-regdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile index 5b95ec59de..4cce267f61 100644 --- a/package/firmware/wireless-regdb/Makefile +++ b/package/firmware/wireless-regdb/Makefile @@ -1,14 +1,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wireless-regdb -PKG_VERSION:=2024.05.08 +PKG_VERSION:=2024.07.04 PKG_RELEASE:=1 PKG_LICENSE:=ISC PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/ -PKG_HASH:=9aee1d86ebebb363b714bec941b2820f31e3b7f1a485ddc9fcbd9985c7d3e7c4 +PKG_HASH:=9832a14e1be24abff7be30dee3c9a1afb5fdfcf475a0d91aafef039f8d85f5eb PKG_MAINTAINER:=Felix Fietkau