diff options
| -rw-r--r-- | core/sap/src/sap_module.c | 6 | ||||
| -rw-r--r-- | core/wma/src/wma_dev_if.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 9e5c0aadb253..2144cba81c50 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -2680,6 +2680,12 @@ wlansap_channel_change_request(void *pSapCtx, uint8_t target_channel) sapContext = (ptSapContext) pSapCtx; + 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__); diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 264badbba17a..e04a73e11760 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2462,6 +2462,12 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma, return QDF_STATUS_E_FAILURE; } + if (req->chan == 0) { + WMA_LOGE("%s: invalid channel: %d", __func__, req->chan); + QDF_ASSERT(0); + return QDF_STATUS_E_INVAL; + } + params.band_center_freq1 = cds_chan_to_freq(req->chan); ch_width = req->chan_width; bw_val = cds_bw_value(ch_width); |
