]> Pileus Git - ~andy/linux/commitdiff
rtl8187: fix retry count passed in rtl8187_tx
authorherton <herton@mandriva.com.br>
Fri, 28 Nov 2008 00:53:24 +0000 (22:53 -0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 5 Dec 2008 14:32:59 +0000 (09:32 -0500)
I mistakenly changed retry count passed in rtl8187_tx in previous change
"rtl8187: feedback transmitted packets using tx close descriptor for
8187B". For 8187 it should represent the number of retries (retry count
limit). As explained by Johannes Berg, .count represents the number of
tries (not retries), and retries = tries - 1.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl818x/rtl8187_dev.c

index 69ea5222f1637175507951b07613f3e632d99b1e..dbf52e8bbd7a6da1164e73ecc13453aa74ce98b4 100644 (file)
@@ -238,7 +238,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
                hdr->flags = cpu_to_le32(flags);
                hdr->len = 0;
                hdr->rts_duration = rts_dur;
-               hdr->retry = cpu_to_le32(info->control.rates[0].count << 8);
+               hdr->retry = cpu_to_le32((info->control.rates[0].count - 1) << 8);
                buf = hdr;
 
                ep = 2;
@@ -256,7 +256,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
                memset(hdr, 0, sizeof(*hdr));
                hdr->flags = cpu_to_le32(flags);
                hdr->rts_duration = rts_dur;
-               hdr->retry = cpu_to_le32(info->control.rates[0].count << 8);
+               hdr->retry = cpu_to_le32((info->control.rates[0].count - 1) << 8);
                hdr->tx_duration =
                        ieee80211_generic_frame_duration(dev, priv->vif,
                                                         skb->len, txrate);