File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -596,4 +596,25 @@ config WIFI_NM_WPA_CTRL_RESP_TIMEOUT_S
596596 Timeout for the control interface commands to get a response from the
597597 supplicant.
598598
599+ config WIFI_NM_HOSTAPD_REGULATORY_REGION
600+ string "Select Wi-Fi Regulatory Domain"
601+ default "00"
602+ depends on WIFI_NM_HOSTAPD_AP
603+ help
604+ Region/Country code (ISO/IEC 3166-1).Used to set regulatory domain.
605+ Set as needed to indicate country in which device is operating.
606+ This can limit available channels and transmit power.
607+ These two octets are used as the first two octets of the Country String
608+ (dot11CountryString). "00" stands for World Wide mode.
609+
610+ config WIFI_NM_HOSTAPD_REGULATORY_ENV
611+ int "Select Wi-Fi Regulatory Environment"
612+ default 32
613+ depends on WIFI_NM_HOSTAPD_AP
614+ help
615+ The third octet of the Country String (dot11CountryString)
616+ This parameter is used to set the third octet of the country string.
617+ All supported environments of current region can be used with
618+ default value of 0x20 or 32.
619+
599620endif # WIFI_NM_WPA_SUPPLICANT
Original file line number Diff line number Diff line change @@ -351,7 +351,10 @@ struct hostapd_config *hostapd_config_read2(const char *fname)
351351 bss -> logger_stdout_level = HOSTAPD_LEVEL_INFO ;
352352 bss -> logger_stdout = 0xffff ;
353353 bss -> nas_identifier = os_strdup ("ap.example.com" );
354- os_memcpy (conf -> country , "US " , 3 );
354+ /* Set regulatory domain */
355+ os_memcpy (conf -> country , CONFIG_WIFI_NM_HOSTAPD_REGULATORY_REGION , 2 );
356+ /* Set regulatory environment */
357+ conf -> country [2 ] = CONFIG_WIFI_NM_HOSTAPD_REGULATORY_ENV ;
355358 conf -> hw_mode = HOSTAPD_MODE_IEEE80211G ;
356359 bss -> wps_state = WPS_STATE_CONFIGURED ;
357360 bss -> eap_server = 1 ;
You can’t perform that action at this time.
0 commit comments