qcacmn: Return invalid agile detector ID if agile dfs is not supported

When QCA_SUPPORT_AGILE_DFS is not defined, dfs->dfs_agile_detector_id
will not be set and it will be 0, which is also a meaningful detector id.

Currently, if radar_found->detector_id is not set, or set as 0, the
detector ID is recognized as a valid agile detector which is incorrect.

Return invalid agile detector id if agile dfs is not supported.

Change-Id: I259fa6f3f9fbcb4a76567090a8f084e15ee6af93
CRs-Fixed: 2646946
This commit is contained in:
bings
2020-03-21 21:24:26 +08:00
committed by nshrivas
부모 806b7c72df
커밋 f5067f066b
2개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@@ -412,7 +412,7 @@
* @DETECTOR_ID_2: Detector ID 2 (Agile detector in 80p80MHZ supported devices).
* @AGILE_DETECTOR_ID_TRUE_160MHZ: Agile detector ID in true 160MHz devices.
* @AGILE_DETECTOR_ID_80p80: Agile detector ID in 80p80MHz supported devices.
* @DETECTOR_ID_MAX: Maximum detector ID value.
* @INVALID_DETECTOR_ID: Invalid detector id.
*/
enum detector_id {
DETECTOR_ID_0,
@@ -420,7 +420,7 @@ enum detector_id {
DETECTOR_ID_2,
AGILE_DETECTOR_ID_TRUE_160MHZ = DETECTOR_ID_1,
AGILE_DETECTOR_ID_80P80 = DETECTOR_ID_2,
DETECTOR_ID_MAX,
INVALID_DETECTOR_ID,
};
/**
@@ -2882,5 +2882,12 @@ static inline bool dfs_is_restricted_80p80mhz_supported(struct wlan_dfs *dfs)
*
* Return: Agile detector value (uint8_t).
*/
#ifdef QCA_SUPPORT_AGILE_DFS
uint8_t dfs_get_agile_detector_id(struct wlan_dfs *dfs);
#else
static inline uint8_t dfs_get_agile_detector_id(struct wlan_dfs *dfs)
{
return INVALID_DETECTOR_ID;
}
#endif
#endif /* _DFS_H_ */

파일 보기

@@ -978,7 +978,9 @@ bool dfs_is_restricted_80p80mhz_supported(struct wlan_dfs *dfs)
}
#endif
#ifdef QCA_SUPPORT_AGILE_DFS
uint8_t dfs_get_agile_detector_id(struct wlan_dfs *dfs)
{
return dfs->dfs_agile_detector_id;
}
#endif