|
@@ -1,5 +1,5 @@
|
|
/*
|
|
/*
|
|
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
|
|
|
|
+ * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2002-2006, Atheros Communications Inc.
|
|
* Copyright (c) 2002-2006, Atheros Communications Inc.
|
|
*
|
|
*
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -16,8 +16,8 @@
|
|
*/
|
|
*/
|
|
|
|
|
|
/**
|
|
/**
|
|
- * DOC: This file contains the dfs_fill_emulate_bang_radar_test() which is used
|
|
|
|
- * to send command to firmware to emulate RADAR found event.
|
|
|
|
|
|
+ * DOC: This file contains the dfs_fill_emulate_bang_radar_test()
|
|
|
|
+ * which is used to send command to firmware to emulate RADAR found event.
|
|
*/
|
|
*/
|
|
|
|
|
|
#include "../dfs_zero_cac.h"
|
|
#include "../dfs_zero_cac.h"
|
|
@@ -28,13 +28,11 @@
|
|
#include "../dfs_full_offload.h"
|
|
#include "../dfs_full_offload.h"
|
|
|
|
|
|
int dfs_fill_emulate_bang_radar_test(struct wlan_dfs *dfs,
|
|
int dfs_fill_emulate_bang_radar_test(struct wlan_dfs *dfs,
|
|
- uint32_t segid,
|
|
|
|
|
|
+ uint8_t segid, bool is_chirp, int32_t freq_offset,
|
|
struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test)
|
|
struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test)
|
|
{
|
|
{
|
|
- /*
|
|
|
|
- * More parameters are to be added later indicating
|
|
|
|
- * seg id, chirp and sidx values to be sent to fw.
|
|
|
|
- */
|
|
|
|
|
|
+ uint32_t packed_args = 0;
|
|
|
|
+
|
|
if (!(WLAN_IS_PRIMARY_OR_SECONDARY_CHAN_DFS(dfs->dfs_curchan))) {
|
|
if (!(WLAN_IS_PRIMARY_OR_SECONDARY_CHAN_DFS(dfs->dfs_curchan))) {
|
|
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
|
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
|
"Ignore bangradar on a NON-DFS channel");
|
|
"Ignore bangradar on a NON-DFS channel");
|
|
@@ -46,13 +44,14 @@ int dfs_fill_emulate_bang_radar_test(struct wlan_dfs *dfs,
|
|
"Segment id should be 0 or 1");
|
|
"Segment id should be 0 or 1");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ packed_args = (segid) | (is_chirp << SEG_ID_SIZE) |
|
|
|
|
+ ((freq_offset & MASK) << (SEG_ID_SIZE + IS_CHIRP_SIZE));
|
|
dfs_unit_test->num_args = DFS_UNIT_TEST_NUM_ARGS;
|
|
dfs_unit_test->num_args = DFS_UNIT_TEST_NUM_ARGS;
|
|
dfs_unit_test->args[IDX_CMD_ID] =
|
|
dfs_unit_test->args[IDX_CMD_ID] =
|
|
DFS_PHYERR_OFFLOAD_TEST_SET_RADAR;
|
|
DFS_PHYERR_OFFLOAD_TEST_SET_RADAR;
|
|
dfs_unit_test->args[IDX_PDEV_ID] =
|
|
dfs_unit_test->args[IDX_PDEV_ID] =
|
|
wlan_objmgr_pdev_get_pdev_id(dfs->dfs_pdev_obj);
|
|
wlan_objmgr_pdev_get_pdev_id(dfs->dfs_pdev_obj);
|
|
- dfs_unit_test->args[IDX_SEG_ID] = segid;
|
|
|
|
|
|
+ dfs_unit_test->args[IDX_RADAR_PARAM1_ID] = packed_args;
|
|
|
|
|
|
if (tgt_dfs_process_emulate_bang_radar_cmd(dfs->dfs_pdev_obj,
|
|
if (tgt_dfs_process_emulate_bang_radar_cmd(dfs->dfs_pdev_obj,
|
|
dfs_unit_test) == QDF_STATUS_E_FAILURE) {
|
|
dfs_unit_test) == QDF_STATUS_E_FAILURE) {
|