Просмотр исходного кода

qcacmn: Bangradar enhanced command support for secondary segment

Adds support to use bangradarenh command to inject radar on the
secondary segment, if AP is operating in HT80+80 or HT160 mode.

Change-Id: I78ab3d3fcb3ecf5fee274911bf6dc48f74c53818
CRs-Fixed: 2359763
Shaakir Mohamed 6 лет назад
Родитель
Сommit
beafb2d5b6
2 измененных файлов с 8 добавлено и 2 удалено
  1. 2 2
      umac/dfs/core/src/misc/dfs.c
  2. 6 0
      umac/dfs/core/src/misc/dfs_full_offload.c

+ 2 - 2
umac/dfs/core/src/misc/dfs.c

@@ -397,8 +397,8 @@ int dfs_control(struct wlan_dfs *dfs,
 
 			if (dfs->dfs_is_offload_enabled) {
 				error = dfs_fill_emulate_bang_radar_test
-							(dfs, SEG_ID_PRIMARY,
-							 &dfs_unit_test);
+						 (dfs, dfs->dfs_seg_id,
+						  &dfs_unit_test);
 			} else {
 				dfs->dfs_enh_bangradar = true;
 				dfs->dfs_bangradar = 0;

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

@@ -41,6 +41,12 @@ int dfs_fill_emulate_bang_radar_test(struct wlan_dfs *dfs,
 		return -EINVAL;
 	}
 
+	if (segid > SEG_ID_SECONDARY) {
+		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
+			"Segment id should be 0 or 1");
+		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;