~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to ubuntu/rtl8192se/rtllib/dot11d.h

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-57i0gl3v99b3lkfg
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/******************************************************************************
2
 
 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
3
 
 *
4
 
 * This program is distributed in the hope that it will be useful, but WITHOUT
5
 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6
 
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
7
 
 * more details.
8
 
 *
9
 
 * You should have received a copy of the GNU General Public License along with
10
 
 * this program; if not, write to the Free Software Foundation, Inc.,
11
 
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
12
 
 *
13
 
 * The full GNU General Public License is included in this distribution in the
14
 
 * file called LICENSE.
15
 
 *
16
 
 * Contact Information:
17
 
 * wlanfae <wlanfae@realtek.com>
18
 
******************************************************************************/
19
 
#ifndef __INC_DOT11D_H
20
 
#define __INC_DOT11D_H
21
 
 
22
 
#ifdef ENABLE_DOT11D
23
 
#include "rtllib.h"
24
 
 
25
 
 
26
 
 
27
 
typedef struct _CHNL_TXPOWER_TRIPLE {
28
 
        u8 FirstChnl;
29
 
        u8  NumChnls;
30
 
        u8  MaxTxPowerInDbm;
31
 
}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
32
 
 
33
 
typedef enum _DOT11D_STATE {
34
 
        DOT11D_STATE_NONE = 0,
35
 
        DOT11D_STATE_LEARNED,
36
 
        DOT11D_STATE_DONE,
37
 
}DOT11D_STATE;
38
 
 
39
 
typedef struct _RT_DOT11D_INFO {
40
 
 
41
 
        bool bEnabled; 
42
 
 
43
 
        u16 CountryIeLen; 
44
 
        u8  CountryIeBuf[MAX_IE_LEN];
45
 
        u8  CountryIeSrcAddr[6]; 
46
 
        u8  CountryIeWatchdog; 
47
 
 
48
 
        u8  channel_map[MAX_CHANNEL_NUMBER+1];  
49
 
        u8  MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];
50
 
 
51
 
        DOT11D_STATE State;
52
 
}RT_DOT11D_INFO, *PRT_DOT11D_INFO;
53
 
#define eqMacAddr(a,b)          ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )
54
 
#define cpMacAddr(des,src)      ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3],(des)[4]=(src)[4],(des)[5]=(src)[5])
55
 
#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo))
56
 
 
57
 
#define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled
58
 
#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)
59
 
 
60
 
#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) 
61
 
#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)
62
 
 
63
 
#define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \
64
 
        (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \
65
 
        false : \
66
 
        (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length)))
67
 
 
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)
72
 
 
73
 
#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)
74
 
 
75
 
void Dot11d_Init( struct rtllib_device *dev); 
76
 
void Dot11d_Channelmap(u8 channel_plan, struct rtllib_device* ieee);
77
 
void Dot11d_Reset(struct rtllib_device *dev);
78
 
void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr, u16 CoutryIeLen, u8 *pCoutryIe);
79
 
u8 DOT11D_GetMaxTxPwrInDbm(struct rtllib_device *dev, u8 Channel);
80
 
void DOT11D_ScanComplete(struct rtllib_device *dev);
81
 
int ToLegalChannel(struct rtllib_device *dev, u8 channel);
82
 
#endif 
83
 
#endif