Browse Source

qcacmn: Do not process bangradar command in NON-DFS channel

FW, on receiving the bangradar command from host, suspends the
scheduler/tx-traffic and resumes only after the channel is switched.

For a bangradar in non-DFS channel, host does not send the channel
switch command. Hence, the tx_traffic are not  resumed.

When the user issues a bangradar, forward it to FW only if the current
channel is a DFS channel.

Change-Id: Id1f969dd7654e540a1c637632122cf2c6b543123
CRs-Fixed: 2225953
Abhijit Pradhan 7 years ago
parent
commit
b847c69bf1
1 changed files with 6 additions and 0 deletions
  1. 6 0
      umac/dfs/core/src/misc/dfs_full_offload.c

+ 6 - 0
umac/dfs/core/src/misc/dfs_full_offload.c

@@ -35,6 +35,12 @@ int dfs_fill_emulate_bang_radar_test(struct wlan_dfs *dfs,
 	 * More parameters are to be added later indicating
 	 * seg id, chirp and sidx values to be sent to fw.
 	 */
+	if (!(WLAN_IS_PRIMARY_OR_SECONDARY_CHAN_DFS(dfs->dfs_curchan))) {
+		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
+			"Ignore bangradar on a NON-DFS channel");
+		return -EINVAL;
+	}
+
 	dfs_unit_test->num_args = DFS_UNIT_TEST_NUM_ARGS;
 	dfs_unit_test->args[IDX_CMD_ID] =
 			DFS_PHYERR_OFFLOAD_TEST_SET_RADAR;