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

📄 syswlanendpxa250.c

📁 vworks 下wlan的实现代码
💻 C
📖 第 1 页 / 共 2 页
字号:
/********************************************************************************* sysWlanMemInWord - read word from device** RETURNS: USHORT** NOMANUAL*/UINT16 sysWlanMemInWord    (    UINT32 port    )    {    UINT16 tempUINT16;    tempUINT16 = * (volatile UINT16 *) port;    return (tempUINT16);    }/********************************************************************************* sysWlanMemOutWord - write word to device** RETURNS: N/A** NOMANUAL*/void sysWlanMemOutWord    (    UINT32 port,    UINT16 data    )    {    * (volatile UINT16 *) port = data;    }/********************************************************************************* sysWlanMemInLong - read long from device** RETURNS: ULONG** NOMANUAL*/UINT32 sysWlanMemInLong    (    UINT32 port    )    {    UINT32 tempUINT32;    tempUINT32 = * (volatile UINT32 *) port;    return (tempUINT32);    }/********************************************************************************* sysWlanMemOutLong - write long to device** RETURNS: N/A** NOMANUAL*/void sysWlanMemOutLong    (    UINT32 port,    UINT32 data    )    {    * (volatile UINT32 *) port = data;    }/******************************************************************************** sysWlanIntConnect - enable the board level interrupt** This routine enables the board level interrupt.** Be aware that using the intConnect() routine usually allows only one* ISR per interrupt, and may result in interrupt conflicts with other* devices that may share the same interrupt.** RETURNS: N/A** NOMANUAL*/void sysWlanIntConnect    (    INT32    vector,      /* interrupt vector */    INT32    routine,     /* interrupt service routine */    INT32    parameter,   /* parameter used by the isr */    STATUS * result       /* result of api call */    )    {    WLAN_DEBUG(DEBUG_INFO, ("sysWlanIntConnect: Int connect to int #%d"                            " routine=%08x parameter=%08x\n",                            vector, routine, parameter));    *result = sysPccardIntConnect ((int)vector,                                (VOIDFUNCPTR)routine, (int)parameter);    }/********************************************************************************* sysWlanIntDisconnect - enable the board level interrupt** This routine enables the board level interrupt.** Be aware that using the intDisconnect() routine (if supported) may* inadvertently disable interrupts to multiple devices, if these devices* share the same interrupt.** RETURNS: N/A** NOMANUAL*/void sysWlanIntDisconnect    (    INT32    vector,      /* interrupt vector */    INT32    routine,     /* interrupt service routine */    INT32    parameter,   /* parameter used by the isr */    STATUS * result       /* result of api call */    )    {    *result = sysPccardIntDisconnect (vector);    }/********************************************************************************* sysWlanIntEnable - enable the board level interrupt** This routine enables the board level interrupt.** Be aware that using the intEnable() routine could have impact on other* devices which may be sharing the same interrupt.  In some cases it may be* better to enable interrupts directly on the device instead of using* intEnable().** RETURNS: N/A** NOMANUAL*/void sysWlanIntEnable    (    INT32    intLevel,  /* interrupt request level */    STATUS * result     /* result of API call */    )    {    WLAN_DEBUG(DEBUG_INFO,("sysWlanIntEnable: Int Enable int #%d\n",           intLevel));    *result = sysPccardIntEnable (intLevel);    }/********************************************************************************* sysWlanIntDisable - disable the board level interrupt** This routine disables the board level interrupt.** Be aware that using the intDisable() routine could have impact on other* devices which may be sharing the same interrupt.  In some cases it may be* better to disable interrupts directly on the device instead of using* intDisable().** RETURNS: N/A** NOMANUAL*/void sysWlanIntDisable    (    INT32    intLevel,  /* interrupt request level */    STATUS * result     /* result of API call */    )    {    *result = sysPccardIntDisable (intLevel);    }#ifdef INCLUDE_AIRONET_SHOWIMPORT STATUS  cisAironetShowInit (void);/****************************************************************************** sysWlanShowInit - Dummy routine used to get aironet show symbols into*                   image.** RETURNS:** NOMANUAL*/void sysWlanShowInit (void)    {    (void)  cisAironetShowInit ();    }#endif/****************************************************************************** sysWlanCfgParamGet - Routine used to get default card config parameters.** RETURNS:** NOMANUAL*/STATUS sysWlanCfgParamGet    (    UINT32 cmd,    INT32  data    )    {    /* Sanity check */    if (data == (INT32) NULL)        {        return (ERROR);        }    /* Get the config parameter */    switch (cmd)        {        case WLAN_SSID:            (void) sysWlanBcopy (WLAN_DEFAULT_SSID,                                 (UINT8 *) data,                                 strlen (WLAN_DEFAULT_SSID));            break;        case WLAN_STATION_NAME:            (void) sysWlanBcopy (WLAN_DEFAULT_STATION_NAME,                                 (UINT8 *) data,                                 strlen (WLAN_DEFAULT_STATION_NAME));            break;        case WLAN_STATION_MODE:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_STATION_MODE;            break;        case WLAN_CHANNEL:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_CHANNEL;            break;        case WLAN_TX_RATE:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_TX_RATE;            break;        case WLAN_BRATES_ENABLE:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_BRATES_ENABLE;            break;        case WLAN_BRATES:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_BRATES;            break;        case WLAN_PMANAGE_ENABLE:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_PMANAGE_ENABLE;            break;        case WLAN_AUTH_TYPE:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_AUTH_TYPE;            break;        case WLAN_WEP_ENABLE:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_WEP_ENABLE;            break;        case WLAN_WEP_TYPE:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_WEP_TYPE;            break;        case WLAN_WEP_KEY0_64:            (void) bcopy (WLAN_DEFAULT_WEP_KEY0_64,                          (char *) data,                          DOT11_40_BIT_KEY_SIZE);                        break;        case WLAN_WEP_KEY1_64:            (void) bcopy (WLAN_DEFAULT_WEP_KEY1_64,                          (char *) data,                          DOT11_40_BIT_KEY_SIZE);            break;        case WLAN_WEP_KEY2_64:            (void) bcopy (WLAN_DEFAULT_WEP_KEY2_64,                          (char *) data,                          DOT11_40_BIT_KEY_SIZE);            break;        case WLAN_WEP_KEY3_64:            (void) bcopy (WLAN_DEFAULT_WEP_KEY3_64,                          (char *) data,                          DOT11_40_BIT_KEY_SIZE);            break;        case WLAN_WEP_KEY0_128:            (void) bcopy (WLAN_DEFAULT_WEP_KEY0_128,                          (char *) data,                          DOT11_128_BIT_KEY_SIZE);            break;                    case WLAN_WEP_KEY_NUMBER:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_WEP_KEY_NUMBER;            break;        case WLAN_BYTE_ORDER:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_BYTE_ORDER;            break;        case WLAN_REGION:            * (UINT16 *) data = (UINT16) WLAN_DEFAULT_REGION;            break;        default:            return (ERROR);        }    return (OK);    }LOCAL void sysWlanBcopy    (    const UINT8 * pSrc,    UINT8 *       pDst,    UINT16        nBytes    )    {    FAST UINT32 i;    for (i=0; i<(nBytes); i+=2)        {#if (_BYTE_ORDER == _BIG_ENDIAN)        pDst[i+1] = pSrc[i];        pDst[i]   = pSrc[i+1];#else        pDst[i+1] = pSrc[i+1];        pDst[i]   = pSrc[i];#endif        }    }/********************************************************************************* sysWlanIOInByte - read byte from device** RETURNS: UCHAR** NOMANUAL*/UINT8 sysWlanIOInByte    (    UINT32 port    )    {    return sysWlanMemInByte(port);    }/********************************************************************************* sysWlanIOOutByte - write byte to device** RETURNS: N/A** NOMANUAL*/void sysWlanIOOutByte    (    UINT32 port,    UINT8  data    )    {    sysWlanMemOutByte(port,data);    }/********************************************************************************* sysWlanIOInWord - read word from device** RETURNS: USHORT** NOMANUAL*/UINT16 sysWlanIOInWord    (    UINT32 port    )    {    return sysWlanMemInWord(port);    }/********************************************************************************* sysWlanIOOutWord - write word to device** RETURNS: N/A** NOMANUAL*/void sysWlanIOOutWord    (    UINT32 port,    UINT16 data    )    {    sysWlanMemOutWord(port,data);    }/********************************************************************************* sysWlanIOInLong - read long from device** RETURNS: ULONG** NOMANUAL*/UINT32 sysWlanIOInLong    (    UINT32 port    )    {    return sysWlanMemInLong(port);    }/********************************************************************************* sysWlanIOOutLong - write long to device** RETURNS: N/A** NOMANUAL*/void sysWlanIOOutLong    (    UINT32 port,    UINT32 data    )    {    sysWlanMemOutLong(port, data);    }/****************************************************************************** wlanIoctl - generic routine to call a wlan card specific ioctl handler** RETURNS: OK or EINVAL**/int wlanIoctl    (    END_OBJ* pDrvCtrl,     /* Device handle for this card */    int cmd,               /* IOCTL command */    caddr_t data           /* Generic data pointer */    )    {    return (WLAN_IOCTL(pDrvCtrl, cmd, data));    }#endif /* INCLUDE_WLAN_END */

⌨️ 快捷键说明

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