diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index bd653fb299..0874301ef7 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1200,6 +1200,8 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc, sap_cfg->go_11ac_override = cfg_get(psoc, CFG_GO_11AC_OVERRIDE); sap_cfg->sap_sae_enabled = is_sae_sap_enabled(psoc); + sap_cfg->is_sap_bcast_deauth_enabled = + cfg_get(psoc, CFG_IS_SAP_BCAST_DEAUTH_ENABLED); } static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sap.h b/components/mlme/dispatcher/inc/cfg_mlme_sap.h index 6485ffad65..851a52b438 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_sap.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_sap.h @@ -687,6 +687,30 @@ 1, \ "Override bw to 11ac for P2P GO") +/* + * + * + * enable_bcast_deauth_for_sap - Enable/Disable broadcast deauth support + * in driver for SAP + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to enable/disable broadcast deauth support in driver + * for sap mode. + * + * Related: None + * + * Supported Feature: SAP + * Usage: External + * + * + */ +#define CFG_IS_SAP_BCAST_DEAUTH_ENABLED CFG_INI_BOOL( \ + "enable_bcast_deauth_for_sap", \ + 0, \ + "Enable/Disable bcast deauth for SAP") + #ifdef WLAN_FEATURE_SAE /* * @@ -750,6 +774,7 @@ CFG(CFG_SAP_FORCE_11N_FOR_11AC) \ CFG(CFG_SAP_11AC_OVERRIDE) \ CFG(CFG_GO_FORCE_11N_FOR_11AC) \ - CFG(CFG_GO_11AC_OVERRIDE) + CFG(CFG_GO_11AC_OVERRIDE) \ + CFG(CFG_IS_SAP_BCAST_DEAUTH_ENABLED) #endif /* __CFG_MLME_SAP_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 5929d5b142..354e8bbf4d 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -533,6 +533,18 @@ QDF_STATUS wlan_mlme_set_rmc_action_period_freq(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc, bool *value); +/** + * wlan_mlme_is_sap_bcast_deauth_enabled() - get the enable/disable value + * for broadcast deauth in sap + * @psoc: pointer to psoc object + * @value: Value that needs to get from the caller + * + * Return: QDF Status + */ +QDF_STATUS +wlan_mlme_is_sap_bcast_deauth_enabled(struct wlan_objmgr_psoc *psoc, + bool *value); + /** * wlan_mlme_get_sap_allow_all_channels() - get the value of sap allow all * channels diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 4c38ad163f..166520755b 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -581,6 +581,8 @@ struct wlan_mlme_wps_params { * @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag * @sap_11ac_override: Overrirde SAP bandwidth to 11ac * @go_11ac_override: Override GO bandwidth to 11ac + * @sap_sae_enabled: enable sae in sap mode + * @is_sap_bcast_deauth_enabled: enable bcast deauth for sap */ struct wlan_mlme_cfg_sap { uint8_t cfg_ssid[WLAN_SSID_MAX_LEN]; @@ -617,6 +619,7 @@ struct wlan_mlme_cfg_sap { bool sap_11ac_override; bool go_11ac_override; bool sap_sae_enabled; + bool is_sap_bcast_deauth_enabled; }; /** diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 9900769e5d..325220f65c 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -1397,6 +1397,23 @@ QDF_STATUS ucfg_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc, return wlan_mlme_get_sap_get_peer_info(psoc, value); } +/** + * ucfg_mlme_is_sap_bcast_deauth_enabled() - get the sap bcast deauth + * enabled value + * @psoc: pointer to psoc object + * @value: Value that needs to be get from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_is_sap_bcast_deauth_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_is_sap_bcast_deauth_enabled(psoc, value); +} + /** * ucfg_mlme_get_sap_allow_all_channels() - get the sap allow all channels * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 8429ea725a..59f130c0e5 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -1609,6 +1609,21 @@ QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } +QDF_STATUS +wlan_mlme_is_sap_bcast_deauth_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) + return QDF_STATUS_E_FAILURE; + + *value = mlme_obj->cfg.sap_cfg.is_sap_bcast_deauth_enabled; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc, bool *value) { diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d25b819d72..f1a5145bbb 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -19428,6 +19428,17 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, if (qdf_is_macaddr_broadcast((struct qdf_mac_addr *) mac)) { uint16_t i; + bool is_sap_bcast_deauth_enabled = false; + + ucfg_mlme_is_sap_bcast_deauth_enabled( + hdd_ctx->psoc, + &is_sap_bcast_deauth_enabled); + hdd_debug("is_sap_bcast_deauth_enabled %d", + is_sap_bcast_deauth_enabled); + + if (is_sap_bcast_deauth_enabled) + goto fn_end; + for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { if ((adapter->sta_info[i].in_use) && (!adapter->sta_info[i]. @@ -19486,8 +19497,8 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, adapter->sta_info[sta_id].is_deauth_in_progress = true; - hdd_debug("Delete STA with MAC::" MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(mac)); + hdd_debug("ucast, Delete STA with MAC:" MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(mac)); /* Case: SAP in ACS selected DFS ch and client connected * Now Radar detected. Then if random channel is another