mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
qcacld-3.0: Reset acs configuration after freeing acs channel list
Presently, on receiving DO_ACS vendor command driver resets acs configuration to zero. This leads dynamically allocated memory acs channel list address to be lost and thereby memory leak is observed. Reset acs configuration after freeing acs channel list, if its already allocated. Change-Id: Ice6854bfe8b12799200a5b18d96620f31548d776 CRs-Fixed: 2196377
This commit is contained in:
parent
fdb0189a4a
commit
560d5713d6
1 changed files with 7 additions and 6 deletions
|
|
@ -2527,11 +2527,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
goto out;
|
||||
}
|
||||
|
||||
sap_config = &adapter->session.ap.sap_config;
|
||||
if (sap_config->acs_cfg.ch_list)
|
||||
qdf_mem_free(sap_config->acs_cfg.ch_list);
|
||||
qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
|
||||
|
||||
ret = wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data,
|
||||
data_len,
|
||||
wlan_hdd_cfg80211_do_acs_policy);
|
||||
|
|
@ -2595,6 +2590,13 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
ch_width = 20;
|
||||
}
|
||||
|
||||
sap_config = &adapter->session.ap.sap_config;
|
||||
|
||||
/* Check and free if memory is already allocated for acs channel list */
|
||||
wlan_hdd_undo_acs(adapter);
|
||||
|
||||
qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
|
||||
|
||||
hdd_debug("channel width =%d", ch_width);
|
||||
if (ch_width == 160)
|
||||
sap_config->acs_cfg.ch_width = CH_WIDTH_160MHZ;
|
||||
|
|
@ -2615,7 +2617,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
* is present
|
||||
*/
|
||||
|
||||
wlan_hdd_undo_acs(adapter);
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST]) {
|
||||
char *tmp = nla_data(tb[QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue