Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58f01e2d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cfg80211: export regulatory_hint_user() API"

parents 3bb60c27 0f665fc2
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -3229,6 +3229,32 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
 */
extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2);

/**
 * regulatory_hint_user - hint to the wireless core a regulatory domain
 * which the driver has received from an application
 * @alpha2: the ISO/IEC 3166 alpha2 the driver claims its regulatory domain
 *	should be in. If @rd is set this should be NULL. Note that if you
 *	set this to NULL you should still set rd->alpha2 to some accepted
 *	alpha2.
 * @user_reg_hint_type: the type of user regulatory hint.
 *
 * Wireless drivers can use this function to hint to the wireless core
 * the current regulatory domain as specified by trusted applications,
 * it is the driver's responsibilty to estbalish which applications it
 * trusts.
 *
 * The wiphy should be registered to cfg80211 prior to this call.
 * For cfg80211 drivers this means you must first use wiphy_register(),
 * for mac80211 drivers you must first use ieee80211_register_hw().
 *
 * Drivers should check the return value, its possible you can get
 * an -ENOMEM or an -EINVAL.
 *
 * Return: 0 on success. -ENOMEM, -EINVAL.
 */
int regulatory_hint_user(const char *alpha2,
			 enum nl80211_user_reg_hint_type user_reg_hint_type);

/**
 * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain
 * @wiphy: the wireless device we want to process the regulatory domain on
+1 −0
Original line number Diff line number Diff line
@@ -1692,6 +1692,7 @@ int regulatory_hint_user(const char *alpha2,

	return 0;
}
EXPORT_SYMBOL(regulatory_hint_user);

/* Driver hints */
int regulatory_hint(struct wiphy *wiphy, const char *alpha2)
+0 −3
Original line number Diff line number Diff line
@@ -21,9 +21,6 @@ extern const struct ieee80211_regdomain __rcu *cfg80211_regdomain;
bool is_world_regdom(const char *alpha2);
bool reg_supported_dfs_region(u8 dfs_region);

int regulatory_hint_user(const char *alpha2,
			 enum nl80211_user_reg_hint_type user_reg_hint_type);

int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env);
void wiphy_regulatory_register(struct wiphy *wiphy);
void wiphy_regulatory_deregister(struct wiphy *wiphy);