summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2014-10-22 15:23:00 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-10-27 03:48:18 -0400
commit1998d90ad424c1ff12ea24816ce158d5262e06a5 (patch)
treead30c598208b3c85525810af268787cad5bb774d /include/net/cfg80211.h
parent8cdd9e1c37dd888894922b8209d5fc8055cfde52 (diff)
cfg80211: support creating wiphy with suggested name
Kernel will attempt to use the name if it is supplied, but if name cannot be used for some reason, the default phyX name will be used instead. Signed-off-by: Ben Greear <greearb@candelatech.com> [while at it, use wiphy_name() instead of dev_name(), fix format string issue reported by Kees Cook] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 77aa805d7e7c..39d7996b0609 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3185,6 +3185,23 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
3185} 3185}
3186 3186
3187/** 3187/**
3188 * wiphy_new_nm - create a new wiphy for use with cfg80211
3189 *
3190 * @ops: The configuration operations for this device
3191 * @sizeof_priv: The size of the private area to allocate
3192 * @requested_name: Request a particular name.
3193 * NULL is valid value, and means use the default phy%d naming.
3194 *
3195 * Create a new wiphy and associate the given operations with it.
3196 * @sizeof_priv bytes are allocated for private use.
3197 *
3198 * Return: A pointer to the new wiphy. This pointer must be
3199 * assigned to each netdev's ieee80211_ptr for proper operation.
3200 */
3201struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
3202 const char *requested_name);
3203
3204/**
3188 * wiphy_new - create a new wiphy for use with cfg80211 3205 * wiphy_new - create a new wiphy for use with cfg80211
3189 * 3206 *
3190 * @ops: The configuration operations for this device 3207 * @ops: The configuration operations for this device
@@ -3196,7 +3213,11 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
3196 * Return: A pointer to the new wiphy. This pointer must be 3213 * Return: A pointer to the new wiphy. This pointer must be
3197 * assigned to each netdev's ieee80211_ptr for proper operation. 3214 * assigned to each netdev's ieee80211_ptr for proper operation.
3198 */ 3215 */
3199struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); 3216static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,
3217 int sizeof_priv)
3218{
3219 return wiphy_new_nm(ops, sizeof_priv, NULL);
3220}
3200 3221
3201/** 3222/**
3202 * wiphy_register - register a wiphy with cfg80211 3223 * wiphy_register - register a wiphy with cfg80211