From 7cc3eecb25cbba42a7b9f5ec7f23db0e15229f58 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 16 Sep 2020 17:33:12 +0800 Subject: [PATCH] qcacld-3.0: Check channel bw valid in pre vdev start wlan_reg_set_channel_params_for_freq API will check the bonded channels are valid or not. If invalid ch width is returned, that means no suitable channel bonding in current regdomain for requested channel frequency, then abort the vdev start request. Change-Id: Ibca5ef7af72f1fd45855d64f380abaa49c0f54c4 CRs-Fixed: 2777637 --- core/mac/src/pe/lim/lim_utils.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index a29884caaeaf..959148675955 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -8719,6 +8719,13 @@ QDF_STATUS lim_pre_vdev_start(struct mac_context *mac, session->beacon_tx_rate, ch_params.mhz_freq_seg0, ch_params.mhz_freq_seg1); + /* Invalid channel width means no suitable channel bonding in current + * regdomain for requested channel frequency. Abort vdev start. + */ + if (ch_params.ch_width == CH_WIDTH_INVALID) { + pe_debug("abort vdev start invalid chan parameters"); + return QDF_STATUS_E_INVAL; + } des_chan = mlme_obj->vdev->vdev_mlme.des_chan; des_chan->ch_freq = session->curr_op_freq;