From 8dad88aeceb7f2bf18a00c78946981da943dbb03 Mon Sep 17 00:00:00 2001 From: Dmitry Tarnyagin Date: Wed, 3 Aug 2011 11:39:01 +0200 Subject: cw1200: Workaround against cyclic requeue of multicast frames. WSM324 firmware has tendency to requeue multicast frames in a loop, causing performance drop and high power consumption of the driver. The workaround blocks attempts to requeue multicasts frames. Workaround has to be modified for further WSM firmware releases where this issue is suppose to be fixed with respect to backward compatibility. Change-Id: I27b66d9acc48b8058efd524a72e6f69c816393cc Signed-off-by: Dmitry Tarnyagin Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28209 Reviewed-by: Bartosz MARKOWSKI Tested-by: Bartosz MARKOWSKI Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33493 Reviewed-by: Philippe LANGLAIS --- drivers/staging/cw1200/txrx.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/staging/cw1200/txrx.c b/drivers/staging/cw1200/txrx.c index a87743b453a..8531994d3da 100644 --- a/drivers/staging/cw1200/txrx.c +++ b/drivers/staging/cw1200/txrx.c @@ -595,7 +595,20 @@ void cw1200_tx_confirm_cb(struct cw1200_common *priv, .multicast = !arg->link_id, }; cw1200_suspend_resume(priv, &suspend); - WARN_ON(cw1200_queue_requeue(queue, arg->packetID)); + if (suspend.multicast) { + /* HACK!!! WSM324 firmware has tendency to requeue + * multicast frames in a loop, causing performance + * drop and high power consumption of the driver. + * In this situation it is better just to drop + * the problematic frame. */ + wiphy_warn(priv->hw->wiphy, "Attempt to requeue a " + "multicat frame. Frame is dropped\n"); + WARN_ON(cw1200_queue_remove(queue, priv, + arg->packetID)); + } else { + WARN_ON(cw1200_queue_requeue(queue, + arg->packetID)); + } } else if (!WARN_ON(cw1200_queue_get_skb( queue, arg->packetID, &skb))) { struct ieee80211_tx_info *tx = IEEE80211_SKB_CB(skb); -- cgit v1.2.3