qcacld-3.0: Free Sap acs ch list memory in stop adapter

Currently the SAP memory is not freed as part of stop
adapter as the sap ctx is mem zero in deinit ctx, hence
the addr to free in NULL
Fix is to extract the the sap config from adapter and
then free the sap ch list memory from it.

Change-Id: I8c0bf66765c34f0936d694d260ce1544791beecc
CRs-Fixed: 2530985
This commit is contained in:
gaurank kathpalia 2019-09-19 14:44:35 +05:30 committed by nshrivas
parent 6243a002ea
commit 081c66cfde
4 changed files with 5 additions and 6 deletions

View File

@ -3033,7 +3033,8 @@ static int wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
*/
void wlan_hdd_undo_acs(struct hdd_adapter *adapter)
{
sap_undo_acs(WLAN_HDD_GET_SAP_CTX_PTR(adapter));
sap_undo_acs(WLAN_HDD_GET_SAP_CTX_PTR(adapter),
&adapter->session.ap.sap_config);
}
/**

View File

@ -5774,8 +5774,6 @@ 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;
qdf_atomic_set(&adapter->session.ap.acs_in_progress, 0);
qdf_mem_zero(&adapter->session.ap.sap_config.acs_cfg,
sizeof(struct sap_acs_cfg));
hdd_debug("Disabling queues");
wlan_hdd_netif_queue_control(adapter,
WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER,

View File

@ -1331,7 +1331,7 @@ QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context,
*
* Return: None
*/
void sap_undo_acs(struct sap_context *sap_context);
void sap_undo_acs(struct sap_context *sap_context, struct sap_config *sap_cfg);
/**
* wlansap_get_chan_width() - get sap channel width.

View File

@ -2485,14 +2485,14 @@ void wlansap_populate_del_sta_params(const uint8_t *mac,
QDF_MAC_ADDR_ARRAY(params->peerMacAddr.bytes));
}
void sap_undo_acs(struct sap_context *sap_ctx)
void sap_undo_acs(struct sap_context *sap_ctx, struct sap_config *sap_cfg)
{
struct sap_acs_cfg *acs_cfg;
if (!sap_ctx)
return;
acs_cfg = sap_ctx->acs_cfg;
acs_cfg = &sap_cfg->acs_cfg;
if (!acs_cfg)
return;