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:

committed by
nshrivas

parent
a822b190c4
commit
d76fafe548
@@ -967,7 +967,6 @@ struct dfs_event_log {
|
|||||||
* @dfs_spoof_check_failed: Indicates if the spoof check has failed.
|
* @dfs_spoof_check_failed: Indicates if the spoof check has failed.
|
||||||
* @dfs_spoof_test_done: Indicates if the sppof test is done.
|
* @dfs_spoof_test_done: Indicates if the sppof test is done.
|
||||||
* @dfs_seg_id: Segment ID of the radar hit channel.
|
* @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_status_timeout_override: Used to change the timeout value of
|
||||||
* dfs_host_wait_timer.
|
* dfs_host_wait_timer.
|
||||||
*/
|
*/
|
||||||
@@ -1089,7 +1088,6 @@ struct wlan_dfs {
|
|||||||
dfs_spoof_check_failed:1,
|
dfs_spoof_check_failed:1,
|
||||||
dfs_spoof_test_done:1;
|
dfs_spoof_test_done:1;
|
||||||
uint8_t dfs_seg_id;
|
uint8_t dfs_seg_id;
|
||||||
int dfs_false_radar_found;
|
|
||||||
struct dfs_channel dfs_radar_found_chan;
|
struct dfs_channel dfs_radar_found_chan;
|
||||||
int dfs_status_timeout_override;
|
int dfs_status_timeout_override;
|
||||||
#endif
|
#endif
|
||||||
@@ -2242,12 +2240,10 @@ void __dfs_process_radarevent(struct wlan_dfs *dfs,
|
|||||||
* @dfs: Pointer to wlan_dfs structure.
|
* @dfs: Pointer to wlan_dfs structure.
|
||||||
* @bangradar: true if radar is due to bangradar command.
|
* @bangradar: true if radar is due to bangradar command.
|
||||||
* @seg_id: Segment id.
|
* @seg_id: Segment id.
|
||||||
* @false_radar_found: value is 1 if false radar is found.
|
|
||||||
*/
|
*/
|
||||||
void dfs_radar_found_action(struct wlan_dfs *dfs,
|
void dfs_radar_found_action(struct wlan_dfs *dfs,
|
||||||
bool bangradar,
|
bool bangradar,
|
||||||
uint8_t seg_id,
|
uint8_t seg_id);
|
||||||
int false_radar_found);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bin5_rules_check_internal() - This is a extension of dfs_bin5_check().
|
* 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.
|
* FCC domain.
|
||||||
* @dfs: Pointer to wlan_dfs structure.
|
* @dfs: Pointer to wlan_dfs structure.
|
||||||
* @seg_id: segment id.
|
* @seg_id: segment id.
|
||||||
* @false_radar_found: Indicates if false radar is found.
|
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
|
#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
|
||||||
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id,
|
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id);
|
||||||
int false_radar_found);
|
|
||||||
#else
|
#else
|
||||||
static inline void dfs_radarfound_action_fcc(struct wlan_dfs *dfs,
|
static inline void dfs_radarfound_action_fcc(struct wlan_dfs *dfs,
|
||||||
uint8_t seg_id,
|
uint8_t seg_id)
|
||||||
int false_radar_found)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -126,12 +126,10 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|||||||
* for domains other than FCC.
|
* for domains other than FCC.
|
||||||
* @dfs: Pointer to wlan_dfs structure.
|
* @dfs: Pointer to wlan_dfs structure.
|
||||||
* @seg_id: segment id.
|
* @seg_id: segment id.
|
||||||
* @false_radar_found: Indicates detection of false radar.
|
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs,
|
void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id);
|
||||||
uint8_t seg_id, int false_radar_found);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dfs_get_bonding_channels() - Get bonding channels.
|
* 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_is_host_wait_running = 0;
|
||||||
dfs->dfs_no_res_from_fw = 1;
|
dfs->dfs_no_res_from_fw = 1;
|
||||||
dfs_radarfound_action_generic(dfs, dfs->dfs_seg_id,
|
dfs_radarfound_action_generic(dfs, dfs->dfs_seg_id);
|
||||||
dfs->dfs_false_radar_found);
|
|
||||||
dfs->dfs_seg_id = 0;
|
dfs->dfs_seg_id = 0;
|
||||||
dfs->dfs_false_radar_found = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dfs_host_wait_timer_init(struct wlan_dfs *dfs)
|
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;
|
dfs->dfs_average_pri = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id,
|
void dfs_radarfound_action_fcc(struct wlan_dfs *dfs, uint8_t seg_id)
|
||||||
int false_radar_found)
|
|
||||||
{
|
{
|
||||||
struct dfs_radar_found_params params;
|
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_send_avg_params_to_fw(dfs, ¶ms);
|
||||||
dfs->dfs_is_host_wait_running = 1;
|
dfs->dfs_is_host_wait_running = 1;
|
||||||
dfs->dfs_seg_id = seg_id;
|
dfs->dfs_seg_id = seg_id;
|
||||||
dfs->dfs_false_radar_found = false_radar_found;
|
|
||||||
qdf_timer_mod(&dfs->dfs_host_wait_timer,
|
qdf_timer_mod(&dfs->dfs_host_wait_timer,
|
||||||
(dfs->dfs_status_timeout_override ==
|
(dfs->dfs_status_timeout_override ==
|
||||||
-1) ? HOST_DFS_STATUS_WAIT_TIMER_MS :
|
-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->dfs_curchan->dfs_ch_freq) {
|
||||||
dfs_radarfound_action_generic(
|
dfs_radarfound_action_generic(
|
||||||
dfs,
|
dfs,
|
||||||
dfs->dfs_seg_id,
|
dfs->dfs_seg_id);
|
||||||
dfs->dfs_false_radar_found);
|
|
||||||
} else {
|
} else {
|
||||||
/* Else of this case, no action is needed as
|
/* Else of this case, no action is needed as
|
||||||
* dfs_action would have been done at timer
|
* 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;
|
dfs->dfs_phyerr_w53_counter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs,
|
void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id)
|
||||||
uint8_t seg_id, int false_radar_found)
|
|
||||||
{
|
{
|
||||||
struct radar_found_info *radar_found;
|
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);
|
dfs_process_radar_ind(dfs, radar_found);
|
||||||
qdf_mem_free(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,
|
void dfs_radar_found_action(struct wlan_dfs *dfs,
|
||||||
bool bangradar,
|
bool bangradar,
|
||||||
uint8_t seg_id,
|
uint8_t seg_id)
|
||||||
int false_radar_found)
|
|
||||||
{
|
{
|
||||||
/* If Host DFS confirmation is supported, save the curchan as
|
/* If Host DFS confirmation is supported, save the curchan as
|
||||||
* radar found chan, send radar found indication along with
|
* radar found chan, send radar found indication along with
|
||||||
@@ -1306,9 +1301,9 @@ void dfs_radar_found_action(struct wlan_dfs *dfs,
|
|||||||
if (!bangradar &&
|
if (!bangradar &&
|
||||||
(utils_get_dfsdomain(dfs->dfs_pdev_obj) == DFS_FCC_DOMAIN) &&
|
(utils_get_dfsdomain(dfs->dfs_pdev_obj) == DFS_FCC_DOMAIN) &&
|
||||||
lmac_is_host_dfs_check_support_enabled(dfs->dfs_pdev_obj)) {
|
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 {
|
} 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:
|
dfsfound:
|
||||||
if (retval) {
|
if (retval) {
|
||||||
dfs_radarfound_reset_vars(dfs, rs, chan, seg_id);
|
dfs_radarfound_reset_vars(dfs, rs, chan, seg_id);
|
||||||
dfs_radar_found_action(dfs, bangradar, seg_id,
|
dfs_radar_found_action(dfs, bangradar, seg_id);
|
||||||
false_radar_found);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false_radar_found)
|
||||||
|
dfs_false_radarfound_reset_vars(dfs);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user