On Mon, 2022-07-04 at 15:53 +0530, Aditya Kumar Singh wrote: > > +/** > + * enum nl80211_regulatory_power_modes - 6 GHz regulatory power > + * modes > + * @NL80211_REG_AP_LPI: Low Power Indoor (Access Point) > + * @NL80211_REG_AP_SP: Standard Power (Access Point) > + * @NL80211_REG_AP_VLP: Very Low Power (Access Point) > + * @NL80211_REG_REGULAR_CLIENT_LPI: Low Power Indoor (Regular > + * or Default Client) REG_REGULAR reads a bit weird, and anyway "REG" as the prefix for "regulatory_power_mode" is a bit strange? Maybe use something like REG_PWR_MODE_... ? > +++ b/net/wireless/util.c > @@ -190,6 +190,66 @@ struct ieee80211_channel *ieee80211_get_channel_khz(struct wiphy *wiphy, > } > EXPORT_SYMBOL(ieee80211_get_channel_khz); > > +enum nl80211_regulatory_power_modes > +ieee80211_ap_reg_power_to_reg_power_mode(enum ieee80211_ap_reg_power ap_type) > +{ > + switch (ap_type) { > + case IEEE80211_REG_LPI_AP: > + return NL80211_REG_AP_LPI; > + case IEEE80211_REG_SP_AP: > + return NL80211_REG_AP_SP; > + case IEEE80211_REG_VLP_AP: > + return NL80211_REG_AP_VLP; > + default: > + return NL80211_REG_MAX_POWER_MODES + 1; > + } > +} > +EXPORT_SYMBOL(ieee80211_ap_reg_power_to_reg_power_mode); What is the use of that, why export it? Same for the other function. johannes