aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorPradeep Nemavat <pnemavat@marvell.com>2011-04-21 07:04:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-25 14:50:15 -0400
commit3a7dbc3b2ac545efac75d4145839eaa7b59d9741 (patch)
tree2041ea40d40fdf0e38874d32b9fdd2f659a57012 /drivers/net/wireless/mwl8k.c
parent2624e96ce16bacae0e422d5775eac6d4fc33239a (diff)
mwl8k: Do not stop tx queues
This is in preparation to support life time expiry of packets in the hardware to avoid head-of-line blocking where a slow client can hog a tx queue and affect the traffic to a faster client from the same queue. Time stamp the packets in driver to allow dropping them in the hardware if they are queued for more than 500ms. If queues are stopped, packets will be queued up outside the driver. Since we will be able to timestamp the packets only after they hit the driver, the timestamp will be less accurate since we cannot consider the time the packets spent in queues outside the driver. With this commit, to achieve accurate timestamping, the tx queues will not be stopped in normal conditions. The only scenarios where the queues will be stopped are when firmware commands are executing or if the interface is brought down. Now, we need to be prepared for a situation where packets hit the driver even after the tx queues are full. Drop all such packets in the driver itself. Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 28ebaec80be6..33da25a349b7 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1666,10 +1666,6 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force)
1666 processed++; 1666 processed++;
1667 } 1667 }
1668 1668
1669 if (index < MWL8K_TX_WMM_QUEUES && processed && priv->radio_on &&
1670 !mutex_is_locked(&priv->fw_mutex))
1671 ieee80211_wake_queue(hw, index);
1672
1673 return processed; 1669 return processed;
1674} 1670}
1675 1671
@@ -1951,13 +1947,14 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
1951 1947
1952 txq = priv->txq + index; 1948 txq = priv->txq + index;
1953 1949
1954 if (index >= MWL8K_TX_WMM_QUEUES && txq->len >= MWL8K_TX_DESCS) { 1950 if (txq->len >= MWL8K_TX_DESCS) {
1955 /* This is the case in which the tx packet is destined for an 1951 if (start_ba_session) {
1956 * AMPDU queue and that AMPDU queue is full. Because we don't 1952 spin_lock(&priv->stream_lock);
1957 * start and stop the AMPDU queues, we must drop these packets. 1953 mwl8k_remove_stream(hw, stream);
1958 */ 1954 spin_unlock(&priv->stream_lock);
1959 dev_kfree_skb(skb); 1955 }
1960 spin_unlock_bh(&priv->tx_lock); 1956 spin_unlock_bh(&priv->tx_lock);
1957 dev_kfree_skb(skb);
1961 return; 1958 return;
1962 } 1959 }
1963 1960
@@ -1985,9 +1982,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
1985 if (txq->tail == MWL8K_TX_DESCS) 1982 if (txq->tail == MWL8K_TX_DESCS)
1986 txq->tail = 0; 1983 txq->tail = 0;
1987 1984
1988 if (txq->head == txq->tail && index < MWL8K_TX_WMM_QUEUES)
1989 ieee80211_stop_queue(hw, index);
1990
1991 mwl8k_tx_start(priv); 1985 mwl8k_tx_start(priv);
1992 1986
1993 spin_unlock_bh(&priv->tx_lock); 1987 spin_unlock_bh(&priv->tx_lock);