From: scottr Date: Mon, 10 Dec 2007 23:13:33 +0000 (+0000) Subject: Stop writing a bogus IEEE80211_RADIOTAP_DBM_TX_POWER field. X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=91fcb5214de6b5b3c2351b8f680fc4f3b9886912;p=madwifi%2F.git Stop writing a bogus IEEE80211_RADIOTAP_DBM_TX_POWER field. 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 --- diff --git a/net80211/ieee80211_monitor.c b/net80211/ieee80211_monitor.c index fffa10b..e8aa7e1 100644 --- a/net80211/ieee80211_monitor.c +++ b/net80211/ieee80211_monitor.c @@ -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); diff --git a/net80211/ieee80211_monitor.h b/net80211/ieee80211_monitor.h index ce77d92..5bc0d6d 100644 --- a/net80211/ieee80211_monitor.h +++ b/net80211/ieee80211_monitor.h @@ -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__));