Skip to contentSkip to conversation

d80211: constify ieee80211_ops pointer

PATCH New Michael Buesch 1 participant 1 message Dec 16, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 d80211: constify ieee80211_ops pointer

const-ify the ieee80211_ops pointer to allow
* The compiler to do opimizations
* The drivers to declare this structure const.

include/net/d80211.h +1 -1
Index: jbenc-dscape/include/net/d80211.h
===================================================================
@@ -740,7 +740,7 @@ struct ieee80211_ops {
  * priv_data_len.
  */
 struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
-					struct ieee80211_ops *ops);
+					const struct ieee80211_ops *ops);
 
 /* Register hardware device to the IEEE 802.11 code and kernel. Low-level
  * drivers must call this function before using any other IEEE 802.11
net/d80211/ieee80211.c +1 -1
Index: jbenc-dscape/net/d80211/ieee80211.c
===================================================================
@@ -4392,7 +4392,7 @@ static void rate_control_deinitialize(st
 }
 
 struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
-					      struct ieee80211_ops *ops)
+					const struct ieee80211_ops *ops)
 {
 	struct net_device *mdev;
         struct ieee80211_local *local;
net/d80211/ieee80211_i.h +1 -1
Index: jbenc-dscape/net/d80211/ieee80211_i.h
===================================================================
@@ -333,7 +333,7 @@ struct ieee80211_local {
 	 * it first anyway so they become a no-op */
 	struct ieee80211_hw hw;
 
-	struct ieee80211_ops *ops;
+	const struct ieee80211_ops *ops;
 
 	/* List of registered struct ieee80211_hw_mode */
 	struct list_head modes_list;
Signature · 1 line
Greetings Michael.