qcacmn: Reset Radar Log Counter on "wifi" command
Currently radar event log is cleared only during dfs_detach which happens during wifi unload. On issuing "wifi or wifi down" command, the logs are not cleared. During Spoof Radar Detection, the log counter values are spuriuos due to accumulation of phyerror events. This accumulation of events is either due to false radar detection or logs of the previous wifi cycle. Hence resetting the dfs radar log counters in the below cases: 1) During vap delete 2) During CC/ Regdomain change. 3) After false radar detect. CRs-Fixed: 2244562 Change-Id: I74745f61c634bab7f9c1a78ef8dea8da2ab1a997
This commit is contained in:

committed by
nshrivas

parent
294ce1121a
commit
d3c3cb004b
@@ -189,4 +189,12 @@ static inline void dfs_action_on_fw_radar_status_check(struct wlan_dfs *dfs,
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WLAN_DFS_PARTIAL_OFFLOAD)
|
||||
void dfs_false_radarfound_reset_vars(struct wlan_dfs *dfs);
|
||||
#else
|
||||
static inline void dfs_false_radarfound_reset_vars(struct wlan_dfs *dfs)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#endif /* _DFS_PARTIAL_OFFLOAD_RADAR_H_ */
|
||||
|
@@ -576,7 +576,7 @@ void dfs_process_phyerr(struct wlan_dfs *dfs, void *buf, uint16_t datalen,
|
||||
"Radar already found in the channel, do not queue radar data");
|
||||
return;
|
||||
}
|
||||
|
||||
dfs->dfs_phyerr_count++;
|
||||
dfs->wlan_dfs_stats.total_phy_errors++;
|
||||
dfs_debug(dfs, WLAN_DEBUG_DFS2, "phyerr %d len %d",
|
||||
dfs->wlan_dfs_stats.total_phy_errors, datalen);
|
||||
|
@@ -1267,7 +1267,7 @@ static inline int dfs_process_each_radarevent(
|
||||
* found.
|
||||
* @dfs: Pointer to wlan_dfs structure.
|
||||
*/
|
||||
static inline void dfs_false_radarfound_reset_vars(
|
||||
void dfs_false_radarfound_reset_vars(
|
||||
struct wlan_dfs *dfs)
|
||||
{
|
||||
dfs->dfs_seq_num = 0;
|
||||
@@ -1276,6 +1276,10 @@ static inline void dfs_false_radarfound_reset_vars(
|
||||
dfs->dfs_phyerr_freq_min = 0x7fffffff;
|
||||
dfs->dfs_phyerr_freq_max = 0;
|
||||
dfs->dfs_phyerr_w53_counter = 0;
|
||||
dfs->dfs_event_log_count = 0;
|
||||
dfs->dfs_phyerr_count = 0;
|
||||
dfs->dfs_phyerr_reject_count = 0;
|
||||
dfs->dfs_phyerr_queued_count = 0;
|
||||
}
|
||||
|
||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id)
|
||||
|
@@ -236,7 +236,7 @@ void dfs_reset(struct wlan_dfs *dfs)
|
||||
if (!dfs->dfs_is_offload_enabled) {
|
||||
dfs_main_timer_reset(dfs);
|
||||
dfs_host_wait_timer_reset(dfs);
|
||||
dfs->dfs_event_log_count = 0;
|
||||
dfs_false_radarfound_reset_vars(dfs);
|
||||
}
|
||||
dfs_task_testtimer_reset(dfs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user