Search Linux Wireless

[PATCH] rtl8180: fix rx rate reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The rate reported in rx_status needs to be the hw value, not actual rate.

Signed-off-by: Michael Wu <flamingice@xxxxxxxxxxxx>
---

 drivers/net/wireless/rtl8180_dev.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c
index db70604..52550c1 100644
--- a/drivers/net/wireless/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl8180_dev.c
@@ -83,7 +83,6 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev)
 			u32 flags2 = le32_to_cpu(entry->flags2);
 			struct ieee80211_rx_status rx_status = {0};
 			struct sk_buff *new_skb = dev_alloc_skb(MAX_RX_SIZE);
-			int rate;
 
 			if (unlikely(!new_skb))
 				goto done;
@@ -93,12 +92,11 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev)
 					 MAX_RX_SIZE, PCI_DMA_FROMDEVICE);
 			skb_put(skb, flags & 0xFFF);
 
-			rate = (flags >> 20) & 0xF;
 			rx_status.antenna = (flags2 >> 15) & 1;
 			/* TODO: improve signal/rssi reporting */
 			rx_status.signal = flags2 & 0xFF;
 			rx_status.ssi = (flags2 >> 8) & 0x7F;
-			rx_status.rate = priv->rates[rate].rate;
+			rx_status.rate = (flags >> 20) & 0xF;
 			rx_status.freq = dev->conf.freq;
 			rx_status.channel = dev->conf.channel;
 			rx_status.phymode = dev->conf.phymode;


-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux