aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-12 10:43:19 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 03:41:39 -0500
commit4a3cb702b05868f67c4ee3da3380461c5b90b4ca (patch)
tree557b28bd820e50ad7d3c758c34a60d5df006f6ed /net/mac80211/ieee80211_i.h
parent50640f169372b9977487a328dedf13a8debedff7 (diff)
mac80211: constify IE parsing
Make all the parsed IE pointers const, and propagate the change to all the users etc. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h87
1 files changed, 44 insertions, 43 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index d1074442f1b5..d702f7dc321b 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1163,41 +1163,41 @@ struct ieee80211_ra_tid {
1163 1163
1164/* Parsed Information Elements */ 1164/* Parsed Information Elements */
1165struct ieee802_11_elems { 1165struct ieee802_11_elems {
1166 u8 *ie_start; 1166 const u8 *ie_start;
1167 size_t total_len; 1167 size_t total_len;
1168 1168
1169 /* pointers to IEs */ 1169 /* pointers to IEs */
1170 u8 *ssid; 1170 const u8 *ssid;
1171 u8 *supp_rates; 1171 const u8 *supp_rates;
1172 u8 *fh_params; 1172 const u8 *fh_params;
1173 u8 *ds_params; 1173 const u8 *ds_params;
1174 u8 *cf_params; 1174 const u8 *cf_params;
1175 struct ieee80211_tim_ie *tim; 1175 const struct ieee80211_tim_ie *tim;
1176 u8 *ibss_params; 1176 const u8 *ibss_params;
1177 u8 *challenge; 1177 const u8 *challenge;
1178 u8 *rsn; 1178 const u8 *rsn;
1179 u8 *erp_info; 1179 const u8 *erp_info;
1180 u8 *ext_supp_rates; 1180 const u8 *ext_supp_rates;
1181 u8 *wmm_info; 1181 const u8 *wmm_info;
1182 u8 *wmm_param; 1182 const u8 *wmm_param;
1183 struct ieee80211_ht_cap *ht_cap_elem; 1183 const struct ieee80211_ht_cap *ht_cap_elem;
1184 struct ieee80211_ht_operation *ht_operation; 1184 const struct ieee80211_ht_operation *ht_operation;
1185 struct ieee80211_vht_cap *vht_cap_elem; 1185 const struct ieee80211_vht_cap *vht_cap_elem;
1186 struct ieee80211_vht_operation *vht_operation; 1186 const struct ieee80211_vht_operation *vht_operation;
1187 struct ieee80211_meshconf_ie *mesh_config; 1187 const struct ieee80211_meshconf_ie *mesh_config;
1188 u8 *mesh_id; 1188 const u8 *mesh_id;
1189 u8 *peering; 1189 const u8 *peering;
1190 __le16 *awake_window; 1190 const __le16 *awake_window;
1191 u8 *preq; 1191 const u8 *preq;
1192 u8 *prep; 1192 const u8 *prep;
1193 u8 *perr; 1193 const u8 *perr;
1194 struct ieee80211_rann_ie *rann; 1194 const struct ieee80211_rann_ie *rann;
1195 struct ieee80211_channel_sw_ie *ch_switch_ie; 1195 const struct ieee80211_channel_sw_ie *ch_switch_ie;
1196 u8 *country_elem; 1196 const u8 *country_elem;
1197 u8 *pwr_constr_elem; 1197 const u8 *pwr_constr_elem;
1198 u8 *quiet_elem; /* first quite element */ 1198 const u8 *quiet_elem; /* first quite element */
1199 u8 *timeout_int; 1199 const u8 *timeout_int;
1200 u8 *opmode_notif; 1200 const u8 *opmode_notif;
1201 1201
1202 /* length of them, respectively */ 1202 /* length of them, respectively */
1203 u8 ssid_len; 1203 u8 ssid_len;
@@ -1276,10 +1276,10 @@ void ieee80211_recalc_ps_vif(struct ieee80211_sub_if_data *sdata);
1276int ieee80211_max_network_latency(struct notifier_block *nb, 1276int ieee80211_max_network_latency(struct notifier_block *nb,
1277 unsigned long data, void *dummy); 1277 unsigned long data, void *dummy);
1278int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata); 1278int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata);
1279void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, 1279void
1280 struct ieee80211_channel_sw_ie *sw_elem, 1280ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
1281 struct ieee80211_bss *bss, 1281 const struct ieee80211_channel_sw_ie *sw_elem,
1282 u64 timestamp); 1282 struct ieee80211_bss *bss, u64 timestamp);
1283void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata); 1283void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata);
1284void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata); 1284void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
1285void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata); 1285void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
@@ -1387,7 +1387,7 @@ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
1387 struct ieee80211_sta_ht_cap *ht_cap); 1387 struct ieee80211_sta_ht_cap *ht_cap);
1388bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, 1388bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,
1389 struct ieee80211_supported_band *sband, 1389 struct ieee80211_supported_band *sband,
1390 struct ieee80211_ht_cap *ht_cap_ie, 1390 const struct ieee80211_ht_cap *ht_cap_ie,
1391 struct sta_info *sta); 1391 struct sta_info *sta);
1392void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, 1392void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
1393 const u8 *da, u16 tid, 1393 const u8 *da, u16 tid,
@@ -1428,10 +1428,11 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid);
1428u8 ieee80211_mcs_to_chains(const struct ieee80211_mcs_info *mcs); 1428u8 ieee80211_mcs_to_chains(const struct ieee80211_mcs_info *mcs);
1429 1429
1430/* VHT */ 1430/* VHT */
1431void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, 1431void
1432 struct ieee80211_supported_band *sband, 1432ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
1433 struct ieee80211_vht_cap *vht_cap_ie, 1433 struct ieee80211_supported_band *sband,
1434 struct sta_info *sta); 1434 const struct ieee80211_vht_cap *vht_cap_ie,
1435 struct sta_info *sta);
1435enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw(struct sta_info *sta); 1436enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw(struct sta_info *sta);
1436void ieee80211_sta_set_rx_nss(struct sta_info *sta); 1437void ieee80211_sta_set_rx_nss(struct sta_info *sta);
1437void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, 1438void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
@@ -1555,7 +1556,7 @@ static inline void ieee80211_add_pending_skbs(struct ieee80211_local *local,
1555 1556
1556void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, 1557void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
1557 u16 transaction, u16 auth_alg, u16 status, 1558 u16 transaction, u16 auth_alg, u16 status,
1558 u8 *extra, size_t extra_len, const u8 *bssid, 1559 const u8 *extra, size_t extra_len, const u8 *bssid,
1559 const u8 *da, const u8 *key, u8 key_len, u8 key_idx, 1560 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
1560 u32 tx_flags); 1561 u32 tx_flags);
1561void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, 1562void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
@@ -1606,7 +1607,7 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
1606 1607
1607/* channel management */ 1608/* channel management */
1608void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan, 1609void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan,
1609 struct ieee80211_ht_operation *ht_oper, 1610 const struct ieee80211_ht_operation *ht_oper,
1610 struct cfg80211_chan_def *chandef); 1611 struct cfg80211_chan_def *chandef);
1611 1612
1612int __must_check 1613int __must_check