Example #1
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;

	#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);
}
Example #2
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);
}
Example #3
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;
}