Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158944
b: refs/heads/master
c: 2ffa5fe
h: refs/heads/master
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Jul 10, 2009
1 parent 69b292d commit d5e973f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 6d541a684d7eb72c71eaba82b09a360c96609134
refs/heads/master: 2ffa5fede379091bf62a732462b829e4b51af054
7 changes: 4 additions & 3 deletions trunk/drivers/net/wireless/p54/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static int p54_tx_qos_accounting_alloc(struct p54_common *priv,
queue = &priv->tx_stats[p54_queue];

spin_lock_irqsave(&priv->tx_stats_lock, flags);
if (unlikely(queue->len > queue->limit && IS_QOS_QUEUE(p54_queue))) {
if (unlikely(queue->len >= queue->limit && IS_QOS_QUEUE(p54_queue))) {
spin_unlock_irqrestore(&priv->tx_stats_lock, flags);
return -ENOSPC;
}
Expand All @@ -222,8 +222,11 @@ static void p54_tx_qos_accounting_free(struct p54_common *priv,
if (skb && IS_DATA_FRAME(skb)) {
struct p54_hdr *hdr = (void *) skb->data;
struct p54_tx_data *data = (void *) hdr->data;
unsigned long flags;

spin_lock_irqsave(&priv->tx_stats_lock, flags);
priv->tx_stats[data->hw_queue].len--;
spin_unlock_irqrestore(&priv->tx_stats_lock, flags);
}
p54_wake_queues(priv);
}
Expand Down Expand Up @@ -462,7 +465,6 @@ static void p54_rx_eeprom_readback(struct p54_common *priv,

priv->eeprom = NULL;
tmp = p54_find_and_unlink_skb(priv, hdr->req_id);
p54_tx_qos_accounting_free(priv, tmp);
dev_kfree_skb_any(tmp);
complete(&priv->eeprom_comp);
}
Expand All @@ -489,7 +491,6 @@ static void p54_rx_stats(struct p54_common *priv, struct sk_buff *skb)
priv->noise = p54_rssi_to_dbm(priv, le32_to_cpu(stats->noise));

tmp = p54_find_and_unlink_skb(priv, hdr->req_id);
p54_tx_qos_accounting_free(priv, tmp);
dev_kfree_skb_any(tmp);
}

Expand Down

0 comments on commit d5e973f

Please sign in to comment.