Browse Source

qcacmn: Do not use a stack variable uninitialized

In reg_is_chan_supported() API, the stack object chan_list is
uninitialized and is used by channel search API. The puncture pattern
inside the chan_list is set to a random value and it causes channel find
failure.

CRs-Fixed: 3402977
Change-Id: Icec8e5f207d3d8bfb5a01dafe8aa6adc5bc18a9d
Priyadarshnee Srinivasan 2 years ago
parent
commit
058c19c08b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      umac/regulatory/core/src/reg_opclass.c

+ 1 - 1
umac/regulatory/core/src/reg_opclass.c

@@ -1577,7 +1577,7 @@ static bool reg_is_chan_supported(struct wlan_objmgr_pdev *pdev,
 				  enum phy_ch_width ch_width,
 				  enum phy_ch_width ch_width,
 				  enum supported_6g_pwr_types in_6g_pwr_mode)
 				  enum supported_6g_pwr_types in_6g_pwr_mode)
 {
 {
-	struct reg_channel_list chan_list;
+	struct reg_channel_list chan_list = {0};
 	qdf_freq_t center_320;
 	qdf_freq_t center_320;
 	struct ch_params ch_params = {0};
 	struct ch_params ch_params = {0};