luci-base: show wifi chip identification on overview 1748/head
authorHannu Nyman <hannu.nyman@iki.fi>
Sat, 5 May 2018 18:20:41 +0000 (21:20 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 5 May 2018 18:20:41 +0000 (21:20 +0300)
Show the correct wifi chip identification in case iwinfo
recognises the chip.

So far the wifidev.get_i18n function has practically always
returned just "Generic", but use iwinfo.hardware_name to
fetch the name.

In case iwinfo returns the default "Generic MAC80211", there
is a double 80211 in the final string, which is a cosmetic bug.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
modules/luci-base/luasrc/model/network.lua

index dfe818bcc72e7d840d7df906d44c2e04a2a1c293..0f58c16848630faec67b477b671cefc50d6807b6 100644 (file)
@@ -1428,7 +1428,7 @@ function wifidev.hwmodes(self)
 end
 
 function wifidev.get_i18n(self)
-       local t = "Generic"
+       local t = self.iwinfo.hardware_name or "Generic"
        if self.iwinfo.type == "wl" then
                t = "Broadcom"
        end