qca-wifi: Fix dfs null pointer dereference issue

When a DFS pulse is being processed, a channel change change can happen.
And the channel change initializes the radar filters which means
it frees and allocates the DFS filtering data structures.
This may result in memory violation (NULL Pointer dereference).

To avoid the memory violation lock the filter initialization and
DFS pulse processing.

Change-Id: Ibb90d067273b24f165205610d76709c6cbc36487
CRs-Fixed: 2317455
Signed-off-by: Vignesh U <uvignesh@codeaurora.org>
This commit is contained in:
Abhijit Pradhan
2018-10-17 20:23:23 +05:30
committato da Vignesh U
parent c3e2443cc4
commit 42442e0af0
3 ha cambiato i file con 6 aggiunte e 0 eliminazioni

Vedi File

@@ -220,5 +220,7 @@ void dfs_get_radars_for_ar5212(struct wlan_dfs *dfs)
rinfo.dfs_defaultparams.pe_prssi = AR5212_DFS_PRSSI;
rinfo.dfs_defaultparams.pe_inband = AR5212_DFS_INBAND;
WLAN_DFS_DATA_STRUCT_LOCK(dfs);
dfs_init_radar_filters(dfs, &rinfo);
WLAN_DFS_DATA_STRUCT_UNLOCK(dfs);
}

Vedi File

@@ -168,5 +168,7 @@ void dfs_get_radars_for_ar5416(struct wlan_dfs *dfs)
rinfo.dfs_defaultparams.pe_relstep = AR5416_DFS_RELSTEP;
rinfo.dfs_defaultparams.pe_maxlen = AR5416_DFS_MAXLEN;
WLAN_DFS_DATA_STRUCT_LOCK(dfs);
dfs_init_radar_filters(dfs, &rinfo);
WLAN_DFS_DATA_STRUCT_UNLOCK(dfs);
}

Vedi File

@@ -246,5 +246,7 @@ void dfs_get_radars_for_ar9300(struct wlan_dfs *dfs)
rinfo.dfs_defaultparams.pe_relstep = AR9300_DFS_RELSTEP;
rinfo.dfs_defaultparams.pe_maxlen = AR9300_DFS_MAXLEN;
WLAN_DFS_DATA_STRUCT_LOCK(dfs);
dfs_init_radar_filters(dfs, &rinfo);
WLAN_DFS_DATA_STRUCT_UNLOCK(dfs);
}