From 775af3700f41edff2dcc71e462b332f8c7404d38 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 14 Feb 2024 12:53:41 +0100 Subject: [PATCH] ipq95xx: more fixes Signed-off-by: John Crispin --- feeds/ipq95xx/hostapd/files/hostapd.sh | 7 ++- .../hostapd/patches/999-probe-request.patch | 43 +++++++++++++++++++ .../boot/dts/qcom/ipq5332-sercomm-mi01.2.dtsi | 2 +- .../files/lib/netifd/wireless/mac80211.sh | 11 +---- .../mac80211/files/lib/wifi/mac80211.sh | 7 +++ 5 files changed, 57 insertions(+), 13 deletions(-) create mode 100644 feeds/ipq95xx/hostapd/patches/999-probe-request.patch diff --git a/feeds/ipq95xx/hostapd/files/hostapd.sh b/feeds/ipq95xx/hostapd/files/hostapd.sh index 525da30cd..5f4ab26e4 100644 --- a/feeds/ipq95xx/hostapd/files/hostapd.sh +++ b/feeds/ipq95xx/hostapd/files/hostapd.sh @@ -126,6 +126,7 @@ hostapd_common_add_device_config() { config_add_int airtime_mode config_add_boolean multiple_bssid rnr_beacon he_co_locate ema + config_add_boolean mlo hostapd_add_log_config } @@ -140,7 +141,7 @@ hostapd_prepare_device_config() { acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \ multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \ - maxassoc_ignore_probe + maxassoc_ignore_probe mlo hostapd_set_log_options base_cfg @@ -155,6 +156,7 @@ hostapd_prepare_device_config() { set_default multiple_bssid 0 set_default ema 0 set_default acs_exclude_dfs 0 + set_default mlo 0 [ -n "$country" ] && { append base_cfg "country_code=$country" "$N" @@ -249,9 +251,10 @@ hostapd_prepare_device_config() { [ -n "$maxassoc" ] && append base_cfg "iface_max_num_sta=$maxassoc" "$N" [ "$maxassoc_ignore_probe" -gt 0 ] && append base_cfg "no_probe_resp_if_max_sta=1" "$N" [ "$rnr_beacon" -gt 0 ] && append base_cfg "rnr_beacon=$rnr_beacon" "$N" -# [ "$he_co_locate" -gt 0 ] && append base_cfg "he_co_locate=$he_co_locate" "$N" + [ "$he_co_locate" -gt 0 ] && append base_cfg "he_co_locate=$he_co_locate" "$N" [ "$multiple_bssid" -gt 0 ] && append base_cfg "multiple_bssid=$multiple_bssid" "$N" [ "$ema" -gt 0 ] && append base_cfg "ema=$ema" "$N" + [ "$mlo" -gt 0 ] && append base_cfg "mlo=1" "$N" [ "$acs_exclude_dfs" -gt 0 ] && append base_cfg "acs_exclude_dfs=$acs_exclude_dfs" "$N" json_get_values opts hostapd_options diff --git a/feeds/ipq95xx/hostapd/patches/999-probe-request.patch b/feeds/ipq95xx/hostapd/patches/999-probe-request.patch new file mode 100644 index 000000000..a239c8432 --- /dev/null +++ b/feeds/ipq95xx/hostapd/patches/999-probe-request.patch @@ -0,0 +1,43 @@ +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -3337,6 +3337,8 @@ static int hostapd_config_fill(struct ho + bss->ignore_broadcast_ssid = atoi(pos); + } else if (os_strcmp(buf, "no_probe_resp_if_max_sta") == 0) { + bss->no_probe_resp_if_max_sta = atoi(pos); ++ } else if (os_strcmp(buf, "dynamic_probe_resp") == 0) { ++ bss->dynamic_probe_resp = atoi(pos); + #ifdef CONFIG_WEP + } else if (os_strcmp(buf, "wep_default_key") == 0) { + bss->ssid.wep.idx = atoi(pos); +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h +@@ -459,6 +459,7 @@ struct hostapd_bss_config { + int ap_max_inactivity; + int ignore_broadcast_ssid; + int no_probe_resp_if_max_sta; ++ int dynamic_probe_resp; + + int wmm_enabled; + int wmm_uapsd; +--- a/src/ap/beacon.c ++++ b/src/ap/beacon.c +@@ -920,7 +920,8 @@ void handle_probe_req(struct hostapd_dat + } + #endif /* CONFIG_P2P */ + +- if (hapd->conf->ignore_broadcast_ssid && elems.ssid_len == 0 && ++ if (!hapd->conf->dynamic_probe_resp && ++ hapd->conf->ignore_broadcast_ssid && elems.ssid_len == 0 && + elems.ssid_list_len == 0 && elems.short_ssid_list_len == 0) { + wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR " for " + "broadcast SSID ignored", MAC2STR(mgmt->sa)); +@@ -967,7 +968,8 @@ void handle_probe_req(struct hostapd_dat + return; + } + +- if (hapd->conf->ignore_broadcast_ssid && res == WILDCARD_SSID_MATCH) { ++ if (!hapd->conf->dynamic_probe_resp && ++ hapd->conf->ignore_broadcast_ssid && res == WILDCARD_SSID_MATCH) { + wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR " for " + "broadcast SSID ignored", MAC2STR(mgmt->sa)); + return; diff --git a/feeds/ipq95xx/ipq53xx/files/arch/arm64/boot/dts/qcom/ipq5332-sercomm-mi01.2.dtsi b/feeds/ipq95xx/ipq53xx/files/arch/arm64/boot/dts/qcom/ipq5332-sercomm-mi01.2.dtsi index b0d081126..b60d367a4 100644 --- a/feeds/ipq95xx/ipq53xx/files/arch/arm64/boot/dts/qcom/ipq5332-sercomm-mi01.2.dtsi +++ b/feeds/ipq95xx/ipq53xx/files/arch/arm64/boot/dts/qcom/ipq5332-sercomm-mi01.2.dtsi @@ -417,7 +417,7 @@ wsi: wsi { id = <0>; - num_chip = <3>; + num_chip = <2>; }; pcie@18000000 { diff --git a/feeds/ipq95xx/mac80211/files/lib/netifd/wireless/mac80211.sh b/feeds/ipq95xx/mac80211/files/lib/netifd/wireless/mac80211.sh index 681289529..371c11286 100644 --- a/feeds/ipq95xx/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/feeds/ipq95xx/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -536,22 +536,13 @@ mac80211_hostapd_setup_base() { eht_ulmumimo_80mhz \ eht_ulmumimo_160mhz \ eht_ulmumimo_320mhz \ - disable_eml_cap + disable_eml_cap:1 append base_cfg "ieee80211be=1" "$N" append base_cfg "eht_su_beamformer=$eht_su_beamformer" "$N" append base_cfg "eht_mu_beamformer=$eht_mu_beamformer" "$N" append base_cfg "eht_su_beamformee=$eht_su_beamformee" "$N" - drv_mlo_capable=$(cat /sys/module/ath12k/parameters/mlo_capable) - if [ -n "$drv_mlo_capable" ] && [ $drv_mlo_capable -eq 1 ]; then - append base_cfg "mlo=1" "$N" - fi - config_get bonded $2 bonded - if [ -n "$bonded" ] && [ $bonded -eq 1 ]; then - append base_cfg "bonded=1" "$N" - fi - [ -n "$disable_eml_cap" ] && append base_cfg "disable_eml_cap=$disable_eml_cap" "$N" if [ -n "$eht_ulmumimo_80mhz" ]; then diff --git a/feeds/ipq95xx/mac80211/files/lib/wifi/mac80211.sh b/feeds/ipq95xx/mac80211/files/lib/wifi/mac80211.sh index 115e5b796..f624f6e18 100644 --- a/feeds/ipq95xx/mac80211/files/lib/wifi/mac80211.sh +++ b/feeds/ipq95xx/mac80211/files/lib/wifi/mac80211.sh @@ -72,6 +72,8 @@ BEGIN { if (vht && band != "1:") mode="VHT80" if (he) mode="HE80" if (he && band == "1:") mode="HE20" + if (be) mode="EHT80" + if (be && band == "1:") mode="EHT20" sub("\\[", "", channel) sub("\\]", "", channel) bands = bands band channel ":" mode " " @@ -85,6 +87,7 @@ $1 == "Band" { vht = "" ht = "" he = "" + be = "" } $0 ~ "Capabilities:" { @@ -99,6 +102,10 @@ $0 ~ "HE Iftypes" { he=1 } +$0 ~ "EHT Iftypes" { + be=1 +} + $1 == "*" && $3 == "MHz" && $0 !~ /disabled/ && band && !channel { channel = $4 }