/drivers/net/wireless/libertas/types.h

http://github.com/mirrors/linux · C++ Header · 268 lines · 207 code · 47 blank · 14 comment · 0 complexity · 919c40d1423fab89f1b52d720b3845fa MD5 · raw file

  1. /*
  2. * This header file contains definition for global types
  3. */
  4. #ifndef _LBS_TYPES_H_
  5. #define _LBS_TYPES_H_
  6. #include <linux/if_ether.h>
  7. #include <linux/ieee80211.h>
  8. #include <asm/byteorder.h>
  9. struct ieee_ie_header {
  10. u8 id;
  11. u8 len;
  12. } __packed;
  13. struct ieee_ie_cf_param_set {
  14. struct ieee_ie_header header;
  15. u8 cfpcnt;
  16. u8 cfpperiod;
  17. __le16 cfpmaxduration;
  18. __le16 cfpdurationremaining;
  19. } __packed;
  20. struct ieee_ie_ibss_param_set {
  21. struct ieee_ie_header header;
  22. __le16 atimwindow;
  23. } __packed;
  24. union ieee_ss_param_set {
  25. struct ieee_ie_cf_param_set cf;
  26. struct ieee_ie_ibss_param_set ibss;
  27. } __packed;
  28. struct ieee_ie_fh_param_set {
  29. struct ieee_ie_header header;
  30. __le16 dwelltime;
  31. u8 hopset;
  32. u8 hoppattern;
  33. u8 hopindex;
  34. } __packed;
  35. struct ieee_ie_ds_param_set {
  36. struct ieee_ie_header header;
  37. u8 channel;
  38. } __packed;
  39. union ieee_phy_param_set {
  40. struct ieee_ie_fh_param_set fh;
  41. struct ieee_ie_ds_param_set ds;
  42. } __packed;
  43. /* TLV type ID definition */
  44. #define PROPRIETARY_TLV_BASE_ID 0x0100
  45. /* Terminating TLV type */
  46. #define MRVL_TERMINATE_TLV_ID 0xffff
  47. #define TLV_TYPE_SSID 0x0000
  48. #define TLV_TYPE_RATES 0x0001
  49. #define TLV_TYPE_PHY_FH 0x0002
  50. #define TLV_TYPE_PHY_DS 0x0003
  51. #define TLV_TYPE_CF 0x0004
  52. #define TLV_TYPE_IBSS 0x0006
  53. #define TLV_TYPE_DOMAIN 0x0007
  54. #define TLV_TYPE_POWER_CAPABILITY 0x0021
  55. #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
  56. #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
  57. #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
  58. #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
  59. #define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 5)
  60. #define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 6)
  61. #define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 7)
  62. #define TLV_TYPE_LED_GPIO (PROPRIETARY_TLV_BASE_ID + 8)
  63. #define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 9)
  64. #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
  65. #define TLV_TYPE_REASSOCAP (PROPRIETARY_TLV_BASE_ID + 11)
  66. #define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 12)
  67. #define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 13)
  68. #define TLV_TYPE_BCASTPROBE (PROPRIETARY_TLV_BASE_ID + 14)
  69. #define TLV_TYPE_NUMSSID_PROBE (PROPRIETARY_TLV_BASE_ID + 15)
  70. #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
  71. #define TLV_TYPE_CRYPTO_DATA (PROPRIETARY_TLV_BASE_ID + 17)
  72. #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
  73. #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
  74. #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
  75. #define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 23)
  76. #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
  77. #define TLV_TYPE_MESH_ID (PROPRIETARY_TLV_BASE_ID + 37)
  78. #define TLV_TYPE_OLD_MESH_ID (PROPRIETARY_TLV_BASE_ID + 291)
  79. /* TLV related data structures */
  80. struct mrvl_ie_header {
  81. __le16 type;
  82. __le16 len;
  83. } __packed;
  84. struct mrvl_ie_data {
  85. struct mrvl_ie_header header;
  86. u8 Data[1];
  87. } __packed;
  88. struct mrvl_ie_rates_param_set {
  89. struct mrvl_ie_header header;
  90. u8 rates[1];
  91. } __packed;
  92. struct mrvl_ie_ssid_param_set {
  93. struct mrvl_ie_header header;
  94. u8 ssid[1];
  95. } __packed;
  96. struct mrvl_ie_wildcard_ssid_param_set {
  97. struct mrvl_ie_header header;
  98. u8 MaxSsidlength;
  99. u8 ssid[1];
  100. } __packed;
  101. struct chanscanmode {
  102. #ifdef __BIG_ENDIAN_BITFIELD
  103. u8 reserved_2_7:6;
  104. u8 disablechanfilt:1;
  105. u8 passivescan:1;
  106. #else
  107. u8 passivescan:1;
  108. u8 disablechanfilt:1;
  109. u8 reserved_2_7:6;
  110. #endif
  111. } __packed;
  112. struct chanscanparamset {
  113. u8 radiotype;
  114. u8 channumber;
  115. struct chanscanmode chanscanmode;
  116. __le16 minscantime;
  117. __le16 maxscantime;
  118. } __packed;
  119. struct mrvl_ie_chanlist_param_set {
  120. struct mrvl_ie_header header;
  121. struct chanscanparamset chanscanparam[1];
  122. } __packed;
  123. struct mrvl_ie_cf_param_set {
  124. struct mrvl_ie_header header;
  125. u8 cfpcnt;
  126. u8 cfpperiod;
  127. __le16 cfpmaxduration;
  128. __le16 cfpdurationremaining;
  129. } __packed;
  130. struct mrvl_ie_ds_param_set {
  131. struct mrvl_ie_header header;
  132. u8 channel;
  133. } __packed;
  134. struct mrvl_ie_rsn_param_set {
  135. struct mrvl_ie_header header;
  136. u8 rsnie[1];
  137. } __packed;
  138. struct mrvl_ie_tsf_timestamp {
  139. struct mrvl_ie_header header;
  140. __le64 tsftable[1];
  141. } __packed;
  142. /* v9 and later firmware only */
  143. struct mrvl_ie_auth_type {
  144. struct mrvl_ie_header header;
  145. __le16 auth;
  146. } __packed;
  147. /* Local Power capability */
  148. struct mrvl_ie_power_capability {
  149. struct mrvl_ie_header header;
  150. s8 minpower;
  151. s8 maxpower;
  152. } __packed;
  153. /* used in CMD_802_11_SUBSCRIBE_EVENT for SNR, RSSI and Failure */
  154. struct mrvl_ie_thresholds {
  155. struct mrvl_ie_header header;
  156. u8 value;
  157. u8 freq;
  158. } __packed;
  159. struct mrvl_ie_beacons_missed {
  160. struct mrvl_ie_header header;
  161. u8 beaconmissed;
  162. u8 reserved;
  163. } __packed;
  164. struct mrvl_ie_num_probes {
  165. struct mrvl_ie_header header;
  166. __le16 numprobes;
  167. } __packed;
  168. struct mrvl_ie_bcast_probe {
  169. struct mrvl_ie_header header;
  170. __le16 bcastprobe;
  171. } __packed;
  172. struct mrvl_ie_num_ssid_probe {
  173. struct mrvl_ie_header header;
  174. __le16 numssidprobe;
  175. } __packed;
  176. struct led_pin {
  177. u8 led;
  178. u8 pin;
  179. } __packed;
  180. struct mrvl_ie_ledgpio {
  181. struct mrvl_ie_header header;
  182. struct led_pin ledpin[1];
  183. } __packed;
  184. struct led_bhv {
  185. uint8_t firmwarestate;
  186. uint8_t led;
  187. uint8_t ledstate;
  188. uint8_t ledarg;
  189. } __packed;
  190. struct mrvl_ie_ledbhv {
  191. struct mrvl_ie_header header;
  192. struct led_bhv ledbhv[1];
  193. } __packed;
  194. /*
  195. * Meant to be packed as the value member of a struct ieee80211_info_element.
  196. * Note that the len member of the ieee80211_info_element varies depending on
  197. * the mesh_id_len
  198. */
  199. struct mrvl_meshie_val {
  200. uint8_t oui[3];
  201. uint8_t type;
  202. uint8_t subtype;
  203. uint8_t version;
  204. uint8_t active_protocol_id;
  205. uint8_t active_metric_id;
  206. uint8_t mesh_capability;
  207. uint8_t mesh_id_len;
  208. uint8_t mesh_id[IEEE80211_MAX_SSID_LEN];
  209. } __packed;
  210. struct mrvl_meshie {
  211. u8 id, len;
  212. struct mrvl_meshie_val val;
  213. } __packed;
  214. struct mrvl_mesh_defaults {
  215. __le32 bootflag;
  216. uint8_t boottime;
  217. uint8_t reserved;
  218. __le16 channel;
  219. struct mrvl_meshie meshie;
  220. } __packed;
  221. #endif