Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/luci.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-06-05 20:04:11 +0300
committerGitHub <noreply@github.com>2021-06-05 20:04:11 +0300
commit516c58e133054d281c00ca5e21995e86393160b5 (patch)
treef8c85a81e29ffc1a32abafd817125250917734ea
parenta6c0ad00b28a5d3f91338b50f7e69fbd45f2154e (diff)
parent4b17f8baa3574527dc6ab8914fd322a08cb9784c (diff)
Merge pull request #5070 from blocktrron/pr-luci-wifi6
luci-mod-network: add 802.11ax HE support
-rw-r--r--libs/rpcd-mod-luci/src/luci.c15
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/network.js16
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js24
3 files changed, 53 insertions, 2 deletions
diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c
index 030dabb823..258d2ec86b 100644
--- a/libs/rpcd-mod-luci/src/luci.c
+++ b/libs/rpcd-mod-luci/src/luci.c
@@ -879,6 +879,9 @@ static bool rpc_luci_get_iwinfo(struct blob_buf *buf, const char *devname,
if (!iw->hwmodelist(devname, &nret)) {
a = blobmsg_open_array(buf, "hwmodes");
+ if (nret & IWINFO_80211_AX)
+ blobmsg_add_string(buf, NULL, "ax");
+
if (nret & IWINFO_80211_AC)
blobmsg_add_string(buf, NULL, "ac");
@@ -921,6 +924,18 @@ static bool rpc_luci_get_iwinfo(struct blob_buf *buf, const char *devname,
if (nret & IWINFO_HTMODE_VHT160)
blobmsg_add_string(buf, NULL, "VHT160");
+ if (nret & IWINFO_HTMODE_HE20)
+ blobmsg_add_string(buf, NULL, "HE20");
+
+ if (nret & IWINFO_HTMODE_HE40)
+ blobmsg_add_string(buf, NULL, "HE40");
+
+ if (nret & IWINFO_HTMODE_HE80)
+ blobmsg_add_string(buf, NULL, "HE80");
+
+ if (nret & IWINFO_HTMODE_HE160)
+ blobmsg_add_string(buf, NULL, "HE160");
+
blobmsg_close_array(buf, a);
}
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js
index b1dfcfd77c..39b8b2dc85 100644
--- a/modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/modules/luci-base/htdocs/luci-static/resources/network.js
@@ -3303,6 +3303,7 @@ WifiDevice = baseclass.extend(/** @lends LuCI.network.WifiDevice.prototype */ {
* - `g` - Legacy 802.11g mode, 2.4 GHz, up to 54 Mbit/s
* - `n` - IEEE 802.11n mode, 2.4 or 5 GHz, up to 600 Mbit/s
* - `ac` - IEEE 802.11ac mode, 5 GHz, up to 6770 Mbit/s
+ * - `ax` - IEEE 802.11ax mode, 2.4 or 5 GHz
*/
getHWModes: function() {
var hwmodes = this.ubus('dev', 'iwinfo', 'hwmodes');
@@ -3324,6 +3325,10 @@ WifiDevice = baseclass.extend(/** @lends LuCI.network.WifiDevice.prototype */ {
* - `VHT40` - applicable to IEEE 802.11ac, 40 MHz wide channels
* - `VHT80` - applicable to IEEE 802.11ac, 80 MHz wide channels
* - `VHT160` - applicable to IEEE 802.11ac, 160 MHz wide channels
+ * - `HE20` - applicable to IEEE 802.11ax, 20 MHz wide channels
+ * - `HE40` - applicable to IEEE 802.11ax, 40 MHz wide channels
+ * - `HE80` - applicable to IEEE 802.11ax, 80 MHz wide channels
+ * - `HE160` - applicable to IEEE 802.11ax, 160 MHz wide channels
*/
getHTModes: function() {
var htmodes = this.ubus('dev', 'iwinfo', 'htmodes');
@@ -4021,6 +4026,17 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */
* @property {number} [nss]
* Specifies the number of spatial streams used by the transmission.
* Only applicable to VHT rates.
+ *
+ * @property {boolean} [he]
+ * Specifies whether this rate is an HE (IEEE 802.11ax) rate.
+ *
+ * @property {number} [he_gi]
+ * Specifies whether the guard interval used for the transmission.
+ * Only applicable to HE rates.
+ *
+ * @property {number} [he_dcm]
+ * Specifies whether dual concurrent modulation is used for the transmission.
+ * Only applicable to HE rates.
*/
/**
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
index 748cb6254f..e9707e85ab 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
@@ -199,7 +199,9 @@ function format_wifirate(rate) {
var s = '%.1f\xa0%s, %d\xa0%s'.format(rate.rate / 1000, _('Mbit/s'), rate.mhz, _('MHz')),
ht = rate.ht, vht = rate.vht,
mhz = rate.mhz, nss = rate.nss,
- mcs = rate.mcs, sgi = rate.short_gi;
+ mcs = rate.mcs, sgi = rate.short_gi,
+ he = rate.he, he_gi = rate.he_gi,
+ he_dcm = rate.he_dcm;
if (ht || vht) {
if (vht) s += ', VHT-MCS\xa0%d'.format(mcs);
@@ -208,6 +210,13 @@ function format_wifirate(rate) {
if (sgi) s += ', ' + _('Short GI').replace(/ /g, '\xa0');
}
+ if (he) {
+ s += ', HE-MCS\xa0%d'.format(mcs);
+ if (nss) s += ', HE-NSS\xa0%d'.format(nss);
+ if (he_gi) s += ', HE-GI\xa0%d'.format(he_gi);
+ if (he_dcm) s += ', HE-DCM\xa0%d'.format(he_dcm);
+ }
+
return s;
}
@@ -320,7 +329,8 @@ var CBIWifiFrequencyValue = form.Value.extend({
this.modes = [
'', 'Legacy', true,
'n', 'N', hwmodelist.n,
- 'ac', 'AC', hwmodelist.ac
+ 'ac', 'AC', hwmodelist.ac,
+ 'ax', 'AX', hwmodelist.ax
];
var htmodelist = L.toArray(data[0] ? data[0].getHTModes() : null)
@@ -337,6 +347,12 @@ var CBIWifiFrequencyValue = form.Value.extend({
'VHT40', '40 MHz', htmodelist.VHT40,
'VHT80', '80 MHz', htmodelist.VHT80,
'VHT160', '160 MHz', htmodelist.VHT160
+ ],
+ 'ax': [
+ 'HE20', '20 MHz', htmodelist.HE20,
+ 'HE40', '40 MHz', htmodelist.HE40,
+ 'HE80', '80 MHz', htmodelist.HE80,
+ 'HE160', '160 MHz', htmodelist.HE160
]
};
@@ -351,6 +367,10 @@ var CBIWifiFrequencyValue = form.Value.extend({
],
'ac': [
'11a', '5 GHz', true
+ ],
+ 'ax': [
+ '11g', '2.4 GHz', this.channels['11g'].length > 3,
+ '11a', '5 GHz', this.channels['11a'].length > 3
]
};
}, this));