Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iwinfo: backport IPQ8074 and QCNxxxx devices support #10743

Merged
merged 1 commit into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions package/network/utils/iwinfo/patches/001-ralink.patch
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
#endif
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -259,6 +259,7 @@ extern const struct iwinfo_ops wext_ops;
@@ -306,6 +306,7 @@ extern const struct iwinfo_ops wext_ops;
extern const struct iwinfo_ops madwifi_ops;
extern const struct iwinfo_ops nl80211_ops;
extern const struct iwinfo_ops wl_ops;
Expand All @@ -233,7 +233,7 @@

--- a/iwinfo_lib.c
+++ b/iwinfo_lib.c
@@ -334,6 +334,9 @@ static const struct iwinfo_ops *backends
@@ -339,6 +339,9 @@ static const struct iwinfo_ops *backends
#ifdef USE_WL
&wl_ops,
#endif
Expand All @@ -245,7 +245,7 @@

--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -659,6 +659,35 @@ static int iwinfo_L_countrylist(lua_Stat
@@ -678,6 +678,35 @@ static int iwinfo_L_countrylist(lua_Stat
return 1;
}

Expand Down Expand Up @@ -281,7 +281,7 @@

#ifdef USE_WL
/* Broadcom */
@@ -908,6 +937,41 @@ static const luaL_reg R_wext[] = {
@@ -927,6 +956,41 @@ static const luaL_reg R_wext[] = {
{ NULL, NULL }
};

Expand Down Expand Up @@ -323,7 +323,7 @@
/* Common */
static const luaL_reg R_common[] = {
{ "type", iwinfo_L_type },
@@ -919,6 +983,15 @@ static const luaL_reg R_common[] = {
@@ -938,6 +1002,15 @@ static const luaL_reg R_common[] = {
LUALIB_API int luaopen_iwinfo(lua_State *L) {
luaL_register(L, IWINFO_META, R_common);

Expand Down Expand Up @@ -1421,7 +1421,7 @@
+#endif
--- a/iwinfo_wext.c
+++ b/iwinfo_wext.c
@@ -185,7 +185,7 @@ static int wext_get_channel(const char *
@@ -197,7 +197,7 @@ static int wext_get_center_chan2(const c
return -1;
}

Expand All @@ -1430,7 +1430,7 @@
{
struct iwreq wrq;
struct iw_range range;
@@ -282,7 +282,7 @@ static int wext_get_noise(const char *if
@@ -294,7 +294,7 @@ static int wext_get_noise(const char *if
return -1;
}

Expand All @@ -1439,7 +1439,7 @@
{
struct iwreq wrq;
struct iw_statistics stats;
@@ -300,7 +300,7 @@ static int wext_get_quality(const char *
@@ -312,7 +312,7 @@ static int wext_get_quality(const char *
return -1;
}

Expand All @@ -1448,7 +1448,7 @@
{
struct iwreq wrq;
struct iw_range range;
@@ -365,7 +365,7 @@ static int wext_get_txpwrlist(const char
@@ -377,7 +377,7 @@ static int wext_get_txpwrlist(const char
return -1;
}

Expand All @@ -1457,7 +1457,7 @@
{
struct iwreq wrq;
struct iw_range range;
@@ -409,7 +409,7 @@ static int wext_get_countrylist(const ch
@@ -421,7 +421,7 @@ static int wext_get_countrylist(const ch
return -1;
}

Expand All @@ -1468,7 +1468,7 @@
struct iwinfo_freqlist_entry *e = NULL;
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,15 @@ ifneq ($(filter nl80211,$(IWINFO_BACKEND
@@ -34,6 +34,15 @@ ifneq ($(filter nl80211,$(IWINFO_BACKEND
IWINFO_LIB_OBJ += iwinfo_nl80211.o
endif

Expand All @@ -1482,11 +1482,11 @@
+ IWINFO_LIB_OBJ += iwinfo_ra.o
+endif

%.o: %.c
$(CC) $(IWINFO_CFLAGS) $(FPIC) -c -o $@ $<
compile: clean $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI)

--- a/hardware.txt
+++ b/hardware.txt
@@ -173,6 +173,36 @@
@@ -180,6 +180,36 @@
0x1814 0x3662 0x1814 0x000d 0 0 "Ralink" "Rt3662"
0x1814 0x3883 0x1814 0x000d 0 0 "Ralink" "Rt3883"
0x1814 0x5350 0x1814 0x000f 0 0 "Ralink" "Rt5350"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>

--- a/hardware.txt
+++ b/hardware.txt
@@ -196,6 +196,7 @@
@@ -225,5 +225,6 @@
0x14c3 0x7650 0x14c3 0x7650 0 0 "MediaTek" "MT7610E"
0x14c3 0x7662 0x14c3 0x7662 0 0 "MediaTek" "MT76x2E"
0x14c3 0x7915 0x14c3 0x7915 0 0 "MediaTek" "MT7915E"
+0x14c3 0x7986 0x14c3 0x7986 0 0 "MediaTek" "MT7986"
0x14e4 0xaa52 0x14e4 0xaa52 0 0 "Broadcom" "BCM43602"
0x02d0 0xa9a6 0x0000 0x0000 0 0 "Cypress" "CYW43455"
0x1ae9 0x0310 0x1ae9 0x0000 0 0 "Wilocity" "Wil6210"
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -3410,7 +3410,13 @@ static int nl80211_hardware_id_from_fdt(struct iwinfo_hardware_id *id, const cha
@@ -3386,7 +3386,13 @@ static int nl80211_hardware_id_from_fdt(
id->device_id = 0x7622;
id->subsystem_vendor_id = 0x14c3;
id->subsystem_device_id = 0x7622;
Expand All @@ -38,5 +37,3 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
return (id->vendor_id && id->device_id) ? 0 : -1;
}

--
2.30.2
37 changes: 37 additions & 0 deletions package/network/utils/iwinfo/patches/003-devices-add-IPQ8074.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From: Robert Marko <robimarko@gmail.com>
Date: Fri, 6 Jan 2023 09:56:54 +0000 (+0100)
Subject: iwinfo: devices: add Qualcomm Atheros IPQ8074 WiSoC
X-Git-Url: http://git.openwrt.org/?p=project%2Fiwinfo.git;a=commitdiff_plain;h=5914d7113ecf77de63eb21fc233684d1a1a52ca5

iwinfo: devices: add Qualcomm Atheros IPQ8074 WiSoC

Add detection of the Qualcomm Atheros IPQ8074 WiSoC using the compatible
string from device tree.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---

--- a/hardware.txt
+++ b/hardware.txt
@@ -167,6 +167,7 @@
0x168c 0x003c 0x1a56 0x1420 0 0 "Qualcomm Atheros" "QCA9862"
0x168c 0x003c 0x19b6 0xd03c 0 0 "Mikrotik" "R11e-5HacT"
0x168c 0x003c 0x168c 0x4019 0 0 "Qualcomm Atheros" "IPQ4019"
+0x168c 0x8074 0x168c 0x8074 0 0 "Qualcomm Atheros" "IPQ8074"
0x168c 0x003c 0x19b6 0xd075 0 0 "Mikrotik" "R11e-5HacD"
0x168c 0x0040 0x168c 0x0002 0 0 "Qualcomm Atheros" "QCA9990"
0x168c 0x0046 0x168c 0xcafe 0 0 "Qualcomm Atheros" "QCA9984"
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -3381,6 +3381,11 @@ static int nl80211_hardware_id_from_fdt(
id->device_id = 0x003c;
id->subsystem_vendor_id = 0x168c;
id->subsystem_device_id = 0x4019;
+ } else if (!strcmp(compat, "qcom,ipq8074-wifi")) {
+ id->vendor_id = 0x168c;
+ id->device_id = 0x8074;
+ id->subsystem_vendor_id = 0x168c;
+ id->subsystem_device_id = 0x8074;
} else if (!strcmp(compat, "mediatek,mt7622-wmac")) {
id->vendor_id = 0x14c3;
id->device_id = 0x7622;
23 changes: 23 additions & 0 deletions package/network/utils/iwinfo/patches/004-devices-add-QCNxxxx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From: Robert Marko <robimarko@gmail.com>
Date: Fri, 6 Jan 2023 16:33:55 +0000 (+0100)
Subject: devices: add Qualcomm Atheros QCN6024/9024/9074 cards
X-Git-Url: http://git.openwrt.org/?p=project%2Fiwinfo.git;a=commitdiff_plain;h=c7b420a2f33c6f1034c3e2191eba0cb0374af7b6

devices: add Qualcomm Atheros QCN6024/9024/9074 cards

Add Qualcomm Atheros QCN6024/9024/9074 PCI ID, they all are compatible and
use the same ID.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---

--- a/hardware.txt
+++ b/hardware.txt
@@ -173,6 +173,7 @@
0x168c 0x0046 0x168c 0xcafe 0 0 "Qualcomm Atheros" "QCA9984"
0x168c 0x0050 0x0000 0x0000 0 0 "Qualcomm Atheros" "QCA9887"
0x168c 0x0056 0x0000 0x0000 0 0 "Qualcomm Atheros" "QCA9886"
+0x17cb 0x1104 0x17cb 0x1104 0 0 "Qualcomm Atheros" "QCN6024/9024/9074"
0x1814 0x3050 0x1814 0x0005 0 0 "Ralink" "Rt3050"
0x1814 0x3051 0x1814 0x0007 0 0 "Ralink" "Rt3051"
0x1814 0x3052 0x1814 0x0008 0 0 "Ralink" "Rt3052"