mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
iwinfo: refresh ralink patch
This commit is contained in:
parent
2b5fdd941c
commit
679e2ae168
@ -223,7 +223,7 @@
|
|||||||
#endif
|
#endif
|
||||||
--- a/include/iwinfo.h
|
--- a/include/iwinfo.h
|
||||||
+++ b/include/iwinfo.h
|
+++ b/include/iwinfo.h
|
||||||
@@ -306,6 +306,7 @@ extern const struct iwinfo_ops wext_ops;
|
@@ -412,6 +412,7 @@ extern const struct iwinfo_ops wext_ops;
|
||||||
extern const struct iwinfo_ops madwifi_ops;
|
extern const struct iwinfo_ops madwifi_ops;
|
||||||
extern const struct iwinfo_ops nl80211_ops;
|
extern const struct iwinfo_ops nl80211_ops;
|
||||||
extern const struct iwinfo_ops wl_ops;
|
extern const struct iwinfo_ops wl_ops;
|
||||||
@ -233,19 +233,19 @@
|
|||||||
|
|
||||||
--- a/iwinfo_lib.c
|
--- a/iwinfo_lib.c
|
||||||
+++ b/iwinfo_lib.c
|
+++ b/iwinfo_lib.c
|
||||||
@@ -339,6 +339,9 @@ static const struct iwinfo_ops *backends
|
@@ -388,6 +388,9 @@ static const struct iwinfo_ops *backends
|
||||||
#ifdef USE_WL
|
#ifdef USE_MADWIFI
|
||||||
&wl_ops,
|
&madwifi_ops,
|
||||||
#endif
|
#endif
|
||||||
+#ifdef USE_RA
|
+#ifdef USE_RA
|
||||||
+ &ra_ops,
|
+ &ra_ops,
|
||||||
+#endif
|
+#endif
|
||||||
&wext_ops,
|
#ifdef USE_WL
|
||||||
};
|
&wl_ops,
|
||||||
|
#endif
|
||||||
--- a/iwinfo_lua.c
|
--- a/iwinfo_lua.c
|
||||||
+++ b/iwinfo_lua.c
|
+++ b/iwinfo_lua.c
|
||||||
@@ -678,6 +678,35 @@ static int iwinfo_L_countrylist(lua_Stat
|
@@ -686,6 +686,35 @@ static int iwinfo_L_countrylist(lua_Stat
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,9 +281,9 @@
|
|||||||
|
|
||||||
#ifdef USE_WL
|
#ifdef USE_WL
|
||||||
/* Broadcom */
|
/* Broadcom */
|
||||||
@@ -927,6 +956,41 @@ static const luaL_reg R_wext[] = {
|
@@ -906,6 +935,40 @@ static const luaL_reg
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
+#ifdef USE_RA
|
+#ifdef USE_RA
|
||||||
+/* Ralink table */
|
+/* Ralink table */
|
||||||
@ -319,15 +319,13 @@
|
|||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+
|
/* Wext table */
|
||||||
/* Common */
|
#ifdef USE_WEXT
|
||||||
static const luaL_reg R_common[] = {
|
static const luaL_reg R_wext[] = {
|
||||||
{ "type", iwinfo_L_type },
|
@@ -950,6 +1013,14 @@ static const luaL_reg R_common[] = {
|
||||||
@@ -938,6 +1002,15 @@ static const luaL_reg R_common[] = {
|
|
||||||
LUALIB_API int luaopen_iwinfo(lua_State *L) {
|
LUALIB_API int luaopen_iwinfo(lua_State *L) {
|
||||||
luaL_register(L, IWINFO_META, R_common);
|
luaL_register(L, IWINFO_META, R_common);
|
||||||
|
|
||||||
+
|
|
||||||
+#ifdef USE_RA
|
+#ifdef USE_RA
|
||||||
+ luaL_newmetatable(L, IWINFO_RA_META);
|
+ luaL_newmetatable(L, IWINFO_RA_META);
|
||||||
+ luaL_register(L, NULL, R_ra);
|
+ luaL_register(L, NULL, R_ra);
|
||||||
@ -1466,9 +1464,21 @@
|
|||||||
{
|
{
|
||||||
char chans[IWINFO_BUFSIZE] = { 0 };
|
char chans[IWINFO_BUFSIZE] = { 0 };
|
||||||
struct iwinfo_freqlist_entry *e = NULL;
|
struct iwinfo_freqlist_entry *e = NULL;
|
||||||
|
--- a/iwinfo_utils.c
|
||||||
|
+++ b/iwinfo_utils.c
|
||||||
|
@@ -407,7 +407,8 @@ int iwinfo_hardware_id_from_mtd(struct i
|
||||||
|
|
||||||
|
/* subsystem from EEPROM_NIC_CONF0_RF_TYPE */
|
||||||
|
id->subsystem_device_id = (bc[off + 0x1a] & 0x0f00) >> 8;
|
||||||
|
- } else if ((bc[off] == 0x7620) || (bc[off] == 0x2076) ||
|
||||||
|
+ } else if ((bc[off] == 0x7615) || (bc[off] == 0x1576) ||
|
||||||
|
+ (bc[off] == 0x7620) || (bc[off] == 0x2076) ||
|
||||||
|
(bc[off] == 0x7628) || (bc[off] == 0x2876) ||
|
||||||
|
(bc[off] == 0x7688) || (bc[off] == 0x8876)) {
|
||||||
|
/* vendor: MediaTek */
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -34,6 +34,15 @@ ifneq ($(filter nl80211,$(IWINFO_BACKEND
|
@@ -39,6 +39,15 @@ ifneq ($(filter nl80211,$(IWINFO_BACKEND
|
||||||
IWINFO_LIB_OBJ += iwinfo_nl80211.o
|
IWINFO_LIB_OBJ += iwinfo_nl80211.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -1484,9 +1494,9 @@
|
|||||||
|
|
||||||
compile: clean $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI)
|
compile: clean $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI)
|
||||||
|
|
||||||
--- a/hardware.txt
|
--- a/devices.txt
|
||||||
+++ b/hardware.txt
|
+++ b/devices.txt
|
||||||
@@ -180,6 +180,36 @@
|
@@ -174,6 +174,36 @@
|
||||||
0x1814 0x3662 0x1814 0x000d 0 0 "Ralink" "Rt3662"
|
0x1814 0x3662 0x1814 0x000d 0 0 "Ralink" "Rt3662"
|
||||||
0x1814 0x3883 0x1814 0x000d 0 0 "Ralink" "Rt3883"
|
0x1814 0x3883 0x1814 0x000d 0 0 "Ralink" "Rt3883"
|
||||||
0x1814 0x5350 0x1814 0x000f 0 0 "Ralink" "Rt5350"
|
0x1814 0x5350 0x1814 0x000f 0 0 "Ralink" "Rt5350"
|
||||||
@ -1523,15 +1533,3 @@
|
|||||||
0x11ab 0x2a55 0x11ab 0x0000 0 0 "Marvell" "88W8864"
|
0x11ab 0x2a55 0x11ab 0x0000 0 0 "Marvell" "88W8864"
|
||||||
0x02df 0x9135 0x0000 0x0000 0 0 "Marvell" "88W8887"
|
0x02df 0x9135 0x0000 0x0000 0 0 "Marvell" "88W8887"
|
||||||
0x11ab 0x2b40 0x11ab 0x0000 0 0 "Marvell" "88W8964"
|
0x11ab 0x2b40 0x11ab 0x0000 0 0 "Marvell" "88W8964"
|
||||||
--- a/iwinfo_utils.c
|
|
||||||
+++ b/iwinfo_utils.c
|
|
||||||
@@ -259,7 +259,8 @@ int iwinfo_hardware_id_from_mtd(struct i
|
|
||||||
|
|
||||||
/* subsystem from EEPROM_NIC_CONF0_RF_TYPE */
|
|
||||||
id->subsystem_device_id = (bc[off + 0x1a] & 0x0f00) >> 8;
|
|
||||||
- } else if ((bc[off] == 0x7620) || (bc[off] == 0x2076) ||
|
|
||||||
+ } else if ((bc[off] == 0x7615) || (bc[off] == 0x1576) ||
|
|
||||||
+ (bc[off] == 0x7620) || (bc[off] == 0x2076) ||
|
|
||||||
(bc[off] == 0x7628) || (bc[off] == 0x2876) ||
|
|
||||||
(bc[off] == 0x7688) || (bc[off] == 0x8876)) {
|
|
||||||
/* vendor: MediaTek */
|
|
||||||
|
Loading…
Reference in New Issue
Block a user