Browse Source

qcacld-3.0: Use frequency based api to set channel params

Currently when driver receives CSA, it uses channel number based
api to fill the channel params which does not work for the 6GHz
channels and may give incorrect results, which may result in
unexpected behavior.

To address above issue use frequency based api to set channel
params which gives correct results for all the bands.

Change-Id: I1e94a9fdac8dfae471ec83e9304d33cf154e49e1
CRs-Fixed: 2812548
Ashish Kumar Dhanotiya 4 years ago
parent
commit
e048ff1d56
1 changed files with 3 additions and 2 deletions
  1. 3 2
      core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

+ 3 - 2
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1748,8 +1748,9 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
 
 			ch_params.ch_width =
 				chnl_switch_info->newChanWidth;
-			wlan_reg_set_channel_params(mac_ctx->pdev,
-					csa_params->channel, 0, &ch_params);
+			wlan_reg_set_channel_params_for_freq(
+				mac_ctx->pdev, csa_params->csa_chan_freq, 0,
+				&ch_params);
 			chnl_switch_info->newCenterChanFreq0 =
 				ch_params.center_freq_seg0;
 			/*