diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 8412a303993a..3d32df1fbc6d 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -509,6 +509,9 @@ struct ieee80211_if_ibss { | |||
509 | /* probe response/beacon for IBSS */ | 509 | /* probe response/beacon for IBSS */ |
510 | struct beacon_data __rcu *presp; | 510 | struct beacon_data __rcu *presp; |
511 | 511 | ||
512 | struct ieee80211_ht_cap ht_capa; /* configured ht-cap over-rides */ | ||
513 | struct ieee80211_ht_cap ht_capa_mask; /* Valid parts of ht_capa */ | ||
514 | |||
512 | spinlock_t incomplete_lock; | 515 | spinlock_t incomplete_lock; |
513 | struct list_head incomplete_stations; | 516 | struct list_head incomplete_stations; |
514 | 517 | ||
@@ -809,6 +812,34 @@ ieee80211_get_sdata_band(struct ieee80211_sub_if_data *sdata) | |||
809 | return band; | 812 | return band; |
810 | } | 813 | } |
811 | 814 | ||
815 | static inline int | ||
816 | ieee80211_chandef_get_shift(struct cfg80211_chan_def *chandef) | ||
817 | { | ||
818 | switch (chandef->width) { | ||
819 | case NL80211_CHAN_WIDTH_5: | ||
820 | return 2; | ||
821 | case NL80211_CHAN_WIDTH_10: | ||
822 | return 1; | ||
823 | default: | ||
824 | return 0; | ||
825 | } | ||
826 | } | ||
827 | |||
828 | static inline int | ||
829 | ieee80211_vif_get_shift(struct ieee80211_vif *vif) | ||
830 | { | ||
831 | struct ieee80211_chanctx_conf *chanctx_conf; | ||
832 | int shift = 0; | ||
833 | |||
834 | rcu_read_lock(); | ||
835 | chanctx_conf = rcu_dereference(vif->chanctx_conf); | ||
836 | if (chanctx_conf) | ||
837 | shift = ieee80211_chandef_get_shift(&chanctx_conf->def); | ||
838 | rcu_read_unlock(); | ||
839 | |||
840 | return shift; | ||
841 | } | ||
842 | |||
812 | enum sdata_queue_type { | 843 | enum sdata_queue_type { |
813 | IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, | 844 | IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, |
814 | IEEE80211_SDATA_QUEUE_AGG_START = 1, | 845 | IEEE80211_SDATA_QUEUE_AGG_START = 1, |
@@ -1026,7 +1057,7 @@ struct ieee80211_local { | |||
1026 | struct cfg80211_ssid scan_ssid; | 1057 | struct cfg80211_ssid scan_ssid; |
1027 | struct cfg80211_scan_request *int_scan_req; | 1058 | struct cfg80211_scan_request *int_scan_req; |
1028 | struct cfg80211_scan_request *scan_req, *hw_scan_req; | 1059 | struct cfg80211_scan_request *scan_req, *hw_scan_req; |
1029 | struct ieee80211_channel *scan_channel; | 1060 | struct cfg80211_chan_def scan_chandef; |
1030 | enum ieee80211_band hw_scan_band; | 1061 | enum ieee80211_band hw_scan_band; |
1031 | int scan_channel_idx; | 1062 | int scan_channel_idx; |
1032 | int scan_ies_len; | 1063 | int scan_ies_len; |
@@ -1306,7 +1337,8 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1306 | void ieee80211_scan_work(struct work_struct *work); | 1337 | void ieee80211_scan_work(struct work_struct *work); |
1307 | int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, | 1338 | int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, |
1308 | const u8 *ssid, u8 ssid_len, | 1339 | const u8 *ssid, u8 ssid_len, |
1309 | struct ieee80211_channel *chan); | 1340 | struct ieee80211_channel *chan, |
1341 | enum nl80211_bss_scan_width scan_width); | ||
1310 | int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, | 1342 | int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, |
1311 | struct cfg80211_scan_request *req); | 1343 | struct cfg80211_scan_request *req); |
1312 | void ieee80211_scan_cancel(struct ieee80211_local *local); | 1344 | void ieee80211_scan_cancel(struct ieee80211_local *local); |
@@ -1465,7 +1497,8 @@ extern void *mac80211_wiphy_privid; /* for wiphy privid */ | |||
1465 | u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len, | 1497 | u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len, |
1466 | enum nl80211_iftype type); | 1498 | enum nl80211_iftype type); |
1467 | int ieee80211_frame_duration(enum ieee80211_band band, size_t len, | 1499 | int ieee80211_frame_duration(enum ieee80211_band band, size_t len, |
1468 | int rate, int erp, int short_preamble); | 1500 | int rate, int erp, int short_preamble, |
1501 | int shift); | ||
1469 | void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx, | 1502 | void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx, |
1470 | struct ieee80211_hdr *hdr, const u8 *tsc, | 1503 | struct ieee80211_hdr *hdr, const u8 *tsc, |
1471 | gfp_t gfp); | 1504 | gfp_t gfp); |
@@ -1569,7 +1602,7 @@ void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1569 | int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | 1602 | int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, |
1570 | size_t buffer_len, const u8 *ie, size_t ie_len, | 1603 | size_t buffer_len, const u8 *ie, size_t ie_len, |
1571 | enum ieee80211_band band, u32 rate_mask, | 1604 | enum ieee80211_band band, u32 rate_mask, |
1572 | u8 channel); | 1605 | struct cfg80211_chan_def *chandef); |
1573 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, | 1606 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, |
1574 | u8 *dst, u32 ratemask, | 1607 | u8 *dst, u32 ratemask, |
1575 | struct ieee80211_channel *chan, | 1608 | struct ieee80211_channel *chan, |
@@ -1582,10 +1615,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | |||
1582 | u32 ratemask, bool directed, u32 tx_flags, | 1615 | u32 ratemask, bool directed, u32 tx_flags, |
1583 | struct ieee80211_channel *channel, bool scan); | 1616 | struct ieee80211_channel *channel, bool scan); |
1584 | 1617 | ||
1585 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, | 1618 | u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata, |
1586 | const size_t supp_rates_len, | ||
1587 | const u8 *supp_rates); | ||
1588 | u32 ieee80211_sta_get_rates(struct ieee80211_local *local, | ||
1589 | struct ieee802_11_elems *elems, | 1619 | struct ieee802_11_elems *elems, |
1590 | enum ieee80211_band band, u32 *basic_rates); | 1620 | enum ieee80211_band band, u32 *basic_rates); |
1591 | int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata, | 1621 | int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata, |
@@ -1602,6 +1632,9 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | |||
1602 | u16 prot_mode); | 1632 | u16 prot_mode); |
1603 | u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, | 1633 | u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, |
1604 | u32 cap); | 1634 | u32 cap); |
1635 | int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef, | ||
1636 | const struct ieee80211_supported_band *sband, | ||
1637 | const u8 *srates, int srates_len, u32 *rates); | ||
1605 | int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, | 1638 | int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, |
1606 | struct sk_buff *skb, bool need_basic, | 1639 | struct sk_buff *skb, bool need_basic, |
1607 | enum ieee80211_band band); | 1640 | enum ieee80211_band band); |