11d.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /**
  2. * This header file contains data structures and
  3. * function declarations of 802.11d
  4. */
  5. #ifndef _LBS_11D_
  6. #define _LBS_11D_
  7. #include "types.h"
  8. #include "defs.h"
  9. #define UNIVERSAL_REGION_CODE 0xff
  10. /** (Beaconsize(256)-5(IEId,len,contrystr(3))/3(FirstChan,NoOfChan,MaxPwr)
  11. */
  12. #define MRVDRV_MAX_SUBBAND_802_11D 83
  13. #define COUNTRY_CODE_LEN 3
  14. #define MAX_NO_OF_CHAN 40
  15. struct cmd_ds_command;
  16. /** Data structure for Country IE*/
  17. struct ieee_subbandset {
  18. u8 firstchan;
  19. u8 nrchan;
  20. u8 maxtxpwr;
  21. } __attribute__ ((packed));
  22. struct ieee_ie_country_info_set {
  23. struct ieee_ie_header header;
  24. u8 countrycode[COUNTRY_CODE_LEN];
  25. struct ieee_subbandset subband[1];
  26. };
  27. struct ieee_ie_country_info_full_set {
  28. struct ieee_ie_header header;
  29. u8 countrycode[COUNTRY_CODE_LEN];
  30. struct ieee_subbandset subband[MRVDRV_MAX_SUBBAND_802_11D];
  31. } __attribute__ ((packed));
  32. struct mrvl_ie_domain_param_set {
  33. struct mrvl_ie_header header;
  34. u8 countrycode[COUNTRY_CODE_LEN];
  35. struct ieee_subbandset subband[1];
  36. } __attribute__ ((packed));
  37. struct cmd_ds_802_11d_domain_info {
  38. __le16 action;
  39. struct mrvl_ie_domain_param_set domain;
  40. } __attribute__ ((packed));
  41. /** domain regulatory information */
  42. struct lbs_802_11d_domain_reg {
  43. /** country Code*/
  44. u8 countrycode[COUNTRY_CODE_LEN];
  45. /** No. of subband*/
  46. u8 nr_subband;
  47. struct ieee_subbandset subband[MRVDRV_MAX_SUBBAND_802_11D];
  48. };
  49. struct chan_power_11d {
  50. u8 chan;
  51. u8 pwr;
  52. } __attribute__ ((packed));
  53. struct parsed_region_chan_11d {
  54. u8 band;
  55. u8 region;
  56. s8 countrycode[COUNTRY_CODE_LEN];
  57. struct chan_power_11d chanpwr[MAX_NO_OF_CHAN];
  58. u8 nr_chan;
  59. } __attribute__ ((packed));
  60. struct region_code_mapping {
  61. u8 region[COUNTRY_CODE_LEN];
  62. u8 code;
  63. };
  64. #endif