logo       
Google Custom Search
    AddThis Social Bookmark Button

revision 2220 committed: msg#00054

Subject: revision 2220 committed
Project     : madwifi
Revision    : 2220
Author      : scottr (Scott Raynel)
Date        : 2007-03-26 13:56:18 +0200 (Mon, 26 Mar 2007)

Log Message :
Sync our Radiotap header to the official version from NetBSD which
introduces couple of extra fields.

Specifically, we now mark tx feedback frames that failed due to excessive
retries as well as provide the actual retry count per tx frame.

Affected Files:
* trunk/net80211/ieee80211_monitor.c                  updated             
* trunk/net80211/ieee80211_monitor.h                  updated             
* trunk/net80211/ieee80211_radiotap.h                 updated             


Modified: trunk/net80211/ieee80211_monitor.c
===================================================================
--- trunk/net80211/ieee80211_monitor.c  2007-03-26 08:55:34 UTC (rev 2219)
+++ trunk/net80211/ieee80211_monitor.c  2007-03-26 11:56:18 UTC (rev 2220)
@@ -467,6 +467,12 @@
                                th->wt_rate = 
sc->sc_hwmap[ds->ds_txstat.ts_rate].ieeerate;
                                th->wt_txpower = 0;
                                th->wt_antenna = ds->ds_txstat.ts_antenna;
+
+                               if (ds->ds_txstat.ts_status & HAL_TXERR_XRETRY)
+                                       th->wt_txflags |= 
IEEE80211_RADIOTAP_F_TX_FAIL;
+                               
+                               th->wt_dataretries = 
ds->ds_txstat.ts_shortretry + ds->ds_txstat.ts_longretry;
+                               
                        } else {
                                struct ath_rx_radiotap_header *th;
                                if (skb_headroom(skb1) < sizeof(struct 
ath_rx_radiotap_header)) {
@@ -485,8 +491,10 @@
 
                                if (ic->ic_flags & IEEE80211_F_SHPREAMBLE)
                                        th->wr_flags |= 
IEEE80211_RADIOTAP_F_SHORTPRE;
-                               if (ds->ds_rxstat.rs_status & HAL_RXERR_CRC)
+                               if (ds->ds_rxstat.rs_status & HAL_RXERR_CRC) {
                                        th->wr_flags |= 
IEEE80211_RADIOTAP_F_BADFCS;
+                                       th->wr_rxflags |= 
IEEE80211_RADIOTAP_F_RX_BADFCS;
+                               }
                                if (skb->len >= IEEE80211_CRC_LEN) 
                                        th->wr_flags |= 
IEEE80211_RADIOTAP_F_FCS;
 

Modified: trunk/net80211/ieee80211_monitor.h
===================================================================
--- trunk/net80211/ieee80211_monitor.h  2007-03-26 08:55:34 UTC (rev 2219)
+++ trunk/net80211/ieee80211_monitor.h  2007-03-26 11:56:18 UTC (rev 2220)
@@ -112,6 +112,7 @@
        (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE)  | \
        (1 << IEEE80211_RADIOTAP_ANTENNA)       | \
        (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL)  | \
+       (1 << IEEE80211_RADIOTAP_RX_FLAGS)      | \
        0)
 
 struct ath_rx_radiotap_header {
@@ -125,6 +126,7 @@
        int8_t          wr_dbm_antnoise;
        u_int8_t        wr_antenna;
        u_int8_t        wr_antsignal;
+       __le16          wr_rxflags;
 }__attribute__((__packed__));
 
 #define ATH_TX_RADIOTAP_PRESENT (               \
@@ -133,6 +135,8 @@
        (1 << IEEE80211_RADIOTAP_RATE)          | \
        (1 << IEEE80211_RADIOTAP_DBM_TX_POWER)  | \
        (1 << IEEE80211_RADIOTAP_ANTENNA)       | \
+       (1 << IEEE80211_RADIOTAP_TX_FLAGS)      | \
+       (1 << IEEE80211_RADIOTAP_DATA_RETRIES)  | \
        0)
 
 struct ath_tx_radiotap_header {
@@ -142,6 +146,8 @@
        u_int8_t        wt_rate;
        u_int8_t        wt_txpower;
        u_int8_t        wt_antenna;
+       __le16          wt_txflags;
+       u_int8_t        wt_dataretries;
 };
 
 /*

Modified: trunk/net80211/ieee80211_radiotap.h
===================================================================
--- trunk/net80211/ieee80211_radiotap.h 2007-03-26 08:55:34 UTC (rev 2219)
+++ trunk/net80211/ieee80211_radiotap.h 2007-03-26 11:56:18 UTC (rev 2220)
@@ -1,3 +1,6 @@
+/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05 
sam Exp $ */
+/* $NetBSD: ieee80211_radiotap.h,v 1.17 2007/03/26 04:32:14 dyoung Exp $ */
+
 /*-
  * Copyright (c) 2003, 2004 David Young.  All rights reserved.
  *
@@ -153,6 +156,21 @@
  *      Unitless indication of the Rx/Tx antenna for this packet.
  *      The first antenna is antenna 0.
  *
+ * IEEE80211_RADIOTAP_RX_FLAGS          u_int16_t       bitmap
+ *
+ *     Properties of received frames. See flags defined below.
+ *
+ * IEEE80211_RADIOTAP_TX_FLAGS          u_int16_t       bitmap
+ *
+ *     Properties of transmitted frames. See flags defined below.
+ *
+ * IEEE80211_RADIOTAP_RTS_RETRIES       u_int8_t        data
+ *
+ *     Number of rts retries a transmitted frame used.
+ *
+ * IEEE80211_RADIOTAP_DATA_RETRIES      u_int8_t        data
+ *
+ *     Number of unicast retries a transmitted frame used.
  */
 enum ieee80211_radiotap_type {
        IEEE80211_RADIOTAP_TSFT = 0,
@@ -169,6 +187,10 @@
        IEEE80211_RADIOTAP_ANTENNA = 11,
        IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12,
        IEEE80211_RADIOTAP_DB_ANTNOISE = 13,
+       IEEE80211_RADIOTAP_RX_FLAGS = 14,
+       IEEE80211_RADIOTAP_TX_FLAGS = 15,
+       IEEE80211_RADIOTAP_RTS_RETRIES = 16,
+       IEEE80211_RADIOTAP_DATA_RETRIES = 17,
        IEEE80211_RADIOTAP_EXT = 31,
 };
 
