ieee80211_common.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * IEEE 802.11 driver (80211.o) -- hostapd interface
  3. * Copyright 2002-2004, Instant802 Networks, Inc.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef IEEE80211_COMMON_H
  10. #define IEEE80211_COMMON_H
  11. #include <linux/types.h>
  12. /*
  13. * This is common header information with user space. It is used on all
  14. * frames sent to wlan#ap interface.
  15. */
  16. #define IEEE80211_FI_VERSION 0x80211001
  17. struct ieee80211_frame_info {
  18. __be32 version;
  19. __be32 length;
  20. __be64 mactime;
  21. __be64 hosttime;
  22. __be32 phytype;
  23. __be32 channel;
  24. __be32 datarate;
  25. __be32 antenna;
  26. __be32 priority;
  27. __be32 ssi_type;
  28. __be32 ssi_signal;
  29. __be32 ssi_noise;
  30. __be32 preamble;
  31. __be32 encoding;
  32. /* Note: this structure is otherwise identical to capture format used
  33. * in linux-wlan-ng, but this additional field is used to provide meta
  34. * data about the frame to hostapd. This was the easiest method for
  35. * providing this information, but this might change in the future. */
  36. __be32 msg_type;
  37. } __attribute__ ((packed));
  38. enum ieee80211_msg_type {
  39. ieee80211_msg_normal = 0,
  40. ieee80211_msg_tx_callback_ack = 1,
  41. ieee80211_msg_tx_callback_fail = 2,
  42. ieee80211_msg_passive_scan = 3,
  43. ieee80211_msg_wep_frame_unknown_key = 4,
  44. ieee80211_msg_michael_mic_failure = 5,
  45. /* hole at 6, was monitor but never sent to userspace */
  46. ieee80211_msg_sta_not_assoc = 7,
  47. ieee80211_msg_set_aid_for_sta = 8 /* used by Intersil MVC driver */,
  48. ieee80211_msg_key_threshold_notification = 9,
  49. ieee80211_msg_radar = 11,
  50. };
  51. struct ieee80211_msg_set_aid_for_sta {
  52. char sta_address[ETH_ALEN];
  53. u16 aid;
  54. };
  55. struct ieee80211_msg_key_notification {
  56. int tx_rx_count;
  57. char ifname[IFNAMSIZ];
  58. u8 addr[ETH_ALEN]; /* ff:ff:ff:ff:ff:ff for broadcast keys */
  59. };
  60. enum ieee80211_phytype {
  61. ieee80211_phytype_fhss_dot11_97 = 1,
  62. ieee80211_phytype_dsss_dot11_97 = 2,
  63. ieee80211_phytype_irbaseband = 3,
  64. ieee80211_phytype_dsss_dot11_b = 4,
  65. ieee80211_phytype_pbcc_dot11_b = 5,
  66. ieee80211_phytype_ofdm_dot11_g = 6,
  67. ieee80211_phytype_pbcc_dot11_g = 7,
  68. ieee80211_phytype_ofdm_dot11_a = 8,
  69. ieee80211_phytype_dsss_dot11_turbog = 255,
  70. ieee80211_phytype_dsss_dot11_turbo = 256,
  71. };
  72. enum ieee80211_ssi_type {
  73. ieee80211_ssi_none = 0,
  74. ieee80211_ssi_norm = 1, /* normalized, 0-1000 */
  75. ieee80211_ssi_dbm = 2,
  76. ieee80211_ssi_raw = 3, /* raw SSI */
  77. };
  78. struct ieee80211_radar_info {
  79. int channel;
  80. int radar;
  81. int radar_type;
  82. };
  83. #endif /* IEEE80211_COMMON_H */