diff options
author | David Spinadel <david.spinadel@intel.com> | 2014-02-05 08:21:13 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-06-25 03:10:42 -0400 |
commit | c56ef6725068c0ce499e517409c0da226ef51b08 (patch) | |
tree | 75133e7a2b9df5b2d6a2766e6fee024ba6fd17af /include/net/mac80211.h | |
parent | ee10f2c779b28c1d6e87ac3e1bbb1aa8b62fa891 (diff) |
mac80211: support more than one band in scan request
Some drivers (such as iwlmvm) can handle multiple bands in a single
HW scan request. Add a HW flag to indicate that the driver support
this. To hold the required data, create a separate structure for
HW scan request that holds cfg scan request and data about
different parts of the scan IEs.
As this changes the mac80211 API, update all drivers using it to
use the correct new function type/argument.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 18c2bdbaf988..9536ee3e22a9 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -768,6 +768,26 @@ struct ieee80211_sched_scan_ies { | |||
768 | size_t len[IEEE80211_NUM_BANDS]; | 768 | size_t len[IEEE80211_NUM_BANDS]; |
769 | }; | 769 | }; |
770 | 770 | ||
771 | /** | ||
772 | * struct ieee80211_scan_ies - descriptors for different blocks of IEs | ||
773 | * | ||
774 | * This structure is used to point to different blocks of IEs in HW scan. | ||
775 | * These blocks contain the IEs passed by userspace and the ones generated | ||
776 | * by mac80211. | ||
777 | * | ||
778 | * @ies: pointers to band specific IEs. | ||
779 | * @len: lengths of band_specific IEs. | ||
780 | * @common_ies: IEs for all bands (especially vendor specific ones) | ||
781 | * @common_ie_len: length of the common_ies | ||
782 | */ | ||
783 | struct ieee80211_scan_ies { | ||
784 | const u8 *ies[IEEE80211_NUM_BANDS]; | ||
785 | size_t len[IEEE80211_NUM_BANDS]; | ||
786 | const u8 *common_ies; | ||
787 | size_t common_ie_len; | ||
788 | }; | ||
789 | |||
790 | |||
771 | static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) | 791 | static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) |
772 | { | 792 | { |
773 | return (struct ieee80211_tx_info *)skb->cb; | 793 | return (struct ieee80211_tx_info *)skb->cb; |
@@ -1606,6 +1626,9 @@ struct ieee80211_tx_control { | |||
1606 | * on single-channel hardware. It can also be used as an | 1626 | * on single-channel hardware. It can also be used as an |
1607 | * optimization in certain channel switch cases with | 1627 | * optimization in certain channel switch cases with |
1608 | * multi-channel. | 1628 | * multi-channel. |
1629 | * | ||
1630 | * @IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS: The HW supports scanning on all bands | ||
1631 | * in one command, mac80211 doesn't have to run separate scans per band. | ||
1609 | */ | 1632 | */ |
1610 | enum ieee80211_hw_flags { | 1633 | enum ieee80211_hw_flags { |
1611 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1634 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -1638,6 +1661,7 @@ enum ieee80211_hw_flags { | |||
1638 | IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27, | 1661 | IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27, |
1639 | IEEE80211_HW_CHANCTX_STA_CSA = 1<<28, | 1662 | IEEE80211_HW_CHANCTX_STA_CSA = 1<<28, |
1640 | IEEE80211_HW_CHANGE_RUNNING_CHANCTX = 1<<29, | 1663 | IEEE80211_HW_CHANGE_RUNNING_CHANCTX = 1<<29, |
1664 | IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS = 1<<30, | ||
1641 | }; | 1665 | }; |
1642 | 1666 | ||
1643 | /** | 1667 | /** |
@@ -1764,6 +1788,19 @@ struct ieee80211_hw { | |||
1764 | }; | 1788 | }; |
1765 | 1789 | ||
1766 | /** | 1790 | /** |
1791 | * struct ieee80211_scan_request - hw scan request | ||
1792 | * | ||
1793 | * @ies: pointers different parts of IEs (in req.ie) | ||
1794 | * @req: cfg80211 request. | ||
1795 | */ | ||
1796 | struct ieee80211_scan_request { | ||
1797 | struct ieee80211_scan_ies ies; | ||
1798 | |||
1799 | /* Keep last */ | ||
1800 | struct cfg80211_scan_request req; | ||
1801 | }; | ||
1802 | |||
1803 | /** | ||
1767 | * wiphy_to_ieee80211_hw - return a mac80211 driver hw struct from a wiphy | 1804 | * wiphy_to_ieee80211_hw - return a mac80211 driver hw struct from a wiphy |
1768 | * | 1805 | * |
1769 | * @wiphy: the &struct wiphy which we want to query | 1806 | * @wiphy: the &struct wiphy which we want to query |
@@ -2874,7 +2911,7 @@ struct ieee80211_ops { | |||
2874 | void (*set_default_unicast_key)(struct ieee80211_hw *hw, | 2911 | void (*set_default_unicast_key)(struct ieee80211_hw *hw, |
2875 | struct ieee80211_vif *vif, int idx); | 2912 | struct ieee80211_vif *vif, int idx); |
2876 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2913 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
2877 | struct cfg80211_scan_request *req); | 2914 | struct ieee80211_scan_request *req); |
2878 | void (*cancel_hw_scan)(struct ieee80211_hw *hw, | 2915 | void (*cancel_hw_scan)(struct ieee80211_hw *hw, |
2879 | struct ieee80211_vif *vif); | 2916 | struct ieee80211_vif *vif); |
2880 | int (*sched_scan_start)(struct ieee80211_hw *hw, | 2917 | int (*sched_scan_start)(struct ieee80211_hw *hw, |