summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShiji Yang2025-04-28 13:16:08 +0000
committerHauke Mehrtens2025-05-03 18:16:25 +0000
commitbad441ae4e60b9203eb4f6370026cc52e9b29384 (patch)
tree70929308bb4647fa54ed5cd933a3117502976ef6
parent8e90c5cfc292fe7e68c3fea3983a663e188f9fb6 (diff)
downloadopenwrt-bad441ae4e60b9203eb4f6370026cc52e9b29384.tar.gz
mac80211: rt2x00: fix build warnings on 6.12 kernel
Move rt2x00lib_read_eeprom() function prototype from rt2800lib.h to rt2x00.h and make rt6352_enable_pa_pin() static to fix the missing prototypes warnings: /workspaces/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-regular/backports-6.12.6/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c:213:5: error: no previous prototype for 'rt2x00lib_read_eeprom' [-Werror=missing-prototypes] 213 | int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev) | ^~~~~~~~~~~~~~~~~~~~~ /workspaces/openwrt/build_dir/target-x86_64_musl/linux-x86_64/mac80211-regular/backports-6.12.6/drivers/net/wireless/ralink/rt2x00/rt2800lib.c:308:6: error: no previous prototype for 'rt6352_enable_pa_pin' [-Werror=missing-prototypes] 308 | void rt6352_enable_pa_pin(struct rt2x00_dev *rt2x00dev, int enable) | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Link: https://github.com/openwrt/openwrt/pull/18637 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch30
-rw-r--r--package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch2
2 files changed, 15 insertions, 17 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch b/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch
index f3c8ddd4f6..cc3aa56618 100644
--- a/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch
+++ b/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch
@@ -108,6 +108,20 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
/*
* Capabilities
+@@ -1505,4 +1506,13 @@ void rt2x00lib_remove_dev(struct rt2x00_
+ int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev);
+ int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);
+
++/*
++ * EEPROM file handlers.
++ */
++#ifdef CPTCFG_RT2X00_LIB_EEPROM
++int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev);
++#else
++#define rt2x00lib_read_eeprom NULL
++#endif /* CPTCFG_RT2X00_LIB_EEPROM */
++
+ #endif /* RT2X00_H */
--- /dev/null
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
@@ -0,0 +1,77 @@
@@ -210,19 +224,3 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
if (rt2800pci_efuse_detect(rt2x00dev))
retval = rt2800pci_read_eeprom_efuse(rt2x00dev);
else
---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
-@@ -270,4 +270,13 @@ void rt2800_get_txwi_rxwi_size(struct rt
- unsigned short *rxwi_size);
- void rt2800_pre_reset_hw(struct rt2x00_dev *rt2x00dev);
-
-+/*
-+ * EEPROM file handlers.
-+ */
-+#ifdef CPTCFG_RT2X00_LIB_EEPROM
-+int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev);
-+#else
-+#define rt2x00lib_read_eeprom NULL
-+#endif /* CPTCFG_RT2X00_LIB_EEPROM */
-+
- #endif /* RT2800LIB_H */
diff --git a/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch
index 88a72fd03e..a92de13594 100644
--- a/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch
+++ b/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch
@@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mutex_unlock(&rt2x00dev->csr_mutex);
}
-+void rt6352_enable_pa_pin(struct rt2x00_dev *rt2x00dev, int enable)
++static void rt6352_enable_pa_pin(struct rt2x00_dev *rt2x00dev, int enable)
+{
+ if (!rt2x00dev->pinctrl)
+ return;