@@ -182,7 +204,6 @@
 #define IEEE80211_CHAN_PASSIVE  0x0200  /* Only passive scan allowed */
 #define        IEEE80211_CHAN_DYN      0x0400  /* Dynamic CCK-OFDM channel */
 #define        IEEE80211_CHAN_GFSK     0x0800  /* GFSK channel (FHSS PHY) */
-#define        IEEE80211_CHAN_STURBO   0x2000  /* 11a static turbo channel 
only */
 
 /* Useful combinations of channel characteristics, borrowed from Ethereal */
 #define IEEE80211_CHAN_A \
@@ -219,4 +240,19 @@
                                                 */
 #define        IEEE80211_RADIOTAP_F_BADFCS     0x40    /* does not pass FCS 
check */
 
+/* For IEEE80211_RADIOTAP_RX_FLAGS */
+#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001  /* Frame failed CRC check.
+                                               *
+                                               * Deprecated: use the flag
+                                               * IEEE80211_RADIOTAP_F_FCS in
+                                               * the IEEE80211_RADIOTAP_FLAGS
+                                               * field, instead.
+                                               */
+
+/* For IEEE80211_RADIOTAP_TX_FLAGS */
+#define IEEE80211_RADIOTAP_F_TX_FAIL   0x0001  /* failed due to excessive
+                                               * retries
+                                               */
+#define IEEE80211_RADIOTAP_F_TX_CTS    0x0002  /* used cts 'protection' */
+#define IEEE80211_RADIOTAP_F_TX_RTS    0x0004  /* used rts/cts handshake */
 #endif /* _NET_IF_IEEE80211RADIOTAP_H_ */

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>