diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rate.c | 16 | ||||
-rw-r--r-- | net/mac80211/rate.h | 2 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel.c | 2 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel.h | 2 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 2 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 22b223f13c9f..255b59e616d0 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | struct rate_control_alg { | 19 | struct rate_control_alg { |
20 | struct list_head list; | 20 | struct list_head list; |
21 | struct rate_control_ops *ops; | 21 | const struct rate_control_ops *ops; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | static LIST_HEAD(rate_ctrl_algs); | 24 | static LIST_HEAD(rate_ctrl_algs); |
@@ -29,7 +29,7 @@ module_param(ieee80211_default_rc_algo, charp, 0644); | |||
29 | MODULE_PARM_DESC(ieee80211_default_rc_algo, | 29 | MODULE_PARM_DESC(ieee80211_default_rc_algo, |
30 | "Default rate control algorithm for mac80211 to use"); | 30 | "Default rate control algorithm for mac80211 to use"); |
31 | 31 | ||
32 | int ieee80211_rate_control_register(struct rate_control_ops *ops) | 32 | int ieee80211_rate_control_register(const struct rate_control_ops *ops) |
33 | { | 33 | { |
34 | struct rate_control_alg *alg; | 34 | struct rate_control_alg *alg; |
35 | 35 | ||
@@ -60,7 +60,7 @@ int ieee80211_rate_control_register(struct rate_control_ops *ops) | |||
60 | } | 60 | } |
61 | EXPORT_SYMBOL(ieee80211_rate_control_register); | 61 | EXPORT_SYMBOL(ieee80211_rate_control_register); |
62 | 62 | ||
63 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops) | 63 | void ieee80211_rate_control_unregister(const struct rate_control_ops *ops) |
64 | { | 64 | { |
65 | struct rate_control_alg *alg; | 65 | struct rate_control_alg *alg; |
66 | 66 | ||
@@ -76,11 +76,11 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops) | |||
76 | } | 76 | } |
77 | EXPORT_SYMBOL(ieee80211_rate_control_unregister); | 77 | EXPORT_SYMBOL(ieee80211_rate_control_unregister); |
78 | 78 | ||
79 | static struct rate_control_ops * | 79 | static const struct rate_control_ops * |
80 | ieee80211_try_rate_control_ops_get(const char *name) | 80 | ieee80211_try_rate_control_ops_get(const char *name) |
81 | { | 81 | { |
82 | struct rate_control_alg *alg; | 82 | struct rate_control_alg *alg; |
83 | struct rate_control_ops *ops = NULL; | 83 | const struct rate_control_ops *ops = NULL; |
84 | 84 | ||
85 | if (!name) | 85 | if (!name) |
86 | return NULL; | 86 | return NULL; |
@@ -98,10 +98,10 @@ ieee80211_try_rate_control_ops_get(const char *name) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | /* Get the rate control algorithm. */ | 100 | /* Get the rate control algorithm. */ |
101 | static struct rate_control_ops * | 101 | static const struct rate_control_ops * |
102 | ieee80211_rate_control_ops_get(const char *name) | 102 | ieee80211_rate_control_ops_get(const char *name) |
103 | { | 103 | { |
104 | struct rate_control_ops *ops; | 104 | const struct rate_control_ops *ops; |
105 | const char *alg_name; | 105 | const char *alg_name; |
106 | 106 | ||
107 | kparam_block_sysfs_write(ieee80211_default_rc_algo); | 107 | kparam_block_sysfs_write(ieee80211_default_rc_algo); |
@@ -127,7 +127,7 @@ ieee80211_rate_control_ops_get(const char *name) | |||
127 | return ops; | 127 | return ops; |
128 | } | 128 | } |
129 | 129 | ||
130 | static void ieee80211_rate_control_ops_put(struct rate_control_ops *ops) | 130 | static void ieee80211_rate_control_ops_put(const struct rate_control_ops *ops) |
131 | { | 131 | { |
132 | module_put(ops->module); | 132 | module_put(ops->module); |
133 | } | 133 | } |
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index b95e16c07081..9aa2a1190a86 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | struct rate_control_ref { | 22 | struct rate_control_ref { |
23 | struct ieee80211_local *local; | 23 | struct ieee80211_local *local; |
24 | struct rate_control_ops *ops; | 24 | const struct rate_control_ops *ops; |
25 | void *priv; | 25 | void *priv; |
26 | }; | 26 | }; |
27 | 27 | ||
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index f3d88b0c054c..26fd94fa0aed 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c | |||
@@ -657,7 +657,7 @@ minstrel_free(void *priv) | |||
657 | kfree(priv); | 657 | kfree(priv); |
658 | } | 658 | } |
659 | 659 | ||
660 | struct rate_control_ops mac80211_minstrel = { | 660 | const struct rate_control_ops mac80211_minstrel = { |
661 | .name = "minstrel", | 661 | .name = "minstrel", |
662 | .tx_status = minstrel_tx_status, | 662 | .tx_status = minstrel_tx_status, |
663 | .get_rate = minstrel_get_rate, | 663 | .get_rate = minstrel_get_rate, |
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h index f4301f4b2e41..046d1bd598a8 100644 --- a/net/mac80211/rc80211_minstrel.h +++ b/net/mac80211/rc80211_minstrel.h | |||
@@ -123,7 +123,7 @@ struct minstrel_debugfs_info { | |||
123 | char buf[]; | 123 | char buf[]; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | extern struct rate_control_ops mac80211_minstrel; | 126 | extern const struct rate_control_ops mac80211_minstrel; |
127 | void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir); | 127 | void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir); |
128 | void minstrel_remove_sta_debugfs(void *priv, void *priv_sta); | 128 | void minstrel_remove_sta_debugfs(void *priv, void *priv_sta); |
129 | 129 | ||
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index c1b5b73c5b91..a6d6cc5c3db4 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -1031,7 +1031,7 @@ minstrel_ht_free(void *priv) | |||
1031 | mac80211_minstrel.free(priv); | 1031 | mac80211_minstrel.free(priv); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | static struct rate_control_ops mac80211_minstrel_ht = { | 1034 | static const struct rate_control_ops mac80211_minstrel_ht = { |
1035 | .name = "minstrel_ht", | 1035 | .name = "minstrel_ht", |
1036 | .tx_status = minstrel_ht_tx_status, | 1036 | .tx_status = minstrel_ht_tx_status, |
1037 | .get_rate = minstrel_ht_get_rate, | 1037 | .get_rate = minstrel_ht_get_rate, |
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index 958fad07b54c..d0da2a70fe68 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -452,7 +452,7 @@ static void rate_control_pid_free_sta(void *priv, struct ieee80211_sta *sta, | |||
452 | kfree(priv_sta); | 452 | kfree(priv_sta); |
453 | } | 453 | } |
454 | 454 | ||
455 | static struct rate_control_ops mac80211_rcpid = { | 455 | static const struct rate_control_ops mac80211_rcpid = { |
456 | .name = "pid", | 456 | .name = "pid", |
457 | .tx_status = rate_control_pid_tx_status, | 457 | .tx_status = rate_control_pid_tx_status, |
458 | .get_rate = rate_control_pid_get_rate, | 458 | .get_rate = rate_control_pid_get_rate, |