summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/SAP/src/sapModule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c
index d5338bf7c32e..b1fcf2254a8d 100644
--- a/CORE/SAP/src/sapModule.c
+++ b/CORE/SAP/src/sapModule.c
@@ -2878,6 +2878,14 @@ WLANSAP_ChannelChangeRequest(v_PVOID_t pSapCtx, uint8_t target_channel)
}
pMac = PMAC_STRUCT( hHal );
phyMode = sapContext->csrRoamProfile.phyMode;
+
+ if (sapContext->csrRoamProfile.ChannelInfo.numOfChannels == 0 ||
+ sapContext->csrRoamProfile.ChannelInfo.ChannelList == NULL)
+ {
+ VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
+ FL("Invalid channel list"));
+ return VOS_STATUS_E_FAULT;
+ }
sapContext->csrRoamProfile.ChannelInfo.ChannelList[0] = target_channel;
/*
* We are getting channel bonding mode from sapDfsInfor structure