|
@@ -6930,7 +6930,6 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
|
QDF_STATUS status;
|
|
QDF_STATUS status;
|
|
struct qdf_mac_addr bssid;
|
|
struct qdf_mac_addr bssid;
|
|
struct csr_roam_profile roam_profile;
|
|
struct csr_roam_profile roam_profile;
|
|
- struct ch_params ch_params;
|
|
|
|
enum phy_ch_width max_fw_bw;
|
|
enum phy_ch_width max_fw_bw;
|
|
enum phy_ch_width ch_width;
|
|
enum phy_ch_width ch_width;
|
|
|
|
|
|
@@ -6948,6 +6947,12 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
|
/* Verify the BW before accepting this request */
|
|
/* Verify the BW before accepting this request */
|
|
ch_width = bandwidth;
|
|
ch_width = bandwidth;
|
|
|
|
|
|
|
|
+ if (ch_width > CH_WIDTH_10MHZ ||
|
|
|
|
+ (!cds_is_sub_20_mhz_enabled() && ch_width > CH_WIDTH_160MHZ)) {
|
|
|
|
+ hdd_err("invalid BW received %d", ch_width);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
max_fw_bw = sme_get_vht_ch_width();
|
|
max_fw_bw = sme_get_vht_ch_width();
|
|
|
|
|
|
hdd_debug("max fw BW %d ch width %d", max_fw_bw, ch_width);
|
|
hdd_debug("max fw BW %d ch width %d", max_fw_bw, ch_width);
|
|
@@ -6992,12 +6997,6 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
|
qdf_mem_copy(bssid.bytes, adapter->mac_addr.bytes,
|
|
qdf_mem_copy(bssid.bytes, adapter->mac_addr.bytes,
|
|
QDF_MAC_ADDR_SIZE);
|
|
QDF_MAC_ADDR_SIZE);
|
|
|
|
|
|
- ch_params.ch_width = bandwidth;
|
|
|
|
- wlan_reg_set_channel_params(hdd_ctx->pdev, chan, 0, &ch_params);
|
|
|
|
- if (ch_params.ch_width == CH_WIDTH_INVALID) {
|
|
|
|
- hdd_err("Invalid capture channel or bandwidth for a country");
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
if (wlan_hdd_change_hw_mode_for_given_chnl(adapter, chan,
|
|
if (wlan_hdd_change_hw_mode_for_given_chnl(adapter, chan,
|
|
POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN)) {
|
|
POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN)) {
|
|
hdd_err("Failed to change hw mode");
|
|
hdd_err("Failed to change hw mode");
|
|
@@ -7005,7 +7004,7 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
|
}
|
|
}
|
|
|
|
|
|
status = sme_roam_channel_change_req(hdd_ctx->mac_handle,
|
|
status = sme_roam_channel_change_req(hdd_ctx->mac_handle,
|
|
- bssid, &ch_params,
|
|
|
|
|
|
+ bssid, &roam_profile.ch_params,
|
|
&roam_profile);
|
|
&roam_profile);
|
|
if (status) {
|
|
if (status) {
|
|
hdd_err("Status: %d Failed to set sme_roam Channel for monitor mode",
|
|
hdd_err("Status: %d Failed to set sme_roam Channel for monitor mode",
|