qcacmn: Reset false radar event variables
When the variable 'false_radar_found' is 1 a set of dfs variables are supposed to be reset. The reset of the variables are done from within dfs_radarfound_action_fcc() and dfs_radarfound_action_generic(). However, neither the function dfs_radarfound_action_fcc() nor the function dfs_radarfound_action_generic() is called when 'false_radar_found' is 1. Therefore, remove resetting of the dfs variables from the two functions and perform resetting of the dfs independent of the radar found action. Change-Id: I120dd8dc7abe13aa9dcaa7a29c10deea06cb8043 CRs-Fixed: 2289775
This commit is contained in:
@@ -967,7 +967,6 @@ struct dfs_event_log {
|
||||
* @dfs_spoof_check_failed: Indicates if the spoof check has failed.
|
||||
* @dfs_spoof_test_done: Indicates if the sppof test is done.
|
||||
* @dfs_seg_id: Segment ID of the radar hit channel.
|
||||
* @dfs_false_radar_found: Indicates if false radar is found.
|
||||
* @dfs_status_timeout_override: Used to change the timeout value of
|
||||
* dfs_host_wait_timer.
|
||||
*/
|
||||
@@ -1089,7 +1088,6 @@ struct wlan_dfs {
|
||||
dfs_spoof_check_failed:1,
|
||||
dfs_spoof_test_done:1;
|
||||
uint8_t dfs_seg_id;
|
||||
int dfs_false_radar_found;
|
||||
struct dfs_channel dfs_radar_found_chan;
|
||||
int dfs_status_timeout_override;
|
||||
#endif
|
||||
@@ -2242,12 +2240,10 @@ void __dfs_process_radarevent(struct wlan_dfs *dfs,
|
||||
* @dfs: Pointer to wlan_dfs structure.
|
||||
* @bangradar: true if radar is due to bangradar command.
|
||||
* @seg_id: Segment id.
|
||||
* @false_radar_found: value is 1 if false radar is found.
|
||||
*/
|
||||
void dfs_radar_found_action(struct wlan_dfs *dfs,
|
||||
bool bangradar,
|
||||
uint8_t seg_id,
|
||||
int false_radar_found);
|
||||
uint8_t seg_id);
|
||||
|
||||
/**
|
||||
* bin5_rules_check_internal() - This is a extension of dfs_bin5_check().
|
||||
|
@@ -121,17 +121,14 @@ QDF_STATUS dfs_get_override_status_timeout(struct wlan_dfs *dfs,
|
||||
* FCC domain.
|
||||
* @dfs: Pointer to wlan_dfs structure.
|
||||
* @seg_id: segment id.
|
||||
* @false_radar_found: Indicates if false radar is found.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
|
||||
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id,
|
||||
int false_radar_found);
|
||||
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id);
|
||||
#else
|
||||
static inline void dfs_radarfound_action_fcc(struct wlan_dfs *dfs,
|
||||
uint8_t seg_id,
|
||||
int false_radar_found)
|
||||
uint8_t seg_id)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@@ -126,12 +126,10 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
||||
* for domains other than FCC.
|
||||
* @dfs: Pointer to wlan_dfs structure.
|
||||
* @seg_id: segment id.
|
||||
* @false_radar_found: Indicates detection of false radar.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs,
|
||||
uint8_t seg_id, int false_radar_found);
|
||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id);
|
||||
|
||||
/**
|
||||
* dfs_get_bonding_channels() - Get bonding channels.
|
||||
|
@@ -455,10 +455,8 @@ static os_timer_func(dfs_no_res_from_fw_task)
|
||||
|
||||
dfs->dfs_is_host_wait_running = 0;
|
||||
dfs->dfs_no_res_from_fw = 1;
|
||||
dfs_radarfound_action_generic(dfs, dfs->dfs_seg_id,
|
||||
dfs->dfs_false_radar_found);
|
||||
dfs_radarfound_action_generic(dfs, dfs->dfs_seg_id);
|
||||
dfs->dfs_seg_id = 0;
|
||||
dfs->dfs_false_radar_found = 0;
|
||||
}
|
||||
|
||||
void dfs_host_wait_timer_init(struct wlan_dfs *dfs)
|
||||
@@ -532,8 +530,7 @@ void dfs_extract_radar_found_params(struct wlan_dfs *dfs,
|
||||
dfs->dfs_average_pri = 0;
|
||||
}
|
||||
|
||||
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id,
|
||||
int false_radar_found)
|
||||
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id)
|
||||
{
|
||||
struct dfs_radar_found_params params;
|
||||
|
||||
@@ -543,7 +540,6 @@ void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id,
|
||||
dfs_send_avg_params_to_fw(dfs, ¶ms);
|
||||
dfs->dfs_is_host_wait_running = 1;
|
||||
dfs->dfs_seg_id = seg_id;
|
||||
dfs->dfs_false_radar_found = false_radar_found;
|
||||
qdf_timer_mod(&dfs->dfs_host_wait_timer,
|
||||
(dfs->dfs_status_timeout_override ==
|
||||
-1) ? HOST_DFS_STATUS_WAIT_TIMER_MS :
|
||||
@@ -611,8 +607,7 @@ void dfs_action_on_fw_radar_status_check(struct wlan_dfs *dfs,
|
||||
dfs->dfs_curchan->dfs_ch_freq) {
|
||||
dfs_radarfound_action_generic(
|
||||
dfs,
|
||||
dfs->dfs_seg_id,
|
||||
dfs->dfs_false_radar_found);
|
||||
dfs->dfs_seg_id);
|
||||
} else {
|
||||
/* Else of this case, no action is needed as
|
||||
* dfs_action would have been done at timer
|
||||
|
@@ -1269,8 +1269,7 @@ static inline void dfs_false_radarfound_reset_vars(
|
||||
dfs->dfs_phyerr_w53_counter = 0;
|
||||
}
|
||||
|
||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs,
|
||||
uint8_t seg_id, int false_radar_found)
|
||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id)
|
||||
{
|
||||
struct radar_found_info *radar_found;
|
||||
|
||||
@@ -1288,15 +1287,11 @@ void dfs_radarfound_action_generic(struct wlan_dfs *dfs,
|
||||
|
||||
dfs_process_radar_ind(dfs, radar_found);
|
||||
qdf_mem_free(radar_found);
|
||||
|
||||
if (false_radar_found)
|
||||
dfs_false_radarfound_reset_vars(dfs);
|
||||
}
|
||||
|
||||
void dfs_radar_found_action(struct wlan_dfs *dfs,
|
||||
bool bangradar,
|
||||
uint8_t seg_id,
|
||||
int false_radar_found)
|
||||
uint8_t seg_id)
|
||||
{
|
||||
/* If Host DFS confirmation is supported, save the curchan as
|
||||
* radar found chan, send radar found indication along with
|
||||
@@ -1306,9 +1301,9 @@ void dfs_radar_found_action(struct wlan_dfs *dfs,
|
||||
if (!bangradar &&
|
||||
(utils_get_dfsdomain(dfs->dfs_pdev_obj) == DFS_FCC_DOMAIN) &&
|
||||
lmac_is_host_dfs_check_support_enabled(dfs->dfs_pdev_obj)) {
|
||||
dfs_radarfound_action_fcc(dfs, seg_id, false_radar_found);
|
||||
dfs_radarfound_action_fcc(dfs, seg_id);
|
||||
} else {
|
||||
dfs_radarfound_action_generic(dfs, seg_id, false_radar_found);
|
||||
dfs_radarfound_action_generic(dfs, seg_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1343,8 +1338,9 @@ void dfs_process_radarevent(
|
||||
dfsfound:
|
||||
if (retval) {
|
||||
dfs_radarfound_reset_vars(dfs, rs, chan, seg_id);
|
||||
dfs_radar_found_action(dfs, bangradar, seg_id,
|
||||
false_radar_found);
|
||||
dfs_radar_found_action(dfs, bangradar, seg_id);
|
||||
}
|
||||
|
||||
if (false_radar_found)
|
||||
dfs_false_radarfound_reset_vars(dfs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user