ath9k: dfs use CFG80211_CERTIFICATION_ONUS flag

Use CFG80211_CERTIFICATION_ONUS flag in the DFS
detector code. This is required as a preparation
for moving DFS detector code from ath9k to ath
module.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Reviewed-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Janusz Dziedzic 2013-10-14 11:06:05 +02:00 committed by John W. Linville
parent d265214b61
commit 379ce86e1f
2 changed files with 3 additions and 10 deletions

View File

@ -299,6 +299,9 @@ dfs_pattern_detector_init(struct ath_common *common,
{ {
struct dfs_pattern_detector *dpd; struct dfs_pattern_detector *dpd;
if (!config_enabled(CONFIG_CFG80211_CERTIFICATION_ONUS))
return NULL;
dpd = kmalloc(sizeof(*dpd), GFP_KERNEL); dpd = kmalloc(sizeof(*dpd), GFP_KERNEL);
if (dpd == NULL) if (dpd == NULL)
return NULL; return NULL;

View File

@ -106,17 +106,7 @@ struct dfs_pattern_detector {
* @param region: DFS domain to be used, can be NL80211_DFS_UNSET at creation * @param region: DFS domain to be used, can be NL80211_DFS_UNSET at creation
* @return instance pointer on success, NULL otherwise * @return instance pointer on success, NULL otherwise
*/ */
#if defined(CONFIG_ATH9K_DFS_CERTIFIED)
extern struct dfs_pattern_detector * extern struct dfs_pattern_detector *
dfs_pattern_detector_init(struct ath_common *common, dfs_pattern_detector_init(struct ath_common *common,
enum nl80211_dfs_regions region); enum nl80211_dfs_regions region);
#else
static inline struct dfs_pattern_detector *
dfs_pattern_detector_init(struct ath_common *common,
enum nl80211_dfs_regions region)
{
return NULL;
}
#endif /* CONFIG_ATH9K_DFS_CERTIFIED */
#endif /* DFS_PATTERN_DETECTOR_H */ #endif /* DFS_PATTERN_DETECTOR_H */