When setting up the interface, send to the driver the following parameters via vendor commands: country_code, is_11b, is_radar_detection. Signed-off-by: Sarada Prasanna Garnayak <sarada.prasanna.garnayak@xxxxxxxxx> --- src/common/intel-ltq-vendor.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/common/intel-ltq-vendor.h b/src/common/intel-ltq-vendor.h index 6b9fac849..63e908080 100644 --- a/src/common/intel-ltq-vendor.h +++ b/src/common/intel-ltq-vendor.h @@ -55,12 +55,16 @@ * module support eapol functionality in the driver, this vendor * cmd used to offload the eapol tx status work from hostapd * to the driver. + * + * @INTEL_LTQ_NL80211_VENDOR_SUBCMD_INITIAL_DATA: Init vendor Data + * for country code, ieee80211b support, radar detection support. */ enum intel_ltq_nl80211_vendor_subcmds { INTEL_LTQ_NL80211_VENDOR_SUBCMD_UNSPEC = 0, INTEL_LTQ_NL80211_VENDOR_SUBCMD_GET_AID = 1, INTEL_LTQ_NL80211_VENDOR_SUBCMD_FREE_AID = 2, INTEL_LTQ_NL80211_VENDOR_SUBCMD_TX_EAPOL = 3, + INTEL_LTQ_NL80211_VENDOR_SUBCMD_INITIAL_DATA = 4, }; /* @@ -74,7 +78,35 @@ enum intel_ltq_nl80211_vendor_events { INTEL_LTQ_NL80211_VENDOR_EVENT_RX_EAPOL = 0, }; +#define COUNTRY_CODE_MAX_LEN 3 +struct intel_ltq_hostapd_initial_data { + char alpha2[COUNTRY_CODE_MAX_LEN]; + u8 is_11b; + u8 radar_detection; +}; + #ifdef CONFIG_DRIVER_NL80211_INTEL_LTQ +static inline int +send_initial_params_to_driver(struct hostapd_data *hapd, const char *country) +{ + struct intel_ltq_hostapd_initial_data data; + + os_memset(&data, 0, sizeof(data)); + os_memcpy(data.alpha2, country, 2); + data.is_11b = (HOSTAPD_MODE_IEEE80211B == hapd->iconf->hw_mode); + data.radar_detection = hapd->iconf->ieee80211h; + + if (hostapd_drv_vendor_cmd(hapd, OUI_INTEL_LTQ, + INTEL_LTQ_NL80211_VENDOR_SUBCMD_INITIAL_DATA, + (const u8*)&data, sizeof(data), NULL)) { + wpa_printf(MSG_ERROR, + "Failed to send intel ltq init data vendor cmd"); + return -1; + } + + return 0; +} + static inline void ap_sta_remove_in_other_bss_now(struct hostapd_data *hapd, const u8 *addr) { -- 2.11.0 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap