⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mib_id.h

📁 mx27 f14v2 源代码。包括ADS板上诸多驱动的源码。
💻 H
字号:
//---------------------------------------------------------------------------
//Copyright (C) 2006, Freescale Semiconductor, Inc. All Rights Reserved.
// THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
// AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT 
//--------------------------------------------------------------------------
//
// File:  mib_id.h
// Header file for platform specific SDIO WLAN functions
//------------------------------------------------------------------------------

#ifndef  MIB_ID_INCLUDED
#define  MIB_ID_INCLUDED
                                                      
#include "wb_types.h"

#if defined(_MSC_VER)
    #pragma pack(push,1)
    #define PREPACK
    #define POSTPACK
#elif defined(__CC_ARM)
    #define PREPACK     __packed
    #define POSTPACK
#elif defined(__GNUC__)
    #define PREPACK
    #define POSTPACK    __attribute__ ((__packed__)) 
#else
    #error need to figure out packing syntax
#endif

/***************************************************************************/
/***                   Include File Dependencies                         ***/
/***************************************************************************/

/***************************************************************************/
/***                  Global data                                        ***/
/***************************************************************************/

/*----Macro Definitions-----------------------------------------------------*/
/* Keep up to date with hi_motab.h */

/* Accessibility of managed object - refer to hi_motab.h for use */

#define MIB_ACC_R             0  /* Read-only                           */
#define MIB_ACC_RW_ADOPT      1  /* Read-write prior to enabling the mac*/
                                     /* i.e. adopting a configuration       */
#define MIB_ACC_RW            2  /* Read-write at any time              */
#define MIB_ACC_W             3  /* Write-only at any time              */


/* Setup requirement for a manged object */
#define MIB_REQ_OPTIONAL      0  /* Value need not be specified         */
#define MIB_REQ_MANDATORY     1  /* Value must be give prior to adopt   */
#define MIB_REQ_NOTUSED       2  /* Value is not used by MAC s/w */


/* Conversion of Kus to us and vice versa - 2^10 us in 1 Kus */
#define MO_KUS_TO_US(kus_value) (((uint32)(kus_value)) << 10)
#define MO_US_TO_KUS(us_value)  ((us_value) >> 10)

#define MO_KUS_TO_S(kus_value)  ((((uint32)(kus_value)) << 10) / 1000000UL)
#define MO_S_TO_KUS(s_value)  ((((uint32)(s_value)) * 1000000UL) >> 10)

/* MIB key length validations */
#define MIB_WEP_KEY_INVALID_LENGTH  0        /* WEP key is not set */
#define MIB_WEP_KEY_WEP1_LENGTH     5        /* WEP key type 1 is 40 bits (5 bytes) */
                                    /* define other values for other keys here */


/***************************************************************************/
/***                       RSN MIB Objects                               ***/
/***************************************************************************/

/* RSN Control */
#define RSNMIB_DEFAULT_REPLAY_WINDOW        (0)

PREPACK typedef struct
{
    uint8   u8IsRsnEnabled;
    uint8   u8IsTsnEnabled;
} POSTPACK RSNMIB_CONTROL;

/* Pairwise alert thresholds */
PREPACK typedef struct
{
    uint16  u16TkipIcvErrorThreshold;
    uint16  u16TkipMicFailureThreshold;
    uint16  u16TkipReplayThreshold;
    uint16  u16CcmpMicFailureThreshold;
    uint16  u16CcmpReplayThreshold;
    uint16  u16NumTxThreshold;
} POSTPACK RSNMIB_PAIRWISE_ALERT_THRESHOLDS;

/* Group alert thresholds */
PREPACK typedef struct
{
    uint16  u16TkipIcvErrorThreshold;
    uint16  u16TkipMicFailureThreshold;
    uint16  u16CcmpMicFailureThreshold;
    uint16  u16NumTxThreshold;
} POSTPACK RSNMIB_GROUP_ALERT_THRESHOLDS;

/* RSN Information Element */
#define MIB_RSN_IE_MAX_LEN              40 // cm1412 FIXME - should this change to 258???
PREPACK typedef struct
{
    uint8   au8RsnIe[MIB_RSN_IE_MAX_LEN];
} POSTPACK MIB_RSN_IE_PARAMS;


/* WME Control */

PREPACK typedef struct
{
    uint16 au16Wme3Word[3];
} POSTPACK WME_3WORD_ARRAY;


