qcacld-3.0: Add support for bcast deauth in sap mode
Currently, only broadcast disassociate is supported and deauth is send in a unicast manner. For enabling broadcast deauth support, bypass the unicast deauth and directly send broadcast disassociate. Change-Id: Ie196bc955b5b9a9f48a474e5f109b2a6c73fa208 CRs-Fixed: 2420980
This commit is contained in:

committed by
nshrivas

parent
869bc4af4f
commit
e57425536e
@@ -1200,6 +1200,8 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
sap_cfg->go_11ac_override =
|
sap_cfg->go_11ac_override =
|
||||||
cfg_get(psoc, CFG_GO_11AC_OVERRIDE);
|
cfg_get(psoc, CFG_GO_11AC_OVERRIDE);
|
||||||
sap_cfg->sap_sae_enabled = is_sae_sap_enabled(psoc);
|
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,
|
static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
|
@@ -687,6 +687,30 @@
|
|||||||
1, \
|
1, \
|
||||||
"Override bw to 11ac for P2P GO")
|
"Override bw to 11ac for P2P GO")
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* <ini>
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#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
|
#ifdef WLAN_FEATURE_SAE
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
@@ -750,6 +774,7 @@
|
|||||||
CFG(CFG_SAP_FORCE_11N_FOR_11AC) \
|
CFG(CFG_SAP_FORCE_11N_FOR_11AC) \
|
||||||
CFG(CFG_SAP_11AC_OVERRIDE) \
|
CFG(CFG_SAP_11AC_OVERRIDE) \
|
||||||
CFG(CFG_GO_FORCE_11N_FOR_11AC) \
|
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 */
|
#endif /* __CFG_MLME_SAP_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,
|
QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc,
|
||||||
bool *value);
|
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
|
* wlan_mlme_get_sap_allow_all_channels() - get the value of sap allow all
|
||||||
* channels
|
* channels
|
||||||
|
@@ -581,6 +581,8 @@ struct wlan_mlme_wps_params {
|
|||||||
* @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag
|
* @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag
|
||||||
* @sap_11ac_override: Overrirde SAP bandwidth to 11ac
|
* @sap_11ac_override: Overrirde SAP bandwidth to 11ac
|
||||||
* @go_11ac_override: Override GO 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 {
|
struct wlan_mlme_cfg_sap {
|
||||||
uint8_t cfg_ssid[WLAN_SSID_MAX_LEN];
|
uint8_t cfg_ssid[WLAN_SSID_MAX_LEN];
|
||||||
@@ -617,6 +619,7 @@ struct wlan_mlme_cfg_sap {
|
|||||||
bool sap_11ac_override;
|
bool sap_11ac_override;
|
||||||
bool go_11ac_override;
|
bool go_11ac_override;
|
||||||
bool sap_sae_enabled;
|
bool sap_sae_enabled;
|
||||||
|
bool is_sap_bcast_deauth_enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -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);
|
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
|
* ucfg_mlme_get_sap_allow_all_channels() - get the sap allow all channels
|
||||||
* @psoc: pointer to psoc object
|
* @psoc: pointer to psoc object
|
||||||
|
@@ -1609,6 +1609,21 @@ QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc,
|
|||||||
return QDF_STATUS_SUCCESS;
|
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,
|
QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc,
|
||||||
bool *value)
|
bool *value)
|
||||||
{
|
{
|
||||||
|
@@ -19428,6 +19428,17 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
|
|||||||
if (qdf_is_macaddr_broadcast((struct qdf_mac_addr *) mac)) {
|
if (qdf_is_macaddr_broadcast((struct qdf_mac_addr *) mac)) {
|
||||||
uint16_t i;
|
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++) {
|
for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {
|
||||||
if ((adapter->sta_info[i].in_use) &&
|
if ((adapter->sta_info[i].in_use) &&
|
||||||
(!adapter->sta_info[i].
|
(!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;
|
adapter->sta_info[sta_id].is_deauth_in_progress = true;
|
||||||
|
|
||||||
hdd_debug("Delete STA with MAC::" MAC_ADDRESS_STR,
|
hdd_debug("ucast, Delete STA with MAC:" MAC_ADDRESS_STR,
|
||||||
MAC_ADDR_ARRAY(mac));
|
MAC_ADDR_ARRAY(mac));
|
||||||
|
|
||||||
/* Case: SAP in ACS selected DFS ch and client connected
|
/* Case: SAP in ACS selected DFS ch and client connected
|
||||||
* Now Radar detected. Then if random channel is another
|
* Now Radar detected. Then if random channel is another
|
||||||
|
Reference in New Issue
Block a user