Browse Source

qcacld-3.0: Fill current oper freq in sw_target_freq

During HT channel width change, host updates secondary channel number
in "sw_target_freq" and not the primary channel frequency. LIM uses
sw_target_freq to update the CSR sessions frequency which become invalid
channel. During SAP start, as host uses this channel to check for SCC
switch, the invalid frequency lead to invalid channel structure getting
accessed.

Hence, during HT channel width change, update sLimChannelSwitchInfo's
sw_target_freq member with current operating frequency stored in
pe_session's curr_op_freq.

Change-Id: Ie7aaa2187d35dba74050263e1ebf6f72d106aa85
CRs-Fixed: 2680035
Abhishek Ambure 5 years ago
parent
commit
ab1d6c2996
1 changed files with 5 additions and 3 deletions
  1. 5 3
      core/mac/src/pe/lim/lim_utils.c

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

@@ -3701,16 +3701,18 @@ static void lim_ht_switch_chnl_params(struct pe_session *pe_session)
 	pe_session->curr_req_chan_freq = pe_session->curr_op_freq;
 	pe_session->ch_center_freq_seg0 = center_freq;
 	pe_session->gLimChannelSwitch.ch_center_freq_seg0 = center_freq;
-	pe_session->gLimChannelSwitch.sw_target_freq = center_freq;
+	pe_session->gLimChannelSwitch.sw_target_freq =
+						pe_session->curr_op_freq;
 	pe_session->ch_width = ch_width;
 	pe_session->gLimChannelSwitch.ch_width = ch_width;
 	pe_session->gLimChannelSwitch.sec_ch_offset =
 		pe_session->htSecondaryChannelOffset;
 	pe_session->gLimChannelSwitch.ch_center_freq_seg1 = 0;
 
-	pe_debug("HT IE changed: Primary Channel: %d center chan: %d Channel Width: %d",
+	pe_debug("HT IE changed: Primary Channel: %d center chan: %d Channel Width: %d cur op freq %d",
 		 primary_channel, center_freq,
-		 pe_session->htRecommendedTxWidthSet);
+		 pe_session->htRecommendedTxWidthSet,
+		 pe_session->gLimChannelSwitch.sw_target_freq);
 	pe_session->channelChangeReasonCode =
 			LIM_SWITCH_CHANNEL_HT_WIDTH;
 	mac->lim.gpchangeChannelCallback = lim_switch_channel_cback;