qcacld-3.0: Reset im stats and freq ctrl params when stop ap
When dcs happened for three times in five minutes, then do restart(start/stop) SAP operation, when SAP is started again, dcs may happen again quickly, if total four times dcs happened in five minutes, dcs_disable_timer will be started due to dcs happened frequency control policy, it will disable wlan interference detection for 30 minutes and dcs interference detection won't work for 30 minutes, it's unreasonable. After SAP restart, dcs happened times should be calculated from zero. Fix is to reset im stats and freq ctrl params when stop ap. Change-Id: I0322a268a031b677a4e263cd6c5c6c0627315719 CRs-Fixed: 2738099
This commit is contained in:
parent
b5334b1bf6
commit
bedc2973c8
@ -205,3 +205,38 @@ void hdd_dcs_chan_select_complete(struct hdd_adapter *adapter)
|
||||
hdd_ctx,
|
||||
adapter->vdev_id);
|
||||
}
|
||||
|
||||
void hdd_dcs_clear(struct hdd_adapter *adapter)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint8_t mac_id;
|
||||
struct hdd_context *hdd_ctx;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
uint32_t list[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
if (!hdd_ctx) {
|
||||
hdd_err("Invalid HDD context pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
psoc = hdd_ctx->psoc;
|
||||
|
||||
if (wlansap_dcs_is_wlan_interference_mitigation_enabled(
|
||||
WLAN_HDD_GET_SAP_CTX_PTR(adapter))) {
|
||||
status = policy_mgr_get_mac_id_by_session_id(psoc,
|
||||
adapter->vdev_id,
|
||||
&mac_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
hdd_err("get mac id failed");
|
||||
return;
|
||||
}
|
||||
if (policy_mgr_get_sap_go_count_on_mac(psoc, list, mac_id) <= 1)
|
||||
ucfg_dcs_clear(psoc, mac_id);
|
||||
}
|
||||
|
||||
wlansap_dcs_set_vdev_wlan_interference_mitigation(
|
||||
WLAN_HDD_GET_SAP_CTX_PTR(adapter), false);
|
||||
wlansap_dcs_set_vdev_starting(
|
||||
WLAN_HDD_GET_SAP_CTX_PTR(adapter), false);
|
||||
}
|
||||
|
@ -62,6 +62,17 @@ void hdd_dcs_hostapd_set_chan(struct hdd_context *hdd_ctx,
|
||||
* Return: None
|
||||
*/
|
||||
void hdd_dcs_chan_select_complete(struct hdd_adapter *adapter);
|
||||
|
||||
/**
|
||||
* hdd_dcs_clear() - clear dcs information
|
||||
* @adapter: hdd adapter pointer
|
||||
*
|
||||
* This function is used to clear sap dcs related information such as
|
||||
* im stats and freq ctrl params
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void hdd_dcs_clear(struct hdd_adapter *adapter);
|
||||
#else
|
||||
static inline void hdd_dcs_register_cb(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
@ -76,6 +87,10 @@ static inline void hdd_dcs_hostapd_set_chan(struct hdd_context *hdd_ctx,
|
||||
static inline void hdd_dcs_chan_select_complete(struct hdd_adapter *adapter)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void hdd_dcs_clear(struct hdd_adapter *adapter)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end #if !defined(WLAN_HDD_DCS_H) */
|
||||
|
@ -5849,7 +5849,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||
tSirUpdateIE update_ie;
|
||||
int ret;
|
||||
mac_handle_t mac_handle;
|
||||
struct sap_context *sap_ctx;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
@ -5915,9 +5914,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||
|
||||
cds_flush_work(&adapter->sap_stop_bss_work);
|
||||
adapter->session.ap.sap_config.acs_cfg.acs_mode = false;
|
||||
sap_ctx = WLAN_HDD_GET_SAP_CTX_PTR(adapter);
|
||||
wlansap_dcs_set_vdev_wlan_interference_mitigation(sap_ctx, false);
|
||||
wlansap_dcs_set_vdev_starting(sap_ctx, false);
|
||||
hdd_dcs_clear(adapter);
|
||||
qdf_atomic_set(&adapter->session.ap.acs_in_progress, 0);
|
||||
hdd_debug("Disabling queues");
|
||||
wlan_hdd_netif_queue_control(adapter,
|
||||
|
Loading…
Reference in New Issue
Block a user