7 Oct 21:14
[RFC PATCH] rtl8187: do not report ACKs if USB Tx status is non-zero
From: John W. Linville <linville@...>
Subject: [RFC PATCH] rtl8187: do not report ACKs if USB Tx status is non-zero
Newsgroups: gmane.linux.kernel.wireless.general
Date: 2008-10-07 19:18:18 GMT
Subject: [RFC PATCH] rtl8187: do not report ACKs if USB Tx status is non-zero
Newsgroups: gmane.linux.kernel.wireless.general
Date: 2008-10-07 19:18:18 GMT
The vendor-supplied driver treats a USB Tx failure as an un-ACKed frame. I don't see why we shouldn't do the same thing -- hopefully this makes rate-scaling algorithms behave sanely with the rtl8187 driver. Thanks to Felix Fietkau <nbd@...> for suggesting this as an option. Signed-off-by: John W. Linville <linville@...> --- This is currently untested -- anyone with rtl8187 bored enough to try it?drivers/net/wireless/rtl8187_dev.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index ca5deb6..ae21191 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c @@ -164,7 +164,12 @@ static void rtl8187_tx_cb(struct urb *urb) skb_pull(skb, priv->is_rtl8187b ? sizeof(struct rtl8187b_tx_hdr) : sizeof(struct rtl8187_tx_hdr)); memset(&info->status, 0, sizeof(info->status)); - info->flags |= IEEE80211_TX_STAT_ACK; + if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { + if (!urb->status) + info->flags |= IEEE80211_TX_STAT_ACK; + else /* assume ACK not received */ + info->status.excessive_retries = 1; + } ieee80211_tx_status_irqsafe(hw, skb); } -- -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html
drivers/net/wireless/rtl8187_dev.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index ca5deb6..ae21191 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -164,7 +164,12 @@ static void rtl8187_tx_cb(struct urb *urb)
skb_pull(skb, priv->is_rtl8187b ? sizeof(struct rtl8187b_tx_hdr) :
sizeof(struct rtl8187_tx_hdr));
memset(&info->status, 0, sizeof(info->status));
- info->flags |= IEEE80211_TX_STAT_ACK;
+ if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
+ if (!urb->status)
+ info->flags |= IEEE80211_TX_STAT_ACK;
+ else /* assume ACK not received */
+ info->status.excessive_retries = 1;
+ }
ieee80211_tx_status_irqsafe(hw, skb);
}
RSS Feed