2007-02-10 22:25:27 +08:00
|
|
|
/**
|
|
|
|
* This header file contains data structures and
|
|
|
|
* function declarations of 802.11d
|
|
|
|
*/
|
2007-11-16 07:05:47 +08:00
|
|
|
#ifndef _LBS_11D_
|
|
|
|
#define _LBS_11D_
|
2007-02-10 22:25:27 +08:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
#include "defs.h"
|
|
|
|
|
|
|
|
#define UNIVERSAL_REGION_CODE 0xff
|
|
|
|
|
|
|
|
/** (Beaconsize(256)-5(IEId,len,contrystr(3))/3(FirstChan,NoOfChan,MaxPwr)
|
|
|
|
*/
|
|
|
|
#define MRVDRV_MAX_SUBBAND_802_11D 83
|
|
|
|
|
|
|
|
#define COUNTRY_CODE_LEN 3
|
|
|
|
#define MAX_NO_OF_CHAN 40
|
|
|
|
|
|
|
|
struct cmd_ds_command;
|
|
|
|
|
|
|
|
/** Data structure for Country IE*/
|
2009-05-23 08:03:09 +08:00
|
|
|
struct ieee_subbandset {
|
2007-02-10 22:25:27 +08:00
|
|
|
u8 firstchan;
|
|
|
|
u8 nrchan;
|
|
|
|
u8 maxtxpwr;
|
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
2009-05-23 08:03:09 +08:00
|
|
|
struct ieee_ie_country_info_set {
|
|
|
|
struct ieee_ie_header header;
|
|
|
|
|
2007-02-10 22:25:27 +08:00
|
|
|
u8 countrycode[COUNTRY_CODE_LEN];
|
2009-05-23 08:03:09 +08:00
|
|
|
struct ieee_subbandset subband[1];
|
2007-02-10 22:25:27 +08:00
|
|
|
};
|
|
|
|
|
2009-05-23 08:03:09 +08:00
|
|
|
struct ieee_ie_country_info_full_set {
|
|
|
|
struct ieee_ie_header header;
|
|
|
|
|
2007-02-10 22:25:27 +08:00
|
|
|
u8 countrycode[COUNTRY_CODE_LEN];
|
2009-05-23 08:03:09 +08:00
|
|
|
struct ieee_subbandset subband[MRVDRV_MAX_SUBBAND_802_11D];
|
2007-02-10 22:25:27 +08:00
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
2009-05-23 08:03:09 +08:00
|
|
|
struct mrvl_ie_domain_param_set {
|
|
|
|
struct mrvl_ie_header header;
|
|
|
|
|
2007-02-10 22:25:27 +08:00
|
|
|
u8 countrycode[COUNTRY_CODE_LEN];
|
2009-05-23 08:03:09 +08:00
|
|
|
struct ieee_subbandset subband[1];
|
2007-02-10 22:25:27 +08:00
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
|
|
|
struct cmd_ds_802_11d_domain_info {
|
2007-05-26 11:36:54 +08:00
|
|
|
__le16 action;
|
2009-05-23 08:03:09 +08:00
|
|
|
struct mrvl_ie_domain_param_set domain;
|
2007-02-10 22:25:27 +08:00
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
|
|
|
/** domain regulatory information */
|
2007-11-16 07:05:47 +08:00
|
|
|
struct lbs_802_11d_domain_reg {
|
2007-02-10 22:25:27 +08:00
|
|
|
/** country Code*/
|
|
|
|
u8 countrycode[COUNTRY_CODE_LEN];
|
|
|
|
/** No. of subband*/
|
|
|
|
u8 nr_subband;
|
2009-05-23 08:03:09 +08:00
|
|
|
struct ieee_subbandset subband[MRVDRV_MAX_SUBBAND_802_11D];
|
2007-02-10 22:25:27 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct chan_power_11d {
|
|
|
|
u8 chan;
|
|
|
|
u8 pwr;
|
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
|
|
|
struct parsed_region_chan_11d {
|
|
|
|
u8 band;
|
|
|
|
u8 region;
|
|
|
|
s8 countrycode[COUNTRY_CODE_LEN];
|
|
|
|
struct chan_power_11d chanpwr[MAX_NO_OF_CHAN];
|
|
|
|
u8 nr_chan;
|
|
|
|
} __attribute__ ((packed));
|
|
|
|
|
|
|
|
struct region_code_mapping {
|
|
|
|
u8 region[COUNTRY_CODE_LEN];
|
|
|
|
u8 code;
|
|
|
|
};
|
|
|
|
|
2007-11-23 22:43:44 +08:00
|
|
|
struct lbs_private;
|
|
|
|
|
2007-11-16 07:05:47 +08:00
|
|
|
u8 lbs_get_scan_type_11d(u8 chan,
|
2007-02-10 22:25:27 +08:00
|
|
|
struct parsed_region_chan_11d *parsed_region_chan);
|
|
|
|
|
2008-03-19 21:25:58 +08:00
|
|
|
u32 lbs_chan_2_freq(u8 chan);
|
2007-02-10 22:25:27 +08:00
|
|
|
|
2007-11-23 22:43:44 +08:00
|
|
|
void lbs_init_11d(struct lbs_private *priv);
|
2007-02-10 22:25:27 +08:00
|
|
|
|
2007-11-23 22:43:44 +08:00
|
|
|
int lbs_set_universaltable(struct lbs_private *priv, u8 band);
|
2007-02-10 22:25:27 +08:00
|
|
|
|
2007-11-23 22:43:44 +08:00
|
|
|
int lbs_cmd_802_11d_domain_info(struct lbs_private *priv,
|
2007-02-10 22:25:27 +08:00
|
|
|
struct cmd_ds_command *cmd, u16 cmdno,
|
|
|
|
u16 cmdOption);
|
|
|
|
|
2008-03-19 21:25:58 +08:00
|
|
|
int lbs_ret_802_11d_domain_info(struct cmd_ds_command *resp);
|
2007-02-10 22:25:27 +08:00
|
|
|
|
2007-05-26 05:09:41 +08:00
|
|
|
struct bss_descriptor;
|
2007-11-23 22:43:44 +08:00
|
|
|
int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv,
|
2007-05-26 05:09:41 +08:00
|
|
|
struct bss_descriptor * bss);
|
2007-02-10 22:25:27 +08:00
|
|
|
|
2007-11-23 22:43:44 +08:00
|
|
|
int lbs_create_dnld_countryinfo_11d(struct lbs_private *priv);
|
2007-02-10 22:25:27 +08:00
|
|
|
|
2007-11-16 07:05:47 +08:00
|
|
|
#endif
|