diff --git a/package/network/utils/iwinfo/patches/001-ralink.patch b/package/network/utils/iwinfo/patches/001-ralink.patch index 18abf8592..2d4e2c7a3 100644 --- a/package/network/utils/iwinfo/patches/001-ralink.patch +++ b/package/network/utils/iwinfo/patches/001-ralink.patch @@ -223,7 +223,7 @@ #endif --- a/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 nl80211_ops; extern const struct iwinfo_ops wl_ops; @@ -233,19 +233,19 @@ --- a/iwinfo_lib.c +++ b/iwinfo_lib.c -@@ -339,6 +339,9 @@ static const struct iwinfo_ops *backends - #ifdef USE_WL - &wl_ops, +@@ -388,6 +388,9 @@ static const struct iwinfo_ops *backends + #ifdef USE_MADWIFI + &madwifi_ops, #endif +#ifdef USE_RA + &ra_ops, +#endif - &wext_ops, - }; - + #ifdef USE_WL + &wl_ops, + #endif --- a/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; } @@ -281,9 +281,9 @@ #ifdef USE_WL /* Broadcom */ -@@ -927,6 +956,41 @@ static const luaL_reg R_wext[] = { - { NULL, NULL } +@@ -906,6 +935,40 @@ static const luaL_reg }; + #endif +#ifdef USE_RA +/* Ralink table */ @@ -319,15 +319,13 @@ + +#endif + -+ - /* Common */ - static const luaL_reg R_common[] = { - { "type", iwinfo_L_type }, -@@ -938,6 +1002,15 @@ static const luaL_reg R_common[] = { + /* Wext table */ + #ifdef USE_WEXT + static const luaL_reg R_wext[] = { +@@ -950,6 +1013,14 @@ static const luaL_reg R_common[] = { LUALIB_API int luaopen_iwinfo(lua_State *L) { luaL_register(L, IWINFO_META, R_common); -+ +#ifdef USE_RA + luaL_newmetatable(L, IWINFO_RA_META); + luaL_register(L, NULL, R_ra); @@ -1466,9 +1464,21 @@ { char chans[IWINFO_BUFSIZE] = { 0 }; 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 +++ 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 endif @@ -1484,9 +1494,9 @@ compile: clean $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI) ---- a/hardware.txt -+++ b/hardware.txt -@@ -180,6 +180,36 @@ +--- a/devices.txt ++++ b/devices.txt +@@ -174,6 +174,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" @@ -1523,15 +1533,3 @@ 0x11ab 0x2a55 0x11ab 0x0000 0 0 "Marvell" "88W8864" 0x02df 0x9135 0x0000 0x0000 0 0 "Marvell" "88W8887" 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 */