diff options
author | Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | 2011-10-06 19:05:02 +0200 |
---|---|---|
committer | Philippe LANGLAIS <philippe.langlais@stericsson.com> | 2011-10-13 10:23:49 +0200 |
commit | 847817a7ac38983d030d87d4c1b38e379a26fe8e (patch) | |
tree | af0b449b8359ed45a234a377c0a81bde69a36653 /drivers/staging/cw1200/wsm.c | |
parent | 5a3348f06558026c5c842112b83674e00903064c (diff) |
cw1200: Accurate reporting of TX status.
* Accurate reporting of TX status is implemented (needed for UAPSD and PSPOLL).
* Leaking of TX rate policies is fixed.
* skb destructor is implemented.
* Time to live for queued frames is implemented.
* cw1200_tx is split by separate TX handlers (like in mac80211).
* cw1200_skb_to_wsm is not existing anymore.
* BT coex: null frames are prioritized as management frames.
* Debug: added printing of rate policies in use.
ST-Ericsson ID: 354950
ST-Ericsson ID: 360749
Change-Id: I920d398418df99c21b37a16ef16591e58a82151d
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33542
Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/wsm.c')
-rw-r--r-- | drivers/staging/cw1200/wsm.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/staging/cw1200/wsm.c b/drivers/staging/cw1200/wsm.c index d0bcffa1654..16996def7b2 100644 --- a/drivers/staging/cw1200/wsm.c +++ b/drivers/staging/cw1200/wsm.c @@ -1399,8 +1399,6 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv, * probe responses. * The easiest way to get it back is to convert * probe request into WSM start_scan command. */ - const struct cw1200_txpriv *txpriv; - int rate_id = (wsm->flags >> 4) & 0x07; struct cw1200_queue *queue = &priv->tx_queue[cw1200_queue_get_queue_id( wsm->packetID)]; @@ -1409,12 +1407,13 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv, wsm_lock_tx_async(priv); BUG_ON(priv->scan.probe_skb); BUG_ON(cw1200_queue_get_skb(queue, - wsm->packetID, - &priv->scan.probe_skb, &txpriv)); - BUG_ON(cw1200_queue_remove(queue, priv, - wsm->packetID)); + wsm->packetID, + &priv->scan.probe_skb)); + skb_get(priv->scan.probe_skb); + IEEE80211_SKB_CB(priv->scan.probe_skb)->flags |= + IEEE80211_TX_STAT_ACK; + BUG_ON(cw1200_queue_remove(queue, wsm->packetID)); /* Release used TX rate policy */ - tx_policy_put(priv, rate_id); queue_delayed_work(priv->workqueue, &priv->scan.probe_work, 0); handled = true; @@ -1424,23 +1423,11 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv, { /* See detailed description of "join" below. * We are dropping everything except AUTH in non-joined mode. */ - struct sk_buff *skb; - int rate_id = (wsm->flags >> 4) & 0x07; - const struct cw1200_txpriv *txpriv = NULL; struct cw1200_queue *queue = &priv->tx_queue[cw1200_queue_get_queue_id( wsm->packetID)]; - wsm_printk(KERN_DEBUG "[WSM] Drop frame (0x%.4X):" - " not joined.\n", fctl); - BUG_ON(cw1200_queue_get_skb(queue, wsm->packetID, - &skb, &txpriv)); - skb_pull(skb, sizeof(struct wsm_tx)); - cw1200_notify_buffered_tx(priv, skb, link_id, txpriv->tid); - BUG_ON(cw1200_queue_remove(queue, priv, wsm->packetID)); - /* Release used TX rate policy */ - tx_policy_put(priv, rate_id); - /* Release SKB. TODO: report TX failure. */ - dev_kfree_skb(skb); + wsm_printk(KERN_DEBUG "[WSM] Drop frame (0x%.4X).\n", fctl); + BUG_ON(cw1200_queue_remove(queue, wsm->packetID)); handled = true; } break; @@ -1626,7 +1613,6 @@ int wsm_get_tx(struct cw1200_common *priv, u8 **data, if (ret) break; - if (cw1200_queue_get(queue, tx_allowed_mask, &wsm, &tx_info, &txpriv)) |