0001
0002
0003
0004
0005
0006
0007
0008 #ifndef WFX_QUEUE_H
0009 #define WFX_QUEUE_H
0010
0011 #include <linux/skbuff.h>
0012 #include <linux/atomic.h>
0013
0014 struct wfx_dev;
0015 struct wfx_vif;
0016
0017 struct wfx_queue {
0018 struct sk_buff_head normal;
0019 struct sk_buff_head cab;
0020 atomic_t pending_frames;
0021 int priority;
0022 };
0023
0024 void wfx_tx_lock(struct wfx_dev *wdev);
0025 void wfx_tx_unlock(struct wfx_dev *wdev);
0026 void wfx_tx_flush(struct wfx_dev *wdev);
0027 void wfx_tx_lock_flush(struct wfx_dev *wdev);
0028
0029 void wfx_tx_queues_init(struct wfx_vif *wvif);
0030 void wfx_tx_queues_check_empty(struct wfx_vif *wvif);
0031 bool wfx_tx_queues_has_cab(struct wfx_vif *wvif);
0032 void wfx_tx_queues_put(struct wfx_vif *wvif, struct sk_buff *skb);
0033 struct wfx_hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev);
0034
0035 bool wfx_tx_queue_empty(struct wfx_vif *wvif, struct wfx_queue *queue);
0036 void wfx_tx_queue_drop(struct wfx_vif *wvif, struct wfx_queue *queue,
0037 struct sk_buff_head *dropped);
0038
0039 struct sk_buff *wfx_pending_get(struct wfx_dev *wdev, u32 packet_id);
0040 void wfx_pending_drop(struct wfx_dev *wdev, struct sk_buff_head *dropped);
0041 unsigned int wfx_pending_get_pkt_us_delay(struct wfx_dev *wdev, struct sk_buff *skb);
0042 void wfx_pending_dump_old_frames(struct wfx_dev *wdev, unsigned int limit_ms);
0043
0044 #endif