radiotap.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include <net/ieee80211_radiotap.h>
  2. struct tx_radiotap_hdr {
  3. struct ieee80211_radiotap_header hdr;
  4. u8 rate;
  5. u8 txpower;
  6. u8 rts_retries;
  7. u8 data_retries;
  8. } __attribute__ ((packed));
  9. #define TX_RADIOTAP_PRESENT ( \
  10. (1 << IEEE80211_RADIOTAP_RATE) | \
  11. (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \
  12. (1 << IEEE80211_RADIOTAP_RTS_RETRIES) | \
  13. (1 << IEEE80211_RADIOTAP_DATA_RETRIES) | \
  14. 0)
  15. #define IEEE80211_FC_VERSION_MASK 0x0003
  16. #define IEEE80211_FC_TYPE_MASK 0x000c
  17. #define IEEE80211_FC_TYPE_MGT 0x0000
  18. #define IEEE80211_FC_TYPE_CTL 0x0004
  19. #define IEEE80211_FC_TYPE_DATA 0x0008
  20. #define IEEE80211_FC_SUBTYPE_MASK 0x00f0
  21. #define IEEE80211_FC_TOFROMDS_MASK 0x0300
  22. #define IEEE80211_FC_TODS_MASK 0x0100
  23. #define IEEE80211_FC_FROMDS_MASK 0x0200
  24. #define IEEE80211_FC_NODS 0x0000
  25. #define IEEE80211_FC_TODS 0x0100
  26. #define IEEE80211_FC_FROMDS 0x0200
  27. #define IEEE80211_FC_DSTODS 0x0300
  28. struct rx_radiotap_hdr {
  29. struct ieee80211_radiotap_header hdr;
  30. u8 flags;
  31. u8 rate;
  32. u16 chan_freq;
  33. u16 chan_flags;
  34. u8 antenna;
  35. u8 antsignal;
  36. u16 rx_flags;
  37. #if 0
  38. u8 pad[IEEE80211_RADIOTAP_HDRLEN - 18];
  39. #endif
  40. } __attribute__ ((packed));
  41. #define RX_RADIOTAP_PRESENT ( \
  42. (1 << IEEE80211_RADIOTAP_FLAGS) | \
  43. (1 << IEEE80211_RADIOTAP_RATE) | \
  44. (1 << IEEE80211_RADIOTAP_CHANNEL) | \
  45. (1 << IEEE80211_RADIOTAP_ANTENNA) | \
  46. (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) |\
  47. (1 << IEEE80211_RADIOTAP_RX_FLAGS) | \
  48. 0)