Commit 3a769888 authored by Nishant Sarmukadam's avatar Nishant Sarmukadam Committed by John W. Linville

mwl8k: Reserve buffers for tx management frames

Since queues are not stopped anymore, management frames would be
dropped if the corresponding tx queue is full.
This can cause issues say when we want to setup an ampdu stream and
action frames i.e addba requests keep getting dropped frequently.
Fix this by reserving some buffers to allow management frames to
go through in queue full conditions.
Signed-off-by: default avatarNishant Sarmukadam <nishants@marvell.com>
Signed-off-by: default avatarPradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 566875db
...@@ -1818,6 +1818,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) ...@@ -1818,6 +1818,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
u8 tid = 0; u8 tid = 0;
struct mwl8k_ampdu_stream *stream = NULL; struct mwl8k_ampdu_stream *stream = NULL;
bool start_ba_session = false; bool start_ba_session = false;
bool mgmtframe = false;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
wh = (struct ieee80211_hdr *)skb->data; wh = (struct ieee80211_hdr *)skb->data;
...@@ -1826,6 +1827,9 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) ...@@ -1826,6 +1827,9 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
else else
qos = 0; qos = 0;
if (ieee80211_is_mgmt(wh->frame_control))
mgmtframe = true;
if (priv->ap_fw) if (priv->ap_fw)
mwl8k_encapsulate_tx_frame(skb); mwl8k_encapsulate_tx_frame(skb);
else else
...@@ -1955,15 +1959,26 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) ...@@ -1955,15 +1959,26 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
txq = priv->txq + index; txq = priv->txq + index;
if (txq->len >= MWL8K_TX_DESCS) { /* Mgmt frames that go out frequently are probe
if (start_ba_session) { * responses. Other mgmt frames got out relatively
spin_lock(&priv->stream_lock); * infrequently. Hence reserve 2 buffers so that
mwl8k_remove_stream(hw, stream); * other mgmt frames do not get dropped due to an
spin_unlock(&priv->stream_lock); * already queued probe response in one of the
* reserved buffers.
*/
if (txq->len >= MWL8K_TX_DESCS - 2) {
if (mgmtframe == false ||
txq->len == MWL8K_TX_DESCS) {
if (start_ba_session) {
spin_lock(&priv->stream_lock);
mwl8k_remove_stream(hw, stream);
spin_unlock(&priv->stream_lock);
}
spin_unlock_bh(&priv->tx_lock);
dev_kfree_skb(skb);
return;
} }
spin_unlock_bh(&priv->tx_lock);
dev_kfree_skb(skb);
return;
} }
BUG_ON(txq->skb[txq->tail] != NULL); BUG_ON(txq->skb[txq->tail] != NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment