diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 75 |
1 files changed, 58 insertions, 17 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index b80c38689927..c47d7c0e48a4 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/etherdevice.h> | 25 | #include <linux/etherdevice.h> |
26 | #include <linux/leds.h> | ||
26 | #include <net/ieee80211_radiotap.h> | 27 | #include <net/ieee80211_radiotap.h> |
27 | #include <net/cfg80211.h> | 28 | #include <net/cfg80211.h> |
28 | #include <net/mac80211.h> | 29 | #include <net/mac80211.h> |
@@ -167,6 +168,7 @@ typedef unsigned __bitwise__ ieee80211_rx_result; | |||
167 | * @IEEE80211_RX_FRAGMENTED: fragmented frame | 168 | * @IEEE80211_RX_FRAGMENTED: fragmented frame |
168 | * @IEEE80211_RX_AMSDU: a-MSDU packet | 169 | * @IEEE80211_RX_AMSDU: a-MSDU packet |
169 | * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed | 170 | * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed |
171 | * @IEEE80211_RX_DEFERRED_RELEASE: frame was subjected to receive reordering | ||
170 | * | 172 | * |
171 | * These are per-frame flags that are attached to a frame in the | 173 | * These are per-frame flags that are attached to a frame in the |
172 | * @rx_flags field of &struct ieee80211_rx_status. | 174 | * @rx_flags field of &struct ieee80211_rx_status. |
@@ -177,6 +179,7 @@ enum ieee80211_packet_rx_flags { | |||
177 | IEEE80211_RX_FRAGMENTED = BIT(2), | 179 | IEEE80211_RX_FRAGMENTED = BIT(2), |
178 | IEEE80211_RX_AMSDU = BIT(3), | 180 | IEEE80211_RX_AMSDU = BIT(3), |
179 | IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4), | 181 | IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4), |
182 | IEEE80211_RX_DEFERRED_RELEASE = BIT(5), | ||
180 | }; | 183 | }; |
181 | 184 | ||
182 | /** | 185 | /** |
@@ -260,6 +263,7 @@ enum ieee80211_work_type { | |||
260 | IEEE80211_WORK_ASSOC_BEACON_WAIT, | 263 | IEEE80211_WORK_ASSOC_BEACON_WAIT, |
261 | IEEE80211_WORK_ASSOC, | 264 | IEEE80211_WORK_ASSOC, |
262 | IEEE80211_WORK_REMAIN_ON_CHANNEL, | 265 | IEEE80211_WORK_REMAIN_ON_CHANNEL, |
266 | IEEE80211_WORK_OFFCHANNEL_TX, | ||
263 | }; | 267 | }; |
264 | 268 | ||
265 | /** | 269 | /** |
@@ -320,6 +324,10 @@ struct ieee80211_work { | |||
320 | struct { | 324 | struct { |
321 | u32 duration; | 325 | u32 duration; |
322 | } remain; | 326 | } remain; |
327 | struct { | ||
328 | struct sk_buff *frame; | ||
329 | u32 wait; | ||
330 | } offchan_tx; | ||
323 | }; | 331 | }; |
324 | 332 | ||
325 | int ie_len; | 333 | int ie_len; |
@@ -349,8 +357,10 @@ struct ieee80211_if_managed { | |||
349 | struct work_struct chswitch_work; | 357 | struct work_struct chswitch_work; |
350 | struct work_struct beacon_connection_loss_work; | 358 | struct work_struct beacon_connection_loss_work; |
351 | 359 | ||
360 | unsigned long beacon_timeout; | ||
352 | unsigned long probe_timeout; | 361 | unsigned long probe_timeout; |
353 | int probe_send_count; | 362 | int probe_send_count; |
363 | bool nullfunc_failed; | ||
354 | 364 | ||
355 | struct mutex mtx; | 365 | struct mutex mtx; |
356 | struct cfg80211_bss *associated; | 366 | struct cfg80211_bss *associated; |
@@ -477,6 +487,8 @@ struct ieee80211_if_mesh { | |||
477 | struct mesh_config mshcfg; | 487 | struct mesh_config mshcfg; |
478 | u32 mesh_seqnum; | 488 | u32 mesh_seqnum; |
479 | bool accepting_plinks; | 489 | bool accepting_plinks; |
490 | const u8 *vendor_ie; | ||
491 | u8 vendor_ie_len; | ||
480 | }; | 492 | }; |
481 | 493 | ||
482 | #ifdef CONFIG_MAC80211_MESH | 494 | #ifdef CONFIG_MAC80211_MESH |
@@ -550,7 +562,7 @@ struct ieee80211_sub_if_data { | |||
550 | unsigned int fragment_next; | 562 | unsigned int fragment_next; |
551 | 563 | ||
552 | struct ieee80211_key *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]; | 564 | struct ieee80211_key *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]; |
553 | struct ieee80211_key *default_key; | 565 | struct ieee80211_key *default_unicast_key, *default_multicast_key; |
554 | struct ieee80211_key *default_mgmt_key; | 566 | struct ieee80211_key *default_mgmt_key; |
555 | 567 | ||
556 | u16 sequence_number; | 568 | u16 sequence_number; |
@@ -578,9 +590,7 @@ struct ieee80211_sub_if_data { | |||
578 | struct ieee80211_if_vlan vlan; | 590 | struct ieee80211_if_vlan vlan; |
579 | struct ieee80211_if_managed mgd; | 591 | struct ieee80211_if_managed mgd; |
580 | struct ieee80211_if_ibss ibss; | 592 | struct ieee80211_if_ibss ibss; |
581 | #ifdef CONFIG_MAC80211_MESH | ||
582 | struct ieee80211_if_mesh mesh; | 593 | struct ieee80211_if_mesh mesh; |
583 | #endif | ||
584 | u32 mntr_flags; | 594 | u32 mntr_flags; |
585 | } u; | 595 | } u; |
586 | 596 | ||
@@ -588,7 +598,8 @@ struct ieee80211_sub_if_data { | |||
588 | struct { | 598 | struct { |
589 | struct dentry *dir; | 599 | struct dentry *dir; |
590 | struct dentry *subdir_stations; | 600 | struct dentry *subdir_stations; |
591 | struct dentry *default_key; | 601 | struct dentry *default_unicast_key; |
602 | struct dentry *default_multicast_key; | ||
592 | struct dentry *default_mgmt_key; | 603 | struct dentry *default_mgmt_key; |
593 | } debugfs; | 604 | } debugfs; |
594 | #endif | 605 | #endif |
@@ -602,19 +613,6 @@ struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p) | |||
602 | return container_of(p, struct ieee80211_sub_if_data, vif); | 613 | return container_of(p, struct ieee80211_sub_if_data, vif); |
603 | } | 614 | } |
604 | 615 | ||
605 | static inline void | ||
606 | ieee80211_sdata_set_mesh_id(struct ieee80211_sub_if_data *sdata, | ||
607 | u8 mesh_id_len, u8 *mesh_id) | ||
608 | { | ||
609 | #ifdef CONFIG_MAC80211_MESH | ||
610 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | ||
611 | ifmsh->mesh_id_len = mesh_id_len; | ||
612 | memcpy(ifmsh->mesh_id, mesh_id, mesh_id_len); | ||
613 | #else | ||
614 | WARN_ON(1); | ||
615 | #endif | ||
616 | } | ||
617 | |||
618 | enum sdata_queue_type { | 616 | enum sdata_queue_type { |
619 | IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, | 617 | IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, |
620 | IEEE80211_SDATA_QUEUE_AGG_START = 1, | 618 | IEEE80211_SDATA_QUEUE_AGG_START = 1, |
@@ -635,6 +633,20 @@ enum queue_stop_reason { | |||
635 | IEEE80211_QUEUE_STOP_REASON_SKB_ADD, | 633 | IEEE80211_QUEUE_STOP_REASON_SKB_ADD, |
636 | }; | 634 | }; |
637 | 635 | ||
636 | #ifdef CONFIG_MAC80211_LEDS | ||
637 | struct tpt_led_trigger { | ||
638 | struct led_trigger trig; | ||
639 | char name[32]; | ||
640 | const struct ieee80211_tpt_blink *blink_table; | ||
641 | unsigned int blink_table_len; | ||
642 | struct timer_list timer; | ||
643 | unsigned long prev_traffic; | ||
644 | unsigned long tx_bytes, rx_bytes; | ||
645 | unsigned int active, want; | ||
646 | bool running; | ||
647 | }; | ||
648 | #endif | ||
649 | |||
638 | /** | 650 | /** |
639 | * mac80211 scan flags - currently active scan mode | 651 | * mac80211 scan flags - currently active scan mode |
640 | * | 652 | * |
@@ -764,6 +776,15 @@ struct ieee80211_local { | |||
764 | struct sk_buff_head skb_queue; | 776 | struct sk_buff_head skb_queue; |
765 | struct sk_buff_head skb_queue_unreliable; | 777 | struct sk_buff_head skb_queue_unreliable; |
766 | 778 | ||
779 | /* | ||
780 | * Internal FIFO queue which is shared between multiple rx path | ||
781 | * stages. Its main task is to provide a serialization mechanism, | ||
782 | * so all rx handlers can enjoy having exclusive access to their | ||
783 | * private data structures. | ||
784 | */ | ||
785 | struct sk_buff_head rx_skb_queue; | ||
786 | bool running_rx_handler; /* protected by rx_skb_queue.lock */ | ||
787 | |||
767 | /* Station data */ | 788 | /* Station data */ |
768 | /* | 789 | /* |
769 | * The mutex only protects the list and counter, | 790 | * The mutex only protects the list and counter, |
@@ -843,6 +864,7 @@ struct ieee80211_local { | |||
843 | #ifdef CONFIG_MAC80211_LEDS | 864 | #ifdef CONFIG_MAC80211_LEDS |
844 | int tx_led_counter, rx_led_counter; | 865 | int tx_led_counter, rx_led_counter; |
845 | struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led; | 866 | struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led; |
867 | struct tpt_led_trigger *tpt_led_trigger; | ||
846 | char tx_led_name[32], rx_led_name[32], | 868 | char tx_led_name[32], rx_led_name[32], |
847 | assoc_led_name[32], radio_led_name[32]; | 869 | assoc_led_name[32], radio_led_name[32]; |
848 | #endif | 870 | #endif |
@@ -929,6 +951,15 @@ struct ieee80211_local { | |||
929 | } debugfs; | 951 | } debugfs; |
930 | #endif | 952 | #endif |
931 | 953 | ||
954 | struct ieee80211_channel *hw_roc_channel; | ||
955 | struct net_device *hw_roc_dev; | ||
956 | struct sk_buff *hw_roc_skb; | ||
957 | struct work_struct hw_roc_start, hw_roc_done; | ||
958 | enum nl80211_channel_type hw_roc_channel_type; | ||
959 | unsigned int hw_roc_duration; | ||
960 | u32 hw_roc_cookie; | ||
961 | bool hw_roc_for_tx; | ||
962 | |||
932 | /* dummy netdev for use w/ NAPI */ | 963 | /* dummy netdev for use w/ NAPI */ |
933 | struct net_device napi_dev; | 964 | struct net_device napi_dev; |
934 | 965 | ||
@@ -1120,6 +1151,7 @@ void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local); | |||
1120 | void ieee80211_offchannel_stop_station(struct ieee80211_local *local); | 1151 | void ieee80211_offchannel_stop_station(struct ieee80211_local *local); |
1121 | void ieee80211_offchannel_return(struct ieee80211_local *local, | 1152 | void ieee80211_offchannel_return(struct ieee80211_local *local, |
1122 | bool enable_beaconing); | 1153 | bool enable_beaconing); |
1154 | void ieee80211_hw_roc_setup(struct ieee80211_local *local); | ||
1123 | 1155 | ||
1124 | /* interface handling */ | 1156 | /* interface handling */ |
1125 | int ieee80211_iface_init(void); | 1157 | int ieee80211_iface_init(void); |
@@ -1264,6 +1296,8 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local, | |||
1264 | int powersave); | 1296 | int powersave); |
1265 | void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, | 1297 | void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, |
1266 | struct ieee80211_hdr *hdr); | 1298 | struct ieee80211_hdr *hdr); |
1299 | void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata, | ||
1300 | struct ieee80211_hdr *hdr, bool ack); | ||
1267 | void ieee80211_beacon_connection_loss_work(struct work_struct *work); | 1301 | void ieee80211_beacon_connection_loss_work(struct work_struct *work); |
1268 | 1302 | ||
1269 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, | 1303 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, |
@@ -1278,6 +1312,9 @@ void ieee80211_add_pending_skb(struct ieee80211_local *local, | |||
1278 | struct sk_buff *skb); | 1312 | struct sk_buff *skb); |
1279 | int ieee80211_add_pending_skbs(struct ieee80211_local *local, | 1313 | int ieee80211_add_pending_skbs(struct ieee80211_local *local, |
1280 | struct sk_buff_head *skbs); | 1314 | struct sk_buff_head *skbs); |
1315 | int ieee80211_add_pending_skbs_fn(struct ieee80211_local *local, | ||
1316 | struct sk_buff_head *skbs, | ||
1317 | void (*fn)(void *data), void *data); | ||
1281 | 1318 | ||
1282 | void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | 1319 | void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, |
1283 | u16 transaction, u16 auth_alg, | 1320 | u16 transaction, u16 auth_alg, |
@@ -1287,6 +1324,10 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | |||
1287 | const u8 *ie, size_t ie_len, | 1324 | const u8 *ie, size_t ie_len, |
1288 | enum ieee80211_band band, u32 rate_mask, | 1325 | enum ieee80211_band band, u32 rate_mask, |
1289 | u8 channel); | 1326 | u8 channel); |
1327 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, | ||
1328 | u8 *dst, | ||
1329 | const u8 *ssid, size_t ssid_len, | ||
1330 | const u8 *ie, size_t ie_len); | ||
1290 | void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | 1331 | void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, |
1291 | const u8 *ssid, size_t ssid_len, | 1332 | const u8 *ssid, size_t ssid_len, |
1292 | const u8 *ie, size_t ie_len); | 1333 | const u8 *ie, size_t ie_len); |