Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b869767b authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville
Browse files

rt2x00: Don't kick TX queue after each frame



TX queues shouldn't be kicked after each frame that is put into the
queue.  This could cause problems during RTS and CTS-to-self as well
as with fragmentation. In all those cases you want all frames to be
send out in a single burst. Off course we shouldn't let the queue fill
up entirely, thus we introduce a 10% threshold which, when reached,
will force the frames to be send out regardless of the frame.

In addition we should prevent queues to become full in such a way
that the tx() handler can fail. Instead of stopping the queue when
it is full, we should stop it when it is below the threshold.

Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6db3786a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1507,7 +1507,6 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
	 */
	skbdesc = get_skb_frame_desc(skb);
	memset(skbdesc, 0, sizeof(*skbdesc));
	skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED;
	skbdesc->data = skb->data;
	skbdesc->data_len = skb->len;
	skbdesc->desc = entry_priv->desc;
+0 −1
Original line number Diff line number Diff line
@@ -1823,7 +1823,6 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
	 */
	skbdesc = get_skb_frame_desc(skb);
	memset(skbdesc, 0, sizeof(*skbdesc));
	skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED;
	skbdesc->data = skb->data;
	skbdesc->data_len = skb->len;
	skbdesc->desc = entry_priv->desc;
+0 −1
Original line number Diff line number Diff line
@@ -1711,7 +1711,6 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
	 */
	skbdesc = get_skb_frame_desc(skb);
	memset(skbdesc, 0, sizeof(*skbdesc));
	skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED;
	skbdesc->data = skb->data + intf->beacon->queue->desc_size;
	skbdesc->data_len = skb->len - intf->beacon->queue->desc_size;
	skbdesc->desc = skb->data;
+1 −1
Original line number Diff line number Diff line
@@ -826,7 +826,7 @@ struct rt2x00_dev {
	 * The Beacon array also contains the Atim queue
	 * if that is supported by the device.
	 */
	int data_queues;
	unsigned int data_queues;
	struct data_queue *rx;
	struct data_queue *tx;
	struct data_queue *bcn;
+1 −9
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
				struct sk_buff *frag_skb)
{
	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(frag_skb);
	struct skb_frame_desc *skbdesc;
	struct ieee80211_tx_info *rts_info;
	struct sk_buff *skb;
	int size;
@@ -82,13 +81,6 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
				  frag_skb->data, size, tx_info,
				  (struct ieee80211_rts *)(skb->data));

	/*
	 * Initialize skb descriptor
	 */
	skbdesc = get_skb_frame_desc(skb);
	memset(skbdesc, 0, sizeof(*skbdesc));
	skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED;

	if (rt2x00queue_write_tx_frame(queue, skb)) {
		WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n");
		return NETDEV_TX_BUSY;
@@ -163,7 +155,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
		return NETDEV_TX_BUSY;
	}

	if (rt2x00queue_full(queue))
	if (rt2x00queue_threshold(queue))
		ieee80211_stop_queue(rt2x00dev->hw, qid);

	return NETDEV_TX_OK;
Loading