I tried my hand at making the patches and applying it to 24.10 openwrt luci feed
create file 001-nss.patch and drop it into feeds/luci/modules/luci-mod-status/patches/
--- a/htdocs/luci-static/resources/view/status/include/10_system.js
+++ b/htdocs/luci-static/resources/view/status/include/10_system.js
@@ -25,14 +25,26 @@ return baseclass.extend({
return Promise.all([
L.resolveDefault(callSystemBoard(), {}),
L.resolveDefault(callSystemInfo(), {}),
- L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' })
+ L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }),
+ fs.lines('/sys/kernel/debug/qca-nss-drv/stats/cpu_load_ubi').then(L.bind(function(lines) {
+ var stats = [];
+ for (var i = 0; i < lines.length; i++) {
+ if (lines[i].match(/%/)) {
+ var stat = lines[i].split(/\s+/);
+ stats['avg'] = stat[1];
+ stats['max'] = stat[2];
+ return stats;
+ }
+ }
+ }))
]);
},
render: function(data) {
var boardinfo = data[0],
systeminfo = data[1],
- luciversion = data[2];
+ luciversion = data[2],
+ nssinfo = data[3];
luciversion = luciversion.branch + ' ' + luciversion.revision;
@@ -64,7 +76,8 @@ return baseclass.extend({
systeminfo.load[0] / 65535.0,
systeminfo.load[1] / 65535.0,
systeminfo.load[2] / 65535.0
- ) : null
+ ) : null,
+ _('NSS Load'), (L.isObject(nssinfo) ? 'Avg: %s Max: %s'.format(nssinfo.avg, nssinfo.max) : null)
];
var table = E('table', { 'class': 'table' });
--- a/root/usr/share/rpcd/acl.d/luci-mod-status.json
+++ b/root/usr/share/rpcd/acl.d/luci-mod-status.json
@@ -31,6 +31,7 @@
"read": {
"cgi-io": [ "exec" ],
"file": {
+ "/sys/kernel/debug/qca-nss-drv/stats/cpu_load_ubi": [ "read" ],
"/bin/dmesg -r": [ "exec" ],
"/usr/libexec/syslog-wrapper": [ "exec" ]
},
as for the QAM256, create 001-vht.patch and drop it into feeds/luci/modules/luci-mod-network/patches
--- a/htdocs/luci-static/resources/view/network/wireless.js
+++ b/htdocs/luci-static/resources/view/network/wireless.js
@@ -351,7 +351,9 @@ var CBIWifiFrequencyValue = form.Value.extend({
'': [ '', '-', { available: true } ],
'n': [
'HT20', '20 MHz', { available: htmodelist.HT20 },
- 'HT40', '40 MHz', { available: htmodelist.HT40 }
+ 'HT40', '40 MHz', { available: htmodelist.HT40 },
+ 'VHT20', '20 MHz QAM-256', { available: htmodelist.VHT20 },
+ 'VHT40', '40 MHz QAM-256', { available: htmodelist.VHT40 }
],
'ac': [
'VHT20', '20 MHz', { available: htmodelist.VHT20 },
@@ -477,20 +479,6 @@ var CBIWifiFrequencyValue = form.Value.extend({
this.setValues(mode, this.modes);
- // Determine mode based on htmode value
- if (/EHT20|EHT40|EHT80|EHT160|EHT320/.test(htval))
- mode.value = 'be';
- else if (/HE20|HE40|HE80|HE160/.test(htval))
- mode.value = 'ax';
- else if (/VHT20|VHT40|VHT80|VHT160/.test(htval))
- mode.value = 'ac';
- else if (/HT20|HT40/.test(htval))
- mode.value = 'n';
- else
- mode.value = '';
-
- this.toggleWifiMode(elem);
-
if (hwval != null) {
this.useBandOption = false;
@@ -504,6 +492,22 @@ var CBIWifiFrequencyValue = form.Value.extend({
this.toggleWifiBand(elem);
+ // Determine mode based on htmode value
+ if (/EHT20|EHT40|EHT80|EHT160|EHT320/.test(htval))
+ mode.value = 'be';
+ else if (/HE20|HE40|HE80|HE160/.test(htval))
+ mode.value = 'ax';
+ else if (/VHT20|VHT40/.test(htval) && band.value == '2g')
+ mode.value = 'n';
+ else if (/VHT20|VHT40|VHT80|VHT160/.test(htval))
+ mode.value = 'ac';
+ else if (/HT20|HT40/.test(htval))
+ mode.value = 'n';
+ else
+ mode.value = '';
+
+ this.toggleWifiMode(elem);
+
bwdt.value = htval;
chan.value = chval ?? (chan.options[0] ? chan.options[0].value : 'auto');