Skip to contentSkip to conversation

rtl8187: Improve wireless statistics for RTL8187B

PATCH New Larry Finger 1 participant 1 message Jul 29, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtl8187: Improve wireless statistics for RTL8187B

Wireless statistics produced by the RTL8187B driver are not particularly informative about the strength of the received signal. From the data sheet provided by Realtek, I discovered that certain parts of the RX header should have the information necessary to calculate signal quality and strength. With testing, it became clear that most of these quantities were very jittery - only the AGC correlated with the signals expected from nearby AP's. As a result, the quality and strength are derived from the agc value. The scaling has been determined so that the numbers are close to those obtained by b43 under the same conditions. The results are qualitatively correct.

Statistics derived for the RTL8187 have not been changed.

The RX header variables have been renamed to match the quantites described in the Realtek data sheet.

---

John.

This is 2.6.27 material.

Larry

drivers/net/wireless/rtl8187.h +6 -4
Index: wireless-testing/drivers/net/wireless/rtl8187.h
===================================================================
@@ -47,11 +47,13 @@ struct rtl8187_rx_hdr {
 struct rtl8187b_rx_hdr {
 	__le32 flags;
 	__le64 mac_time;
-	u8 noise;
-	u8 signal;
+	u8 sq;
+	u8 rssi;
 	u8 agc;
-	u8 reserved;
-	__le32 unused;
+	u8 flags2;
+	__le16 snr_long2end;
+	s8 pwdb_g12;
+	u8 fot;
 } __attribute__((packed));
 
 /* {rtl8187,rtl8187b}_tx_info is in skb */
drivers/net/wireless/rtl8187_dev.c +48 -30

117 lines not on this page · raw message