Thread (13 messages) 13 messages, 1 author, 2007-01-03
STALE7108d
Revisions (5)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 current

[PATCH 7/12] d80211: constify ieee80211_ops pointer

From: Jiri Benc <hidden>
Date: 2007-01-03 18:05:16
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Michael Buesch <redacted>

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

Signed-off-by: Michael Buesch <redacted>
Signed-off-by: Jiri Benc <redacted>

---

 include/net/d80211.h     |    2 +-
 net/d80211/ieee80211.c   |    2 +-
 net/d80211/ieee80211_i.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

9d037dc28e7f453a2dbda17284d78ae18d15f646
diff --git a/include/net/d80211.h b/include/net/d80211.h
index dc7822f..9cecbd8 100644
--- a/include/net/d80211.h
+++ b/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
diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c
index c833642..a5ae8a1 100644
--- a/net/d80211/ieee80211.c
+++ b/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;
diff --git a/net/d80211/ieee80211_i.h b/net/d80211/ieee80211_i.h
index 63077b0..6ba6a61 100644
--- a/net/d80211/ieee80211_i.h
+++ b/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;
-- 
1.3.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help