Browse Source

qcacld-3.0: SAP DFS: Fill new channel width in new_ch_params

In sap_random_channel_sel function, new channel and channel width will
be calculated based on the available channels. New channel width is
populated to only new_chanWidth and this new channel width value will be
assigned to new_ch_params in wlansap_set_channel_change_with_csa.
This channel width from new_ch_params will be used as new channel width
on restarting SAP on Radar detection.

wlansap_set_channel_change_with_csa will get called only when radar is
detected when SAP started beaconing (after CAC wait).

If radar is detected during CAC_WAIT state, new_ch_params will not be
having new calculated channel width, it will be having zero, So during
this scenario SAP will be restarted with 20MHz bandwidth.

To fix this, populate new channel width to new_ch_params in
sap_random_channel_sel along with new_chanWidth.

Change-Id: If07f875dda3a4f6d29480c84b784ca7995c19c7f
CRs-Fixed: 1063038
(cherry picked from commit 714eb0a7fae9c4e50b1c52fa27001705991ab6eb)
Arif Hussain 8 years ago
parent
commit
9dc47d3beb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/sap/src/sap_fsm.c

+ 3 - 1
core/sap/src/sap_fsm.c

@@ -1725,8 +1725,10 @@ static uint8_t sap_random_channel_sel(ptSapContext sap_ctx)
 			break;
 	} while (true);
 
-	if (target_channel)
+	if (target_channel) {
 		mac_ctx->sap.SapDfsInfo.new_chanWidth = ch_wd;
+		mac_ctx->sap.SapDfsInfo.new_ch_params.ch_width = ch_wd;
+	}
 
 	qdf_mem_free(rule_adjusted_lst);
 	qdf_mem_free(leakage_adjusted_lst);