Sfoglia il codice sorgente

qcacld-3.0: Add a check for invalid channel number

If the channel bandwidth is not 80+80, then the channel freq segment1
of the current session will become 0. When api is called to get freq from
channel num it shows error msg invalid channel num 0.

To avoid the above issue, add a check for invalid channel number before
calling the api to get freq.

Change-Id: I7bd0748be04181d4e59935b0f9111d582ca31e3c
CRs-Fixed: 2820653
Abdul Muqtadeer Ahmed 4 anni fa
parent
commit
401fc4d532
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5 4
      core/mac/src/pe/lim/lim_utils.c

+ 5 - 4
core/mac/src/pe/lim/lim_utils.c

@@ -8750,10 +8750,11 @@ QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
 					   session->ch_center_freq_seg0,
 					   band_mask);
 
-	ch_params.mhz_freq_seg1 =
-		wlan_reg_chan_band_to_freq(mac->pdev,
-					   session->ch_center_freq_seg1,
-					   band_mask);
+	if (session->ch_center_freq_seg1)
+		ch_params.mhz_freq_seg1 =
+			wlan_reg_chan_band_to_freq(mac->pdev,
+						   session->ch_center_freq_seg1,
+						   band_mask);
 
 	if (band == (REG_BAND_2G) && (ch_params.ch_width == CH_WIDTH_40MHZ)) {
 		if (ch_params.mhz_freq_seg0 ==  session->curr_op_freq + 10)