From e61f06c51d11dc5846023cd0fb28322345ca03b3 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 16 May 2024 12:03:19 +0200 Subject: [PATCH 1/2] ipq806x: mr42/mr52: fix PCIe ports All three PCIe ports are reported non working on Meraki MR42/MR52 boards since kernel 6.1 with the issue of PCIe PHY link never coming up thus no WLAN cards are available on the boards. After debugging it seems that PCIe worked on 5.15 and older purely by accident as device DTS was using /delete-property/ perst-gpios; in each of the 3 PCIe nodes but there was no "perst-gpios" property in the SoC DTSI as it was still using the older "perst-gpio" property so it was not getting removed from the device DTS. However, in kernel 6.1 commit ("ARM: dts: qcom-*: replace deprecated perst-gpio with perst-gpios") updated all Qualcomm DTS-es to use the newer "perst-gpios" and thus once ipq806x moved to 6.1 PCIe stopped working as now that property was being dropped from the device DTS. So, since the removal of PERST pins seems to have been wrong from the start lets drop the property removal from MR42/MR52. Fixes: #15408 Link: https://github.com/openwrt/openwrt/pull/15509 Link: https://github.com/openwrt/openwrt/pull/15512 Signed-off-by: Robert Marko --- .../arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi index a8f43591f9..2e71575331 100644 --- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi +++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi @@ -73,10 +73,6 @@ &pcie0 { status = "okay"; - /delete-property/ pinctrl-0; - /delete-property/ pinctrl-names; - /delete-property/ perst-gpios; - bridge@0,0 { reg = <0x0 0 0 0 0>; #address-cells = <3>; @@ -94,10 +90,6 @@ &pcie1 { status = "okay"; - /delete-property/ pinctrl-0; - /delete-property/ pinctrl-names; - /delete-property/ perst-gpios; - bridge@0,0 { reg = <0x0 0 0 0 0>; #address-cells = <3>; @@ -115,10 +107,6 @@ &pcie2 { status = "okay"; - /delete-property/ pinctrl-0; - /delete-property/ pinctrl-names; - /delete-property/ perst-gpios; - bridge@0,0 { reg = <0x0 0 0 0 0>; #address-cells = <3>; From a9e117e03faa53f17598b548f9a245f2ac3b52c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 18 May 2024 14:56:58 +0200 Subject: [PATCH 2/2] mt76: fix mt7603 compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: mt7603/dma.c: In function 'mt7603_rx_loopback_skb': mt7603/dma.c:60:17: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] Fixes: 2568b30285ff ("mt76: backport mt7603 fixes important for its stability") Fixes: https://github.com/openwrt/openwrt/issues/15510 Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 2 +- ...7603-fix-mixed-declarations-and-code.patch | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 22269277da..9957c99999 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=2 +PKG_RELEASE=3 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= diff --git a/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch b/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch new file mode 100644 index 0000000000..92befe4afa --- /dev/null +++ b/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch @@ -0,0 +1,33 @@ +From 513c131c6309712a51502870b041f45b4bd6a6d4 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Fri, 17 May 2024 13:51:22 +0200 +Subject: [PATCH] mt76: mt7603: fix mixed declarations and code + +Move the qid variable declaration further up + +Fixes: b473c0e47f04 ("wifi: mt76: mt7603: fix tx queue of loopback packets") +Signed-off-by: Felix Fietkau +--- + mt7603/dma.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/mt7603/dma.c ++++ b/mt7603/dma.c +@@ -29,7 +29,7 @@ mt7603_rx_loopback_skb(struct mt7603_dev + struct ieee80211_sta *sta; + struct mt7603_sta *msta; + struct mt76_wcid *wcid; +- u8 tid = 0, hwq = 0; ++ u8 qid, tid = 0, hwq = 0; + void *priv; + int idx; + u32 val; +@@ -57,7 +57,7 @@ mt7603_rx_loopback_skb(struct mt7603_dev + if (ieee80211_is_data_qos(hdr->frame_control)) { + tid = *ieee80211_get_qos_ctl(hdr) & + IEEE80211_QOS_CTL_TAG1D_MASK; +- u8 qid = tid_to_ac[tid]; ++ qid = tid_to_ac[tid]; + hwq = wmm_queue_map[qid]; + skb_set_queue_mapping(skb, qid); + } else if (ieee80211_is_data(hdr->frame_control)) {