From ec8f647d168fa8f3b1eedd9b5fe665f793f3a659 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Tue, 7 May 2024 08:46:07 +0200 Subject: [PATCH 01/10] ipq806x: swap lan leds for Meraki MR52 LAN Leds on Meraki MR52 are wrong and needs to be swapped to actually reflect real ports (lan1<->lan2). Fixes: #15388 Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/15410 [ wrap commit to 80 columns and improve commit title ] Signed-off-by: Christian Marangi (cherry picked from commit bd6852185b7c7362fc5485afa961c686d9cd74b4) --- .../arch/arm/boot/dts/qcom-ipq8068-mr52.dts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts index f81e3ef690..b49ea499d6 100644 --- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts +++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts @@ -44,13 +44,13 @@ gpios = <&qcom_pinmux 19 GPIO_ACTIVE_HIGH>; }; - lan2_green { - label = "green:lan2"; + lan1_green { + label = "green:lan1"; gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>; }; - lan1_green { - label = "green:lan1"; + lan2_green { + label = "green:lan2"; gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>; }; @@ -59,13 +59,13 @@ gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>; }; - lan2_orange { - label = "orange:lan2"; + lan1_orange { + label = "orange:lan1"; gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>; }; - lan1_orange { - label = "orange:lan1"; + lan2_orange { + label = "orange:lan2"; gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>; }; }; From 5c4c9ae05953884a75e1c2b0afb14759b9e6d6f8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 29 Apr 2024 18:58:40 +0200 Subject: [PATCH 02/10] mt76: update to the latest version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit b5d13611d35e mt76: mt7915: fix monitor mode issues bbbac7deee3d wifi: mt76: rename mt76_packet_id_init/flush to mt76_wcid_init/cleanup f1e1e67d97d1 wifi: mt76: fix race condition related to checking tx queue fill status b3f739a64e6b wifi: mt76: mt7996: add eht rx rate support ca4917062f17 wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power 325a0c493199 wifi: mt76: mt7996: fill txd by host driver cd371fcc98d4 mt76: mt7996: sync with upstream d71f8d1b172b wifi: mt76: use atomic iface iteration for pre-TBTT work 8d5ea32d4895 wifi: mt76: remove unused error path in mt76_connac_tx_complete_skb 01860c02c505 wifi: mt76: add DMA mapping error check in mt76_alloc_txwi() 62ddb6d46a97 wifi: mt76: connac: introduce helper for mt7925 chipset 0837f37e998b wifi: mt76: mt792x: support mt7925 chip init 899ff378082b wifi: mt76: connac: export functions for mt7925 c3858b5bf347 wifi: mt76: connac: add eht support for phy mode config 5df6b26a9fc5 wifi: mt76: connac: add eht support for tx power a8081345c636 wifi: mt76: connac: add data field in struct tlv 9b38aebecf78 wifi: mt76: connac: add more unified command IDs 84984e6dc87d wifi: mt76: connac: add more unified event IDs 6fe92398c9ce wifi: mt76: mt7996: set correct wcid in txp 2cfe2fb0bb80 wifi: mt76: mt7996: fix beamform mcu cmd configuration e512241bb5bb wifi: mt76: mt7996: fix beamformee ss subfield in EHT PHY cap 719a98f832c7 wifi: mt76: mt7996: fix wmm queue mapping 9723562f2a5b wifi: mt76: mt7996: fix rx rate report for CBW320-2 1bb5a6a54943 wifi: mt76: mt7996: fix TWT command format 751b054891f6 wifi: mt76: mt7996: only set vif teardown cmds at remove interface fea1e10c7741 wifi: mt76: mt7996: support more options for mt7996_set_bitrate_mask() d497ee8aa2f5 wifi: mt76: mt7996: support per-band LED control 8ccc84111141 wifi: mt76: Use PTR_ERR_OR_ZERO() to simplify code 161f70217edf wifi: mt76: mt7921e: Support MT7992 IP in Xiaomi Redmibook 15 Pro (2023) 7d25bfc3f0cc wifi: mt76: fix clang-specific fortify warnings 5971aa968401 wifi: mt76: connac: add MBSSID support for mt7996 5a47dd323be1 wifi: mt76: update beacon size limitation d5b4b81dcc9e wifi: mt76: check sta rx control frame to multibss capability af0e1f6dafb5 wifi: mt76: fix potential memory leak of beacon commands 65d91a833b01 wifi: mt76: get rid of false alamrs of tx emission issues 29411e52059f wifi: mt76: fix per-band IEEE80211_CONF_MONITOR flag comparison 4da62774038a wifi: mt76: check vif type before reporting cca and csa 4a85678fe089 wifi: mt76: mt7915: update mpdu density capability 791a45cffadf wifi: mt76: mt7915: fix beamforming availability check 08e1e6cb7d41 wifi: mt76: Drop unnecessary error check for debugfs_create_dir() d1881b1b2bf6 wifi: mt76: move struct ieee80211_chanctx_conf up to struct mt76_vif 66d5694e1898 wifi: mt76: mt7921: fix the wrong rate pickup for the chanctx driver 9fc37b0ac546 wifi: mt76: mt7921: fix the wrong rate selected in fw for the chanctx driver 2afc7285f75d wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips Signed-off-by: Felix Fietkau (cherry picked from commit ef8e2f66f563d0d1864be37075dacf3f13defdc7) Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 56 +++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 500735303f..dd75390ee7 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,16 +1,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=2 +PKG_RELEASE=1 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-09-11 -PKG_SOURCE_VERSION:=f1e1e67d97d1e9a8bb01b59ab20c45ebc985a958 -PKG_MIRROR_HASH:=41fde79de5bec3aaafdb64658475a1fa99bc483b8122e6aad9b2aa8aa8edfce6 +PKG_SOURCE_DATE:=2023-09-18 +PKG_SOURCE_VERSION:=2afc7285f75dca5a0583fd917285bf33f1429cc6 +PKG_MIRROR_HASH:=2c9556b298246277ac2d65415e4449f98e6d5fdb99e0d0a92262f162df772bbc PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 @@ -315,6 +315,38 @@ define KernelPackage/mt7921e AUTOLOAD:=$(call AutoProbe,mt7921e) endef +define KernelPackage/mt7996e + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7996E wireless driver + DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac + FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko + AUTOLOAD:=$(call AutoProbe,mt7996e) +endef + +define KernelPackage/mt7925-common + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7925 wireless driver common code + HIDDEN:=1 + DEPENDS+=+kmod-mt792x-common +@DRIVER_11AX_SUPPORT +kmod-hwmon-core + FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925-common.ko +endef + +define KernelPackage/mt7925u + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7925U wireless driver + DEPENDS+=+kmod-mt792x-usb +kmod-mt7925-common + FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925u.ko + AUTOLOAD:=$(call AutoProbe,mt7921u) +endef + +define KernelPackage/mt7925e + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7925e wireless driver + DEPENDS+=@PCI_SUPPORT +kmod-mt7925-common + FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925e.ko + AUTOLOAD:=$(call AutoProbe,mt7921e) +endef + define Package/mt76-test SECTION:=devel CATEGORY:=Development @@ -423,6 +455,18 @@ endif ifdef CONFIG_PACKAGE_kmod-mt7921e PKG_MAKE_FLAGS += CONFIG_MT7921E=m endif +ifdef CONFIG_PACKAGE_kmod-mt7996e + PKG_MAKE_FLAGS += CONFIG_MT7996E=m +endif +ifdef CONFIG_PACKAGE_kmod-mt7925-common + PKG_MAKE_FLAGS += CONFIG_MT7925_COMMON=m +endif +ifdef CONFIG_PACKAGE_kmod-mt7925u + PKG_MAKE_FLAGS += CONFIG_MT7925U=m +endif +ifdef CONFIG_PACKAGE_kmod-mt7925e + PKG_MAKE_FLAGS += CONFIG_MT7925E=m +endif define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ @@ -603,8 +647,12 @@ $(eval $(call KernelPackage,mt7922-firmware)) $(eval $(call KernelPackage,mt792x-common)) $(eval $(call KernelPackage,mt792x-usb)) $(eval $(call KernelPackage,mt7921-common)) +$(eval $(call KernelPackage,mt7925-common)) $(eval $(call KernelPackage,mt7921u)) $(eval $(call KernelPackage,mt7921s)) $(eval $(call KernelPackage,mt7921e)) +$(eval $(call KernelPackage,mt7925u)) +$(eval $(call KernelPackage,mt7925e)) +$(eval $(call KernelPackage,mt7996e)) $(eval $(call KernelPackage,mt76)) $(eval $(call BuildPackage,mt76-test)) From 06be957f86d037ed710a8b426aca493590c451de Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 29 Apr 2024 18:58:41 +0200 Subject: [PATCH 03/10] mt76: update to Git HEAD (2023-12-08) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 890ae4d717f1 wifi: mt76: mt76x02: fix MT76x0 external LNA gain handling fcc2f3d82bc9 wifi: mt76: fix lock dependency problem for wed_lock 77cc14596202 wifi: mt76: mt792x: move mt7921_skb_add_usb_sdio_hdr in mt792x module bc85355885d1 wifi: mt76: mt792x: move some common usb code in mt792x module c27f01c4c834 wifi: mt76: mt7996: get tx_retries and tx_failed from txfree 30aba4c18307 wifi: mt76: mt7996: Add mcu commands for getting sta tx statistic 119bebff244b wifi: mt76: mt7996: enable PPDU-TxS to host a4005e0e83e7 wifi: mt76: mt7996: remove periodic MPDU TXS request d6cc20bf5913 wifi: mt76: reduce spin_lock_bh held up in mt76_dma_rx_cleanup 5d94251d641c wifi: mt76: mt7921: move connac nic capability handling to mt7921 266341b5019d wifi: mt76: mt7921: enable set txpower for UNII-4 581449ac5274 wifi: mt76: mt7921: add 6GHz power type support for clc 9bfd669e9477 wifi: mt76: mt7921: get regulatory information from the clc event 4a0f839da0f1 wifi: mt76: mt7921: update the channel usage when the regd domain changed f4df423d3d56 wifi: mt76: add ability to explicitly forbid LED registration with DT 54d369e79972 wifi: mt76: mt7921: support 5.9/6GHz channel config in acpi b39b6cba220f wifi: mt76: mt7996: fix uninitialized variable in parsing txfree 77194e652885 wifi: mt76: fix typo in mt76_get_of_eeprom_from_nvmem function c37738fc9097 wifi: mt76: limit support of precal loading for mt7915 to MTD only d6e8aa634a19 wifi: mt76: make mt76_get_of_eeprom static again d1c671a90eba wifi: mt76: permit to use alternative cell name to eeprom NVMEM load 5539001fe4e3 wifi: mt76: permit to load precal from NVMEM cell for mt7915 48d413380685 wifi: mt76: Remove unnecessary (void*) conversions ea2814289147 wifi: mt76: mmio: move mt76_mmio_wed_{init,release}_rx_buf in common code 9fb0277d7ee8 wifi: mt76: move mt76_mmio_wed_offload_{enable,disable} in common code 4b47145ecf44 wifi: mt76: move mt76_net_setup_tc in common code d798d5d6f770 wifi: mt76: introduce mt76_queue_is_wed_tx_free utility routine 48b0cedbf83f wifi: mt76: introduce wed pointer in mt76_queue c550204e347d wifi: mt76: increase MT_QFLAG_WED_TYPE size 2e7f30f22cfd wifi: mt76: mt7996: add wed tx support ec8765a02fc8 wifi: mt76: dma: introduce __mt76_dma_queue_reset utility routine a469aaac9784 wifi: mt76: mt7996: use u16 for val field in mt7996_mcu_set_rro signature abca260a15c4 wifi: mt76: mt7996: add wed rx support be2e74c0c495 wifi: mt76: move wed reset common code in mt76 module 7f17e164fbb4 wifi: mt76: mt7996: add wed reset support 0f89bf58efda wifi: mt76: mt7996: add wed rro delete session garbage collector a58b75f863ca wifi: mt76: mt7915: fallback to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init() 36d2ddd94eeb wifi: mt76: mt7996: add support for variants with auxiliary RX path cec7720c9341 wifi: mt76: mt7996: add TX statistics for EHT mode in debugfs 9852093062e8 wifi: mt76: connac: add thermal protection support for mt7996 955540a4df74 wifi: mt76: mt7996: add thermal sensor device support af41374a3b8e wifi: mt76: connac: add beacon duplicate TX mode support for mt7996 3c98d7b7fa23 wifi: mt76: mt7996: fix the size of struct bss_rate_tlv ee2169c00539 wifi: mt76: mt7996: adjust WFDMA settings to improve performance 0aead5de68a7 wifi: mt76: connac: set fixed_bw bit in TX descriptor for fixed rate frames ab5580ff5a4f wifi: mt76: mt7996: handle IEEE80211_RC_SMPS_CHANGED eed234afed7e wifi: mt76: mt7996: align the format of fixed rate command d9a855285b95 wifi: mt76: mt7996: fix rate usage of inband discovery frames 47799aefe263 wifi: mt76: change txpower init to per-phy 264e1ecfe1b4 wifi: mt76: mt7996: add txpower setting support c7b243b127eb wifi: mt76: use chainmask for power delta calculation 05f433900a02 wifi: mt76: mt7996: switch to mcu command for TX GI report ae963198e605 wifi: mt76: mt7996: fix alignment of sta info event d0d2e03591d6 wifi: mt76: mt7996: rework ampdu params setting e87f4efc7638 wifi: mt76: connac: add beacon protection support for mt7996 0dfcc53a8e5d wifi: mt76: connac: fix EHT phy mode check 30c54a53bf8b wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981 17297c97b737 wifi: mt76: mt7915: also MT7981 is 3T3R but nss2 on 5 GHz band eeb48c081034 wifi: mt76: mt7996: fix mt7996_mcu_all_sta_info_event struct packing b74ad922659c wifi: mt76: mt7996: introduce mt7996_band_valid() 51cb541c1e53 wifi: mt76: connac: add firmware support for mt7992 c0eda4d96ec8 wifi: mt76: mt7996: add DMA support for mt7992 f12471968a53 wifi: mt76: mt7996: rework register offsets for mt7992 8d11dae73eb8 wifi: mt76: mt7996: support mt7992 eeprom loading 6c2b2c37abd7 wifi: mt76: mt7996: adjust interface num and wtbl size for mt7992 df1d3b3c67e5 wifi: mt76: connac: add new definition of tx descriptor f997e759cea5 wifi: mt76: mt7996: add PCI IDs for mt7992 94e3632e4e93 wifi: mt76: mt7925: remove iftype from mt7925_init_eht_caps signature 9c7b98c03173 net: ethernet: mtk_wed: rename mtk_rxbm_desc in mtk_wed_bm_desc 4423b4eb69fb wifi: mt76: mt7996: fix endianness in mt7996_mcu_wed_rro_event b97d899a7907 wifi: mt76: mt7921: fix kernel panic by accessing invalid 6GHz channel info 9ef06028d4fe wifi: mt76: mt7921s: fix workqueue problem causes STA association fail 95c14207d2a9 wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM dbea5151412b wifi: mt76: mt7921: reduce the size of MCU firmware download Rx queue a84a355d2e0a wifi: mt76: mt7921: fix country count limitation for CLC c498f27ad075 wifi: mt76: mt7921: fix CLC command timeout when suspend/resume 3098d968abe4 wifi: mt76: mt7921: fix wrong 6Ghz power type 7730fc91dd15 wifi: mt76: fix shift overflow warnings on 32 bit systems f559adf1849c wifi: mt76: fix crash with WED rx support enabled Signed-off-by: Felix Fietkau (cherry picked from commit 8f782ed07dc23b64bb24f63ce31d939ee6afb5ad) [rmilecki: add patches/fixes for regressions from this commit] Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 8 +-- ..._wed-rename-mtk_rxbm_desc-in-mtk_wed.patch | 24 -------- ...-fix-shift-overflow-warning-on-32-bi.patch | 34 +++++++++++ ...-fix-6GHz-disabled-by-the-missing-de.patch | 31 ++++++++++ ...wifi-mt76-mt7996-fix-fortify-warning.patch | 26 ++++++++ ...i-mt76-mt7996-fix-fw-loading-timeout.patch | 38 ++++++++++++ ...-check-txs-format-before-getting-skb.patch | 60 +++++++++++++++++++ ...-fix-incorrect-type-conversion-for-C.patch | 38 ++++++++++++ ...e-issue-of-missing-txpwr-settings-fr.patch | 28 +++++++++ ...7996-fix-size-of-txpower-MCU-command.patch | 56 +++++++++++++++++ ...-fix-uninitialized-variable-in-mt799.patch | 27 +++++++++ ...-fix-potential-memory-leakage-when-r.patch | 39 ++++++++++++ 12 files changed, 381 insertions(+), 28 deletions(-) delete mode 100644 package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch create mode 100644 package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch create mode 100644 package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch create mode 100644 package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch create mode 100644 package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch create mode 100644 package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch create mode 100644 package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch create mode 100644 package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch create mode 100644 package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch create mode 100644 package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch create mode 100644 package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index dd75390ee7..762f474ce9 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-09-18 -PKG_SOURCE_VERSION:=2afc7285f75dca5a0583fd917285bf33f1429cc6 -PKG_MIRROR_HASH:=2c9556b298246277ac2d65415e4449f98e6d5fdb99e0d0a92262f162df772bbc +PKG_SOURCE_DATE:=2023-12-08 +PKG_SOURCE_VERSION:=f559adf1849c8af91f5a5eb670f4ed2c24988898 +PKG_MIRROR_HASH:=74dde4478442d5f0edbae918636b40767b0e49181b732d4184feeccd8a8cc328 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 @@ -318,7 +318,7 @@ endef define KernelPackage/mt7996e $(KernelPackage/mt76-default) TITLE:=MediaTek MT7996E wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac + DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko AUTOLOAD:=$(call AutoProbe,mt7996e) endef diff --git a/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch b/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch deleted file mode 100644 index 15241c8195..0000000000 --- a/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9c7b98c03173a1a201d74203a81b344a0cd637ac Mon Sep 17 00:00:00 2001 -From: Lorenzo Bianconi -Date: Mon, 18 Sep 2023 12:29:07 +0200 -Subject: [PATCH] net: ethernet: mtk_wed: rename mtk_rxbm_desc in - mtk_wed_bm_desc - -Rename mtk_rxbm_desc structure in mtk_wed_bm_desc since it will be used -even on tx side by MT7988 SoC. - -Signed-off-by: Lorenzo Bianconi -Signed-off-by: Paolo Abeni ---- - ---- a/mt7915/mmio.c -+++ b/mt7915/mmio.c -@@ -591,7 +591,7 @@ static void mt7915_mmio_wed_release_rx_b - - static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size) - { -- struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc; -+ struct mtk_wed_bm_desc *desc = wed->rx_buf_ring.desc; - struct mt76_txwi_cache *t = NULL; - struct mt7915_dev *dev; - struct mt76_queue *q; diff --git a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch b/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch new file mode 100644 index 0000000000..5acc9e88a5 --- /dev/null +++ b/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch @@ -0,0 +1,34 @@ +From f63f87cd5b45c3779293e6062c6b26bdf57e851d Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Sat, 9 Dec 2023 22:44:57 +0100 +Subject: [PATCH] wifi: mt76: mt7996: fix shift overflow warning on 32 bit + systems + +Fix additional shift overflow warning on 32 bit systems for mt7996 mac.c +source. + +Fixes: 95c14207d2a9 ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM") +Signed-off-by: Christian Marangi +--- + mt7996/mac.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/mt7996/mac.c ++++ b/mt7996/mac.c +@@ -942,9 +942,13 @@ int mt7996_tx_prepare_skb(struct mt76_de + + txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE); + for (i = 0; i < nbuf; i++) { +- u16 len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len) | +- FIELD_PREP(MT_TXP_DMA_ADDR_H, +- tx_info->buf[i + 1].addr >> 32); ++ u16 len; ++ ++ len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len); ++#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT ++ len |= FIELD_PREP(MT_TXP_DMA_ADDR_H, ++ tx_info->buf[i + 1].addr >> 32); ++#endif + + txp->fw.buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr); + txp->fw.len[i] = cpu_to_le16(len); diff --git a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch new file mode 100644 index 0000000000..3fff9caa3c --- /dev/null +++ b/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch @@ -0,0 +1,31 @@ +From bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b Mon Sep 17 00:00:00 2001 +From: Ming Yen Hsieh +Date: Mon, 30 Oct 2023 15:17:34 +0800 +Subject: [PATCH] wifi: mt76: mt7921: fix 6GHz disabled by the missing default + CLC config + +No matter CLC is enabled or disabled, the driver should initialize +the default value 0xff for channel configuration of CLC. Otherwise, +the zero value would disable channels. + +Reported-and-tested-by: Ben Greear +Closes: https://lore.kernel.org/all/2fb78387-d226-3193-8ca7-90040561b9ad@candelatech.com/ +Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed") +Signed-off-by: Ming Yen Hsieh +Signed-off-by: Deren Wu +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/5a976ddf1f636b5cb809373501d3cfdc6d8de3e4.1698648737.git.deren.wu@mediatek.com +--- + mt7921/mcu.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/mt7921/mcu.c ++++ b/mt7921/mcu.c +@@ -375,6 +375,7 @@ static int mt7921_load_clc(struct mt792x + int ret, i, len, offset = 0; + u8 *clc_base = NULL, hw_encap = 0; + ++ dev->phy.clc_chan_conf = 0xff; + if (mt7921_disable_clc || + mt76_is_usb(&dev->mt76)) + return 0; diff --git a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch new file mode 100644 index 0000000000..f3cf9c10fa --- /dev/null +++ b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch @@ -0,0 +1,26 @@ +From 786a339bac36d8e53eb8b540e79221d20011ab2a Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sat, 3 Feb 2024 14:21:58 +0100 +Subject: [PATCH] wifi: mt76: mt7996: fix fortify warning + +Copy cck and ofdm separately in order to avoid __read_overflow2_field +warning. + +Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support") +Signed-off-by: Felix Fietkau +--- + mt7996/mcu.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/mt7996/mcu.c ++++ b/mt7996/mcu.c +@@ -4477,7 +4477,8 @@ int mt7996_mcu_set_txpower_sku(struct mt + + skb_put_data(skb, &req, sizeof(req)); + /* cck and ofdm */ +- skb_put_data(skb, &la.cck, sizeof(la.cck) + sizeof(la.ofdm)); ++ skb_put_data(skb, &la.cck, sizeof(la.cck)); ++ skb_put_data(skb, &la.ofdm, sizeof(la.ofdm)); + /* ht20 */ + skb_put_data(skb, &la.mcs[0], 8); + /* ht40 */ diff --git a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch new file mode 100644 index 0000000000..9c2247b0c2 --- /dev/null +++ b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch @@ -0,0 +1,38 @@ +From bc37a7ebc267e400fc4e9886b7197b4b866763d1 Mon Sep 17 00:00:00 2001 +From: Lorenzo Bianconi +Date: Thu, 21 Dec 2023 10:41:18 +0100 +Subject: [PATCH] wifi: mt76: mt7996: fix fw loading timeout + +Fix the following firmware loading error due to a wrong dma register +configuration if wed is disabled. + +[ 8.245881] mt7996e_hif 0001:01:00.0: assign IRQ: got 128 +[ 8.251308] mt7996e_hif 0001:01:00.0: enabling device (0000 -> 0002) +[ 8.257674] mt7996e_hif 0001:01:00.0: enabling bus mastering +[ 8.263488] mt7996e 0000:01:00.0: assign IRQ: got 126 +[ 8.268537] mt7996e 0000:01:00.0: enabling device (0000 -> 0002) +[ 8.274551] mt7996e 0000:01:00.0: enabling bus mastering +[ 28.648773] mt7996e 0000:01:00.0: Message 00000010 (seq 1) timeout +[ 28.654959] mt7996e 0000:01:00.0: Failed to get patch semaphore +[ 29.661033] mt7996e: probe of 0000:01:00.0 failed with error -11 + +Suggested-by: Sujuan Chen" +Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM") +Signed-off-by: Lorenzo Bianconi +Signed-off-by: Felix Fietkau +--- + mt7996/dma.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/mt7996/dma.c ++++ b/mt7996/dma.c +@@ -237,7 +237,8 @@ void mt7996_dma_start(struct mt7996_dev + MT_WFDMA0_GLO_CFG_TX_DMA_EN | + MT_WFDMA0_GLO_CFG_RX_DMA_EN | + MT_WFDMA0_GLO_CFG_OMIT_TX_INFO | +- MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2); ++ MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 | ++ MT_WFDMA0_GLO_CFG_EXT_EN); + + if (dev->hif2) + mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs, diff --git a/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch b/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch new file mode 100644 index 0000000000..f72c76ec66 --- /dev/null +++ b/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch @@ -0,0 +1,60 @@ +From 025d5734caba6fa1fd96b57c19c61e42e601815b Mon Sep 17 00:00:00 2001 +From: Peter Chiu +Date: Fri, 26 Jan 2024 17:09:12 +0800 +Subject: [PATCH] wifi: mt76: mt7996: check txs format before getting skb by + pid + +The PPDU TXS does not include the error bit so it cannot use to report +status to mac80211. This patch fixes issue that STA wrongly detects if AP +is still alive. + +Fixes: 2569ea5326e2 ("wifi: mt76: mt7996: enable PPDU-TxS to host") +Signed-off-by: Peter Chiu +Signed-off-by: Shayne Chen +Signed-off-by: Felix Fietkau +--- + mt7996/mac.c | 23 +++++++++++++---------- + 1 file changed, 13 insertions(+), 10 deletions(-) + +--- a/mt7996/mac.c ++++ b/mt7996/mac.c +@@ -1188,25 +1188,28 @@ mt7996_mac_add_txs_skb(struct mt7996_dev + struct ieee80211_tx_info *info; + struct sk_buff_head list; + struct rate_info rate = {}; +- struct sk_buff *skb; ++ struct sk_buff *skb = NULL; + bool cck = false; + u32 txrate, txs, mode, stbc; + + txs = le32_to_cpu(txs_data[0]); + + mt76_tx_status_lock(mdev, &list); +- skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list); + +- if (skb) { +- info = IEEE80211_SKB_CB(skb); +- if (!(txs & MT_TXS0_ACK_ERROR_MASK)) +- info->flags |= IEEE80211_TX_STAT_ACK; +- +- info->status.ampdu_len = 1; +- info->status.ampdu_ack_len = +- !!(info->flags & IEEE80211_TX_STAT_ACK); ++ /* only report MPDU TXS */ ++ if (le32_get_bits(txs_data[0], MT_TXS0_TXS_FORMAT) == 0) { ++ skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list); ++ if (skb) { ++ info = IEEE80211_SKB_CB(skb); ++ if (!(txs & MT_TXS0_ACK_ERROR_MASK)) ++ info->flags |= IEEE80211_TX_STAT_ACK; ++ ++ info->status.ampdu_len = 1; ++ info->status.ampdu_ack_len = ++ !!(info->flags & IEEE80211_TX_STAT_ACK); + +- info->status.rates[0].idx = -1; ++ info->status.rates[0].idx = -1; ++ } + } + + if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) { diff --git a/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch b/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch new file mode 100644 index 0000000000..a85dfb7f72 --- /dev/null +++ b/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch @@ -0,0 +1,38 @@ +From d75eac9f5531e484fbbabf2652922976e15a7a7a Mon Sep 17 00:00:00 2001 +From: Ming Yen Hsieh +Date: Tue, 16 Jan 2024 10:48:54 +0800 +Subject: [PATCH] wifi: mt76: mt7921: fix incorrect type conversion for CLC + command + +clc->len is defined as 32 bits in length, so it must also be +operated on with 32 bits, not 16 bits. + +Fixes: fa6ad88e023d ("wifi: mt76: mt7921: fix country count limitation for CLC") +Signed-off-by: Ming Yen Hsieh +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202312112104.Zkc3QUHr-lkp@intel.com/ +Signed-off-by: Felix Fietkau +--- + mt7921/mcu.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/mt7921/mcu.c ++++ b/mt7921/mcu.c +@@ -1272,7 +1272,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d + .mtcl_conf = mt792x_acpi_get_mtcl_conf(&dev->phy, alpha2), + }; + int ret, valid_cnt = 0; +- u16 buf_len = 0; ++ u32 buf_len = 0; + u8 *pos; + + if (!clc) +@@ -1283,7 +1283,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d + if (mt76_find_power_limits_node(&dev->mt76)) + req.cap |= CLC_CAP_DTS_EN; + +- buf_len = le16_to_cpu(clc->len) - sizeof(*clc); ++ buf_len = le32_to_cpu(clc->len) - sizeof(*clc); + pos = clc->data; + while (buf_len > 16) { + struct mt7921_clc_rule *rule = (struct mt7921_clc_rule *)pos; diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch b/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch new file mode 100644 index 0000000000..380bdfac38 --- /dev/null +++ b/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch @@ -0,0 +1,28 @@ +From 841bf82e99581f648325bee570de98892cad894f Mon Sep 17 00:00:00 2001 +From: Ming Yen Hsieh +Date: Wed, 7 Feb 2024 11:31:23 +0800 +Subject: [PATCH] wifi: mt76: fix the issue of missing txpwr settings from + ch153 to ch177 + +Because the number of channels to be configured is calculated using the %, +and it results in 0 when there's an exact division, this leads to some +channels not having their tx power configured. + +Fixes: 7801da338856 ("wifi: mt76: mt7921: enable set txpower for UNII-4") +Signed-off-by: Ming Yen Hsieh +Signed-off-by: Felix Fietkau +--- + mt76_connac_mcu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mt76_connac_mcu.c ++++ b/mt76_connac_mcu.c +@@ -2101,7 +2101,7 @@ mt76_connac_mcu_rate_txpower_band(struct + int j, msg_len, num_ch; + struct sk_buff *skb; + +- num_ch = i == batch_size - 1 ? n_chan % batch_len : batch_len; ++ num_ch = i == batch_size - 1 ? n_chan - i * batch_len : batch_len; + msg_len = sizeof(tx_power_tlv) + num_ch * sizeof(sku_tlbv); + skb = mt76_mcu_msg_alloc(dev, NULL, msg_len); + if (!skb) { diff --git a/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch b/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch new file mode 100644 index 0000000000..f1d3af80b8 --- /dev/null +++ b/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch @@ -0,0 +1,56 @@ +From b108dda7e201994f10c885362b07ff3b6e1e843d Mon Sep 17 00:00:00 2001 +From: Chad Monroe +Date: Tue, 5 Mar 2024 17:55:35 +0000 +Subject: [PATCH] wifi: mt76: mt7996: fix size of txpower MCU command + +Fixes issues with scanning and low power output at some rates. + +Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support") +Signed-off-by: Chad Monroe +Signed-off-by: Ryder Lee +Signed-off-by: Felix Fietkau +--- + mt7996/mcu.c | 7 +++++-- + mt7996/mt7996.h | 1 + + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/mt7996/mcu.c ++++ b/mt7996/mcu.c +@@ -4456,7 +4456,7 @@ int mt7996_mcu_set_txpower_sku(struct mt + u8 band_idx; + } __packed req = { + .tag = cpu_to_le16(UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL), +- .len = cpu_to_le16(sizeof(req) + MT7996_SKU_RATE_NUM - 4), ++ .len = cpu_to_le16(sizeof(req) + MT7996_SKU_PATH_NUM - 4), + .power_ctrl_id = UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL, + .power_limit_type = TX_POWER_LIMIT_TABLE_RATE, + .band_idx = phy->mt76->band_idx, +@@ -4471,7 +4471,7 @@ int mt7996_mcu_set_txpower_sku(struct mt + mphy->txpower_cur = tx_power; + + skb = mt76_mcu_msg_alloc(&dev->mt76, NULL, +- sizeof(req) + MT7996_SKU_RATE_NUM); ++ sizeof(req) + MT7996_SKU_PATH_NUM); + if (!skb) + return -ENOMEM; + +@@ -4495,6 +4495,9 @@ int mt7996_mcu_set_txpower_sku(struct mt + /* eht */ + skb_put_data(skb, &la.eht[0], sizeof(la.eht)); + ++ /* padding */ ++ skb_put_zero(skb, MT7996_SKU_PATH_NUM - MT7996_SKU_RATE_NUM); ++ + return mt76_mcu_skb_send_msg(&dev->mt76, skb, + MCU_WM_UNI_CMD(TXPOWER), true); + } +--- a/mt7996/mt7996.h ++++ b/mt7996/mt7996.h +@@ -50,6 +50,7 @@ + #define MT7996_CFEND_RATE_11B 0x03 /* 11B LP, 11M */ + + #define MT7996_SKU_RATE_NUM 417 ++#define MT7996_SKU_PATH_NUM 494 + + #define MT7996_MAX_TWT_AGRT 16 + #define MT7996_MAX_STA_TWT_AGRT 8 diff --git a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch b/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch new file mode 100644 index 0000000000..b0b7a78e3c --- /dev/null +++ b/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch @@ -0,0 +1,27 @@ +From b96ab5e62010887a8abee43dbcccf6f4b3fcb269 Mon Sep 17 00:00:00 2001 +From: Lorenzo Bianconi +Date: Tue, 19 Mar 2024 13:05:36 +0100 +Subject: [PATCH] wifi: mt76: mt7996: fix uninitialized variable in + mt7996_irq_tasklet() + +Set intr1 to 0 in mt7996_irq_tasklet() in order to avoid possible +uninitialized variable usage if wed is not active for hif2. + +Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support") +Signed-off-by: Lorenzo Bianconi +Signed-off-by: Felix Fietkau +--- + mt7996/mmio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mt7996/mmio.c ++++ b/mt7996/mmio.c +@@ -499,7 +499,7 @@ static void mt7996_irq_tasklet(struct ta + struct mt7996_dev *dev = from_tasklet(dev, t, mt76.irq_tasklet); + struct mtk_wed_device *wed = &dev->mt76.mmio.wed; + struct mtk_wed_device *wed_hif2 = &dev->mt76.mmio.wed_hif2; +- u32 i, intr, mask, intr1; ++ u32 i, intr, mask, intr1 = 0; + + if (dev->hif2 && mtk_wed_device_active(wed_hif2)) { + mtk_wed_device_irq_set_mask(wed_hif2, 0); diff --git a/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch b/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch new file mode 100644 index 0000000000..a0d62dc5af --- /dev/null +++ b/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch @@ -0,0 +1,39 @@ +From 424e9df466cea3bb39a1e92bf95f3efe65472c27 Mon Sep 17 00:00:00 2001 +From: Howard Hsu +Date: Wed, 20 Mar 2024 19:09:14 +0800 +Subject: [PATCH] wifi: mt76: mt7996: fix potential memory leakage when reading + chip temperature + +Without this commit, reading chip temperature will cause memory leakage. + +Fixes: 6879b2e94172 ("wifi: mt76: mt7996: add thermal sensor device support") +Reported-by: Ryder Lee +Signed-off-by: Howard Hsu +Signed-off-by: Shayne Chen +Signed-off-by: Felix Fietkau +--- + mt7996/mcu.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/mt7996/mcu.c ++++ b/mt7996/mcu.c +@@ -3721,6 +3721,7 @@ int mt7996_mcu_get_temperature(struct mt + } __packed * res; + struct sk_buff *skb; + int ret; ++ u32 temp; + + ret = mt76_mcu_send_and_get_msg(&phy->dev->mt76, MCU_WM_UNI_CMD(THERMAL), + &req, sizeof(req), true, &skb); +@@ -3728,8 +3729,10 @@ int mt7996_mcu_get_temperature(struct mt + return ret; + + res = (void *)skb->data; ++ temp = le32_to_cpu(res->temperature); ++ dev_kfree_skb(skb); + +- return le32_to_cpu(res->temperature); ++ return temp; + } + + int mt7996_mcu_set_thermal_throttling(struct mt7996_phy *phy, u8 state) From 3704eb3c3f5063f42d6128160f191b86e2c42437 Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Thu, 9 May 2024 21:11:09 -0300 Subject: [PATCH 04/10] ipq40xx: whw03v2: fix handling of RGB LED The RGB LED should glow green in the 'running' state, but it was glowing cyan because the blue component defaulted to 'on'. Signed-off-by: Rodrigo Balerdi (cherry picked from commit fc62d66c20b9e9f52ed787d2079baab06108b959) Link: https://github.com/openwrt/openwrt/pull/15438 Signed-off-by: Robert Marko --- .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts index e01be0ae4b..aba7cb8bea 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts @@ -278,7 +278,6 @@ label = "red"; color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <0>; }; @@ -286,7 +285,6 @@ label = "green"; color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <1>; }; @@ -294,7 +292,6 @@ label = "blue"; color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "default-on"; reg = <2>; }; }; From 567af392b6d465a413b698ab6a245c30b7e6458f Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Thu, 9 May 2024 21:15:47 -0300 Subject: [PATCH 05/10] ipq40xx: whw03v2: change LED color for 'running' state to blue Change the RGB indicator LED color for the running state from green to blue. There are various reasons for this change: - In stock firmware, green means internet connection is up, red means it is down, and blue means indeterminate. To track stock behavior as closely as possible, OpenWrt should indicate blue by default. - In the current 23.x OpenWrt releases for this router, the led glows blue all the time -not green- because the bootloader sets it blue and there is an OpenWrt bug that makes it unable to control the LED. The bug is fixed in master, so without this commit there would be an unexpected change of behavior for this device in the next release. - The ports other closely related Linksys devices (such as EA8300 and MR8300) get this right and use blue for the running state. Signed-off-by: Rodrigo Balerdi (cherry picked from commit c2f52e42b1e9f736edd6e4545ebe3435db6605ee) Link: https://github.com/openwrt/openwrt/pull/15438 Signed-off-by: Robert Marko --- .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts index aba7cb8bea..ab4dd9de8e 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts @@ -13,7 +13,7 @@ aliases { led-boot = &led_blue; led-failsafe = &led_red; - led-running = &led_green; + led-running = &led_blue; led-upgrade = &led_red; }; From e32782b2df1243183ed057f272f176dc2601cc33 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 11 Dec 2023 13:15:09 +0100 Subject: [PATCH 06/10] mt76: update to Git HEAD (2023-12-11) f63f87cd5b45 wifi: mt76: mt7996: fix shift overflow warning on 32 bit systems Signed-off-by: Felix Fietkau (cherry picked from commit da7b0351fce5dd59b79ea78d34c90c66b8bd6f6e) [rmilecki: it's a no-change for 23.05 as we had that fix backported] --- package/kernel/mt76/Makefile | 6 ++-- ...-fix-shift-overflow-warning-on-32-bi.patch | 34 ------------------- 2 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 762f474ce9..38a92c953e 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-12-08 -PKG_SOURCE_VERSION:=f559adf1849c8af91f5a5eb670f4ed2c24988898 -PKG_MIRROR_HASH:=74dde4478442d5f0edbae918636b40767b0e49181b732d4184feeccd8a8cc328 +PKG_SOURCE_DATE:=2023-12-11 +PKG_SOURCE_VERSION:=f63f87cd5b45c3779293e6062c6b26bdf57e851d +PKG_MIRROR_HASH:=43f1b1fb75dfb4756aa1767983b338bd63154f0f6c45554029e69af49d55b914 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch b/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch deleted file mode 100644 index 5acc9e88a5..0000000000 --- a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f63f87cd5b45c3779293e6062c6b26bdf57e851d Mon Sep 17 00:00:00 2001 -From: Christian Marangi -Date: Sat, 9 Dec 2023 22:44:57 +0100 -Subject: [PATCH] wifi: mt76: mt7996: fix shift overflow warning on 32 bit - systems - -Fix additional shift overflow warning on 32 bit systems for mt7996 mac.c -source. - -Fixes: 95c14207d2a9 ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM") -Signed-off-by: Christian Marangi ---- - mt7996/mac.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - ---- a/mt7996/mac.c -+++ b/mt7996/mac.c -@@ -942,9 +942,13 @@ int mt7996_tx_prepare_skb(struct mt76_de - - txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE); - for (i = 0; i < nbuf; i++) { -- u16 len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len) | -- FIELD_PREP(MT_TXP_DMA_ADDR_H, -- tx_info->buf[i + 1].addr >> 32); -+ u16 len; -+ -+ len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len); -+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT -+ len |= FIELD_PREP(MT_TXP_DMA_ADDR_H, -+ tx_info->buf[i + 1].addr >> 32); -+#endif - - txp->fw.buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr); - txp->fw.len[i] = cpu_to_le16(len); From 4be4d20662403d543256e0a5ef9959180135b383 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 18 Dec 2023 18:54:55 +0100 Subject: [PATCH 07/10] mt76: update to Git HEAD (2023-12-18) bebd9cffc2ae wifi: mt76: mt7921: fix 6GHz disabled by the missing default CLC config Signed-off-by: Felix Fietkau (cherry picked from commit 1a57d758f229a1e8d9085cd4775ebe7e1ec5d9b2) [rmilecki: it's a no-change for 23.05 as we had that fix backported] --- package/kernel/mt76/Makefile | 6 ++-- ...-fix-6GHz-disabled-by-the-missing-de.patch | 31 ------------------- 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 38a92c953e..65f6ca1e8e 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-12-11 -PKG_SOURCE_VERSION:=f63f87cd5b45c3779293e6062c6b26bdf57e851d -PKG_MIRROR_HASH:=43f1b1fb75dfb4756aa1767983b338bd63154f0f6c45554029e69af49d55b914 +PKG_SOURCE_DATE:=2023-12-18 +PKG_SOURCE_VERSION:=bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b +PKG_MIRROR_HASH:=580261755bc3f251b8bc5f7f610274693c067432187570694d2f2ccab0edb62b PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch deleted file mode 100644 index 3fff9caa3c..0000000000 --- a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b Mon Sep 17 00:00:00 2001 -From: Ming Yen Hsieh -Date: Mon, 30 Oct 2023 15:17:34 +0800 -Subject: [PATCH] wifi: mt76: mt7921: fix 6GHz disabled by the missing default - CLC config - -No matter CLC is enabled or disabled, the driver should initialize -the default value 0xff for channel configuration of CLC. Otherwise, -the zero value would disable channels. - -Reported-and-tested-by: Ben Greear -Closes: https://lore.kernel.org/all/2fb78387-d226-3193-8ca7-90040561b9ad@candelatech.com/ -Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed") -Signed-off-by: Ming Yen Hsieh -Signed-off-by: Deren Wu -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/5a976ddf1f636b5cb809373501d3cfdc6d8de3e4.1698648737.git.deren.wu@mediatek.com ---- - mt7921/mcu.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/mt7921/mcu.c -+++ b/mt7921/mcu.c -@@ -375,6 +375,7 @@ static int mt7921_load_clc(struct mt792x - int ret, i, len, offset = 0; - u8 *clc_base = NULL, hw_encap = 0; - -+ dev->phy.clc_chan_conf = 0xff; - if (mt7921_disable_clc || - mt76_is_usb(&dev->mt76)) - return 0; From c5ed115104ce35c0c5a6853b50889f8b777a759b Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Sat, 4 May 2024 16:11:00 +0200 Subject: [PATCH 08/10] realtek: Change LLTP register to LLDP These registers control the handling of Link Layer Discovery Protocol (LLDP) packets. This seems to be a typo in the naming. Signed-off-by: Kevin Jilissen (cherry picked from commit 81ab9ef2d166f9914a33d54d4dfd00429511ccb2) --- .../files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c | 4 ++-- .../files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h | 10 +++++----- .../files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c | 4 ++-- .../files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c index adff404fdd..d93087f5b1 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c @@ -1678,9 +1678,9 @@ void rtl838x_set_receive_management_action(int port, rma_ctrl_t type, action_typ sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), RTL838X_RMA_PTP_CTRL + ((port >> 4) << 2)); break; - case LLTP: + case LLDP: sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), - RTL838X_RMA_LLTP_CTRL + ((port >> 4) << 2)); + RTL838X_RMA_LLDP_CTRL + ((port >> 4) << 2)); break; default: break; diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h index 24d18d61fa..6d29e437af 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h @@ -425,7 +425,7 @@ typedef enum { PTP, PTP_UDP, PTP_ETH2, - LLTP, + LLDP, EAPOL, GRATARP, } rma_ctrl_t; @@ -449,10 +449,10 @@ typedef enum { #define RTL930X_RMA_PTP_CTRL (0x9E88) #define RTL931X_RMA_PTP_CTRL (0x8834) -#define RTL838X_RMA_LLTP_CTRL (0x4340) -#define RTL839X_RMA_LLTP_CTRL (0x124C) -#define RTL930X_RMA_LLTP_CTRL (0x9EFC) -#define RTL931X_RMA_LLTP_CTRL (0x8918) +#define RTL838X_RMA_LLDP_CTRL (0x4340) +#define RTL839X_RMA_LLDP_CTRL (0x124C) +#define RTL930X_RMA_LLDP_CTRL (0x9EFC) +#define RTL931X_RMA_LLDP_CTRL (0x8918) #define RTL930X_RMA_EAPOL_CTRL (0x9F08) #define RTL931X_RMA_EAPOL_CTRL (0x8930) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c index ff80a9074e..5889cea6d6 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c @@ -1814,9 +1814,9 @@ void rtl839x_set_receive_management_action(int port, rma_ctrl_t type, action_typ sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), RTL839X_RMA_PTP_CTRL + ((port >> 4) << 2)); break; - case LLTP: + case LLDP: sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1), - RTL839X_RMA_LLTP_CTRL + ((port >> 4) << 2)); + RTL839X_RMA_LLDP_CTRL + ((port >> 4) << 2)); break; default: break; diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c index 3221109c18..0f1852abd0 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c @@ -516,8 +516,8 @@ void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_typ case PTP_ETH2: sw_w32_mask(3, value, RTL931X_RMA_PTP_CTRL + (port << 2)); break; - case LLTP: - sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLTP_CTRL + ((port / 10) << 2)); + case LLDP: + sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLDP_CTRL + ((port / 10) << 2)); break; case EAPOL: sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_EAPOL_CTRL + ((port / 10) << 2)); From 5b7240c07056ccdde606cea8e832d76f0d4e8002 Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Sat, 4 May 2024 16:12:20 +0200 Subject: [PATCH 09/10] realtek: Trap LLDP packets to the CPU We should setup the registers for trapping LLDP packets to the CPU. Currently, these packets are forwarded to all ports which is not desired behaviour. Signed-off-by: Kevin Jilissen (cherry picked from commit 5a5c52085a5bd0b1b8bc629f3586c7a93dcb4460) --- .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c index 063ce9b8c5..6d8b155245 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c @@ -155,6 +155,12 @@ static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv) priv->r->set_receive_management_action(i, BPDU, TRAP2CPU); } +static void rtl83xx_setup_lldp_traps(struct rtl838x_switch_priv *priv) +{ + for (int i = 0; i < priv->cpu_port; i++) + priv->r->set_receive_management_action(i, LLDP, TRAP2CPU); +} + static void rtl83xx_port_set_salrn(struct rtl838x_switch_priv *priv, int port, bool enable) { @@ -207,6 +213,7 @@ static int rtl83xx_setup(struct dsa_switch *ds) rtl83xx_vlan_setup(priv); rtl83xx_setup_bpdu_traps(priv); + rtl83xx_setup_lldp_traps(priv); ds->configure_vlan_while_not_filtering = true; From 447eef2063cce1ad472a07af3e368826158b1da3 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 25 Apr 2024 16:53:55 +0200 Subject: [PATCH 10/10] mpc85xx: convert WS-AP3710i to simpleImage wrapper Convert the Enterasys WS-AP3710i access point to use the simpleImage wrapper. This is necessary, as the bootlaoder does not align the DTB correctly (and does not support altering the FDT loadaddress). Booting images with kernels 5.15 and later can break depending on the alignment on the DTB within the FIT image. Compared with the patch applied to master, this compiles the loader at the changed offset used in OpenWrt master. This is required, as U-Boot loads the uImage at the offset the loader is currently compiled for. Signed-off-by: David Bauer (cherry picked from commit eec18118d02fa5d095cb4035c42187e487d0e68c) --- .../arch/powerpc/boot/dts/ws-ap3710i.dts | 104 +++++++++++++++++- target/linux/mpc85xx/image/p1020.mk | 6 +- target/linux/mpc85xx/p1020/target.mk | 2 +- .../106-powerpc-85xx-ws-ap3710i-support.patch | 30 +++++ ...-powerpc-85xx-add-ws-ap3825i-support.patch | 22 ++-- ...-powerpc-85xx-add-ws-ap3715i-support.patch | 14 +-- .../110-powerpc-85xx-br200-wp-support.patch | 8 +- 7 files changed, 158 insertions(+), 28 deletions(-) diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts index 5d81da4686..2eb6f6e21e 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts @@ -9,6 +9,8 @@ compatible = "enterasys,ws-ap3710i"; aliases { + ethernet0 = &enet0; + ethernet1 = &enet2; led-boot = &led_power_green; led-failsafe = &led_power_red; led-running = &led_power_green; @@ -16,6 +18,11 @@ label-mac-device = &enet0; }; + chosen { + bootargs-override = "console=ttyS0,115200"; + stdout-path = &serial0; + }; + memory { device_type = "memory"; }; @@ -74,7 +81,7 @@ #size-cells = <1>; partition@0 { - compatible = "denx,fit"; + compatible = "denx,uimage"; reg = <0x0 0x1d80000>; label = "firmware"; }; @@ -145,6 +152,13 @@ ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; reg = <0 0xffe09000 0 0x1000>; + + /* Filled by U-Boot */ + bus-range = <0x00 0x01>; + dma-ranges = <0x2000000 0x00 0xfff00000 0x00 0xffe00000 + 0x00 0x100000 0x42000000 0x00 0x00 0x00 + 0x00 0x00 0x10000000>; + pcie@0 { ranges = <0x2000000 0x0 0xa0000000 0x2000000 0x0 0xa0000000 @@ -160,6 +174,13 @@ reg = <0 0xffe0a000 0 0x1000>; ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; + + /* Filled by U-Boot */ + bus-range = <0x00 0x01>; + dma-ranges = <0x2000000 0x00 0xfff00000 0x00 + 0xffe00000 0x00 0x100000 0x42000000 + 0x00 0x00 0x00 0x00 0x00 0x10000000>; + pcie@0 { ranges = <0x2000000 0x0 0x80000000 0x2000000 0x0 0x80000000 @@ -174,6 +195,87 @@ }; /include/ "fsl/p1020si-post.dtsi" +/ { + cpus { + PowerPC,P1020@0 { + bus-frequency = <399999996>; + timebase-frequency = <50000000>; + clock-frequency = <799999992>; + d-cache-block-size = <0x20>; + d-cache-size = <0x8000>; + d-cache-sets = <0x80>; + i-cache-block-size = <0x20>; + i-cache-size = <0x8000>; + i-cache-sets = <0x80>; + cpu-release-addr = <0x0 0x0ffff280>; + status = "okay"; + enable-method = "spin-table"; + }; + + PowerPC,P1020@1 { + bus-frequency = <399999996>; + timebase-frequency = <50000000>; + clock-frequency = <799999992>; + d-cache-block-size = <0x20>; + d-cache-size = <0x8000>; + d-cache-sets = <0x80>; + i-cache-block-size = <0x20>; + i-cache-size = <0x8000>; + i-cache-sets = <0x80>; + cpu-release-addr = <0x0 0x0ffff2a0>; + status = "disabled"; + enable-method = "spin-table"; + }; + }; + + memory { + reg = <0x0 0x0 0x0 0x10000000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cpu1-bootpage@ff00000 { + /* Reserve upper 1 MB for second-core-bootpage */ + reg = <0x0 0xff00000 0x0 0x100000>; + }; + }; + + soc@ffe00000 { + bus-frequency = <399999996>; + + serial@4600 { + clock-frequency = <399999996>; + }; + + serial@4500 { + clock-frequency = <399999996>; + }; + + pic@40000 { + clock-frequency = <399999996>; + }; + }; + + localbus@ffe05000 { + bus-frequency = <24999999>; + }; +}; + +&enet0 { + rx-stash-idx = <0x00>; + rx-stash-len = <0x60>; + bd-stash; +}; + +&enet2 { + rx-stash-idx = <0x00>; + rx-stash-len = <0x60>; + bd-stash; +}; + /* * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses * aliases to determine PCI domain numbers, drop aliases so as not to diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index d3d7f93ddd..e5bfabf8ce 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -62,7 +62,11 @@ define Device/enterasys_ws-ap3710i DEVICE_VENDOR := Enterasys DEVICE_MODEL := WS-AP3710i BLOCKSIZE := 128k - KERNEL = kernel-bin | lzma | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb + KERNEL_NAME := simpleImage.ws-ap3710i + KERNEL_ENTRY := 0x1000000 + KERNEL_LOADADDR := 0x1000000 + KERNEL = kernel-bin | uImage none + KERNEL_INITRAMFS := kernel-bin | uImage none IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata endef diff --git a/target/linux/mpc85xx/p1020/target.mk b/target/linux/mpc85xx/p1020/target.mk index 8770edb9a9..d0d919cb1d 100644 --- a/target/linux/mpc85xx/p1020/target.mk +++ b/target/linux/mpc85xx/p1020/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=P1020 -KERNEL_IMAGES:=simpleImage.ws-ap3825i +KERNEL_IMAGES:=simpleImage.ws-ap3710i simpleImage.ws-ap3825i define Target/Description Build firmware images for Freescale P1020 based boards. diff --git a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch index 124376ffd9..1edc2aa56b 100644 --- a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch @@ -28,3 +28,33 @@ obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -164,6 +164,7 @@ src-plat-$(CONFIG_PPC_POWERNV) += pserie + src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S + src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c + src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S ++src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S + + src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c + +@@ -345,6 +346,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm + image-$(CONFIG_TQM8560) += cuImage.tqm8560 + image-$(CONFIG_KSI8560) += cuImage.ksi8560 + image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 ++image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i + # Board ports in arch/powerpc/platform/86xx/Kconfig + image-$(CONFIG_MVME7100) += dtbImage.mvme7100 + +--- a/arch/powerpc/boot/wrapper ++++ b/arch/powerpc/boot/wrapper +@@ -326,7 +326,8 @@ adder875-redboot) + platformo="$object/fixed-head.o $object/redboot-8xx.o" + binary=y + ;; +-simpleboot-tl-wdr4900-v1) ++simpleboot-tl-wdr4900-v1|\ ++simpleboot-ws-ap3710i) + platformo="$object/fixed-head.o $object/simpleboot.o" + link_address='0x1000000' + binary=y diff --git a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch index b211f3cb30..3f05c906af 100644 --- a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch @@ -37,29 +37,23 @@ WS-AP3825i AP. obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile -@@ -164,6 +164,7 @@ src-plat-$(CONFIG_PPC_POWERNV) += pserie - src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S - src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c - src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S -+src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S - - src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c - -@@ -345,6 +346,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm - image-$(CONFIG_TQM8560) += cuImage.tqm8560 +@@ -347,6 +347,7 @@ image-$(CONFIG_TQM8560) += cuImage.tqm image-$(CONFIG_KSI8560) += cuImage.ksi8560 image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 + image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i +image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i # Board ports in arch/powerpc/platform/86xx/Kconfig image-$(CONFIG_MVME7100) += dtbImage.mvme7100 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper -@@ -326,6 +326,7 @@ adder875-redboot) - platformo="$object/fixed-head.o $object/redboot-8xx.o" +@@ -327,7 +327,8 @@ adder875-redboot) binary=y ;; -+simpleboot-ws-ap3825i|\ - simpleboot-tl-wdr4900-v1) + simpleboot-tl-wdr4900-v1|\ +-simpleboot-ws-ap3710i) ++simpleboot-ws-ap3710i|\ ++simpleboot-ws-ap3825i) platformo="$object/fixed-head.o $object/simpleboot.o" link_address='0x1000000' + binary=y diff --git a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch index 8272d9dd2a..fe9abbb1e2 100644 --- a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch @@ -30,21 +30,21 @@ obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile -@@ -346,6 +346,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm - image-$(CONFIG_TQM8560) += cuImage.tqm8560 +@@ -347,6 +347,7 @@ image-$(CONFIG_TQM8560) += cuImage.tqm image-$(CONFIG_KSI8560) += cuImage.ksi8560 image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 + image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i +image-$(CONFIG_WS_AP3715I) += simpleImage.ws-ap3715i image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i # Board ports in arch/powerpc/platform/86xx/Kconfig image-$(CONFIG_MVME7100) += dtbImage.mvme7100 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper -@@ -326,6 +326,7 @@ adder875-redboot) - platformo="$object/fixed-head.o $object/redboot-8xx.o" - binary=y +@@ -328,6 +328,7 @@ adder875-redboot) ;; + simpleboot-tl-wdr4900-v1|\ + simpleboot-ws-ap3710i|\ +simpleboot-ws-ap3715i|\ - simpleboot-ws-ap3825i|\ - simpleboot-tl-wdr4900-v1) + simpleboot-ws-ap3825i) platformo="$object/fixed-head.o $object/simpleboot.o" + link_address='0x1000000' diff --git a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch index 8d510759dc..ef05df3430 100644 --- a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch +++ b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch @@ -35,7 +35,7 @@ src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c +src-plat-$(CONFIG_BR200_WP) += simpleboot.c fixed-head.S src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S - src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S + src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S @@ -345,6 +346,7 @@ image-$(CONFIG_TQM8548) += cuImage.tqm image-$(CONFIG_TQM8555) += cuImage.tqm8555 @@ -43,8 +43,8 @@ image-$(CONFIG_KSI8560) += cuImage.ksi8560 +image-$(CONFIG_BR200_WP) += simpleImage.br200-wp image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 + image-$(CONFIG_WS_AP3710I) += simpleImage.ws-ap3710i image-$(CONFIG_WS_AP3715I) += simpleImage.ws-ap3715i - image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -326,6 +326,7 @@ adder875-redboot) @@ -52,6 +52,6 @@ binary=y ;; +simpleboot-br200-wp|\ + simpleboot-tl-wdr4900-v1|\ + simpleboot-ws-ap3710i|\ simpleboot-ws-ap3715i|\ - simpleboot-ws-ap3825i|\ - simpleboot-tl-wdr4900-v1)