Skip to content

Commit f21a2f7

Browse files
committed
luci-wireless: add 11be support
Add 11be support Tested with banana rpi-4 Signed-off-by: Rudy Andram <rmandrad@gmail.com> Tested-By: Daniel Pawlik <pawlik.dan@gmail.com>
1 parent a2c21a6 commit f21a2f7

4 files changed

Lines changed: 204 additions & 114 deletions

File tree

modules/luci-base/htdocs/luci-static/resources/network.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,6 +3371,7 @@ WifiDevice = baseclass.extend(/** @lends LuCI.network.WifiDevice.prototype */ {
33713371
* - `n` - IEEE 802.11n mode, 2.4 or 5 GHz, up to 600 Mbit/s
33723372
* - `ac` - IEEE 802.11ac mode, 5 GHz, up to 6770 Mbit/s
33733373
* - `ax` - IEEE 802.11ax mode, 2.4 or 5 GHz
3374+
* - 'be' - IEEE 802.11be mode, 2.4, 5 or 6 GHz
33743375
*/
33753376
getHWModes: function() {
33763377
var hwmodes = this.ubus('dev', 'iwinfo', 'hwmodes');
@@ -3396,6 +3397,11 @@ WifiDevice = baseclass.extend(/** @lends LuCI.network.WifiDevice.prototype */ {
33963397
* - `HE40` - applicable to IEEE 802.11ax, 40 MHz wide channels
33973398
* - `HE80` - applicable to IEEE 802.11ax, 80 MHz wide channels
33983399
* - `HE160` - applicable to IEEE 802.11ax, 160 MHz wide channels
3400+
* - `EHT20` - applicable to IEEE 802.11be, 20 MHz wide channels
3401+
* - `EHT40` - applicable to IEEE 802.11be, 40 MHz wide channels
3402+
* - `EHT80` - applicable to IEEE 802.11be, 80 MHz wide channels
3403+
* - `EHT160` - applicable to IEEE 802.11be, 160 MHz wide channels
3404+
* - `EHT320` - applicable to IEEE 802.11be, 320 MHz wide channels
33993405
*/
34003406
getHTModes: function() {
34013407
var htmodes = this.ubus('dev', 'iwinfo', 'htmodes');
@@ -4101,6 +4107,17 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */
41014107
* @property {number} [he_dcm]
41024108
* Specifies whether dual concurrent modulation is used for the transmission.
41034109
* Only applicable to HE rates.
4110+
*
4111+
* @property {boolean} [eht]
4112+
* Specifies whether this rate is an EHT (IEEE 802.11be) rate.
4113+
*
4114+
* @property {number} [eht_gi]
4115+
* Specifies whether the guard interval used for the transmission.
4116+
* Only applicable to EHT rates.
4117+
*
4118+
* @property {number} [eht_dcm]
4119+
* Specifies whether dual concurrent modulation is used for the transmission.
4120+
* Only applicable to EHT rates.
41044121
*/
41054122

41064123
/**

modules/luci-base/root/usr/share/rpcd/ucode/luci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ const methods = {
208208
relayd: access('/usr/sbin/relayd') == true,
209209
};
210210

211-
const wifi_features = [ 'eap', '11ac', '11ax', '11r', 'acs', 'sae', 'owe', 'suiteb192', 'wep', 'wps', 'ocv' ];
211+
const wifi_features = [ 'eap', '11ac', '11ax', '11be', '11r', 'acs', 'sae', 'owe', 'suiteb192', 'wep', 'wps', 'ocv' ];
212212

213213
if (access('/usr/sbin/hostapd')) {
214214
result.hostapd = { cli: access('/usr/sbin/hostapd_cli') == true };

modules/luci-compat/luasrc/view/cbi/wireless_modefreq.htm

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
var modes = [
3030
'', 'Legacy', true,
3131
'n', 'N', hwmodes.n,
32-
'ac', 'AC', hwmodes.ac
32+
'ac', 'AC', hwmodes.ac,
33+
'ax', 'AX', hwmodes.ax,
34+
'be', 'BE', hwmodes.be
3335
];
3436

3537
var htmodes = {
@@ -45,6 +47,19 @@
4547
'VHT40', '40 MHz', htmodes.VHT40,
4648
'VHT80', '80 MHz', htmodes.VHT80,
4749
'VHT160', '160 MHz', htmodes.VHT160
50+
],
51+
'ax': [
52+
'HE20', '20 MHz', htmodes.HE20,
53+
'HE40', '40 MHz', htmodes.HE40,
54+
'HE80', '80 MHz', htmodes.HE80,
55+
'HE160', '160 MHz', htmodes.HE160
56+
],
57+
'be': [
58+
'EHT20', '20 MHz', htmodes.EHT20,
59+
'EHT40', '40 MHz', htmodes.EHT40,
60+
'EHT80', '80 MHz', htmodes.EHT80,
61+
'EHT160', '160 MHz', htmodes.EHT160,
62+
'EHT320', '320 MHz', htmodes.EHT320
4863
]
4964
};
5065

@@ -59,6 +74,12 @@
5974
],
6075
'ac': [
6176
'11a', '5 GHz', true
77+
],
78+
'ax': [
79+
'11a', '5 GHz', true
80+
],
81+
'be': [
82+
'11a', '6 GHz', true
6283
]
6384
};
6485

@@ -128,8 +149,12 @@
128149
var bwdt = document.getElementById(id + '.htmode');
129150

130151
cbi_set_values(mode, modes);
131-
132-
if (/VHT20|VHT40|VHT80|VHT160/.test(<%= luci.http.write_json(self.map:get(section, "htmode")) %>))
152+
153+
if (/EHT20|EHT40|HE80|EHT160|EHT320/.test(<%= luci.http.write_json(self.map:get(section, "htmode")) %>))
154+
mode.value = 'be';
155+
else if (/HE20|HE40|HE80|HE160/.test(<%= luci.http.write_json(self.map:get(section, "htmode")) %>))
156+
mode.value = 'ax';
157+
else if (/VHT20|VHT40|VHT80|VHT160/.test(<%= luci.http.write_json(self.map:get(section, "htmode")) %>))
133158
mode.value = 'ac';
134159
else if (/HT20|HT40/.test(<%= luci.http.write_json(self.map:get(section, "htmode")) %>))
135160
mode.value = 'n';

0 commit comments

Comments
 (0)