diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b0787a1dea90..2a1811366076 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -149,6 +149,7 @@ struct ieee80211_low_level_stats { | |||
149 | * @BSS_CHANGED_ARP_FILTER: Hardware ARP filter address list or state changed. | 149 | * @BSS_CHANGED_ARP_FILTER: Hardware ARP filter address list or state changed. |
150 | * @BSS_CHANGED_QOS: QoS for this association was enabled/disabled. Note | 150 | * @BSS_CHANGED_QOS: QoS for this association was enabled/disabled. Note |
151 | * that it is only ever disabled for station mode. | 151 | * that it is only ever disabled for station mode. |
152 | * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface. | ||
152 | */ | 153 | */ |
153 | enum ieee80211_bss_change { | 154 | enum ieee80211_bss_change { |
154 | BSS_CHANGED_ASSOC = 1<<0, | 155 | BSS_CHANGED_ASSOC = 1<<0, |
@@ -165,6 +166,7 @@ enum ieee80211_bss_change { | |||
165 | BSS_CHANGED_IBSS = 1<<11, | 166 | BSS_CHANGED_IBSS = 1<<11, |
166 | BSS_CHANGED_ARP_FILTER = 1<<12, | 167 | BSS_CHANGED_ARP_FILTER = 1<<12, |
167 | BSS_CHANGED_QOS = 1<<13, | 168 | BSS_CHANGED_QOS = 1<<13, |
169 | BSS_CHANGED_IDLE = 1<<14, | ||
168 | 170 | ||
169 | /* when adding here, make sure to change ieee80211_reconfig */ | 171 | /* when adding here, make sure to change ieee80211_reconfig */ |
170 | }; | 172 | }; |
@@ -223,6 +225,9 @@ enum ieee80211_bss_change { | |||
223 | * hardware must not perform any ARP filtering. Note, that the filter will | 225 | * hardware must not perform any ARP filtering. Note, that the filter will |
224 | * be enabled also in promiscuous mode. | 226 | * be enabled also in promiscuous mode. |
225 | * @qos: This is a QoS-enabled BSS. | 227 | * @qos: This is a QoS-enabled BSS. |
228 | * @idle: This interface is idle. There's also a global idle flag in the | ||
229 | * hardware config which may be more appropriate depending on what | ||
230 | * your driver/device needs to do. | ||
226 | */ | 231 | */ |
227 | struct ieee80211_bss_conf { | 232 | struct ieee80211_bss_conf { |
228 | const u8 *bssid; | 233 | const u8 *bssid; |
@@ -247,6 +252,7 @@ struct ieee80211_bss_conf { | |||
247 | u8 arp_addr_cnt; | 252 | u8 arp_addr_cnt; |
248 | bool arp_filter_enabled; | 253 | bool arp_filter_enabled; |
249 | bool qos; | 254 | bool qos; |
255 | bool idle; | ||
250 | }; | 256 | }; |
251 | 257 | ||
252 | /** | 258 | /** |
@@ -783,20 +789,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) | |||
783 | } | 789 | } |
784 | 790 | ||
785 | /** | 791 | /** |
786 | * enum ieee80211_key_alg - key algorithm | ||
787 | * @ALG_WEP: WEP40 or WEP104 | ||
788 | * @ALG_TKIP: TKIP | ||
789 | * @ALG_CCMP: CCMP (AES) | ||
790 | * @ALG_AES_CMAC: AES-128-CMAC | ||
791 | */ | ||
792 | enum ieee80211_key_alg { | ||
793 | ALG_WEP, | ||
794 | ALG_TKIP, | ||
795 | ALG_CCMP, | ||
796 | ALG_AES_CMAC, | ||
797 | }; | ||
798 | |||
799 | /** | ||
800 | * enum ieee80211_key_flags - key flags | 792 | * enum ieee80211_key_flags - key flags |
801 | * | 793 | * |
802 | * These flags are used for communication about keys between the driver | 794 | * These flags are used for communication about keys between the driver |
@@ -833,7 +825,7 @@ enum ieee80211_key_flags { | |||
833 | * @hw_key_idx: To be set by the driver, this is the key index the driver | 825 | * @hw_key_idx: To be set by the driver, this is the key index the driver |
834 | * wants to be given when a frame is transmitted and needs to be | 826 | * wants to be given when a frame is transmitted and needs to be |
835 | * encrypted in hardware. | 827 | * encrypted in hardware. |
836 | * @alg: The key algorithm. | 828 | * @cipher: The key's cipher suite selector. |
837 | * @flags: key flags, see &enum ieee80211_key_flags. | 829 | * @flags: key flags, see &enum ieee80211_key_flags. |
838 | * @keyidx: the key index (0-3) | 830 | * @keyidx: the key index (0-3) |
839 | * @keylen: key material length | 831 | * @keylen: key material length |
@@ -846,7 +838,7 @@ enum ieee80211_key_flags { | |||
846 | * @iv_len: The IV length for this key type | 838 | * @iv_len: The IV length for this key type |
847 | */ | 839 | */ |
848 | struct ieee80211_key_conf { | 840 | struct ieee80211_key_conf { |
849 | enum ieee80211_key_alg alg; | 841 | u32 cipher; |
850 | u8 icv_len; | 842 | u8 icv_len; |
851 | u8 iv_len; | 843 | u8 iv_len; |
852 | u8 hw_key_idx; | 844 | u8 hw_key_idx; |
@@ -1102,6 +1094,10 @@ enum ieee80211_hw_flags { | |||
1102 | * | 1094 | * |
1103 | * @max_rates: maximum number of alternate rate retry stages | 1095 | * @max_rates: maximum number of alternate rate retry stages |
1104 | * @max_rate_tries: maximum number of tries for each stage | 1096 | * @max_rate_tries: maximum number of tries for each stage |
1097 | * | ||
1098 | * @napi_weight: weight used for NAPI polling. You must specify an | ||
1099 | * appropriate value here if a napi_poll operation is provided | ||
1100 | * by your driver. | ||
1105 | */ | 1101 | */ |
1106 | struct ieee80211_hw { | 1102 | struct ieee80211_hw { |
1107 | struct ieee80211_conf conf; | 1103 | struct ieee80211_conf conf; |
@@ -1113,6 +1109,7 @@ struct ieee80211_hw { | |||
1113 | int channel_change_time; | 1109 | int channel_change_time; |
1114 | int vif_data_size; | 1110 | int vif_data_size; |
1115 | int sta_data_size; | 1111 | int sta_data_size; |
1112 | int napi_weight; | ||
1116 | u16 queues; | 1113 | u16 queues; |
1117 | u16 max_listen_interval; | 1114 | u16 max_listen_interval; |
1118 | s8 max_signal; | 1115 | s8 max_signal; |
@@ -1687,6 +1684,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1687 | * switch operation for CSAs received from the AP may implement this | 1684 | * switch operation for CSAs received from the AP may implement this |
1688 | * callback. They must then call ieee80211_chswitch_done() to indicate | 1685 | * callback. They must then call ieee80211_chswitch_done() to indicate |
1689 | * completion of the channel switch. | 1686 | * completion of the channel switch. |
1687 | * | ||
1688 | * @napi_poll: Poll Rx queue for incoming data frames. | ||
1690 | */ | 1689 | */ |
1691 | struct ieee80211_ops { | 1690 | struct ieee80211_ops { |
1692 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1691 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -1752,6 +1751,7 @@ struct ieee80211_ops { | |||
1752 | void (*flush)(struct ieee80211_hw *hw, bool drop); | 1751 | void (*flush)(struct ieee80211_hw *hw, bool drop); |
1753 | void (*channel_switch)(struct ieee80211_hw *hw, | 1752 | void (*channel_switch)(struct ieee80211_hw *hw, |
1754 | struct ieee80211_channel_switch *ch_switch); | 1753 | struct ieee80211_channel_switch *ch_switch); |
1754 | int (*napi_poll)(struct ieee80211_hw *hw, int budget); | ||
1755 | }; | 1755 | }; |
1756 | 1756 | ||
1757 | /** | 1757 | /** |
@@ -1897,6 +1897,22 @@ void ieee80211_free_hw(struct ieee80211_hw *hw); | |||
1897 | */ | 1897 | */ |
1898 | void ieee80211_restart_hw(struct ieee80211_hw *hw); | 1898 | void ieee80211_restart_hw(struct ieee80211_hw *hw); |
1899 | 1899 | ||
1900 | /** ieee80211_napi_schedule - schedule NAPI poll | ||
1901 | * | ||
1902 | * Use this function to schedule NAPI polling on a device. | ||
1903 | * | ||
1904 | * @hw: the hardware to start polling | ||
1905 | */ | ||
1906 | void ieee80211_napi_schedule(struct ieee80211_hw *hw); | ||
1907 | |||
1908 | /** ieee80211_napi_complete - complete NAPI polling | ||
1909 | * | ||
1910 | * Use this function to finish NAPI polling on a device. | ||
1911 | * | ||
1912 | * @hw: the hardware to stop polling | ||
1913 | */ | ||
1914 | void ieee80211_napi_complete(struct ieee80211_hw *hw); | ||
1915 | |||
1900 | /** | 1916 | /** |
1901 | * ieee80211_rx - receive frame | 1917 | * ieee80211_rx - receive frame |
1902 | * | 1918 | * |
@@ -2518,6 +2534,18 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, | |||
2518 | */ | 2534 | */ |
2519 | void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success); | 2535 | void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success); |
2520 | 2536 | ||
2537 | /** | ||
2538 | * ieee80211_request_smps - request SM PS transition | ||
2539 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2540 | * @smps_mode: new SM PS mode | ||
2541 | * | ||
2542 | * This allows the driver to request an SM PS transition in managed | ||
2543 | * mode. This is useful when the driver has more information than | ||
2544 | * the stack about possible interference, for example by bluetooth. | ||
2545 | */ | ||
2546 | void ieee80211_request_smps(struct ieee80211_vif *vif, | ||
2547 | enum ieee80211_smps_mode smps_mode); | ||
2548 | |||
2521 | /* Rate control API */ | 2549 | /* Rate control API */ |
2522 | 2550 | ||
2523 | /** | 2551 | /** |