summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgaurank kathpalia <gkathpal@codeaurora.org>2019-12-05 14:36:13 +0530
committernshrivas <nshrivas@codeaurora.org>2019-12-12 04:26:55 -0800
commitca718a9fd885b66deee11e559eac8a494cc6ebf3 (patch)
treee30eb9b26cd72e897fea013c09fb06061e15fd8f
parentc2b1ab92bb2f2fe3babc623d6e02d5a4653b2a24 (diff)
qcacld-3.0: Set max BW for each valid channel and send to FW
Configuration for Issue:- DUT configuration:- 1. Configure DUT's country as US where channel 165 does not support channel bandwidth of 40 mhz. AP Configuration:- 1 Configure the AP in a country where channel 165 supports channel bandwidth 40MHZ. Scenario of the issue:- 1.Connect to a diff AP on some channel x with same SSID, and then roam to this AP. Observation:- The DUT would connect in 40 mhz to this AP instead of 20Mhz, which violates the DUT's country reg rules. Expectation:- The DUT should re-connect only in 20Mhz on channel 165, or only in max BW supported by reg in that country. Issue:- The DUT does not consider the max bandwidth allowed for the channel in the country configured, and allow the re-association only in the respective bandwidth. Fix:- Send the max BW supported by the channels in the current reg domain to the FW so that it considers the max BW of the channel and AP capability and then roam in the respective BW only. Change-Id: I1730d6c65d3dd305dcf2ebe340c3d5ad950761d7 CRs-Fixed: 2504900
-rw-r--r--core/wma/src/wma_scan_roam.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index e99baba16613..f365b8b71a6c 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -730,6 +730,27 @@ error:
return qdf_status;
}
+static inline wmi_host_channel_width
+wma_map_phy_ch_bw_to_wmi_channel_width(enum phy_ch_width ch_width)
+{
+ switch (ch_width) {
+ case CH_WIDTH_20MHZ:
+ return WMI_HOST_CHAN_WIDTH_20;
+ case CH_WIDTH_40MHZ:
+ return WMI_HOST_CHAN_WIDTH_40;
+ case CH_WIDTH_80MHZ:
+ return WMI_HOST_CHAN_WIDTH_80;
+ case CH_WIDTH_160MHZ:
+ return WMI_HOST_CHAN_WIDTH_160;
+ case CH_WIDTH_5MHZ:
+ return WMI_HOST_CHAN_WIDTH_5;
+ case CH_WIDTH_10MHZ:
+ return WMI_HOST_CHAN_WIDTH_10;
+ default:
+ return WMI_HOST_CHAN_WIDTH_20;
+ }
+}
+
/**
* wma_update_channel_list() - update channel list
* @handle: wma handle
@@ -747,6 +768,7 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
int i;
struct scan_chan_list_params scan_ch_param = {0};
wmi_channel_param *tchan_info;
+ struct ch_params_s ch_params = {0};
scan_ch_param.chan_info = qdf_mem_malloc(sizeof(wmi_channel) *
chan_list->numChan);
@@ -759,6 +781,7 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
WMA_LOGD("no of channels = %d", chan_list->numChan);
tchan_info = scan_ch_param.chan_info;
scan_ch_param.num_scan_chans = chan_list->numChan;
+ scan_ch_param.max_bw_support_present = true;
wma_handle->saved_chan.num_channels = chan_list->numChan;
WMA_LOGD("ht %d, vht %d, vht_24 %d", chan_list->ht_en,
chan_list->vht_en, chan_list->vht_24_en);
@@ -813,6 +836,14 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
WMI_SET_CHANNEL_REG_POWER(tchan_info,
chan_list->chanParam[i].pwr);
+ ch_params.ch_width = CH_WIDTH_160MHZ;
+ cds_set_channel_params(chan_list->chanParam[i].chanId, 0,
+ &ch_params);
+
+ WMI_SET_CHANNEL_MAX_BANDWIDTH(tchan_info,
+ wma_map_phy_ch_bw_to_wmi_channel_width(
+ ch_params.ch_width));
+
tchan_info++;
}