提交 8a47cea7 编写于 作者: J Johannes Berg

mac80211: make cfg80211 ops and privid const

The wiphy privid (to identify wiphys) and the cfg80211
ops should both be const, so change them to be.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 631ad703
...@@ -3918,7 +3918,7 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy, ...@@ -3918,7 +3918,7 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy,
return 0; return 0;
} }
struct cfg80211_ops mac80211_config_ops = { const struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface, .add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface, .del_virtual_intf = ieee80211_del_iface,
.change_virtual_intf = ieee80211_change_iface, .change_virtual_intf = ieee80211_change_iface,
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
#ifndef __CFG_H #ifndef __CFG_H
#define __CFG_H #define __CFG_H
extern struct cfg80211_ops mac80211_config_ops; extern const struct cfg80211_ops mac80211_config_ops;
#endif /* __CFG_H */ #endif /* __CFG_H */
...@@ -1608,7 +1608,7 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw) ...@@ -1608,7 +1608,7 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw)
} }
/* utility functions/constants */ /* 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, u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
enum nl80211_iftype type); enum nl80211_iftype type);
int ieee80211_frame_duration(enum ieee80211_band band, size_t len, int ieee80211_frame_duration(enum ieee80211_band band, size_t len,
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "wep.h" #include "wep.h"
/* privid for wiphys to determine whether they belong to us or not */ /* 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) struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册