diff mbox series

[OpenWrt-Devel] Patch iwinfo to detect wrt3200acm chipsets

Message ID 3c3e0517-a4ce-9953-e48b-da771a6a1a1e@codepoet.org
State Superseded
Delegated to: John Crispin
Headers show
Series [OpenWrt-Devel] Patch iwinfo to detect wrt3200acm chipsets | expand

Commit Message

Erik Andersen April 13, 2018, 3:10 a.m. UTC
A small patch to iwinfo is needed to properly detect and report the
Marvell 88W8964 and 88W8887 chipsets in the wrt3200acm. This trivial
patch against the latest iwinfo git tree works for me.

Signed-off-by: Erik Andersen <andersen@codepoet.org>
---
--

  -Erik

--
Erik B. Andersen
--This message was written using 73% post-consumer electrons--

Comments

Erik Andersen April 14, 2018, 9:31 p.m. UTC | #1
On 04/12/2018 09:10 PM, Erik Andersen wrote:
> A small patch to iwinfo is needed to properly detect and report the
> Marvell 88W8964 and 88W8887 chipsets in the wrt3200acm. This trivial
> patch against the latest iwinfo git tree works for me.
> 
> Signed-off-by: Erik Andersen <andersen@codepoet.org>
> ---
> diff --git a/hardware.txt b/hardware.txt
> index 81b31cf..098551f 100644
> --- a/hardware.txt
> +++ b/hardware.txt
> @@ -59,3 +59,5 @@
>   0x1814 0x3052 0x1814 0x0008    0      0  "RaLink"   "Rt3052"
>   0x1814 0x3352 0x1814 0x000c    0      0  "RaLink"   "Rt3352"
>   0x11ab 0x2a55 0x11ab 0x0000    0      0  "Marvell"  "88W8864"
> +0x11ab 0x2b40 0x11ab 0x0000    0      0  "Marvell"  "88W8964"
> +0x02df 0x9135 0x0000 0x0000    0      0  "Marvell"  "88W8887"

How does one get a patch actually committed
to the git tree?  Does iwinfo have a maintainer?

  -Erik

--
Erik B. Andersen
--This message was written using 73% post-consumer electrons--
Hannu Nyman April 15, 2018, 9:29 a.m. UTC | #2
On Sat Apr 14 23:31:28 CEST 2018 Erik Andersen wrote:
 > How does one get a patch actually committed
 > to the git tree?  Does iwinfo have a maintainer?

jow is the maintainer for iwinfo, as said in its package Makefile.

https://github.com/openwrt/openwrt/blob/master/package/network/utils/iwinfo/Makefile


FYI, I noticed the recent forum discussion and modified the propsed patch for 
my own builds by adding chip ID also for QCA9984, enabling proper recognition 
for some of the ipq806x devices like R7800.

It would be great to add more new wifi chips to the iwinfo database, so that 
more routers would have properly named radios.


--- a/hardware.txt
+++ b/hardware.txt
@@ -55,7 +55,10 @@
  0x168c 0x0033 0x168c 0xa120    0      0  "Atheros"  "AR9580"
  0x168c 0x0033 0x168c 0xa136    0      0  "Atheros"  "AR9580"
  0x168c 0x003c 0x0000 0x0000    0      0  "Qualcomm Atheros" "QCA9880"
+0c168c 0x0046 0x168c 0xcafe    0      0  "Qualcomm Atheros" "QCA9984"
  0x1814 0x3050 0x1814 0x0005    0      0  "RaLink"   "Rt3050"
  0x1814 0x3052 0x1814 0x0008    0      0  "RaLink"   "Rt3052"
  0x1814 0x3352 0x1814 0x000c    0      0  "RaLink"   "Rt3352"
  0x11ab 0x2a55 0x11ab 0x0000    0      0  "Marvell"  "88W8864"
+0x02df 0x9135 0x0000 0x0000    0      0  "Marvell"  "88W8887"
+0x11ab 0x2b40 0x11ab 0x0000    0      0  "Marvell"  "88W8964"


Additionally, LuCI could be enhanced to show the correct radio chip also on 
the router overview page, not only in the network/wifi page. network/wifi has 
been calling iwinfo hardware_type, but router overview has skipped that and 
has only shown "Generic" as set by wifidev.get_i18n

The proper ID could be enabled with a small change to luci-base package:

--- a/modules/luci-base/luasrc/model/network.lua
+++ b/modules/luci-base/luasrc/model/network.lua
@@ -1429,6 +1429,10 @@ end

  function wifidev.get_i18n(self)
         local t = "Generic"
+       local hw = self.iwinfo.hardware_name
+       if hw ~= "Generic MAC80211"  then
+               t = hw
+       end
         if self.iwinfo.type == "wl" then
                 t = "Broadcom"
         end

I will likely do a LuCI PR about that and discuss it with jow. (Not quite 
sure if there performance issues in adding that iwinfo call to the repeatedly 
refreshed overvie page)
Erik Andersen April 18, 2018, 8:33 p.m. UTC | #3
On 04/15/2018 03:29 AM, Hannu Nyman wrote:
> I will likely do a LuCI PR about that and discuss it with jow.
That would be fantastic.

  -Erik

--
Erik B. Andersen
--This message was written using 73% post-consumer electrons--
Hannu Nyman April 22, 2018, 10:06 a.m. UTC | #4
Erik Andersen kirjoitti 18.4.2018 klo 23:33:
> On 04/15/2018 03:29 AM, Hannu Nyman wrote:
>> I will likely do a LuCI PR about that and discuss it with jow.
> That would be fantastic.
>
>  -Erik
>

I created https://github.com/openwrt/luci/pull/1748  a few days ago.

That enables showing the wifi chip also on the LuCI front page.
diff mbox series

Patch

diff --git a/hardware.txt b/hardware.txt
index 81b31cf..098551f 100644
--- a/hardware.txt
+++ b/hardware.txt
@@ -59,3 +59,5 @@ 
  0x1814 0x3052 0x1814 0x0008    0      0  "RaLink"   "Rt3052"
  0x1814 0x3352 0x1814 0x000c    0      0  "RaLink"   "Rt3352"
  0x11ab 0x2a55 0x11ab 0x0000    0      0  "Marvell"  "88W8864"
+0x11ab 0x2b40 0x11ab 0x0000    0      0  "Marvell"  "88W8964"
+0x02df 0x9135 0x0000 0x0000    0      0  "Marvell"  "88W8887"