qcacld-3.0: Fail channel sap channel change request for channel 0

In function wlansap_channel_change_request validate channel requested
before processing the request.

Change-Id: I1cc8c978b15fe6ee043ce6bf712a109994dce50b
CRs-Fixed: 2212078
This commit is contained in:
Naveen Rawat
2018-03-23 17:10:01 -07:00
committed by nshrivas
parent 302bdcce10
commit b4ea70f96e
2 changed files with 12 additions and 0 deletions

View File

@@ -1706,6 +1706,12 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
eCsrPhyMode phy_mode;
struct ch_params *ch_params;
if (!target_channel) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: channel 0 requested", __func__);
return QDF_STATUS_E_FAULT;
}
if (NULL == sapContext) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid SAP pointer", __func__);