aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h89
1 files changed, 24 insertions, 65 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 8c026abcb8d9..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
320enum 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 */
333enum work_done_result {
334 WORK_DONE_DESTROY,
335 WORK_DONE_REQUEUE,
336};
337 325
338struct ieee80211_work { 326struct 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 */
@@ -848,13 +823,6 @@ struct ieee80211_local {
848 const struct ieee80211_ops *ops; 823 const struct ieee80211_ops *ops;
849 824
850 /* 825 /*
851 * work stuff, potentially off-channel (in the future)
852 */
853 struct list_head work_list;
854 struct timer_list work_timer;
855 struct work_struct work_work;
856
857 /*
858 * private workqueue to mac80211. mac80211 makes this accessible 826 * private workqueue to mac80211. mac80211 makes this accessible
859 * via ieee80211_queue_work() 827 * via ieee80211_queue_work()
860 */ 828 */
@@ -1088,14 +1056,12 @@ struct ieee80211_local {
1088 } debugfs; 1056 } debugfs;
1089#endif 1057#endif
1090 1058
1091 struct ieee80211_channel *hw_roc_channel; 1059 /*
1092 struct net_device *hw_roc_dev; 1060 * Remain-on-channel support
1093 struct sk_buff *hw_roc_skb, *hw_roc_skb_for_status; 1061 */
1062 struct list_head roc_list;
1094 struct work_struct hw_roc_start, hw_roc_done; 1063 struct work_struct hw_roc_start, hw_roc_done;
1095 enum nl80211_channel_type hw_roc_channel_type; 1064 unsigned long hw_roc_start_time;
1096 unsigned int hw_roc_duration;
1097 u32 hw_roc_cookie;
1098 bool hw_roc_for_tx;
1099 1065
1100 struct idr ack_status_frames; 1066 struct idr ack_status_frames;
1101 spinlock_t ack_status_lock; 1067 spinlock_t ack_status_lock;
@@ -1291,7 +1257,12 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
1291 bool offchannel_ps_enable); 1257 bool offchannel_ps_enable);
1292void ieee80211_offchannel_return(struct ieee80211_local *local, 1258void ieee80211_offchannel_return(struct ieee80211_local *local,
1293 bool offchannel_ps_disable); 1259 bool offchannel_ps_disable);
1294void ieee80211_hw_roc_setup(struct ieee80211_local *local); 1260void ieee80211_roc_setup(struct ieee80211_local *local);
1261void ieee80211_start_next_roc(struct ieee80211_local *local);
1262void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata);
1263void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc);
1264void ieee80211_sw_roc_work(struct work_struct *work);
1265void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc);
1295 1266
1296/* interface handling */ 1267/* interface handling */
1297int ieee80211_iface_init(void); 1268int ieee80211_iface_init(void);
@@ -1501,18 +1472,6 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1501 enum nl80211_channel_type channel_type, 1472 enum nl80211_channel_type channel_type,
1502 u16 prot_mode); 1473 u16 prot_mode);
1503 1474
1504/* internal work items */
1505void ieee80211_work_init(struct ieee80211_local *local);
1506void ieee80211_add_work(struct ieee80211_work *wk);
1507void free_work(struct ieee80211_work *wk);
1508void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata);
1509int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
1510 struct ieee80211_channel *chan,
1511 enum nl80211_channel_type channel_type,
1512 unsigned int duration, u64 *cookie);
1513int ieee80211_wk_cancel_remain_on_channel(
1514 struct ieee80211_sub_if_data *sdata, u64 cookie);
1515
1516/* channel management */ 1475/* channel management */
1517enum ieee80211_chan_mode { 1476enum ieee80211_chan_mode {
1518 CHAN_MODE_UNDEFINED, 1477 CHAN_MODE_UNDEFINED,