From 5f783ea77a433a8a075294ec32383825e6ae0944 Mon Sep 17 00:00:00 2001 From: Ramya Gnanasekar Date: Tue, 29 Nov 2022 15:37:13 +0530 Subject: [PATCH] mesh: CCFS option from script for center frequency CCFS option is provided in script to help configure center frequency. Same is used in case of mesh from wpa_supplicant config. Signed-off-by: Ramya Gnanasekar --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4323,6 +4323,8 @@ static int hostapd_config_fill(struct ho bss->wowlan_triggers = os_strdup(pos); } else if (os_strcmp(buf, "enable_320mhz_bw") == 0) { conf->enable_320mhz_bw = atoi(pos); + } else if (os_strcmp(buf, "ccfs") == 0) { + conf->ccfs = atoi(pos); } else if (os_strcmp(buf, "enable_160mhz_bw") == 0) { conf->enable_160mhz_bw = atoi(pos); } else if (os_strcmp(buf, "disable_40mhz_scan") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -1220,6 +1220,7 @@ struct hostapd_config { ENHANCED_MBSSID_ENABLED = 2, } mbssid; int use_ru_puncture_dfs; + int ccfs; }; --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1379,6 +1379,12 @@ struct wpa_driver_associate_params { u16 ru_punct_bitmap; /** + * Center Frequency - 320MHz has overlapping bands and by default, center frequency + * will be selected from non-overlapping bands. + * CCFS can be configured from script to select particular range. */ + int ccfs; + + /** * disable_eht - Disable EHT for this connection */ int disable_eht; --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -2887,6 +2887,7 @@ static const struct parse_data ssid_fiel { INT_RANGE(enable_320mhz_bw, 0, 1)}, { INT(ru_punct_bitmap) }, { INT_RANGE(use_ru_puncture_dfs, 0, 1) }, + { INT(ccfs) }, { INT_RANGE(disable_eht, 0, 1)}, { INT_RANGE(enable_4addr_mode, 0, 1)}, }; --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -904,6 +904,7 @@ static void wpa_config_write_network(FIL INT(beacon_tx_mode); INT(enable_160mhz_bw); INT(ru_punct_bitmap); + INT(ccfs); INT(enable_4addr_mode); #undef STR --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h @@ -1305,6 +1305,12 @@ struct wpa_ssid { int use_ru_puncture_dfs; /** + * Center Frequency - 320MHz has overlapping bands and by default, center frequency + * will be selected from non-overlapping bands. + * CCFS can be configured from script to select particular range.*/ + int ccfs; + + /** * disable_eht - Disable EHT (IEEE 802.11be) for this network * * By default, use it if it is available, but this can be configured