mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 21:58:06 +04:00
wifi-scripts: add EHT beamforming options to hostapd config
Some EHT options like beamformer/beamformee are disabled by default in hostapd.conf Read the EHT Phy Cap structure and enable/disable switches within the hostapd.conf for capable hardware. Without this EHT SU beamformer/beamformee and MU beamformer capabilities are omitted from AP beacons, even if the driver reports the hardware as capable. Signed-off-by: Richard Huynh <voxlympha@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22956 Signed-off-by: Robert Marko <robert.marko@sartura.hr>
This commit is contained in:
1 parent
54e70703a0
commit
da28c7a67e
2 files changed
+31
-1
No files matched your search
+15
@@ -153,6 +153,21 @@
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"eht_mu_beamformer": {
|
||||
"description": "EHT multiple user beamformer support",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"eht_su_beamformee": {
|
||||
"description": "EHT single user beamformee support",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"eht_su_beamformer": {
|
||||
"description": "EHT single user beamformer support",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"enable_background_radar": {
|
||||
"description": "This feature allows CAC to be run on dedicated radio RF chains",
|
||||
"type": "boolean"
|
||||
|
||||
@@ -448,8 +448,21 @@ function device_htmode_append(config) {
|
||||
}
|
||||
|
||||
if (wildcard(config.htmode, 'EHT*')) {
|
||||
let eht_phy_cap = phy_capabilities.eht_phy_cap;
|
||||
|
||||
config.ieee80211be = true;
|
||||
append_vars(config, [ 'ieee80211be' ]);
|
||||
|
||||
if (!(eht_phy_cap[0] & 0x20))
|
||||
config.eht_su_beamformer = false;
|
||||
if (!(eht_phy_cap[0] & 0x40))
|
||||
config.eht_su_beamformee = false;
|
||||
if (!(eht_phy_cap[7] & 0x70))
|
||||
config.eht_mu_beamformer = false;
|
||||
|
||||
append_vars(config, [
|
||||
'ieee80211be', 'eht_su_beamformer', 'eht_su_beamformee',
|
||||
'eht_mu_beamformer',
|
||||
]);
|
||||
|
||||
if (config.hw_mode == 'a')
|
||||
append_vars(config, [ 'eht_oper_chwidth', 'eht_oper_centr_freq_seg0_idx' ]);
|
||||
@@ -472,11 +485,13 @@ function device_capabilities(config) {
|
||||
phy_capabilities.vht_capa = band.vht_capa ?? 0;
|
||||
phy_capabilities.he_mac_cap = [];
|
||||
phy_capabilities.he_phy_cap = [];
|
||||
phy_capabilities.eht_phy_cap = [];
|
||||
for (let iftype in band.iftype_data) {
|
||||
if (!iftype.iftypes.ap)
|
||||
continue;
|
||||
phy_capabilities.he_mac_cap = iftype.he_cap_mac;
|
||||
phy_capabilities.he_phy_cap = iftype.he_cap_phy;
|
||||
phy_capabilities.eht_phy_cap = iftype.eht_cap_phy;
|
||||
}
|
||||
|
||||
phy_features.ftm_responder = device_extended_features(phy.extended_features, NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER);
|
||||
|
||||
Reference in new issue
Block a user