mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacmn: Remove radar parameter translation for partial-offload chips
The routine 'dfs_translate_radar_params()' translates the radar found offsets given by a 160MHz detector which ranges from -80MHz to +80MHz to that of the offsets given by an 80MHz detector that ranges from -40MHz to +40Mhz. The same function also translates the segment ID from a single-detector(160MHz) model to a two-detector model(80Mhz). This routine is unnecessarily called for partial-offload chipsets which do not support True 160MHz. Do not call the function 'dfs_translate_radar_params()' from 'dfs_process_radar_ind()' which is common for both partial-offload and full-offload. Call it from the full-offload specific radar action function 'tgt_dfs_process_radar_ind()'. Change-Id: I2c717219d0b0f9263734767bee6070f335032b04 CRs-Fixed: 2718507
This commit is contained in:
parent
69bc670b4b
commit
ca60e2f141
3 changed files with 49 additions and 44 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -233,4 +233,48 @@ dfs_set_nol_subchannel_marking(struct wlan_dfs *dfs,
|
|||
int
|
||||
dfs_get_nol_subchannel_marking(struct wlan_dfs *dfs,
|
||||
bool *nol_subchannel_marking);
|
||||
|
||||
#if defined(WLAN_DFS_TRUE_160MHZ_SUPPORT) && defined(WLAN_DFS_FULL_OFFLOAD)
|
||||
#define DFS_80P80MHZ_SECOND_SEG_OFFSET 85
|
||||
/**
|
||||
* dfs_translate_radar_params() - Translate the radar parameters received in
|
||||
* true 160MHz supported chipsets.
|
||||
* @dfs: Pointer to the wlan_dfs object.
|
||||
* @radar_found: Radar found parameters.
|
||||
*
|
||||
* Radar found parameters in true 160MHz detectors are represented below:
|
||||
*
|
||||
* Offset received with respect to the center of 160MHz ranging from -80 to +80.
|
||||
* __________________________________________
|
||||
* | |
|
||||
* | 160 MHz Channel |
|
||||
* |__________________________________________|
|
||||
* | | | | |
|
||||
* | | | | |
|
||||
* -80 -ve offset center +ve offset +80
|
||||
*
|
||||
*
|
||||
* Radar found parameters after translation by this API:
|
||||
*
|
||||
* Offsets with respect to pri/sec 80MHz center ranging from -40 to +40.
|
||||
* __________________________________________
|
||||
* | | |
|
||||
* | 160 MHz|Channel |
|
||||
* |____________________|_____________________|
|
||||
* | | | | |
|
||||
* | | | | |
|
||||
* -40 pri center +40/-40 sec center +40
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
void
|
||||
dfs_translate_radar_params(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found);
|
||||
#else
|
||||
static inline void
|
||||
dfs_translate_radar_params(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_DFS_TRUE_160MHZ_SUPPORT */
|
||||
#endif /*_DFS_PROCESS_RADAR_FOUND_IND_H_ */
|
||||
|
|
|
|||
|
|
@ -959,42 +959,9 @@ bool dfs_process_nol_ie_bitmap(struct wlan_dfs *dfs, uint8_t nol_ie_bandwidth,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_DFS_TRUE_160MHZ_SUPPORT
|
||||
#define DFS_80P80MHZ_SECOND_SEG_OFFSET 85
|
||||
/**
|
||||
* dfs_translate_radar_params() - Translate the radar parameters received in
|
||||
* true 160MHz supported chipsets.
|
||||
* @dfs: Pointer to the wlan_dfs object.
|
||||
* @radar_found: Radar found parameters.
|
||||
*
|
||||
* Radar found parameters in true 160MHz detectors are represented below:
|
||||
*
|
||||
* Offset received with respect to the center of 160MHz ranging from -80 to +80.
|
||||
* __________________________________________
|
||||
* | |
|
||||
* | 160 MHz Channel |
|
||||
* |__________________________________________|
|
||||
* | | | | |
|
||||
* | | | | |
|
||||
* -80 -ve offset center +ve offset +80
|
||||
*
|
||||
*
|
||||
* Radar found parameters after translation by this API:
|
||||
*
|
||||
* Offsets with respect to pri/sec 80MHz center ranging from -40 to +40.
|
||||
* __________________________________________
|
||||
* | | |
|
||||
* | 160 MHz|Channel |
|
||||
* |____________________|_____________________|
|
||||
* | | | | |
|
||||
* | | | | |
|
||||
* -40 pri center +40/-40 sec center +40
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
static void
|
||||
dfs_translate_radar_params(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found)
|
||||
#if defined(WLAN_DFS_TRUE_160MHZ_SUPPORT) && defined(WLAN_DFS_FULL_OFFLOAD)
|
||||
void dfs_translate_radar_params(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found)
|
||||
{
|
||||
struct dfs_channel *curchan = dfs->dfs_curchan;
|
||||
bool is_primary_ch_right_of_center = false;
|
||||
|
|
@ -1044,12 +1011,6 @@ dfs_translate_radar_params(struct wlan_dfs *dfs,
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
dfs_translate_radar_params(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_DFS_TRUE_160MHZ_SUPPORT */
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
|
|
@ -1072,7 +1033,6 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|||
*/
|
||||
DFS_RADAR_MODE_SWITCH_LOCK(dfs);
|
||||
|
||||
dfs_translate_radar_params(dfs, radar_found);
|
||||
/* Before processing radar, check if HW mode switch is in progress.
|
||||
* If in progress, defer the processing of radar event received till
|
||||
* the mode switch is completed.
|
||||
|
|
|
|||
|
|
@ -655,6 +655,7 @@ QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev,
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue