|
@@ -337,7 +337,7 @@ dfs_compute_radar_found_cfreq(struct wlan_dfs *dfs,
|
|
|
* Applicable to chips that have a separate agile radar detector
|
|
|
* engine.
|
|
|
*/
|
|
|
- if (radar_found->detector_id == AGILE_DETECTOR_ID) {
|
|
|
+ if (radar_found->detector_id == dfs_get_agile_detector_id(dfs)) {
|
|
|
*freq_center = dfs->dfs_agile_precac_freq_mhz;
|
|
|
} else if (!radar_found->segment_id) {
|
|
|
*freq_center = curchan->dfs_ch_mhz_freq_seg1;
|
|
@@ -386,7 +386,7 @@ dfs_compute_radar_found_cfreq(struct wlan_dfs *dfs,
|
|
|
* Applicable to chips that have a separate agile radar detector
|
|
|
* engine.
|
|
|
*/
|
|
|
- if (radar_found->detector_id == AGILE_DETECTOR_ID) {
|
|
|
+ if (radar_found->detector_id == dfs_get_agile_detector_id(dfs)) {
|
|
|
*freq_center = utils_dfs_chan_to_freq(
|
|
|
dfs->dfs_agile_precac_freq);
|
|
|
/* Radar found on primary segment by the HW. */
|
|
@@ -647,7 +647,7 @@ uint8_t dfs_get_bonding_channels_for_freq(struct wlan_dfs *dfs,
|
|
|
uint16_t center_freq;
|
|
|
uint8_t nchannels = 0;
|
|
|
|
|
|
- if (detector_id == AGILE_DETECTOR_ID)
|
|
|
+ if (detector_id == dfs_get_agile_detector_id(dfs))
|
|
|
center_freq = dfs->dfs_agile_precac_freq_mhz;
|
|
|
else if (!segment_id)
|
|
|
center_freq = curchan->dfs_ch_mhz_freq_seg1;
|
|
@@ -671,7 +671,7 @@ uint8_t dfs_get_bonding_channels_for_freq(struct wlan_dfs *dfs,
|
|
|
freq_list[1] = center_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
|
|
|
} else if (WLAN_IS_CHAN_MODE_80(curchan) ||
|
|
|
WLAN_IS_CHAN_MODE_80_80(curchan) ||
|
|
|
- detector_id == AGILE_DETECTOR_ID) {
|
|
|
+ detector_id == dfs_get_agile_detector_id(dfs)) {
|
|
|
/* If the current channel's bandwidth is 80/80+80/160Mhz,
|
|
|
* the corresponding agile Detector's bandwidth will be 80Mhz.
|
|
|
* Therefore, if radar is found on the agile detector find
|
|
@@ -709,7 +709,7 @@ uint8_t dfs_get_bonding_channels(struct wlan_dfs *dfs,
|
|
|
uint8_t center_chan;
|
|
|
uint8_t nchannels = 0;
|
|
|
|
|
|
- if (detector_id == AGILE_DETECTOR_ID)
|
|
|
+ if (detector_id == dfs_get_agile_detector_id(dfs))
|
|
|
center_chan = dfs->dfs_agile_precac_freq;
|
|
|
else if (!segment_id)
|
|
|
center_chan = curchan->dfs_ch_vhtop_ch_freq_seg1;
|
|
@@ -744,7 +744,7 @@ uint8_t dfs_get_bonding_channels(struct wlan_dfs *dfs,
|
|
|
channels[1] = center_chan + DFS_5GHZ_NEXT_CHAN_OFFSET;
|
|
|
} else if (WLAN_IS_CHAN_MODE_80(curchan) ||
|
|
|
WLAN_IS_CHAN_MODE_80_80(curchan) ||
|
|
|
- detector_id == AGILE_DETECTOR_ID) {
|
|
|
+ detector_id == dfs_get_agile_detector_id(dfs)) {
|
|
|
/* If the current channel's bandwidth is 80/80+80/160Mhz,
|
|
|
* the corresponding agile Detector's bandwidth will be 80Mhz.
|
|
|
* Therefore, if radar is found on the agile detector find
|
|
@@ -1005,14 +1005,14 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|
|
* different channel.
|
|
|
*/
|
|
|
if (!dfs_radarevent_basic_sanity(dfs, dfs_curchan) &&
|
|
|
- !(radar_found->detector_id == AGILE_DETECTOR_ID)) {
|
|
|
+ !(radar_found->detector_id == dfs_get_agile_detector_id(dfs))) {
|
|
|
dfs_err(dfs, WLAN_DEBUG_DFS,
|
|
|
"radar event on a non-DFS channel");
|
|
|
goto exit;
|
|
|
}
|
|
|
|
|
|
/* Sanity checks for radar on Agile detector */
|
|
|
- if (radar_found->detector_id == AGILE_DETECTOR_ID &&
|
|
|
+ if (radar_found->detector_id == dfs_get_agile_detector_id(dfs) &&
|
|
|
(!dfs_is_agile_precac_enabled(dfs) || !dfs->dfs_agile_precac_freq_mhz))
|
|
|
{
|
|
|
dfs_err(dfs, WLAN_DEBUG_DFS,
|
|
@@ -1034,7 +1034,7 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|
|
dfs_compute_radar_found_cfreq(dfs, radar_found, &freq_center);
|
|
|
radarfound_freq = freq_center + radar_found->freq_offset;
|
|
|
|
|
|
- if (radar_found->detector_id == AGILE_DETECTOR_ID)
|
|
|
+ if (radar_found->detector_id == dfs_get_agile_detector_id(dfs))
|
|
|
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
|
|
"Radar found on Agile detector freq=%d radar freq=%d",
|
|
|
freq_center, radarfound_freq);
|
|
@@ -1091,7 +1091,7 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|
|
|
|
|
dfs->dfs_is_nol_ie_sent = false;
|
|
|
(dfs->is_radar_during_precac ||
|
|
|
- radar_found->detector_id == AGILE_DETECTOR_ID) ?
|
|
|
+ radar_found->detector_id == dfs_get_agile_detector_id(dfs)) ?
|
|
|
(dfs->dfs_is_rcsa_ie_sent = false) :
|
|
|
(dfs->dfs_is_rcsa_ie_sent = true);
|
|
|
if (dfs->dfs_use_nol_subchannel_marking) {
|
|
@@ -1141,7 +1141,7 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs,
|
|
|
/* If radar is found on preCAC or Agile CAC, return here since
|
|
|
* channel change is not required.
|
|
|
*/
|
|
|
- if (radar_found->detector_id == AGILE_DETECTOR_ID)
|
|
|
+ if (radar_found->detector_id == dfs_get_agile_detector_id(dfs))
|
|
|
goto exit;
|
|
|
if (!dfs->dfs_is_offload_enabled &&
|
|
|
dfs->is_radar_found_on_secondary_seg) {
|