summaryrefslogtreecommitdiff
path: root/drivers/staging/cw1200/queue.c
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2011-10-05 09:29:01 +0200
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-10-13 10:23:25 +0200
commit5a3348f06558026c5c842112b83674e00903064c (patch)
tree1bf2ffa5c77ad60ee487364a62978cbd08b818b0 /drivers/staging/cw1200/queue.c
parent868040fa7b15aa1adf7af925f89dfa6c3b0b7a3c (diff)
cw1200: AP PS refactoring.
* buffered_multicasts_lock was renamed to ps_state_lock. Previous name was quite confusive. * Per-STA rx_queue was created for early RX-ed frames. Not that we really need these frames, but PM status they are holding is important. * priv->tx_suspend_mask was removed, driver is not using it. It was intended for UAPSD and is not needed in current implementation on mac80211. * Fix: cw1200_queue_unlock() was not called from cw1200_queue_clear() when queue was internally locked. ST-Ericsson ID: 360749 Change-Id: I61346db485d34f761d80af786b716d8c73e8b600 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33541 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/queue.c')
-rw-r--r--drivers/staging/cw1200/queue.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/staging/cw1200/queue.c b/drivers/staging/cw1200/queue.c
index c667c433766..83b294dc1da 100644
--- a/drivers/staging/cw1200/queue.c
+++ b/drivers/staging/cw1200/queue.c
@@ -116,7 +116,7 @@ int cw1200_queue_init(struct cw1200_queue *queue,
return 0;
}
-int cw1200_queue_clear(struct cw1200_queue *queue)
+int cw1200_queue_clear(struct cw1200_queue *queue, struct cw1200_common *priv)
{
int i;
struct cw1200_queue_stats *stats = queue->stats;
@@ -145,6 +145,10 @@ int cw1200_queue_clear(struct cw1200_queue *queue)
queue->link_map_cache[i] = 0;
}
spin_unlock_bh(&stats->lock);
+ if (unlikely(queue->overfull)) {
+ queue->overfull = false;
+ __cw1200_queue_unlock(queue, priv);
+ }
spin_unlock_bh(&queue->lock);
wake_up(&stats->wait_link_id_empty);
return 0;
@@ -156,9 +160,10 @@ void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats)
stats->link_map_cache = NULL;
}
-void cw1200_queue_deinit(struct cw1200_queue *queue)
+void cw1200_queue_deinit(struct cw1200_queue *queue,
+ struct cw1200_common *priv)
{
- cw1200_queue_clear(queue);
+ cw1200_queue_clear(queue, priv);
INIT_LIST_HEAD(&queue->free_pool);
kfree(queue->pool);
kfree(queue->link_map_cache);