Sfoglia il codice sorgente

qcacld-3.0: Fix wrong puncture bitmap issue

if local var of struct ch_params isn't initialized to 0, the value is
random, reg_punc_bitmap in it is random as following too.

notify: chan:2462 width:1 freq1:2462 freq2:0 punct 0x8880

Change-Id: I8b73aa57cc83181914abff2d3775d7bfb741601d
CRs-Fixed: 3506745
Jianmin Zhu 1 anno fa
parent
commit
377edefc12

+ 1 - 1
core/hdd/src/wlan_hdd_assoc.c

@@ -2141,7 +2141,7 @@ hdd_indicate_ese_bcn_report_ind(const struct hdd_adapter *adapter,
 static void hdd_roam_channel_switch_handler(struct hdd_adapter *adapter,
 					    struct csr_roam_info *roam_info)
 {
-	struct hdd_chan_change_params chan_change;
+	struct hdd_chan_change_params chan_change = {0};
 	QDF_STATUS status;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	mac_handle_t mac_handle;

+ 2 - 2
core/hdd/src/wlan_hdd_hostapd.c

@@ -1756,7 +1756,7 @@ hdd_fill_channel_change_puncture(struct hdd_chan_change_params *chan_change,
 static QDF_STATUS hdd_hostapd_chan_change(struct hdd_adapter *adapter,
 					  struct sap_event *sap_event)
 {
-	struct hdd_chan_change_params chan_change;
+	struct hdd_chan_change_params chan_change = {0};
 	struct ch_params sap_ch_param = {0};
 	eCsrPhyMode phy_mode;
 	bool legacy_phymode;
@@ -7326,7 +7326,7 @@ wlan_hdd_is_ap_ap_force_scc_override(struct hdd_adapter *adapter,
 	uint32_t cc_count, i;
 	uint32_t op_freq[MAX_NUMBER_OF_CONC_CONNECTIONS];
 	uint8_t vdev_id[MAX_NUMBER_OF_CONC_CONNECTIONS];
-	struct ch_params ch_params;
+	struct ch_params ch_params = {0};
 	enum nl80211_channel_type channel_type;
 	uint8_t con_vdev_id;
 	uint32_t con_freq;

+ 1 - 1
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -5573,7 +5573,7 @@ void lim_calculate_tpc(struct mac_context *mac,
 	uint16_t local_constraint, bw_val = 0;
 	uint32_t num_pwr_levels, ap_power_type_6g = 0;
 	qdf_freq_t oper_freq, start_freq = 0;
-	struct ch_params ch_params;
+	struct ch_params ch_params = {0};
 	struct vdev_mlme_obj *mlme_obj;
 	int8_t tpe_power;
 	bool skip_tpe = false;

+ 3 - 3
core/sap/src/sap_ch_select.c

@@ -1715,7 +1715,7 @@ sap_sort_chl_weight_80_mhz(struct mac_context *mac_ctx,
 	uint8_t i, j;
 	tSapSpectChInfo *pSpectInfo;
 	uint8_t minIdx;
-	struct ch_params acs_ch_params;
+	struct ch_params acs_ch_params = {0};
 	int8_t center_freq_diff;
 	uint32_t combined_weight;
 	uint32_t min_ch_weight;
@@ -2026,7 +2026,7 @@ sap_sort_chl_weight_320_mhz(struct mac_context *mac_ctx,
 	uint8_t i, j;
 	tSapSpectChInfo *pSpectInfo;
 	uint8_t minIdx;
-	struct ch_params acs_ch_params;
+	struct ch_params acs_ch_params = {0};
 	int32_t center_freq_diff;
 	uint32_t combined_weight;
 	uint32_t min_ch_weight;
@@ -2465,7 +2465,7 @@ sap_sort_chl_weight_40_mhz(struct mac_context *mac_ctx,
 	uint8_t i, j;
 	tSapSpectChInfo *pSpectInfo;
 	uint8_t minIdx;
-	struct ch_params acs_ch_params;
+	struct ch_params acs_ch_params = {0};
 	int8_t center_freq_diff;
 	uint32_t combined_weight;
 	uint32_t min_ch_weight;

+ 1 - 1
core/sap/src/sap_module.c

@@ -3321,7 +3321,7 @@ wlansap_select_chan_with_best_bandwidth(struct sap_context *sap_ctx,
 					enum phy_ch_width *selected_ch_width)
 {
 	struct mac_context *mac;
-	struct ch_params ch_params;
+	struct ch_params ch_params = {0};
 	enum phy_ch_width ch_width;
 	uint32_t center_freq, bw_val, bw_start, bw_end;
 	uint16_t i, j;