[openwrt/openwrt] wifi-scripts: fix RX-STBC notation VHT capabilities
LEDE Commits
lede-commits at lists.infradead.org
Tue Feb 18 23:13:37 PST 2025
blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/18511314275bd1056d2e2b6c6a382fa10c0a13f9
commit 18511314275bd1056d2e2b6c6a382fa10c0a13f9
Author: Sean Khan <datapronix at protonmail.com>
AuthorDate: Mon Feb 17 16:55:40 2025 -0500
wifi-scripts: fix RX-STBC notation VHT capabilities
Notation for RX-STBC VHT capabilities when specifying number of spatial
streams should be hyphenated, e.g. RX-STBC-1, RX-STBC-2. HT capabilities
use without hyphen, e.g. RX-STBC1, RX-STBC2. This is consistent with
what hostapd expects.
```c
static int hostapd_config_ht_capab(struct hostapd_config *conf,
const char *capab)
{
if (os_strstr(capab, "[RX-STBC1]")) {
conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
conf->ht_capab |= HT_CAP_INFO_RX_STBC_1;
}
if (os_strstr(capab, "[RX-STBC12]")) {
conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
conf->ht_capab |= HT_CAP_INFO_RX_STBC_12;
}
if (os_strstr(capab, "[RX-STBC123]")) {
conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
conf->ht_capab |= HT_CAP_INFO_RX_STBC_123;
}
}
static int hostapd_config_vht_capab(struct hostapd_config *conf,
const char *capab)
{
if (os_strstr(capab, "[RX-STBC-1]"))
conf->vht_capab |= VHT_CAP_RXSTBC_1;
if (os_strstr(capab, "[RX-STBC-12]"))
conf->vht_capab |= VHT_CAP_RXSTBC_2;
if (os_strstr(capab, "[RX-STBC-123]"))
conf->vht_capab |= VHT_CAP_RXSTBC_3;
if (os_strstr(capab, "[RX-STBC-1234]"))
}
```
Signed-off-by: Sean Khan <datapronix at protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18013
Signed-off-by: John Crispin <john at phrozen.org>
---
.../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
index 01e29db8e2..c08d26d04f 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
@@ -329,7 +329,7 @@ function device_htmode_append(config) {
config.vht_capab += '[RX-ANTENNA-PATTERN]';
if (vht_capab & 0x20000000 && config.tx_antenna_pattern)
config.vht_capab += '[TX-ANTENNA-PATTERN]';
- let rx_stbc = [ '', '[RX-STBC1]', '[RX-STBC12]', '[RX-STBC123]', '[RX-STBC-1234]' ];
+ let rx_stbc = [ '', '[RX-STBC-1]', '[RX-STBC-12]', '[RX-STBC-123]', '[RX-STBC-1234]' ];
config.vht_capab += rx_stbc[min(config.rx_stbc, (vht_capab >> 8) & 7)];
if (vht_capab & 0x800 && config.su_beamformer)
More information about the lede-commits
mailing list