mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacmn: Do not modify radar found params while processing it
The radar found parameters processing API dfs_process_radar_ind() is supposed to read-only the radar_found_info parameters and not modify them. A block of code for PO platforms modify the radar_found_info parameters. The function dfs_process_radar_ind() should not modify the radar found input parameters. Since in this case the parameter modifications are specific to partial offload, move the code that modifies the parameters out of the function into a partial offload specific code. NOTE:- The previous change I2c717219d0b0f9263734767bee6070f335032b04 also does the same that is mentioned here but for modification of full-offload parameters. Change-Id: Ic438d70eaadb9ef91d28f6a0c22caf4926ed1df1 CRs-Fixed: 2737060
This commit is contained in:
parent
ca60e2f141
commit
adae9cdb21
4 changed files with 20 additions and 16 deletions
|
|
@ -1003,8 +1003,6 @@ struct dfs_rcac_params {
|
|||
* @wlan_dfs_debug_timer: Dfs debug timer.
|
||||
* @dfs_bangradar_type: Radar simulation type.
|
||||
* @is_radar_found_on_secondary_seg: Radar on second segment.
|
||||
* @dfs_radar_found_for_fo: Radar found event for FO(Full Offload) is
|
||||
* received.
|
||||
* @is_radar_during_precac: Radar found during precac.
|
||||
* @dfs_precac_lock: Lock to protect precac lists.
|
||||
* @dfs_precac_secondary_freq: Second segment freq for precac.
|
||||
|
|
@ -1180,7 +1178,6 @@ struct wlan_dfs {
|
|||
qdf_timer_t wlan_dfs_debug_timer;
|
||||
enum dfs_bangradar_types dfs_bangradar_type;
|
||||
bool is_radar_found_on_secondary_seg;
|
||||
bool dfs_radar_found_for_fo;
|
||||
bool is_radar_during_precac;
|
||||
qdf_spinlock_t dfs_precac_lock;
|
||||
bool dfs_precac_enable;
|
||||
|
|
|
|||
|
|
@ -1377,6 +1377,25 @@ void dfs_false_radarfound_reset_vars(
|
|||
dfs->dfs_phyerr_queued_count = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* dfs_process_radarevent() - For Full Offload, FW sends segment id,freq_offset
|
||||
* and chirp information and gets assigned when there is radar detect. In
|
||||
* case of radartool bangradar enhanced command and real radar for DA and PO,
|
||||
* we assign these information here.
|
||||
*
|
||||
* @dfs: Pointer to wlan_dfs structure.
|
||||
* @radar_found: Pointer to radar_found_info structure.
|
||||
*/
|
||||
|
||||
static void
|
||||
dfs_fill_radar_found_info(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found)
|
||||
{
|
||||
radar_found->segment_id = dfs->dfs_seg_id;
|
||||
radar_found->freq_offset = dfs->dfs_freq_offset;
|
||||
radar_found->is_chirp = dfs->dfs_is_chirp;
|
||||
}
|
||||
|
||||
void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id)
|
||||
{
|
||||
struct radar_found_info *radar_found;
|
||||
|
|
@ -1391,6 +1410,7 @@ void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id)
|
|||
radar_found->pdev_id =
|
||||
wlan_objmgr_pdev_get_pdev_id(dfs->dfs_pdev_obj);
|
||||
|
||||
dfs_fill_radar_found_info(dfs, radar_found);
|
||||
dfs_process_radar_ind(dfs, radar_found);
|
||||
qdf_mem_free(radar_found);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1092,17 +1092,6 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
/* For Full Offload, FW sends segment id,freq_offset and chirp
|
||||
* information and gets assigned when there is radar detect. In
|
||||
* case of radartool bangradar enhanced command and real radar
|
||||
* for DA and PO, we assign these information here.
|
||||
*/
|
||||
if (!(dfs->dfs_is_offload_enabled && dfs->dfs_radar_found_for_fo)) {
|
||||
radar_found->segment_id = dfs->dfs_seg_id;
|
||||
radar_found->freq_offset = dfs->dfs_freq_offset;
|
||||
radar_found->is_chirp = dfs->dfs_is_chirp;
|
||||
}
|
||||
|
||||
dfs_compute_radar_found_cfreq(dfs, radar_found, &freq_center);
|
||||
radarfound_freq = freq_center + radar_found->freq_offset;
|
||||
|
||||
|
|
|
|||
|
|
@ -654,10 +654,8 @@ QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev,
|
|||
return status;
|
||||
}
|
||||
|
||||
dfs->dfs_radar_found_for_fo = 1;
|
||||
dfs_translate_radar_params(dfs, radar_found);
|
||||
status = dfs_process_radar_ind(dfs, radar_found);
|
||||
dfs->dfs_radar_found_for_fo = 0;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue