Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247169
b: refs/heads/master
c: 3a76988
h: refs/heads/master
i:
  247167: cd7fa91
v: v3
  • Loading branch information
Nishant Sarmukadam authored and John W. Linville committed Apr 25, 2011
1 parent 2ee8979 commit 5f22b84
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 566875db5058f582ea56da891f9c3cabc01efff5
refs/heads/master: 3a769888797b7117005e9c60d4cd73a2efc92f8d
31 changes: 23 additions & 8 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
u8 tid = 0;
struct mwl8k_ampdu_stream *stream = NULL;
bool start_ba_session = false;
bool mgmtframe = false;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;

wh = (struct ieee80211_hdr *)skb->data;
Expand All @@ -1826,6 +1827,9 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
else
qos = 0;

if (ieee80211_is_mgmt(wh->frame_control))
mgmtframe = true;

if (priv->ap_fw)
mwl8k_encapsulate_tx_frame(skb);
else
Expand Down Expand Up @@ -1955,15 +1959,26 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)

txq = priv->txq + index;

if (txq->len >= MWL8K_TX_DESCS) {
if (start_ba_session) {
spin_lock(&priv->stream_lock);
mwl8k_remove_stream(hw, stream);
spin_unlock(&priv->stream_lock);
/* Mgmt frames that go out frequently are probe
* responses. Other mgmt frames got out relatively
* infrequently. Hence reserve 2 buffers so that
* other mgmt frames do not get dropped due to an
* 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);
Expand Down

0 comments on commit 5f22b84

Please sign in to comment.