o wl3501: do proper tx throttling

. check if queue was stopped when receiving interrupt tx confirmation,
  prior to calling netif_wake_queue.
. stop the queue processing if there is less than 2 tx blocks in the
  card, with this I get no drops in pktgen, whee! 8)
parent c9386ad9
...@@ -1141,7 +1141,8 @@ static inline void wl3501_md_confirm_interrupt(struct net_device *dev, ...@@ -1141,7 +1141,8 @@ static inline void wl3501_md_confirm_interrupt(struct net_device *dev,
wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
wl3501_free_tx_buffer(this, sig.data); wl3501_free_tx_buffer(this, sig.data);
netif_wake_queue(dev); if (netif_queue_stopped(dev))
netif_wake_queue(dev);
} }
static inline void wl3501_md_ind_interrupt(struct net_device *dev, static inline void wl3501_md_ind_interrupt(struct net_device *dev,
...@@ -1544,6 +1545,9 @@ static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1544,6 +1545,9 @@ static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
++this->stats.tx_packets; ++this->stats.tx_packets;
this->stats.tx_bytes += skb->len; this->stats.tx_bytes += skb->len;
kfree_skb(skb); kfree_skb(skb);
if (this->tx_buffer_cnt < 2)
netif_stop_queue(dev);
} }
spin_unlock_irqrestore(&this->lock, flags); spin_unlock_irqrestore(&this->lock, flags);
return rc; return rc;
......
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