Stop writing a bogus IEEE80211_RADIOTAP_DBM_TX_POWER field.
authorscottr <scottr@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 10 Dec 2007 23:13:33 +0000 (23:13 +0000)
committerscottr <scottr@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 10 Dec 2007 23:13:33 +0000 (23:13 +0000)
We were setting this field to 0 as we had no easy way of determining
what TX power was used to transmit a frame. However, by including this
field and setting it to 0dBm we are saying that each frame is being
transmitted at 1mW, which is incorrect. Better to simply not write the
field at all, however this introduces the need for padding in the TX
header to ensure that the TX_FLAGS field is aligned to a 16-bit
boundary.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3014 0192ed92-7a03-0410-a25b-9323aeb14dbd

net80211/ieee80211_monitor.c
net80211/ieee80211_monitor.h

index fffa10ba8f9313e5c4bde14db4b2592b0d7ccfea..e8aa7e15617431628f98211a4a55c3041d92dd78 100644 (file)
@@ -478,8 +478,8 @@ ieee80211_input_monitor(struct ieee80211com *ic, struct sk_buff *skb,
 
                                th->wt_flags = 0;
                                th->wt_rate = ieeerate;
-                               th->wt_txpower = 0;
                                th->wt_antenna = antenna;
+                               th->wt_pad = 0;
 
                                if (bf->bf_dsstatus.ds_txstat.ts_status & HAL_TXERR_XRETRY)
                                        th->wt_txflags |= cpu_to_le16(IEEE80211_RADIOTAP_F_TX_FAIL);
index ce77d9202f9c9ead353cb87d55746d7c217a15ce..5bc0d6d762421e02efd4d6cd6a7cc11bef90c515 100644 (file)
@@ -131,7 +131,6 @@ struct ath_rx_radiotap_header {
        (1 << IEEE80211_RADIOTAP_TSFT)          | \
        (1 << IEEE80211_RADIOTAP_FLAGS)         | \
        (1 << IEEE80211_RADIOTAP_RATE)          | \
-       (1 << IEEE80211_RADIOTAP_DBM_TX_POWER)  | \
        (1 << IEEE80211_RADIOTAP_ANTENNA)       | \
        (1 << IEEE80211_RADIOTAP_TX_FLAGS)      | \
        (1 << IEEE80211_RADIOTAP_DATA_RETRIES)  | \
@@ -142,8 +141,8 @@ struct ath_tx_radiotap_header {
        __le64          wt_tsft;
        u_int8_t        wt_flags;
        u_int8_t        wt_rate;
-       u_int8_t        wt_txpower;
        u_int8_t        wt_antenna;
+       u_int8_t        wt_pad; /* Padding to ensure txflags is aligned */
        __le16          wt_txflags;
        u_int8_t        wt_dataretries;
 }__attribute__((__packed__));