PREPACK typedef struct
{
    uint16 au16Wme4Word[4];
} POSTPACK WME_4WORD_ARRAY;


PREPACK typedef struct
{
    uint8 au8Wme4Byte[4];
} POSTPACK WME_4BYTE_ARRAY;

/* These are set up by the values in CWmin and CWmax in the MIB */

#define MIB_WME_OUI_AND_VERSION_DEFAULT { { 0 MIB_COMMA 0x50 MIB_COMMA 0xF2} MIB_COMMA 2 MIB_COMMA 0 MIB_COMMA 1}


#define MIB_WME_CWMIN_DEFAULT_A_G      {CW_MIN_11A           MIB_COMMA \
                                        CW_MIN_11A           MIB_COMMA \
                                        ((CW_MIN_11A+1)/2)-1 MIB_COMMA \
                                        ((CW_MIN_11A+1)/4)-1 }

#define MIB_WME_CWMAX_DEFAULT_A_G      {CW_MAX_11A           MIB_COMMA \
                                        CW_MAX_11A           MIB_COMMA \
                                        CW_MIN_11A           MIB_COMMA \
                                        ((CW_MIN_11A+1)/2)-1 }

#define MIB_WME_CWMIN_DEFAULT_B        {CW_MIN_11B           MIB_COMMA \
                                        CW_MIN_11B           MIB_COMMA \
                                        ((CW_MIN_11B+1)/2)-1 MIB_COMMA \
                                        ((CW_MIN_11B+1)/4)-1 }

#define MIB_WME_CWMAX_DEFAULT_B        {CW_MAX_11B           MIB_COMMA \
                                        CW_MAX_11B           MIB_COMMA \
                                        CW_MIN_11B           MIB_COMMA \
                                        ((CW_MIN_11B+1)/2)-1 }

#define MIB_WME_AIFS_DEFAULT           {2 MIB_COMMA 1 MIB_COMMA 1 MIB_COMMA 1}
#define MIB_WME_TXOP_BUDGET_DEFAULT    {0x7fff MIB_COMMA 0x7fff MIB_COMMA 0x7fff}
#define MIB_WME_TXOP_LIMIT_DEFAULT_A_G {0 MIB_COMMA 1500/32 MIB_COMMA 3000/32 MIB_COMMA 1500/32}
#define MIB_WME_TXOP_LIMIT_DEFAULT_B   {0 MIB_COMMA 3000/32 MIB_COMMA 6000/32 MIB_COMMA 3000/32}
#define MIB_WME_LOAD_DEFAULT           {0 MIB_COMMA 0 MIB_COMMA 0}


#define MIB_WME_PARAMETERS_A_G         { MIB_WME_CWMIN_DEFAULT_A_G      MIB_COMMA \
                                         MIB_WME_CWMAX_DEFAULT_A_G      MIB_COMMA \
                                         MIB_WME_AIFS_DEFAULT           MIB_COMMA \
                                         MIB_WME_TXOP_LIMIT_DEFAULT_A_G MIB_COMMA \
                                         MIB_WME_TXOP_BUDGET_DEFAULT    MIB_COMMA \
                                         MIB_WME_LOAD_DEFAULT }

#define MIB_WME_PARAMETERS_B           { MIB_WME_CWMIN_DEFAULT_B        MIB_COMMA \
                                         MIB_WME_CWMAX_DEFAULT_B        MIB_COMMA \
                                         MIB_WME_AIFS_DEFAULT           MIB_COMMA \
                                         MIB_WME_TXOP_LIMIT_DEFAULT_B   MIB_COMMA \
                                         MIB_WME_TXOP_BUDGET_DEFAULT    MIB_COMMA \
                                         MIB_WME_LOAD_DEFAULT }

#define MIB_WME_DAMPING_DEFAULT        {230 MIB_COMMA 230 MIB_COMMA 230} /* 0.9 in 256ths */

/*--------------------------------------------------------------------------
 * Managed Object Type Definitions
 *
 * Description:     The country string to be used by the product
 *
 *                  The first two octets of this string is the two character
 *                  country code as described in document ISO/IEC 3166-1. 
 *
 *                  The third octet shall be one of the following:
 *
 *                  1. an ASCII space character, if the regulations under 
 *                     which the station is operating encompass all 
 *                     environments in the country,
 *
 *                  2. an ASCII 慜

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -