Ticket #866: madwifi_radiotap_dbm_2.patch

File madwifi_radiotap_dbm_2.patch, 2.2 kB (added by smr26@cs.waikato.ac.nz, 6 years ago)

Cosmetic fix to previous patch - tabs instead of spaces. Signed-off-by: Scott Raynel <smr26@cs.waikato.ac.nz>

  • net80211/ieee80211_monitor.c

    old new  
    373373                                                th->wr_chan_flags = 0; /* unknown */ 
    374374                                                break; 
    375375                                } 
    376  
     376                                th->wr_dbm_antnoise = -95; 
     377                                th->wr_dbm_antsignal = th->wr_dbm_antnoise + signal; 
    377378                                th->wr_antenna = ds->ds_rxstat.rs_antenna; 
    378379                                th->wr_antsignal = signal; 
    379380                                memcpy(&th->wr_fcs, &skb1->data[skb1->len - IEEE80211_CRC_LEN], 
  • net80211/ieee80211_monitor.h

    old new  
    109109 
    110110#define ATH_RX_RADIOTAP_PRESENT (               \ 
    111111        (1 << IEEE80211_RADIOTAP_TSFT)          | \ 
    112         (1 << IEEE80211_RADIOTAP_FLAGS)         | \ 
    113         (1 << IEEE80211_RADIOTAP_RATE)          | \ 
    114         (1 << IEEE80211_RADIOTAP_CHANNEL)       | \ 
    115         (1 << IEEE80211_RADIOTAP_ANTENNA)       | \ 
    116         (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL)  | \ 
    117         (1 << IEEE80211_RADIOTAP_FCS)           | \ 
    118         0) 
     112        (1 << IEEE80211_RADIOTAP_FLAGS)         | \ 
     113        (1 << IEEE80211_RADIOTAP_RATE)          | \ 
     114        (1 << IEEE80211_RADIOTAP_CHANNEL)       | \ 
     115        (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \ 
     116        (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE)  | \ 
     117        (1 << IEEE80211_RADIOTAP_ANTENNA)       | \ 
     118        (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL)  | \ 
     119        (1 << IEEE80211_RADIOTAP_FCS)           | \ 
     120        0) 
    119121 
    120122struct ath_rx_radiotap_header { 
    121         struct ieee80211_radiotap_header wr_ihdr; 
     123       struct ieee80211_radiotap_header wr_ihdr; 
    122124        u_int64_t wr_tsft; 
    123         u_int8_t wr_flags; 
    124         u_int8_t wr_rate; 
    125         u_int16_t wr_chan_freq; 
    126         u_int16_t wr_chan_flags; 
    127         u_int8_t wr_antenna; 
    128         u_int8_t wr_antsignal; 
     125        u_int8_t wr_flags; 
     126        u_int8_t wr_rate; 
     127        u_int16_t wr_chan_freq; 
     128        u_int16_t wr_chan_flags; 
     129        int8_t  wr_dbm_antsignal; 
     130        int8_t  wr_dbm_antnoise; 
     131        u_int8_t wr_antenna; 
     132        u_int8_t wr_antsignal; 
     133        u_int8_t wr_pad[2]; /* Ensure fcs is on 32 bit boundary */ 
    129134        u_int32_t wr_fcs; 
    130 }
     135}__attribute__((__packed__))
    131136 
    132137#define ATH_TX_RADIOTAP_PRESENT (               \ 
    133138        (1 << IEEE80211_RADIOTAP_FLAGS)         | \