luci-base: use "hwmodes_text" to describe wireless radios
This is a preformatted string like "ac/ax/b/g/n" for presentation. Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
parent
eb93ea0ac2
commit
d53ea72a88
1 changed files with 3 additions and 2 deletions
|
@ -3396,13 +3396,14 @@ WifiDevice = baseclass.extend(/** @lends LuCI.network.WifiDevice.prototype */ {
|
||||||
getI18n: function() {
|
getI18n: function() {
|
||||||
var hw = this.ubus('dev', 'iwinfo', 'hardware'),
|
var hw = this.ubus('dev', 'iwinfo', 'hardware'),
|
||||||
type = L.isObject(hw) ? hw.name : null;
|
type = L.isObject(hw) ? hw.name : null;
|
||||||
|
var modes = this.ubus('dev', 'iwinfo', 'hwmodes_text');
|
||||||
|
|
||||||
if (this.ubus('dev', 'iwinfo', 'type') == 'wl')
|
if (this.ubus('dev', 'iwinfo', 'type') == 'wl')
|
||||||
type = 'Broadcom';
|
type = 'Broadcom';
|
||||||
|
|
||||||
return '%s 802.11%s Wireless Controller (%s)'.format(
|
return '%s %s Wireless Controller (%s)'.format(
|
||||||
type || 'Generic',
|
type || 'Generic',
|
||||||
this.getHWModes().sort(L.naturalCompare).join(''),
|
modes ? '802.11' + modes : 'unknown',
|
||||||
this.getName());
|
this.getName());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue