qcacld-3.0: Fail monitor mode set channel if it is invalid channel for country

Monitor mode channel set operation derives invalid channel width if
we try to set not allowed channel for country code, make sure to return
failure instead of going ahead with invalid channel width.

Change-Id: I498555a9c90497ef225f536c904b8e7ea8f8d4a2
CRs-Fixed: 2016185
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index e7d24c7..f5cdb57 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -12438,6 +12438,10 @@
 
 	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) {