}
EXPORT_SYMBOL(ath_is_world_regd);
+#ifndef CONFIG_ATH_DEFER_EEPROM_REGULATORY
static const struct ieee80211_regdomain *ath_default_world_regdomain(void)
{
/* this is the most restrictive */
return ath_default_world_regdomain();
}
}
+#endif /* CONFIG_ATH_DEFER_EEPROM_REGULATORY */
bool ath_is_49ghz_allowed(u16 regdomain)
{
}
EXPORT_SYMBOL(ath_is_49ghz_allowed);
+#ifndef CONFIG_ATH_DEFER_EEPROM_REGULATORY
/* Frequency is one where radar detection is required */
static bool ath_is_radar_freq(u16 center_freq)
{
return (center_freq >= 5260 && center_freq <= 5700);
}
+#endif /* CONFIG_ATH_DEFER_EEPROM_REGULATORY */
/*
* N.B: These exception rules do not apply radar freqs.
ath_reg_apply_beaconing_flags(struct wiphy *wiphy,
enum nl80211_reg_initiator initiator)
{
+#ifndef CONFIG_ATH_DEFER_EEPROM_REGULATORY
enum ieee80211_band band;
struct ieee80211_supported_band *sband;
const struct ieee80211_reg_rule *reg_rule;
}
}
}
+#endif /* CONFIG_ATH_DEFER_EEPROM_REGULATORY */
}
ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
enum nl80211_reg_initiator initiator)
{
+#ifndef CONFIG_ATH_DEFER_EEPROM_REGULATORY
struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch;
const struct ieee80211_reg_rule *reg_rule;
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
}
+#endif /* CONFIG_ATH_DEFER_EEPROM_REGULATORY */
}
/* Always apply Radar/DFS rules on freq range 5260 MHz - 5700 MHz */
static void ath_reg_apply_radar_flags(struct wiphy *wiphy)
{
+#ifndef CONFIG_ATH_DEFER_EEPROM_REGULATORY
struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch;
unsigned int i;
IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN;
}
+#endif /* CONFIG_ATH_DEFER_EEPROM_REGULATORY */
}
static void ath_reg_apply_world_flags(struct wiphy *wiphy,
int (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request))
{
+#ifndef CONFIG_ATH_DEFER_EEPROM_REGULATORY
const struct ieee80211_regdomain *regd;
wiphy->reg_notifier = reg_notifier;
wiphy_apply_custom_regulatory(wiphy, regd);
ath_reg_apply_radar_flags(wiphy);
ath_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg);
+#endif /* CONFIG_ATH_DEFER_EEPROM_REGULATORY */
return 0;
}