linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, bcm43xx-dev@lists.berlios.de
Subject: [patch 7/9] b43: Fix frame retry count for suppressed frames
Date: Tue, 14 Aug 2007 20:12:20 +0200	[thread overview]
Message-ID: <20070814181216.382473000@bu3sch.de> (raw)
In-Reply-To: 20070814181213.135874000@bu3sch.de

(u8)0 - 1 == 255
which is wrong. Should be 0.

Signed-off-by: Michael Buesch <mb@bu3sch.de>

Index: wireless-dev-new/drivers/net/wireless/b43/dma.c
===================================================================
--- wireless-dev-new.orig/drivers/net/wireless/b43/dma.c	2007-08-12 16:38:51.000000000 +0200
+++ wireless-dev-new/drivers/net/wireless/b43/dma.c	2007-08-13 16:01:07.000000000 +0200
@@ -1276,12 +1276,15 @@ void b43_dma_handle_txstatus(struct b43_
 			if (status->acked) {
 				meta->txstat.flags |= IEEE80211_TX_STATUS_ACK;
 			} else {
-				if (!
-				    (meta->txstat.control.
-				     flags & IEEE80211_TXCTL_NO_ACK))
+				if (!(meta->txstat.control.flags
+				      & IEEE80211_TXCTL_NO_ACK))
 					meta->txstat.excessive_retries = 1;
 			}
-			meta->txstat.retry_count = status->frame_count - 1;
+			if (status->frame_count == 0) {
+				/* The frame was not transmitted at all. */
+				meta->txstat.retry_count = 0;
+			} else
+				meta->txstat.retry_count = status->frame_count - 1;
 			ieee80211_tx_status_irqsafe(dev->wl->hw, meta->skb,
 						    &(meta->txstat));
 			/* skb is freed by ieee80211_tx_status_irqsafe() */
Index: wireless-dev-new/drivers/net/wireless/b43/pio.c
===================================================================
--- wireless-dev-new.orig/drivers/net/wireless/b43/pio.c	2007-08-12 16:38:52.000000000 +0200
+++ wireless-dev-new/drivers/net/wireless/b43/pio.c	2007-08-13 16:02:24.000000000 +0200
@@ -469,7 +469,11 @@ void b43_pio_handle_txstatus(struct b43_
 		if (!(packet->txstat.control.flags & IEEE80211_TXCTL_NO_ACK))
 			packet->txstat.excessive_retries = 1;
 	}
-	packet->txstat.retry_count = status->frame_count - 1;
+	if (status->frame_count == 0) {
+		/* The frame was not transmitted at all. */
+		packet->txstat.retry_count = 0;
+	} else
+		packet->txstat.retry_count = status->frame_count - 1;
 	ieee80211_tx_status_irqsafe(dev->wl->hw, packet->skb,
 				    &(packet->txstat));
 	packet->skb = NULL;

-- 


  parent reply	other threads:[~2007-08-14 18:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-14 18:12 [patch 0/9] New patch series for merge Michael Buesch
2007-08-14 18:12 ` [patch 1/9] b43: Add more LO debugging Michael Buesch
2007-08-14 18:12 ` [patch 2/9] b43: Remove PCI to SSB bridge code Michael Buesch
2007-08-14 18:12 ` [patch 3/9] b43: Powerup the bus before accessing any MMIO Michael Buesch
2007-08-14 18:12 ` [patch 4/9] b43: Check init status in b43_config_interface Michael Buesch
2007-08-14 18:12 ` [patch 5/9] b43: Suppress sending of probe responses from firmware Michael Buesch
2007-08-14 18:12 ` [patch 6/9] b43: debugfs tx_status, Fix endless loop inside of spinlock Michael Buesch
2007-08-14 18:12 ` Michael Buesch [this message]
2007-08-14 18:12 ` [patch 8/9] b43: Fix controller reset Michael Buesch
2007-08-14 18:12 ` [patch 9/9] b43: Rewrite kconfig to get rid of the advice hack Michael Buesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070814181216.382473000@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).