radiotap.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <net/ieee80211_radiotap.h>
  3. struct tx_radiotap_hdr {
  4. struct ieee80211_radiotap_header hdr;
  5. u8 rate;
  6. u8 txpower;
  7. u8 rts_retries;
  8. u8 data_retries;
  9. } __packed;
  10. #define TX_RADIOTAP_PRESENT ( \
  11. (1 << IEEE80211_RADIOTAP_RATE) | \
  12. (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \
  13. (1 << IEEE80211_RADIOTAP_RTS_RETRIES) | \
  14. (1 << IEEE80211_RADIOTAP_DATA_RETRIES) | \
  15. 0)
  16. #define IEEE80211_FC_VERSION_MASK 0x0003
  17. #define IEEE80211_FC_TYPE_MASK 0x000c
  18. #define IEEE80211_FC_TYPE_MGT 0x0000
  19. #define IEEE80211_FC_TYPE_CTL 0x0004
  20. #define IEEE80211_FC_TYPE_DATA 0x0008
  21. #define IEEE80211_FC_SUBTYPE_MASK 0x00f0
  22. #define IEEE80211_FC_TOFROMDS_MASK 0x0300
  23. #define IEEE80211_FC_TODS_MASK 0x0100
  24. #define IEEE80211_FC_FROMDS_MASK 0x0200
  25. #define IEEE80211_FC_NODS 0x0000
  26. #define IEEE80211_FC_TODS 0x0100
  27. #define IEEE80211_FC_FROMDS 0x0200
  28. #define IEEE80211_FC_DSTODS 0x0300
  29. struct rx_radiotap_hdr {
  30. struct ieee80211_radiotap_header hdr;
  31. u8 flags;
  32. u8 rate;
  33. u8 antsignal;
  34. } __packed;
  35. #define RX_RADIOTAP_PRESENT ( \
  36. (1 << IEEE80211_RADIOTAP_FLAGS) | \
  37. (1 << IEEE80211_RADIOTAP_RATE) | \
  38. (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) |\
  39. 0)