Search Linux Wireless

[PATCH 1/2] cfg80211: mark ops as pointer to const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows drivers to mark their cfg80211_ops tables const.

Signed-off-by: David Kilroy <kilroyd@xxxxxxxxxxxxxx>
Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
---
 include/net/cfg80211.h |    2 +-
 net/wireless/core.c    |    2 +-
 net/wireless/core.h    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9e17a83..7702715 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1070,7 +1070,7 @@ static inline const char *wiphy_name(struct wiphy *wiphy)
  * The returned pointer must be assigned to each netdev's
  * ieee80211_ptr for proper operation.
  */
-struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv);
+struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
 
 /**
  * wiphy_register - register a wiphy with cfg80211
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 47c20eb..98bfd4d 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -228,7 +228,7 @@ int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,
 
 /* exported functions */
 
-struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv)
+struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
 {
 	static int wiphy_counter;
 
diff --git a/net/wireless/core.h b/net/wireless/core.h
index f14b6c5..725c22e 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -15,7 +15,7 @@
 #include "reg.h"
 
 struct cfg80211_registered_device {
-	struct cfg80211_ops *ops;
+	const struct cfg80211_ops *ops;
 	struct list_head list;
 	/* we hold this mutex during any call so that
 	 * we cannot do multiple calls at once, and also
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux