From: Larry Finger <[EMAIL PROTECTED]>
Fixed-by: Michael Buesch <[EMAIL PROTECTED]>

In bcm43xx-mac80211, the mechanism for decreasing the transmit rate cannot
be triggered. This may be shown by walking away from the AP with a laptop.
At some distance, communications will be lost and never recovered because
the rate decreasing mechanism of rc80211_simple needs to see excessive_retries
set in the ieee80211_tx_status struct. With this patch, the transmit rate
will decrease until communications restart.

Signed-off-by: Larry Finger <[EMAIL PROTECTED]>
Signed-off-by: Michael Buesch <[EMAIL PROTECTED]>

Index: wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_dma.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_dma.c       
2007-08-02 23:31:33.000000000 +0200
+++ wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_dma.c    
2007-08-02 23:39:35.000000000 +0200
@@ -1309,8 +1309,12 @@ void bcm43xx_dma_handle_txstatus(struct 
                         * status of the transmission.
                         * Some fields of txstat are already filled in dma_tx().
                         */
-                       if (status->acked)
+                       if (status->acked) {
                                meta->txstat.flags |= IEEE80211_TX_STATUS_ACK;
+                       } else {
+                               if (!(meta->txstat.control.flags & 
IEEE80211_TXCTL_NO_ACK))
+                                       meta->txstat.excessive_retries = 1;
+                       }
                        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/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_pio.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_pio.c       
2007-08-02 16:47:33.000000000 +0200
+++ wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_pio.c    
2007-08-02 23:39:56.000000000 +0200
@@ -487,8 +487,12 @@ void bcm43xx_pio_handle_txstatus(struct 
        queue->tx_devq_packets--;
        queue->tx_devq_used -= (packet->skb->len + sizeof(struct 
bcm43xx_txhdr_fw4));
 
-       if (status->acked)
+       if (status->acked) {
                packet->txstat.flags |= IEEE80211_TX_STATUS_ACK;
+       } else {
+               if (!(packet->txstat.control.flags & IEEE80211_TXCTL_NO_ACK))
+                       packet->txstat.excessive_retries = 1;
+       }
        packet->txstat.retry_count = status->frame_count - 1;
        ieee80211_tx_status_irqsafe(dev->wl->hw, packet->skb,
                                    &(packet->txstat));

--

_______________________________________________
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to