diff options
author | Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | 2011-05-16 09:41:37 +0200 |
---|---|---|
committer | Robert Marklund <robert.marklund@stericsson.com> | 2011-10-05 12:12:27 +0200 |
commit | ab9a186770c4b3d3d825047a688d173f9a3a2e2d (patch) | |
tree | 7b7bf1eceae08f15dcd25c9518d6dd77c1111042 /drivers/staging/cw1200/queue.h | |
parent | 7c399d9287d00678a9641a46ee3af2be848c9f81 (diff) |
wlan: cw1200: .flush mac80211 API is implemented.
- .flush mac80211 API is implemented (expected to be called from
mac80211 off_channel code).
- TX queue statistics is implemented.
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Change-Id: If228ceccd856b699236999122c9989d0eca1e98d
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23604
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/queue.h')
-rw-r--r-- | drivers/staging/cw1200/queue.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/drivers/staging/cw1200/queue.h b/drivers/staging/cw1200/queue.h index a87505defba..fc5d4613efb 100644 --- a/drivers/staging/cw1200/queue.h +++ b/drivers/staging/cw1200/queue.h @@ -19,7 +19,10 @@ /* extern */ struct cw1200_common; /* extern */ struct ieee80211_tx_queue_stats; +/* forward */ struct cw1200_queue_stats; + struct cw1200_queue { + struct cw1200_queue_stats *stats; size_t capacity; size_t num_queued; size_t num_pending; @@ -30,24 +33,36 @@ struct cw1200_queue { struct list_head pending; int tx_locked_cnt; int *link_map_cache; - size_t map_capacity; bool overfull; spinlock_t lock; u8 queue_id; u8 generation; }; -int cw1200_queue_init(struct cw1200_queue *queue, u8 queue_id, - size_t capacity, size_t map_capacity); +struct cw1200_queue_stats { + spinlock_t lock; + int *link_map_cache; + int num_queued; + size_t map_capacity; + wait_queue_head_t wait_link_id_empty; +}; + +int cw1200_queue_stats_init(struct cw1200_queue_stats *stats, + size_t map_capacity); +int cw1200_queue_init(struct cw1200_queue *queue, + struct cw1200_queue_stats *stats, + u8 queue_id, + size_t capacity); int cw1200_queue_clear(struct cw1200_queue *queue); -int cw1200_queue_deinit(struct cw1200_queue *queue); +void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats); +void cw1200_queue_deinit(struct cw1200_queue *queue); size_t cw1200_queue_get_num_queued(struct cw1200_queue *queue, - u32 allowed_mask); + u32 link_id_map); int cw1200_queue_put(struct cw1200_queue *queue, struct cw1200_common *cw1200, struct sk_buff *skb, u8 link_id); int cw1200_queue_get(struct cw1200_queue *queue, - u32 allowed_mask, + u32 link_id_map, struct wsm_tx **tx, struct ieee80211_tx_info **tx_info); int cw1200_queue_requeue(struct cw1200_queue *queue, u32 packetID); @@ -61,6 +76,9 @@ void cw1200_queue_lock(struct cw1200_queue *queue, void cw1200_queue_unlock(struct cw1200_queue *queue, struct cw1200_common *cw1200); +bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats, + u32 link_id_map); + /* int cw1200_queue_get_stats(struct cw1200_queue *queue, struct ieee80211_tx_queue_stats *stats); */ |