Skip to contentSkip to conversation

adm8211-d80211: Add wireless statistics (compile tested only)

PATCH In review Larry Finger 2 participants 2 messages Nov 2, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 adm8211-d80211: Add wireless statistics (compile tested only)

These patches modify adm8211-d80211 to use the wireless statics added in patch 1.

drivers/net/wireless/d80211/adm8211/adm8211.c +11 -0
Index: wireless-dev/drivers/net/wireless/d80211/adm8211/adm8211.c
===================================================================
@@ -73,6 +73,8 @@ ADM8211_IER_TDUIE | ADM8211_IER_GPTIE)
 #define PLCP_SIGNAL_5M5		0x37
 #define PLCP_SIGNAL_11M		0x6e
 
+#define ADM8211_RX_MAX_SSI	100
+
 struct adm8211_tx_hdr {
 	u8 da[6];
 	u8 signal; /* PLCP signal / TX rate in 100 Kbps */
@@ -557,6 +559,14 @@ static void adm8211_interrupt_rci(struct
 			if (dev->flags & IFF_PROMISC)
 				skb_trim(skb, skb->len - FCS_LEN);
 
+
+/* FIXME: The following set of assignments supply additional data for wireless statistics. The
+	  necessary quantities are (1) the "noise" value in dBm, and (2) the "signal" value in dBm.
+	  The present code supplies dummy values for these quantities. */
+
+			rx_status.noise = -85;   /* FIXME */
+			rx_status.signal = rx_status.ssi - ADM8211_RX_MAX_SSI; /* FIXME */
+
 			ieee80211_rx_irqsafe(dev, skb, &rx_status);
 		}
 
@@ -2045,6 +2055,7 @@ static int __devinit adm8211_probe(struc
 	hw->get_tsf = adm8211_get_tsft;
 	hw->get_tx_stats = adm8211_get_tx_stats;
 	hw->queues = 1;		// ADM8211C supports more, maybe ADM8211B
+	hw->maxssi = ADM8211_RX_MAX_SSI;// FIXME - This is an approximation
 
 	priv->retry_limit = 3;
 	priv->ant_power = 0x40;
#1 lore raw
Quoted 4 lines · Larry Finger

These patches modify adm8211-d80211 to use the wireless statics added in patch 1.

ACK. I can put better values in later.

Thanks,
-Michael Wu