qcacmn: Unify radar simulation commands
Replace all three radar simulation commands with a single variant which will perform required functionality based on its number of arguments. Existing variants of radar simulation commands: 1). Bangradar: Description: Adds all subchannels of segment ID "0" in the current channel to NOL. Syntax: radartool -i wifi0 bangradar. 2). Second Segment Bangradar: Description: Adds all subchannels of segment ID "1" of the current channel to NOL. Syntax: radartool -i wifi0 secondSegmentBangradar. 3). Enhanced Bangradar: Description: Adds the radar infected subchannels computed based on segment ID (X), chirp information (Y) and frequency offset (Z) to NOL. Syntax: radartool -i wifi0 bangradarenh X Y Z. where, X - Segment ID. Y - Is chirp/non chirp. Z - Frequency offset. New radar simulation command: Bangradar: Types of usage: 1). No arguments: Description: Adds all subchannels in the current channel to NOL. Syntax: radartool -i wifi0 bangradar. 2). 1 Argument: Description: Adds all subchannels of segment ID "X" of the current channel to NOL. Syntax: radartool -i wifi0 bangradar X 3). 3 Arguments: Description: Adds the radar infected subchannels computed based on segment ID (X), chirp information (Y) and frequency offset (Z) to NOL. Syntax: radartool -i wifi0 bangradar X Y Z where, X - Segment ID. Y - Is chirp/non chirp. Z - Frequency offset. All other combinations of arguments will result in error (insufficient arguments). Change-Id: I10c86d78bf46c075e65f93ad0f0143f328f5c7be CRs-Fixed: 2373228
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2013, 2016-2019 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2005-2006 Atheros Communications, Inc.
|
* Copyright (c) 2005-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
|
||||||
@@ -922,11 +922,7 @@ struct dfs_event_log {
|
|||||||
* @wlan_dfswaittimer: Dfs wait timer.
|
* @wlan_dfswaittimer: Dfs wait timer.
|
||||||
* @wlan_dfstesttimer: Dfs mute test timer.
|
* @wlan_dfstesttimer: Dfs mute test timer.
|
||||||
* @wlan_dfs_debug_timer: Dfs debug timer.
|
* @wlan_dfs_debug_timer: Dfs debug timer.
|
||||||
* @dfs_bangradar: Radar simulation on entire segment.
|
* @dfs_bangradar_type: Radar simulation type.
|
||||||
* @dfs_enh_bangradar: Radar (Chirp or non-chirp) simulation on
|
|
||||||
* particular frequency.
|
|
||||||
* @dfs_second_segment_bangradar: Bangaradar on second segment of
|
|
||||||
* VHT80_80/160.
|
|
||||||
* @is_radar_found_on_secondary_seg: Radar on second segment.
|
* @is_radar_found_on_secondary_seg: Radar on second segment.
|
||||||
* @dfs_radar_found_for_fo: Radar found event for FO(Full Offload) is
|
* @dfs_radar_found_for_fo: Radar found event for FO(Full Offload) is
|
||||||
* received.
|
* received.
|
||||||
@@ -1073,9 +1069,7 @@ struct wlan_dfs {
|
|||||||
os_timer_t wlan_dfswaittimer;
|
os_timer_t wlan_dfswaittimer;
|
||||||
os_timer_t wlan_dfstesttimer;
|
os_timer_t wlan_dfstesttimer;
|
||||||
os_timer_t wlan_dfs_debug_timer;
|
os_timer_t wlan_dfs_debug_timer;
|
||||||
uint8_t dfs_bangradar;
|
enum dfs_bangradar_types dfs_bangradar_type;
|
||||||
bool dfs_enh_bangradar;
|
|
||||||
bool dfs_second_segment_bangradar;
|
|
||||||
bool is_radar_found_on_secondary_seg;
|
bool is_radar_found_on_secondary_seg;
|
||||||
bool dfs_radar_found_for_fo;
|
bool dfs_radar_found_for_fo;
|
||||||
bool is_radar_during_precac;
|
bool is_radar_during_precac;
|
||||||
|
@@ -579,7 +579,7 @@ static inline void dfs_radarfound_reset_vars(
|
|||||||
* @dfs: Pointer to wlan_dfs structure.
|
* @dfs: Pointer to wlan_dfs structure.
|
||||||
* @chan: Current channel.
|
* @chan: Current channel.
|
||||||
* @rs: Pointer to dfs_state.
|
* @rs: Pointer to dfs_state.
|
||||||
* Return: if bangradar then return 0. Otherwise, return 1.
|
* Return: if bangradar then return 1. Otherwise, return 0.
|
||||||
*/
|
*/
|
||||||
static inline int dfs_handle_bangradar(
|
static inline int dfs_handle_bangradar(
|
||||||
struct wlan_dfs *dfs,
|
struct wlan_dfs *dfs,
|
||||||
@@ -589,42 +589,38 @@ static inline int dfs_handle_bangradar(
|
|||||||
int *retval)
|
int *retval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (dfs->dfs_enh_bangradar || dfs->dfs_bangradar) {
|
if (dfs->dfs_bangradar_type) {
|
||||||
/*
|
if (dfs->dfs_bangradar_type >= DFS_INVALID_BANGRADAR_TYPE) {
|
||||||
* Bangradar will always simulate radar found on
|
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
||||||
* the primary channel.
|
"Invalid bangradar type");
|
||||||
*
|
return 1;
|
||||||
* Enhanced Bangradar will save the params in dfs
|
}
|
||||||
* and simulate radar on given frequency
|
/* All bangradars are processed similarly.
|
||||||
*/
|
* arguments for the bangradar are already stored in
|
||||||
|
* respective dfs structures.
|
||||||
|
*/
|
||||||
|
|
||||||
*rs = &dfs->dfs_radar[dfs->dfs_curchan_radindex];
|
*rs = &dfs->dfs_radar[dfs->dfs_curchan_radindex];
|
||||||
if (dfs->dfs_enh_bangradar)
|
if (dfs->dfs_seg_id == SEG_ID_SECONDARY) {
|
||||||
*seg_id = dfs->dfs_seg_id;
|
if (dfs_is_precac_timer_running(dfs) ||
|
||||||
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
WLAN_IS_CHAN_11AC_VHT160(chan) ||
|
||||||
"bangradar %d, Enhanced Bangradar %d",
|
WLAN_IS_CHAN_11AC_VHT80_80(chan)) {
|
||||||
dfs->dfs_bangradar, dfs->dfs_enh_bangradar);
|
dfs->is_radar_found_on_secondary_seg = 1;
|
||||||
|
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
||||||
|
"bangradar on 2nd segment cfreq = %u",
|
||||||
|
dfs->dfs_precac_secondary_freq);
|
||||||
|
} else {
|
||||||
|
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
||||||
|
"No second segment");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*seg_id = dfs->dfs_seg_id;
|
||||||
|
dfs_debug(dfs, WLAN_DEBUG_DFS, "bangradar %d",
|
||||||
|
dfs->dfs_bangradar_type);
|
||||||
*retval = 1;
|
*retval = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dfs->dfs_second_segment_bangradar) {
|
|
||||||
if (dfs_is_precac_timer_running(dfs) ||
|
|
||||||
WLAN_IS_CHAN_11AC_VHT160(chan) ||
|
|
||||||
WLAN_IS_CHAN_11AC_VHT80_80(chan)) {
|
|
||||||
dfs->is_radar_found_on_secondary_seg = 1;
|
|
||||||
*rs = &dfs->dfs_radar[dfs->dfs_curchan_radindex];
|
|
||||||
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
|
||||||
"second segment bangradar on cfreq = %u",
|
|
||||||
dfs->dfs_precac_secondary_freq);
|
|
||||||
*retval = 1;
|
|
||||||
*seg_id = SEG_ID_SECONDARY;
|
|
||||||
} else {
|
|
||||||
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
|
||||||
"Do not process the second segment bangradar");
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -315,7 +315,7 @@ int dfs_control(struct wlan_dfs *dfs,
|
|||||||
{
|
{
|
||||||
struct wlan_dfs_phyerr_param peout;
|
struct wlan_dfs_phyerr_param peout;
|
||||||
struct dfs_ioctl_params *dfsparams;
|
struct dfs_ioctl_params *dfsparams;
|
||||||
struct dfs_bangradar_enh_params *bangradar_enh_params;
|
struct dfs_bangradar_params *bangradar_params;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
uint32_t val = 0;
|
uint32_t val = 0;
|
||||||
struct dfsreq_nolinfo *nol;
|
struct dfsreq_nolinfo *nol;
|
||||||
@@ -370,43 +370,67 @@ int dfs_control(struct wlan_dfs *dfs,
|
|||||||
dfsparams->dfs_maxlen))
|
dfsparams->dfs_maxlen))
|
||||||
error = -EINVAL;
|
error = -EINVAL;
|
||||||
break;
|
break;
|
||||||
case DFS_BANGRADAR_ENH:
|
case DFS_BANGRADAR:
|
||||||
if (insize < sizeof(struct dfs_bangradar_enh_params) ||
|
/*
|
||||||
|
* Handle all types of Bangradar here.
|
||||||
|
* Bangradar arguments:
|
||||||
|
* seg_id : Segment ID where radar should be injected.
|
||||||
|
* is_chirp : Is chirp radar or non chirp radar.
|
||||||
|
* freq_offset : Frequency offset from center frequency.
|
||||||
|
*
|
||||||
|
* Type 1 (DFS_BANGRADAR_FOR_ALL_SUBCHANS): To add all subchans.
|
||||||
|
* Type 2 (DFS_BANGRADAR_FOR_ALL_SUBCHANS_OF_SEGID): To add all
|
||||||
|
* subchans of given segment_id.
|
||||||
|
* Type 3 (DFS_BANGRADAR_FOR_SPECIFIC_SUBCHANS): To add specific
|
||||||
|
* subchans based on the arguments.
|
||||||
|
*
|
||||||
|
* The arguments will already be filled in the indata structure
|
||||||
|
* based on the type.
|
||||||
|
* If an argument is not specified by user, it will be set to
|
||||||
|
* default (0) in the indata already and correspondingly,
|
||||||
|
* the type will change.
|
||||||
|
*/
|
||||||
|
if (insize < sizeof(struct dfs_bangradar_params) ||
|
||||||
!indata) {
|
!indata) {
|
||||||
dfs_debug(dfs, WLAN_DEBUG_DFS1,
|
dfs_debug(dfs, WLAN_DEBUG_DFS1,
|
||||||
"insize = %d, expected = %zu bytes, indata = %pK",
|
"insize = %d, expected = %zu bytes, indata = %pK",
|
||||||
insize,
|
insize,
|
||||||
sizeof(struct dfs_bangradar_enh_params),
|
sizeof(struct dfs_bangradar_params),
|
||||||
indata);
|
indata);
|
||||||
error = -EINVAL;
|
error = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bangradar_enh_params =
|
bangradar_params = (struct dfs_bangradar_params *)indata;
|
||||||
(struct dfs_bangradar_enh_params *)indata;
|
if (bangradar_params) {
|
||||||
if (bangradar_enh_params) {
|
if (abs(bangradar_params->freq_offset) >
|
||||||
if (abs(bangradar_enh_params->freq_offset) >
|
|
||||||
FREQ_OFFSET_BOUNDARY_FOR_80MHZ) {
|
FREQ_OFFSET_BOUNDARY_FOR_80MHZ) {
|
||||||
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
||||||
"Frequency Offset out of bound");
|
"Frequency Offset out of bound");
|
||||||
error = -EINVAL;
|
error = -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
} else if (bangradar_params->seg_id >
|
||||||
|
SEG_ID_SECONDARY) {
|
||||||
|
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
||||||
|
"Illegal segment ID");
|
||||||
|
error = -EINVAL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
dfs->dfs_seg_id = bangradar_enh_params->seg_id;
|
dfs->dfs_bangradar_type =
|
||||||
dfs->dfs_is_chirp = bangradar_enh_params->is_chirp;
|
bangradar_params->bangradar_type;
|
||||||
dfs->dfs_freq_offset =
|
dfs->dfs_seg_id = bangradar_params->seg_id;
|
||||||
bangradar_enh_params->freq_offset;
|
dfs->dfs_is_chirp = bangradar_params->is_chirp;
|
||||||
|
dfs->dfs_freq_offset = bangradar_params->freq_offset;
|
||||||
|
|
||||||
if (dfs->dfs_is_offload_enabled) {
|
if (dfs->dfs_is_offload_enabled) {
|
||||||
error = dfs_fill_emulate_bang_radar_test
|
error = dfs_fill_emulate_bang_radar_test
|
||||||
(dfs, dfs->dfs_seg_id,
|
(dfs, dfs->dfs_seg_id,
|
||||||
&dfs_unit_test);
|
&dfs_unit_test);
|
||||||
} else {
|
} else {
|
||||||
dfs->dfs_enh_bangradar = true;
|
|
||||||
dfs->dfs_bangradar = 0;
|
|
||||||
error = dfs_start_host_based_bangradar(dfs);
|
error = dfs_start_host_based_bangradar(dfs);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "bangradar_enh_params is NULL");
|
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
||||||
|
"bangradar_params is NULL");
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -677,16 +701,6 @@ int dfs_control(struct wlan_dfs *dfs,
|
|||||||
case DFS_SHOW_NOLHISTORY:
|
case DFS_SHOW_NOLHISTORY:
|
||||||
dfs_print_nolhistory(dfs);
|
dfs_print_nolhistory(dfs);
|
||||||
break;
|
break;
|
||||||
case DFS_BANGRADAR:
|
|
||||||
dfs->dfs_bangradar = 1;
|
|
||||||
if (dfs->dfs_is_offload_enabled) {
|
|
||||||
error = dfs_fill_emulate_bang_radar_test(dfs,
|
|
||||||
SEG_ID_PRIMARY,
|
|
||||||
&dfs_unit_test);
|
|
||||||
} else {
|
|
||||||
error = dfs_start_host_based_bangradar(dfs);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case DFS_SHOW_PRECAC_LISTS:
|
case DFS_SHOW_PRECAC_LISTS:
|
||||||
dfs_print_precaclists(dfs);
|
dfs_print_precaclists(dfs);
|
||||||
dfs_print_etsi_precaclists(dfs);
|
dfs_print_etsi_precaclists(dfs);
|
||||||
@@ -695,16 +709,6 @@ int dfs_control(struct wlan_dfs *dfs,
|
|||||||
dfs_reset_precac_lists(dfs);
|
dfs_reset_precac_lists(dfs);
|
||||||
dfs_reset_etsi_precac_lists(dfs);
|
dfs_reset_etsi_precac_lists(dfs);
|
||||||
break;
|
break;
|
||||||
case DFS_SECOND_SEGMENT_BANGRADAR:
|
|
||||||
if (dfs->dfs_is_offload_enabled) {
|
|
||||||
error = dfs_fill_emulate_bang_radar_test(dfs,
|
|
||||||
SEG_ID_SECONDARY,
|
|
||||||
&dfs_unit_test);
|
|
||||||
} else {
|
|
||||||
dfs->dfs_second_segment_bangradar = 1;
|
|
||||||
error = dfs_start_host_based_bangradar(dfs);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
error = -EINVAL;
|
error = -EINVAL;
|
||||||
}
|
}
|
||||||
|
@@ -517,18 +517,23 @@ uint8_t dfs_get_bonding_channels(struct wlan_dfs *dfs,
|
|||||||
return nchannels;
|
return nchannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void dfs_reset_bangradar(struct wlan_dfs *dfs)
|
||||||
|
{
|
||||||
|
dfs->dfs_bangradar_type = DFS_NO_BANGRADAR;
|
||||||
|
}
|
||||||
|
|
||||||
int dfs_radarevent_basic_sanity(struct wlan_dfs *dfs,
|
int dfs_radarevent_basic_sanity(struct wlan_dfs *dfs,
|
||||||
struct dfs_channel *chan)
|
struct dfs_channel *chan)
|
||||||
{
|
{
|
||||||
if (!(dfs->dfs_second_segment_bangradar ||
|
if (!(dfs->dfs_seg_id == SEG_ID_SECONDARY &&
|
||||||
dfs_is_precac_timer_running(dfs)))
|
dfs_is_precac_timer_running(dfs)))
|
||||||
if (!(WLAN_IS_PRIMARY_OR_SECONDARY_CHAN_DFS(chan))) {
|
if (!(WLAN_IS_PRIMARY_OR_SECONDARY_CHAN_DFS(chan))) {
|
||||||
dfs_debug(dfs, WLAN_DEBUG_DFS2,
|
dfs_debug(dfs, WLAN_DEBUG_DFS2,
|
||||||
"radar event on non-DFS chan");
|
"radar event on non-DFS chan");
|
||||||
if (!(dfs->dfs_is_offload_enabled)) {
|
if (!(dfs->dfs_is_offload_enabled)) {
|
||||||
dfs_reset_radarq(dfs);
|
dfs_reset_radarq(dfs);
|
||||||
dfs_reset_alldelaylines(dfs);
|
dfs_reset_alldelaylines(dfs);
|
||||||
dfs->dfs_bangradar = 0;
|
dfs_reset_bangradar(dfs);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -559,13 +564,6 @@ int dfs_second_segment_radar_disable(struct wlan_dfs *dfs)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void dfs_reset_bangradar(struct wlan_dfs *dfs)
|
|
||||||
{
|
|
||||||
dfs->dfs_bangradar = 0;
|
|
||||||
dfs->dfs_second_segment_bangradar = 0;
|
|
||||||
dfs->dfs_enh_bangradar = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* dfs_prepare_nol_ie_bitmap: Create a Bitmap from the radar found subchannels
|
/* dfs_prepare_nol_ie_bitmap: Create a Bitmap from the radar found subchannels
|
||||||
* to be sent along with RCSA.
|
* to be sent along with RCSA.
|
||||||
*
|
*
|
||||||
@@ -693,7 +691,6 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
uint32_t freq_center;
|
uint32_t freq_center;
|
||||||
uint32_t radarfound_freq;
|
uint32_t radarfound_freq;
|
||||||
struct dfs_channel *dfs_curchan;
|
|
||||||
|
|
||||||
if (!dfs->dfs_curchan) {
|
if (!dfs->dfs_curchan) {
|
||||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs->dfs_curchan is NULL");
|
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs->dfs_curchan is NULL");
|
||||||
@@ -719,21 +716,7 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dfs_compute_radar_found_cfreq(dfs, radar_found, &freq_center);
|
dfs_compute_radar_found_cfreq(dfs, radar_found, &freq_center);
|
||||||
|
radarfound_freq = freq_center + dfs->dfs_freq_offset;
|
||||||
if (dfs->dfs_bangradar || dfs->dfs_second_segment_bangradar) {
|
|
||||||
dfs_curchan = dfs->dfs_curchan;
|
|
||||||
if (radar_found->segment_id == SEG_ID_SECONDARY)
|
|
||||||
if (dfs_is_precac_timer_running(dfs))
|
|
||||||
radarfound_freq =
|
|
||||||
dfs->dfs_precac_secondary_freq;
|
|
||||||
else
|
|
||||||
radarfound_freq =
|
|
||||||
dfs_curchan->dfs_ch_vhtop_ch_freq_seg2;
|
|
||||||
else
|
|
||||||
radarfound_freq = dfs->dfs_curchan->dfs_ch_freq;
|
|
||||||
} else {
|
|
||||||
radarfound_freq = freq_center + dfs->dfs_freq_offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (radar_found->segment_id == SEG_ID_SECONDARY)
|
if (radar_found->segment_id == SEG_ID_SECONDARY)
|
||||||
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
||||||
@@ -752,11 +735,14 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dfs->dfs_bangradar_type == DFS_BANGRADAR_FOR_ALL_SUBCHANS)
|
||||||
|
num_channels = dfs_get_bonding_channels_without_seg_info(
|
||||||
|
dfs->dfs_curchan, channels);
|
||||||
/* BW reduction is dependent on subchannel marking */
|
/* BW reduction is dependent on subchannel marking */
|
||||||
|
else if ((dfs->dfs_use_nol_subchannel_marking) &&
|
||||||
if ((dfs->dfs_use_nol_subchannel_marking ||
|
(!(dfs->dfs_bangradar_type) ||
|
||||||
(dfs->dfs_use_nol_subchannel_marking && dfs->dfs_bw_reduced)) &&
|
(dfs->dfs_bangradar_type ==
|
||||||
!(dfs->dfs_bangradar || dfs->dfs_second_segment_bangradar))
|
DFS_BANGRADAR_FOR_SPECIFIC_SUBCHANS)))
|
||||||
num_channels = dfs_find_radar_affected_subchans(dfs,
|
num_channels = dfs_find_radar_affected_subchans(dfs,
|
||||||
radar_found,
|
radar_found,
|
||||||
channels,
|
channels,
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2016-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011, 2016-2019 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2010, Atheros Communications Inc.
|
* Copyright (c) 2010, Atheros Communications Inc.
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
@@ -48,19 +48,17 @@
|
|||||||
#define DFS_GET_CAC_VALID_TIME 20
|
#define DFS_GET_CAC_VALID_TIME 20
|
||||||
#define DFS_SET_CAC_VALID_TIME 21
|
#define DFS_SET_CAC_VALID_TIME 21
|
||||||
#define DFS_SHOW_NOLHISTORY 22
|
#define DFS_SHOW_NOLHISTORY 22
|
||||||
#define DFS_SECOND_SEGMENT_BANGRADAR 23
|
#define DFS_SHOW_PRECAC_LISTS 23
|
||||||
#define DFS_SHOW_PRECAC_LISTS 24
|
#define DFS_RESET_PRECAC_LISTS 24
|
||||||
#define DFS_RESET_PRECAC_LISTS 25
|
#define DFS_SET_DISABLE_RADAR_MARKING 25
|
||||||
#define DFS_BANGRADAR_ENH 26
|
#define DFS_GET_DISABLE_RADAR_MARKING 26
|
||||||
#define DFS_SET_DISABLE_RADAR_MARKING 27
|
|
||||||
#define DFS_GET_DISABLE_RADAR_MARKING 28
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Spectral IOCTLs use DFS_LAST_IOCTL as the base.
|
* Spectral IOCTLs use DFS_LAST_IOCTL as the base.
|
||||||
* This must always be the last IOCTL in DFS and have
|
* This must always be the last IOCTL in DFS and have
|
||||||
* the highest value.
|
* the highest value.
|
||||||
*/
|
*/
|
||||||
#define DFS_LAST_IOCTL 29
|
#define DFS_LAST_IOCTL 27
|
||||||
|
|
||||||
#ifndef DFS_CHAN_MAX
|
#ifndef DFS_CHAN_MAX
|
||||||
#define DFS_CHAN_MAX 1023
|
#define DFS_CHAN_MAX 1023
|
||||||
@@ -122,13 +120,40 @@ struct dfs_ioctl_params {
|
|||||||
int32_t dfs_maxlen;
|
int32_t dfs_maxlen;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/* Types of Bangradar commands:
|
||||||
* struct dfs_bangradar_enh_params - DFS enhanced bangradr params.
|
* @DFS_BANGRADAR_FOR_ALL_SUBCHANS : Bangradar with no arguments.
|
||||||
* @seg_id: Segment ID information.
|
* All the subchannels in the current
|
||||||
* @is_chirp: Chirp radar or not.
|
* channel shall be added.
|
||||||
* @freq_offset: Frequency offset at which radar was found.
|
* @DFS_BANGRADAR_FOR_ALL_SUBCHANS_OF_SEGID : Bangradar with 1 (seg_id) argument
|
||||||
|
* All subchannels of the specific
|
||||||
|
* seg_id shall be added.
|
||||||
|
* @DFS_BANGRADAR_FOR_SPECIFIC_SUBCHANS : Bangradar with all (segment ID,
|
||||||
|
* is_chirp and frequency offset)
|
||||||
|
* arguments.
|
||||||
|
* Only radar infected subchannels
|
||||||
|
* of the specific seg_id shall be
|
||||||
|
* added.
|
||||||
|
*
|
||||||
|
* (Unless all arguments are given, we cannot determine which specific
|
||||||
|
* subchannels to simulate the radar on, hence simulate in all subchans).
|
||||||
*/
|
*/
|
||||||
struct dfs_bangradar_enh_params {
|
enum dfs_bangradar_types {
|
||||||
|
DFS_NO_BANGRADAR = 0,
|
||||||
|
DFS_BANGRADAR_FOR_ALL_SUBCHANS,
|
||||||
|
DFS_BANGRADAR_FOR_ALL_SUBCHANS_OF_SEGID,
|
||||||
|
DFS_BANGRADAR_FOR_SPECIFIC_SUBCHANS,
|
||||||
|
DFS_INVALID_BANGRADAR_TYPE
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct dfs_bangradar_params - DFS bangradar params.
|
||||||
|
* @bangradar_type: Type of Bangradar.
|
||||||
|
* @seg_id: Segment ID information.
|
||||||
|
* @is_chirp: Chirp radar or not.
|
||||||
|
* @freq_offset: Frequency offset at which radar was found.
|
||||||
|
*/
|
||||||
|
struct dfs_bangradar_params {
|
||||||
|
enum dfs_bangradar_types bangradar_type;
|
||||||
uint8_t seg_id;
|
uint8_t seg_id;
|
||||||
uint8_t is_chirp;
|
uint8_t is_chirp;
|
||||||
int32_t freq_offset;
|
int32_t freq_offset;
|
||||||
|
Reference in New Issue
Block a user