summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_wext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 350265ab6e96..903fc0605a3d 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -12226,6 +12226,10 @@ static int wlan_hdd_set_mon_chan(hdd_adapter_t *adapter, uint32_t chan,
ch_params.ch_width = bandwidth;
cds_set_channel_params(chan, 0, &ch_params);
+ if (ch_params.ch_width == CH_WIDTH_INVALID) {
+ hdd_err("Invalid capture channel or bandwidth for a country");
+ return -EINVAL;
+ }
status = sme_roam_channel_change_req(hal_hdl, bssid, &ch_params,
&roam_profile);
if (status) {