static void _rtw_regd_init_wiphy(struct rtw_regulatory *reg, struct wiphy *wiphy, void (*reg_notifier) (struct wiphy * wiphy, struct regulatory_request * request)) { const struct ieee80211_regdomain *regd; wiphy->reg_notifier = reg_notifier; #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)) wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; wiphy->flags &= ~WIPHY_FLAG_STRICT_REGULATORY; wiphy->flags &= ~WIPHY_FLAG_DISABLE_BEACON_HINTS; #else wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG; wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG; wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS; #endif regd = _rtw_regdomain_select(reg); wiphy_apply_custom_regulatory(wiphy, regd); /* Hard code flags */ _rtw_reg_apply_flags(wiphy); _rtw_reg_apply_radar_flags(wiphy); _rtw_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg); }
static int _rtw_reg_notifier_apply(struct wiphy *wiphy, struct regulatory_request *request, struct rtw_regulatory *reg) { /* Hard code flags */ _rtw_reg_apply_flags(wiphy); return 0; }
static void _rtw_regd_init_wiphy(struct rtw_regulatory *reg, struct wiphy *wiphy, void (*reg_notifier) (struct wiphy * wiphy, struct regulatory_request * request)) { const struct ieee80211_regdomain *regd; wiphy->reg_notifier = reg_notifier; wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG; wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG; wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS; regd = _rtw_regdomain_select(reg); wiphy_apply_custom_regulatory(wiphy, regd); /* Hard code flags */ _rtw_reg_apply_flags(wiphy); }
static int _rtw_reg_notifier_apply(struct wiphy *wiphy, struct regulatory_request *request, struct rtw_regulatory *reg) { /* Hard code flags */ _rtw_reg_apply_flags(wiphy); /* We always apply this */ _rtw_reg_apply_radar_flags(wiphy); switch (request->initiator) { case NL80211_REGDOM_SET_BY_DRIVER: DBG_8192C("%s: %s\n", __func__, "NL80211_REGDOM_SET_BY_DRIVER"); _rtw_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg); break; case NL80211_REGDOM_SET_BY_CORE: DBG_8192C("%s: %s\n", __func__, "NL80211_REGDOM_SET_BY_CORE to DRV"); _rtw_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg); break; case NL80211_REGDOM_SET_BY_USER: DBG_8192C("%s: %s\n", __func__, "NL80211_REGDOM_SET_BY_USER to DRV"); _rtw_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg); break; case NL80211_REGDOM_SET_BY_COUNTRY_IE: DBG_8192C("%s: %s\n", __func__, "NL80211_REGDOM_SET_BY_COUNTRY_IE"); _rtw_reg_apply_world_flags(wiphy, request->initiator, reg); break; } return 0; }
static int _rtw_regd_init_wiphy(struct rtw_regulatory *reg, struct wiphy *wiphy, int (*reg_notifier) (struct wiphy * wiphy, struct regulatory_request * request)) { const struct ieee80211_regdomain *regd; wiphy->reg_notifier = reg_notifier; wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; wiphy->flags &= ~WIPHY_FLAG_STRICT_REGULATORY; wiphy->flags &= ~WIPHY_FLAG_DISABLE_BEACON_HINTS; regd = _rtw_regdomain_select(reg); wiphy_apply_custom_regulatory(wiphy, regd); /* Hard code flags */ _rtw_reg_apply_flags(wiphy); _rtw_reg_apply_radar_flags(wiphy); _rtw_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg); return 0; }