diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 92 |
1 files changed, 26 insertions, 66 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 3f3cd50fff16..e6cbf5b68c89 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -317,55 +317,30 @@ struct mesh_preq_queue { | |||
317 | u8 flags; | 317 | u8 flags; |
318 | }; | 318 | }; |
319 | 319 | ||
320 | enum ieee80211_work_type { | 320 | #if HZ/100 == 0 |
321 | IEEE80211_WORK_ABORT, | 321 | #define IEEE80211_ROC_MIN_LEFT 1 |
322 | IEEE80211_WORK_REMAIN_ON_CHANNEL, | 322 | #else |
323 | IEEE80211_WORK_OFFCHANNEL_TX, | 323 | #define IEEE80211_ROC_MIN_LEFT (HZ/100) |
324 | }; | 324 | #endif |
325 | |||
326 | /** | ||
327 | * enum work_done_result - indicates what to do after work was done | ||
328 | * | ||
329 | * @WORK_DONE_DESTROY: This work item is no longer needed, destroy. | ||
330 | * @WORK_DONE_REQUEUE: This work item was reset to be reused, and | ||
331 | * should be requeued. | ||
332 | */ | ||
333 | enum work_done_result { | ||
334 | WORK_DONE_DESTROY, | ||
335 | WORK_DONE_REQUEUE, | ||
336 | }; | ||
337 | 325 | ||
338 | struct ieee80211_work { | 326 | struct ieee80211_roc_work { |
339 | struct list_head list; | 327 | struct list_head list; |
328 | struct list_head dependents; | ||
340 | 329 | ||
341 | struct rcu_head rcu_head; | 330 | struct delayed_work work; |
342 | 331 | ||
343 | struct ieee80211_sub_if_data *sdata; | 332 | struct ieee80211_sub_if_data *sdata; |
344 | 333 | ||
345 | enum work_done_result (*done)(struct ieee80211_work *wk, | ||
346 | struct sk_buff *skb); | ||
347 | |||
348 | struct ieee80211_channel *chan; | 334 | struct ieee80211_channel *chan; |
349 | enum nl80211_channel_type chan_type; | 335 | enum nl80211_channel_type chan_type; |
350 | 336 | ||
351 | unsigned long timeout; | 337 | bool started, abort, hw_begun, notified; |
352 | enum ieee80211_work_type type; | ||
353 | 338 | ||
354 | bool started; | 339 | unsigned long hw_start_time; |
355 | 340 | ||
356 | union { | 341 | u32 duration, req_duration; |
357 | struct { | 342 | struct sk_buff *frame; |
358 | u32 duration; | 343 | u64 mgmt_tx_cookie; |
359 | } remain; | ||
360 | struct { | ||
361 | struct sk_buff *frame; | ||
362 | u32 wait; | ||
363 | bool status; | ||
364 | } offchan_tx; | ||
365 | }; | ||
366 | |||
367 | size_t data_len; | ||
368 | u8 data[]; | ||
369 | }; | 344 | }; |
370 | 345 | ||
371 | /* flags used in struct ieee80211_if_managed.flags */ | 346 | /* flags used in struct ieee80211_if_managed.flags */ |
@@ -399,7 +374,6 @@ struct ieee80211_mgd_auth_data { | |||
399 | struct ieee80211_mgd_assoc_data { | 374 | struct ieee80211_mgd_assoc_data { |
400 | struct cfg80211_bss *bss; | 375 | struct cfg80211_bss *bss; |
401 | const u8 *supp_rates; | 376 | const u8 *supp_rates; |
402 | const u8 *ht_operation_ie; | ||
403 | 377 | ||
404 | unsigned long timeout; | 378 | unsigned long timeout; |
405 | int tries; | 379 | int tries; |
@@ -414,6 +388,8 @@ struct ieee80211_mgd_assoc_data { | |||
414 | bool sent_assoc; | 388 | bool sent_assoc; |
415 | bool synced; | 389 | bool synced; |
416 | 390 | ||
391 | u8 ap_ht_param; | ||
392 | |||
417 | size_t ie_len; | 393 | size_t ie_len; |
418 | u8 ie[]; | 394 | u8 ie[]; |
419 | }; | 395 | }; |
@@ -847,13 +823,6 @@ struct ieee80211_local { | |||
847 | const struct ieee80211_ops *ops; | 823 | const struct ieee80211_ops *ops; |
848 | 824 | ||
849 | /* | 825 | /* |
850 | * work stuff, potentially off-channel (in the future) | ||
851 | */ | ||
852 | struct list_head work_list; | ||
853 | struct timer_list work_timer; | ||
854 | struct work_struct work_work; | ||
855 | |||
856 | /* | ||
857 | * private workqueue to mac80211. mac80211 makes this accessible | 826 | * private workqueue to mac80211. mac80211 makes this accessible |
858 | * via ieee80211_queue_work() | 827 | * via ieee80211_queue_work() |
859 | */ | 828 | */ |
@@ -1087,14 +1056,12 @@ struct ieee80211_local { | |||
1087 | } debugfs; | 1056 | } debugfs; |
1088 | #endif | 1057 | #endif |
1089 | 1058 | ||
1090 | struct ieee80211_channel *hw_roc_channel; | 1059 | /* |
1091 | struct net_device *hw_roc_dev; | 1060 | * Remain-on-channel support |
1092 | struct sk_buff *hw_roc_skb, *hw_roc_skb_for_status; | 1061 | */ |
1062 | struct list_head roc_list; | ||
1093 | struct work_struct hw_roc_start, hw_roc_done; | 1063 | struct work_struct hw_roc_start, hw_roc_done; |
1094 | enum nl80211_channel_type hw_roc_channel_type; | 1064 | unsigned long hw_roc_start_time; |
1095 | unsigned int hw_roc_duration; | ||
1096 | u32 hw_roc_cookie; | ||
1097 | bool hw_roc_for_tx; | ||
1098 | 1065 | ||
1099 | struct idr ack_status_frames; | 1066 | struct idr ack_status_frames; |
1100 | spinlock_t ack_status_lock; | 1067 | spinlock_t ack_status_lock; |
@@ -1290,7 +1257,12 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | |||
1290 | bool offchannel_ps_enable); | 1257 | bool offchannel_ps_enable); |
1291 | void ieee80211_offchannel_return(struct ieee80211_local *local, | 1258 | void ieee80211_offchannel_return(struct ieee80211_local *local, |
1292 | bool offchannel_ps_disable); | 1259 | bool offchannel_ps_disable); |
1293 | void ieee80211_hw_roc_setup(struct ieee80211_local *local); | 1260 | void ieee80211_roc_setup(struct ieee80211_local *local); |
1261 | void ieee80211_start_next_roc(struct ieee80211_local *local); | ||
1262 | void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata); | ||
1263 | void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc); | ||
1264 | void ieee80211_sw_roc_work(struct work_struct *work); | ||
1265 | void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); | ||
1294 | 1266 | ||
1295 | /* interface handling */ | 1267 | /* interface handling */ |
1296 | int ieee80211_iface_init(void); | 1268 | int ieee80211_iface_init(void); |
@@ -1500,18 +1472,6 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | |||
1500 | enum nl80211_channel_type channel_type, | 1472 | enum nl80211_channel_type channel_type, |
1501 | u16 prot_mode); | 1473 | u16 prot_mode); |
1502 | 1474 | ||
1503 | /* internal work items */ | ||
1504 | void ieee80211_work_init(struct ieee80211_local *local); | ||
1505 | void ieee80211_add_work(struct ieee80211_work *wk); | ||
1506 | void free_work(struct ieee80211_work *wk); | ||
1507 | void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata); | ||
1508 | int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata, | ||
1509 | struct ieee80211_channel *chan, | ||
1510 | enum nl80211_channel_type channel_type, | ||
1511 | unsigned int duration, u64 *cookie); | ||
1512 | int ieee80211_wk_cancel_remain_on_channel( | ||
1513 | struct ieee80211_sub_if_data *sdata, u64 cookie); | ||
1514 | |||
1515 | /* channel management */ | 1475 | /* channel management */ |
1516 | enum ieee80211_chan_mode { | 1476 | enum ieee80211_chan_mode { |
1517 | CHAN_MODE_UNDEFINED, | 1477 | CHAN_MODE_UNDEFINED, |