mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Validate mac context in CSA bw selection API
Add sanity check mac context before using it in API wlansap_get_csa_chanwidth_from_phymode. Change-Id: I8df501e850b606615c899321fc23636ad985ab23 CRs-Fixed: 2955278
This commit is contained in:
parent
7d04179c25
commit
b656e027b3
1 changed files with 7 additions and 1 deletions
|
|
@ -1232,9 +1232,15 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
|
|||
struct ch_params *tgt_ch_params)
|
||||
{
|
||||
enum phy_ch_width ch_width, concurrent_bw = 0;
|
||||
struct mac_context *mac = sap_get_mac_context();
|
||||
struct mac_context *mac;
|
||||
struct ch_params ch_params = {0};
|
||||
|
||||
mac = sap_get_mac_context();
|
||||
if (!mac) {
|
||||
sap_err("Invalid MAC context");
|
||||
return CH_WIDTH_20MHZ;
|
||||
}
|
||||
|
||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(chan_freq)) {
|
||||
/*
|
||||
* currently OBSS scan is done in hostapd, so to avoid
|
||||
|
|
|
|||
Loading…
Reference in a new issue