linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] wireless:  expose set-wiphy-name method to other modules.
@ 2014-09-26 23:24 greearb
  2014-09-26 23:24 ` [PATCH v2 2/4] mac-sim: support creating radios with specific name greearb
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: greearb @ 2014-09-26 23:24 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

This will let hw-sim create wiphy objects with a specific
name.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---

v2:  Fix checkpatch warnings (char * instead of char*)

 include/net/cfg80211.h | 5 +++++
 net/wireless/core.c    | 9 +++++++++
 2 files changed, 14 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 3a13aab..e1641e6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4854,6 +4854,11 @@ int cfg80211_iter_combinations(struct wiphy *wiphy,
 void cfg80211_stop_iface(struct wiphy *wiphy, struct wireless_dev *wdev,
 			 gfp_t gfp);
 
+/*
+ * Attempt to rename a device.  Acquire RTNL before calling.
+ */
+int cfg80211_dev_rename_wiphy(struct wiphy *wiphy, char *newname);
+
 /**
  * cfg80211_shutdown_all_interfaces - shut down all interfaces for a wiphy
  * @wiphy: the wiphy to shut down
diff --git a/net/wireless/core.c b/net/wireless/core.c
index f52a4cd..4d7e17c 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -86,6 +86,15 @@ struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx)
 	return &rdev->wiphy;
 }
 
+int cfg80211_dev_rename_wiphy(struct wiphy *wiphy, char *newname)
+{
+	struct cfg80211_registered_device *rdev;
+
+	rdev = wiphy_to_rdev(wiphy);
+	return cfg80211_dev_rename(rdev, newname);
+}
+EXPORT_SYMBOL_GPL(cfg80211_dev_rename_wiphy);
+
 int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,
 			char *newname)
 {
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-06 18:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 23:24 [PATCH v2 1/4] wireless: expose set-wiphy-name method to other modules greearb
2014-09-26 23:24 ` [PATCH v2 2/4] mac-sim: support creating radios with specific name greearb
2014-09-26 23:24 ` [PATCH v2 3/4] wireless: support creating wiphy w/out creating wlanX greearb
2014-09-26 23:24 ` [PATCH v2 4/4] hwsim: " greearb
2014-10-06 14:28   ` Johannes Berg
2014-10-06 14:27 ` [PATCH v2 1/4] wireless: expose set-wiphy-name method to other modules Johannes Berg
2014-10-06 18:26   ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).