mac80211: make cfg80211 ops and privid const
authorJohannes Berg <johannes.berg@intel.com>
Mon, 20 Jan 2014 22:55:44 +0000 (23:55 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Feb 2014 20:48:21 +0000 (21:48 +0100)
The wiphy privid (to identify wiphys) and the cfg80211
ops should both be const, so change them to be.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/cfg.h
net/mac80211/ieee80211_i.h
net/mac80211/util.c

index d2125a37014a015e0b925cb26ce5a8b7552d898a..cf27c623394a2d2ca04e843a0b4d43c54ff15747 100644 (file)
@@ -3918,7 +3918,7 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy,
        return 0;
 }
 
-struct cfg80211_ops mac80211_config_ops = {
+const struct cfg80211_ops mac80211_config_ops = {
        .add_virtual_intf = ieee80211_add_iface,
        .del_virtual_intf = ieee80211_del_iface,
        .change_virtual_intf = ieee80211_change_iface,
index 7d7879f5b00b9d9fb7aa42ca8695d04e330dadb0..2d51f62dc76cd4978f1249c4a8ad1f95535a3e21 100644 (file)
@@ -4,6 +4,6 @@
 #ifndef __CFG_H
 #define __CFG_H
 
-extern struct cfg80211_ops mac80211_config_ops;
+extern const struct cfg80211_ops mac80211_config_ops;
 
 #endif /* __CFG_H */
index 96eb272297e16882ba196f986a715fe1c71f9383..d37dc75baffdecaf5910e1177d4b5661c4de6ebc 100644 (file)
@@ -1608,7 +1608,7 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw)
 }
 
 /* utility functions/constants */
-extern void *mac80211_wiphy_privid; /* for wiphy privid */
+extern const void *const mac80211_wiphy_privid; /* for wiphy privid */
 u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
                        enum nl80211_iftype type);
 int ieee80211_frame_duration(enum ieee80211_band band, size_t len,
index 676dc0967f377f1251a761bf2dff0c35c8e92346..128a0c57a0d304acab3f272a611167866f5913f0 100644 (file)
@@ -34,7 +34,7 @@
 #include "wep.h"
 
 /* privid for wiphys to determine whether they belong to us or not */
-void *mac80211_wiphy_privid = &mac80211_wiphy_privid;
+const void *const mac80211_wiphy_privid = &mac80211_wiphy_privid;
 
 struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
 {
This page took 0.033683 seconds and 5 git commands to generate.