7 typedef struct _CHNL_TXPOWER_TRIPLE
{
11 } CHNL_TXPOWER_TRIPLE
, *PCHNL_TXPOWER_TRIPLE
;
13 typedef enum _DOT11D_STATE
{
14 DOT11D_STATE_NONE
= 0,
20 * struct _RT_DOT11D_INFO
21 * @CountryIeLen: value greater than 0 if @CountryIeBuf contains
22 * valid country information element.
23 * @chanell_map: holds channel values
25 * 1 - valid (active scan),
26 * 2 - valid (passive scan)
27 * @CountryIeSrcAddr - Source AP of the country IE
30 typedef struct _RT_DOT11D_INFO
{
34 u8 CountryIeBuf
[MAX_IE_LEN
];
35 u8 CountryIeSrcAddr
[6];
38 u8 channel_map
[MAX_CHANNEL_NUMBER
+1];
39 u8 MaxTxPwrDbmList
[MAX_CHANNEL_NUMBER
+1];
42 } RT_DOT11D_INFO
, *PRT_DOT11D_INFO
;
44 static inline void cpMacAddr(unsigned char *des
, unsigned char *src
)
49 #define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO) \
50 ((__pIeeeDev)->pDot11dInfo))
52 #define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled
53 #define IS_COUNTRY_IE_VALID(__pIeeeDev) \
54 (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)
56 #define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) \
57 eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
59 #define UPDATE_CIE_SRC(__pIeeeDev, __pTa) \
60 cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
62 #define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \
63 (((__Ie).Length == 0 || (__Ie).Length != \
64 GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? FALSE : \
65 (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, \
66 (__Ie).Octet, (__Ie).Length)))
68 #define CIE_WATCHDOG_TH 1
69 #define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog
70 #define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0
71 #define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev)
73 #define IS_DOT11D_STATE_DONE(__pIeeeDev) \
74 (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)
77 void Dot11d_Init(struct ieee80211_device
*dev
);
79 void Dot11d_Reset(struct ieee80211_device
*dev
);
81 void Dot11d_UpdateCountryIe(struct ieee80211_device
*dev
, u8
*pTaddr
,
82 u16 CoutryIeLen
, u8
*pCoutryIe
);
84 u8
DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device
*dev
, u8 channel
);
86 void DOT11D_ScanComplete(struct ieee80211_device
*dev
);
88 int IsLegalChannel(struct ieee80211_device
*dev
, u8 channel
);
90 int ToLegalChannel(struct ieee80211_device
*dev
, u8 channel
);
92 #endif /* ENABLE_DOT11D */
93 #endif /* INC_DOT11D_H */