7 struct _CHNL_TXPOWER_TRIPLE
{
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 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];
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)-> \
71 #define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0
72 #define UPDATE_CIE_WATCHDOG(__pIeeeDev) (++GET_CIE_WATCHDOG(__pIeeeDev))
74 #define IS_DOT11D_STATE_DONE(__pIeeeDev) \
75 (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)
78 void Dot11d_Init(struct ieee80211_device
*dev
);
80 void Dot11d_Reset(struct ieee80211_device
*dev
);
82 void Dot11d_UpdateCountryIe(struct ieee80211_device
*dev
, u8
*pTaddr
,
83 u16 CoutryIeLen
, u8
*pCoutryIe
);
85 u8
DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device
*dev
, u8 channel
);
87 void DOT11D_ScanComplete(struct ieee80211_device
*dev
);
89 int IsLegalChannel(struct ieee80211_device
*dev
, u8 channel
);
91 int ToLegalChannel(struct ieee80211_device
*dev
, u8 channel
);
93 #endif /* ENABLE_DOT11D */
94 #endif /* INC_DOT11D_H */