本文整理汇总了C++中rtw_msleep_os函数的典型用法代码示例。如果您正苦于以下问题:C++ rtw_msleep_os函数的具体用法?C++ rtw_msleep_os怎么用?C++ rtw_msleep_os使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rtw_msleep_os函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rtl8723as_xmit_handler
/*
* Description
* Transmit xmitframe from queue
*
* Return
* _SUCCESS ok
* _FAIL something error
*/
s32 rtl8723as_xmit_handler(PADAPTER padapter)
{
struct xmit_priv *pxmitpriv;
PHAL_DATA_TYPE phal;
s32 ret;
_irqL irql;
pxmitpriv = &padapter->xmitpriv;
phal = GET_HAL_DATA(padapter);
wait:
ret = _rtw_down_sema(&phal->SdioXmitSema);
if (_FAIL == ret) {
RT_TRACE(_module_hal_xmit_c_, _drv_emerg_, ("%s: down sema fail!\n", __FUNCTION__));
return _FAIL;
}
next:
if ((padapter->bDriverStopped == _TRUE) ||
(padapter->bSurpriseRemoved == _TRUE)) {
RT_TRACE(_module_hal_xmit_c_, _drv_notice_,
("%s: bDriverStopped(%d) bSurpriseRemoved(%d)\n",
__FUNCTION__, padapter->bDriverStopped, padapter->bSurpriseRemoved));
return _FAIL;
}
_enter_critical_bh(&pxmitpriv->lock, &irql);
ret = rtw_txframes_pending(padapter);
_exit_critical_bh(&pxmitpriv->lock, &irql);
if (ret == 0) {
return _SUCCESS;
}
// dequeue frame and write to hardware
ret = xmit_xmitframes(padapter, pxmitpriv);
if (ret == -2) {
rtw_msleep_os(1);
goto next;
}
_enter_critical_bh(&pxmitpriv->lock, &irql);
ret = rtw_txframes_pending(padapter);
_exit_critical_bh(&pxmitpriv->lock, &irql);
if (ret == 1) {
rtw_msleep_os(1);
goto next;
}
return _SUCCESS;
}
开发者ID:jiangdoudou,项目名称:a31_422_v33_lichee,代码行数:60,代码来源:rtl8723as_xmit.c
示例2: wps_connect_to_AP_by_certificate
static void wps_connect_to_AP_by_certificate(rtw_network_info_t *wifi)
{
#define RETRY_COUNT 3
int retry_count = RETRY_COUNT, ret;
printf("\r\n=============== wifi_certificate_info ===============\n");
printf("\r\nwps_wifi.ssid = %s\n", wifi->ssid.val);
printf("\r\nsecurity_type = %d\n", wifi->security_type);
printf("\r\nwps_wifi.password = %s\n", wifi->password);
printf("\r\nssid_len = %d\n", wifi->ssid.len);
printf("\r\npassword_len = %d\n", wifi->password_len);
while (1) {
ret = wifi_connect((char*)wifi->ssid.val,
wifi->security_type,
(char*)wifi->password,
wifi->ssid.len,
wifi->password_len,
wifi->key_id,
NULL);
if (ret == RTW_SUCCESS) {
if(retry_count == RETRY_COUNT)
rtw_msleep_os(1000); //When start wps with OPEN AP, AP will send a disassociate frame after STA connected, need reconnect here.
if(RTW_SUCCESS == wifi_is_ready_to_transceive(RTW_STA_INTERFACE)){
//printf("\r\n[WPS]Ready to tranceive!!\n");
wps_check_and_show_connection_info();
break;
}
}
if (retry_count == 0) {
printf("\r\n[WPS]Join bss failed\n");
break;
}
retry_count --;
}
}
开发者ID:geliang201201,项目名称:RTL_Ameba,代码行数:35,代码来源:wifi_wps_config.c
示例3: wps_connect_to_AP_by_open_system
static int wps_connect_to_AP_by_open_system(char *target_ssid)
{
int retry_count = 3, ret;
if (target_ssid != NULL) {
rtw_msleep_os(500); //wait scan complete.
while (1) {
ret = wifi_connect(target_ssid,
RTW_SECURITY_OPEN,
NULL,
strlen(target_ssid),
0,
0,
NULL);
if (ret == RTW_SUCCESS) {
//wps_check_and_show_connection_info();
break;
}
if (retry_count == 0) {
printf("\r\n[WPS]Join bss failed\n");
return -1;
}
retry_count --;
}
//
} else {
printf("\r\n[WPS]Target SSID is NULL\n");
}
return 0;
}
开发者ID:geliang201201,项目名称:RTL_Ameba,代码行数:31,代码来源:wifi_wps_config.c
示例4: rtl8188es_dequeue_writeport
//todo: static
s32 rtl8188es_dequeue_writeport(PADAPTER padapter, u8 *freePage)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
struct xmit_buf *pxmitbuf;
PADAPTER pri_padapter = padapter;
s32 ret = 0;
#ifdef CONFIG_CONCURRENT_MODE
if (padapter->adapter_type > 0)
pri_padapter = padapter->pbuddy_adapter;
if(rtw_buddy_adapter_up(padapter))
ret = check_buddy_fwstate( padapter, _FW_UNDER_SURVEY);
#endif
ret = ret || check_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
if (_TRUE == ret)
pxmitbuf = dequeue_pending_xmitbuf_under_survey(pxmitpriv);
else
pxmitbuf = dequeue_pending_xmitbuf(pxmitpriv);
if (pxmitbuf == NULL)
return _TRUE;
query_free_page:
// check if hardware tx fifo page is enough
if( _FALSE == rtl8188es_query_tx_freepage(pri_padapter, pxmitbuf))
{
rtw_msleep_os(1);
goto query_free_page;
}
if ((padapter->bSurpriseRemoved == _TRUE)
|| (padapter->bDriverStopped == _TRUE)
#ifdef CONFIG_CONCURRENT_MODE
||((padapter->pbuddy_adapter)
&& ((padapter->pbuddy_adapter->bSurpriseRemoved) ||(padapter->pbuddy_adapter->bDriverStopped)))
#endif
){
RT_TRACE(_module_hal_xmit_c_, _drv_notice_,
("%s: bSurpriseRemoved(wirte port)\n", __FUNCTION__));
goto free_xmitbuf;
}
rtw_write_port(padapter, ffaddr2deviceId(pdvobjpriv, pxmitbuf->ff_hwaddr), pxmitbuf->len, (u8 *)pxmitbuf);
free_xmitbuf:
//rtw_free_xmitframe(pxmitpriv, pframe);
//pxmitbuf->priv_data = NULL;
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
#ifdef CONFIG_SDIO_TX_TASKLET
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
#endif
return _FAIL;
}
开发者ID:takitr,项目名称:linux-wetek-3.10.y-1,代码行数:61,代码来源:rtl8189es_xmit.c
示例5: rtl8723bs_xmit_handler
/*
* Description
* Transmit xmitframe from queue
*
* Return
* _SUCCESS ok
* _FAIL something error
*/
s32 rtl8723bs_xmit_handler(PADAPTER padapter)
{
struct xmit_priv *pxmitpriv;
s32 ret;
_irqL irql;
pxmitpriv = &padapter->xmitpriv;
wait:
ret = _rtw_down_sema(&pxmitpriv->SdioXmitSema);
if (_FAIL == ret) {
DBG_871X_LEVEL(_drv_emerg_, "%s: down sema fail!\n", __FUNCTION__);
return _FAIL;
}
next:
if ((padapter->bDriverStopped == _TRUE) ||
(padapter->bSurpriseRemoved == _TRUE)) {
RT_TRACE(_module_hal_xmit_c_, _drv_notice_,
("%s: bDriverStopped(%d) bSurpriseRemoved(%d)\n",
__FUNCTION__, padapter->bDriverStopped, padapter->bSurpriseRemoved));
return _FAIL;
}
_enter_critical_bh(&pxmitpriv->lock, &irql);
ret = rtw_txframes_pending(padapter);
_exit_critical_bh(&pxmitpriv->lock, &irql);
if (ret == 0) {
if(!padapter->registrypriv.wifi_spec)
rtw_yield_os();
return _SUCCESS;
}
// dequeue frame and write to hardware
ret = xmit_xmitframes(padapter, pxmitpriv);
if (ret == -2) {
//here sleep 1ms will cause big TP loss of TX
//from 50+ to 40+
if(padapter->registrypriv.wifi_spec)
rtw_msleep_os(1);
else
rtw_yield_os();
goto next;
}
_enter_critical_bh(&pxmitpriv->lock, &irql);
ret = rtw_txframes_pending(padapter);
_exit_critical_bh(&pxmitpriv->lock, &irql);
if (ret == 1) {
//rtw_msleep_os(1);
goto next;
}
return _SUCCESS;
}
开发者ID:avila-devlogic,项目名称:D33_KK_Kernel,代码行数:65,代码来源:rtl8723bs_xmit.c
示例6: MPT_DeInitAdapter
/*-----------------------------------------------------------------------------
* Function: MPT_DeInitAdapter()
*
* Overview: Extra DeInitialization for Mass Production Test.
*
* Input: PADAPTER pAdapter
*
* Output: NONE
*
* Return: NONE
*
* Revised History:
* When Who Remark
* 05/08/2007 MHC Create Version 0.
* 05/18/2007 MHC Add normal driver MPHalt code.
*
*---------------------------------------------------------------------------*/
VOID
MPT_DeInitAdapter(
IN PADAPTER pAdapter
)
{
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx;
pMptCtx->bMptDrvUnload = _TRUE;
#ifdef CONFIG_RTL8723A
_rtw_free_sema(&(pMptCtx->MPh2c_Sema));
_cancel_timer_ex( &pMptCtx->MPh2c_timeout_timer);
rtw_write32(pAdapter, 0xcc, (rtw_read32(pAdapter, 0xcc)& 0xFFFFFFFD)| 0x00000002);
rtw_write32(pAdapter, 0x6b, (rtw_read32(pAdapter, 0x6b)& 0xFFFFFFFB));
rtw_msleep_os(500);
rtw_write32(pAdapter, 0x6b, (rtw_read32(pAdapter, 0x6b)& 0xFFFFFFFB)| 0x00000004);
rtw_write32(pAdapter, 0xcc, (rtw_read32(pAdapter, 0xcc)& 0xFFFFFFFD));
rtw_msleep_os(1000);
DBG_871X("_rtw_mp_xmit_priv reinit for normal mode\n");
_rtw_mp_xmit_priv(&pAdapter->xmitpriv);
#endif
#if 0 // for Windows
PlatformFreeWorkItem( &(pMptCtx->MptWorkItem) );
while(pMptCtx->bMptWorkItemInProgress)
{
if(NdisWaitEvent(&(pMptCtx->MptWorkItemEvent), 50))
{
break;
}
}
NdisFreeSpinLock( &(pMptCtx->MptWorkItemSpinLock) );
#endif
}
开发者ID:Dee-UK,项目名称:RK3188_KK_4.4.02_Beta,代码行数:53,代码来源:rtw_mp.c
示例7: reset_tsf
int reset_tsf(PADAPTER Adapter, u8 reset_port )
{
u8 reset_cnt_before = 0, reset_cnt_after = 0, loop_cnt = 0;
u32 reg_reset_tsf_cnt = (IFACE_PORT0==reset_port) ?
REG_FW_RESET_TSF_CNT_0:REG_FW_RESET_TSF_CNT_1;
rtw_scan_abort(Adapter->pbuddy_adapter); /* site survey will cause reset_tsf fail */
reset_cnt_after = reset_cnt_before = rtw_read8(Adapter,reg_reset_tsf_cnt);
rtl8192d_reset_tsf(Adapter, reset_port);
while ((reset_cnt_after == reset_cnt_before ) && (loop_cnt < 10)) {
rtw_msleep_os(100);
loop_cnt++;
reset_cnt_after = rtw_read8(Adapter, reg_reset_tsf_cnt);
}
return(loop_cnt >= 10) ? _FAIL : _TRUE;
}
开发者ID:kozmo2k4,项目名称:linux-amlogic,代码行数:18,代码来源:rtl8192d_cmd.c
示例8: _rtw_mdelay_os
void _rtw_mdelay_os(int ms, const char *func, const int line)
{
#if 0
if(ms>10)
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
rtw_msleep_os(ms);
return;
#endif
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
#if defined(PLATFORM_LINUX)
mdelay((unsigned long)ms);
#endif
}
开发者ID:instantaphex,项目名称:rtl8723as,代码行数:20,代码来源:osdep_service.c
示例9: _is_fw_read_cmd_down
static u8 _is_fw_read_cmd_down(_adapter* padapter, u8 msgbox_num)
{
u8 read_down = _FALSE;
int retry_cnts = 100;
u8 valid;
//DBG_8192C(" _is_fw_read_cmd_down ,reg_1cc(%x),msg_box(%d)...\n",rtw_read8(padapter,REG_HMETFR),msgbox_num);
do{
valid = rtw_read8(padapter,REG_HMETFR) & BIT(msgbox_num);
if(0 == valid ){
read_down = _TRUE;
}
else
rtw_msleep_os(1);
}while( (!read_down) && (retry_cnts--));
return read_down;
}
开发者ID:BoteRock,项目名称:tl-wn723n-linux-4.3,代码行数:21,代码来源:rtl8188e_cmd.c
示例10: _rtw_mdelay_os
void _rtw_mdelay_os(int ms, const char *func, const int line)
{
if(ms>10)
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
rtw_msleep_os(ms);
return;
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
#if defined(PLATFORM_LINUX)
mdelay((unsigned long)ms);
#elif defined(PLATFORM_WINDOWS)
NdisStallExecution(ms*1000); //(us)*1000=(ms)
#endif
}
开发者ID:artm1248,项目名称:wifi,代码行数:22,代码来源:osdep_service.c
示例11: rtw_sdio_wait_enough_TxOQT_space
static u8 rtw_sdio_wait_enough_TxOQT_space(PADAPTER padapter, u8 agg_num)
{
u32 n = 0;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
while (pHalData->SdioTxOQTFreeSpace < agg_num)
{
if ((padapter->bSurpriseRemoved == _TRUE)
|| (padapter->bDriverStopped == _TRUE)
#ifdef CONFIG_CONCURRENT_MODE
||((padapter->pbuddy_adapter)
&& ((padapter->pbuddy_adapter->bSurpriseRemoved) ||(padapter->pbuddy_adapter->bDriverStopped)))
#endif
){
DBG_871X("%s: bSurpriseRemoved or bDriverStopped (wait TxOQT)\n", __func__);
return _FALSE;
}
HalQueryTxOQTBufferStatus8189ESdio(padapter);
if ((++n % 60) == 0) {
if ((n % 300) == 0) {
DBG_871X("%s(%d): QOT free space(%d), agg_num: %d\n",
__func__, n, pHalData->SdioTxOQTFreeSpace, agg_num);
}
rtw_msleep_os(1);
//yield();
}
}
pHalData->SdioTxOQTFreeSpace -= agg_num;
//if (n > 1)
// ++priv->pshare->nr_out_of_txoqt_space;
return _TRUE;
}
开发者ID:alex-deng,项目名称:a33_linux,代码行数:37,代码来源:rtl8189es_xmit.c
示例12: rtl8723bs_query_tx_freepage
static u8 rtl8723bs_query_tx_freepage(_adapter *padapter, struct xmit_buf *pxmitbuf)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
u8 TxRequiredPageNum = 0;
u8 DedicatedPgNum = 0;
u8 RequiredPublicFreePgNum = 0;
u8 PageIdx = 0;
u8 bResult = _TRUE;
u32 n, deviceId;
TxRequiredPageNum = pxmitbuf->pg_num;
deviceId = ffaddr2deviceId(pdvobjpriv, pxmitbuf->ff_hwaddr);
// translate fifo addr to queue index
switch (deviceId) {
case WLAN_TX_HIQ_DEVICE_ID:
PageIdx = HI_QUEUE_IDX;
break;
case WLAN_TX_MIQ_DEVICE_ID:
PageIdx = MID_QUEUE_IDX;
break;
case WLAN_TX_LOQ_DEVICE_ID:
PageIdx = LOW_QUEUE_IDX;
break;
}
// check if hardware tx fifo page is enough
n = 0;
do {
if ((padapter->bSurpriseRemoved == _TRUE) || (padapter->bDriverStopped == _TRUE)) {
RT_TRACE(_module_hal_xmit_c_, _drv_notice_,
("%s: bSurpriseRemoved(update TX FIFO page)\n", __FUNCTION__));
break;
}
// The number of page which public page is included is available .
if ((pHalData->SdioTxFIFOFreePage[PageIdx]+pHalData->SdioTxFIFOFreePage[PUBLIC_QUEUE_IDX]) > (TxRequiredPageNum+1)) {
DedicatedPgNum = pHalData->SdioTxFIFOFreePage[PageIdx];
if (TxRequiredPageNum <= DedicatedPgNum) {
pHalData->SdioTxFIFOFreePage[PageIdx] -= TxRequiredPageNum;
break;
} else {
pHalData->SdioTxFIFOFreePage[PageIdx] = 0;
RequiredPublicFreePgNum = TxRequiredPageNum - DedicatedPgNum;
pHalData->SdioTxFIFOFreePage[PUBLIC_QUEUE_IDX] -= RequiredPublicFreePgNum;
break;
}
}
n++;
#if 0
if (n >= 5000)
{
u8 reg_value_1 = 0;
u8 reg_value_2 = 0;
u8 reg_value_3 = 0;
//try to recover the transmission
reg_value_1 = rtw_read8(padapter, REG_SYS_FUNC_EN);
reg_value_2 = rtw_read8(padapter, REG_CR);
reg_value_3 = rtw_read8(padapter, REG_TXPAUSE);
DBG_871X("Before recovery: REG_SYS_FUNC_EN = 0x%X, REG_CR = 0x%X, REG_TXPAUSE = 0x%X\n", reg_value_1, reg_value_2, reg_value_3);
rtw_write8(padapter, REG_SYS_FUNC_EN, reg_value_1 | 0x01);
rtw_write8(padapter, REG_CR, reg_value_2 | 0xC0);
rtw_write8(padapter, REG_TXPAUSE, 0);
DBG_871X("After recovery: REG_SYS_FUNC_EN = 0x%X, REG_CR = 0x%X, REG_TXPAUSE = 0x%X\n",
rtw_read8(padapter, REG_SYS_FUNC_EN), rtw_read8(padapter, REG_CR), rtw_read8(padapter, REG_TXPAUSE));
}
#endif
if ((n % 0x7F) == 0) {//or 80
//DBG_871X("%s: FIFO starvation!(%d) len=%d agg=%d page=(R)%d(A)%d\n",
// __func__, n, pxmitbuf->len, pxmitbuf->agg_num, pframe->pg_num, freePage[PageIdx] + freePage[PUBLIC_QUEUE_IDX]);
rtw_msleep_os(1);
}
// Total number of page is NOT available, so update current FIFO status
HalQueryTxBufferStatus8723BSdio(padapter);
} while (1);
return bResult;
}
开发者ID:avila-devlogic,项目名称:D33_KK_Kernel,代码行数:88,代码来源:rtl8723bs_xmit.c
示例13: rtl8192d_set_wowlan_cmd
void rtl8192d_set_wowlan_cmd(_adapter* padapter)
{
u8 res=_SUCCESS;
u32 test=0;
struct recv_priv *precvpriv = &padapter->recvpriv;
SETWOWLAN_PARM pwowlan_parm;
struct pwrctrl_priv *pwrpriv=&padapter->pwrctrlpriv;
_func_enter_;
pwowlan_parm.mode =0;
pwowlan_parm.gpio_index=0;
pwowlan_parm.gpio_duration=0;
pwowlan_parm.second_mode =0;
pwowlan_parm.reserve=0;
//pause RX DMA
test = rtw_read8(padapter, REG_RXPKT_NUM+2);
test |= BIT(2);
rtw_write8(padapter, REG_RXPKT_NUM+2, test);
//286 BIT(1) , not 1(means idle) do rx urb
test = rtw_read8(padapter, REG_RXPKT_NUM+2) & BIT(1);
//printk("line(%d) 0x286=%d\n", __LINE__, rtw_read8(padapter, REG_RXPKT_NUM+2));
//check DMA idle?
while(test != BIT(1))
{
tasklet_schedule(&precvpriv->recv_tasklet);
test = rtw_read8(padapter, REG_RXPKT_NUM+2) & BIT(1);
rtw_msleep_os(10);
//printk("line(%d) 0x286=%d\n", __LINE__, test);
}
//mask usb se0 reset by Alex and DD
test = rtw_read8(padapter, 0xf8);
test &= ~(BIT(3)|BIT(4));
rtw_write8(padapter, 0xf8, test);
pwowlan_parm.mode |=FW_WOWLAN_FUN_EN;
//printk("\n %s 1.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
if(pwrpriv->wowlan_pattern ==_TRUE){
pwowlan_parm.mode |= FW_WOWLAN_PATTERN_MATCH;
//printk("\n %s 2.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
}
//if(pwrpriv->wowlan_magic ==_TRUE){
//pwowlan_parm.mode |=FW_WOWLAN_MAGIC_PKT;
//printk("\n %s 3.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
//}
if(pwrpriv->wowlan_unicast ==_TRUE){
pwowlan_parm.mode |=FW_WOWLAN_UNICAST;
//printk("\n %s 4.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
}
rtl8192d_set_FwJoinBssReport_cmd(padapter, 1);
//WOWLAN_GPIO_ACTIVE means GPIO high active
//pwowlan_parm.mode |=FW_WOWLAN_GPIO_ACTIVE;
pwowlan_parm.mode |=FW_WOWLAN_REKEY_WAKEUP;
pwowlan_parm.mode |=FW_WOWLAN_DEAUTH_WAKEUP;
//GPIO 0
pwowlan_parm.gpio_index=0;
//duration unit is 64us
pwowlan_parm.gpio_duration=0xff;
pwowlan_parm.second_mode|=FW_WOWLAN_GPIO_WAKEUP_EN;
pwowlan_parm.second_mode|=FW_FW_PARSE_MAGIC_PKT;
//printk("\n %s 5.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
{ u8 *ptr=(u8 *)&pwowlan_parm;
printk("\n %s H2C_WO_WLAN=%x %02x:%02x:%02x:%02x:%02x \n",__FUNCTION__,H2C_WO_WLAN_CMD,ptr[0],ptr[1],ptr[2],ptr[3],ptr[4] );
}
FillH2CCmd92D(padapter, H2C_WO_WLAN_CMD, 4, (u8 *)&pwowlan_parm);
//keep alive period = 3 * 10 BCN interval
pwowlan_parm.mode =3;
pwowlan_parm.gpio_index=3;
FillH2CCmd92D(padapter, KEEP_ALIVE_CONTROL_CMD, 2, (u8 *)&pwowlan_parm);
printk("%s after KEEP_ALIVE_CONTROL_CMD register 0x81=%x \n",__FUNCTION__,rtw_read8(padapter, 0x85));
pwowlan_parm.mode =1;
pwowlan_parm.gpio_index=0;
pwowlan_parm.gpio_duration=0;
FillH2CCmd92D(padapter, DISCONNECT_DECISION_CTRL_CMD, 3, (u8 *)&pwowlan_parm);
printk("%s after DISCONNECT_DECISION_CTRL_CMD register 0x81=%x \n",__FUNCTION__,rtw_read8(padapter, 0x85));
//enable GPIO wakeup
pwowlan_parm.mode =1;
pwowlan_parm.gpio_index=0;
pwowlan_parm.gpio_duration=0;
FillH2CCmd92D(padapter, REMOTE_WAKE_CTRL_CMD, 1, (u8 *)&pwowlan_parm);
printk("%s after DISCONNECT_DECISION_CTRL_CMD register \n",__FUNCTION__);
_func_exit_;
return ;
}
开发者ID:kozmo2k4,项目名称:linux-amlogic,代码行数:100,代码来源:rtl8192d_cmd.c
示例14: rtw_gspi_suspend
static int rtw_gspi_suspend(struct spi_device *spi, pm_message_t mesg)
{
struct dvobj_priv *dvobj = spi_get_drvdata(spi);
PADAPTER padapter = dvobj->if1;
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct net_device *pnetdev = padapter->pnetdev;
int ret = 0;
u32 start_time = rtw_get_current_time();
_func_enter_;
DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid);
pwrpriv->bInSuspend = _TRUE;
while (pwrpriv->bips_processing == _TRUE)
rtw_msleep_os(1);
if((!padapter->bup) || (padapter->bDriverStopped)||(padapter->bSurpriseRemoved))
{
DBG_871X("%s bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n", __FUNCTION__
,padapter->bup, padapter->bDriverStopped,padapter->bSurpriseRemoved);
goto exit;
}
rtw_cancel_all_timer(padapter);
LeaveAllPowerSaveMode(padapter);
//padapter->net_closed = _TRUE;
//s1.
if(pnetdev)
{
netif_carrier_off(pnetdev);
rtw_netif_stop_queue(pnetdev);
}
#ifdef CONFIG_WOWLAN
padapter->pwrctrlpriv.bSupportRemoteWakeup=_TRUE;
#else
//s2.
//s2-1. issue rtw_disassoc_cmd to fw
disconnect_hdl(padapter, NULL);
//rtw_disassoc_cmd(padapter);
#endif
#ifdef CONFIG_LAYER2_ROAMING_RESUME
if(check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED) )
{
DBG_871X("%s %s(" MAC_FMT "), length:%d assoc_ssid.length:%d\n",__FUNCTION__,
pmlmepriv->cur_network.network.Ssid.Ssid,
MAC_ARG(pmlmepriv->cur_network.network.MacAddress),
pmlmepriv->cur_network.network.Ssid.SsidLength,
pmlmepriv->assoc_ssid.SsidLength);
pmlmepriv->to_roaming = 1;
}
#endif
//s2-2. indicate disconnect to os
rtw_indicate_disconnect(padapter);
//s2-3.
rtw_free_assoc_resources(padapter, 1);
//s2-4.
rtw_free_network_queue(padapter, _TRUE);
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_dev_unload(padapter);
if(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
rtw_indicate_scan_done(padapter, 1);
if(check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
rtw_indicate_disconnect(padapter);
// interface deinit
gspi_deinit(dvobj);
RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("%s: deinit GSPI complete!\n", __FUNCTION__));
rtw_wifi_gpio_wlan_ctrl(WLAN_PWDN_OFF);
rtw_mdelay_os(1);
exit:
DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__
, ret, rtw_get_passing_time_ms(start_time));
_func_exit_;
return ret;
}
开发者ID:32743069,项目名称:amlogic_common_3050,代码行数:90,代码来源:gspi_intf.c
示例15: _rtw_pwr_wakeup
/*
* rtw_pwr_wakeup - Wake the NIC up from: 1)IPS. 2)USB autosuspend
* @adapter: pointer to _adapter structure
* @ips_deffer_ms: the ms wiil prevent from falling into IPS after wakeup
* Return _SUCCESS or _FAIL
*/
int _rtw_pwr_wakeup(struct rtw_adapter *padapter, u32 ips_deffer_ms,
const char *caller)
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int ret = _SUCCESS;
u32 start = rtw_get_current_time();
#ifdef CONFIG_CONCURRENT_MODE
if (padapter->pbuddy_adapter)
LeaveAllPowerSaveMode(padapter->pbuddy_adapter);
if ((padapter->isprimary == false) && padapter->pbuddy_adapter) {
padapter = padapter->pbuddy_adapter;
pwrpriv = &padapter->pwrctrlpriv;
pmlmepriv = &padapter->mlmepriv;
}
#endif
if (pwrpriv->ips_deny_time <
rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms))
pwrpriv->ips_deny_time =
rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms);
if (pwrpriv->ps_processing) {
DBG_8192D("%s wait ps_processing...\n", __func__);
while (pwrpriv->ps_processing &&
rtw_get_passing_time_ms(start) <= 3000)
rtw_msleep_os(10);
if (pwrpriv->ps_processing)
DBG_8192D("%s wait ps_processing timeout\n", __func__);
else
DBG_8192D("%s wait ps_processing done\n", __func__);
}
if (pwrpriv->bInternalAutoSuspend == false && pwrpriv->bInSuspend) {
DBG_8192D("%s wait bInSuspend...\n", __func__);
while (pwrpriv->bInSuspend &&
((rtw_get_passing_time_ms(start) <= 3000 &&
!rtw_is_do_late_resume(pwrpriv)) ||
(rtw_get_passing_time_ms(start) <= 500 &&
rtw_is_do_late_resume(pwrpriv)))) {
rtw_msleep_os(10);
}
if (pwrpriv->bInSuspend)
DBG_8192D("%s wait bInSuspend timeout\n", __func__);
else
DBG_8192D("%s wait bInSuspend done\n", __func__);
}
/* System suspend is not allowed to wakeup */
if ((pwrpriv->bInternalAutoSuspend == false) &&
(true == pwrpriv->bInSuspend)) {
ret = _FAIL;
goto exit;
}
/* block??? */
if ((pwrpriv->bInternalAutoSuspend == true) &&
(padapter->net_closed == true)) {
ret = _FAIL;
goto exit;
}
/* I think this should be check in IPS, LPS, autosuspend functions... */
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
ret = _SUCCESS;
goto exit;
}
if (rf_off == pwrpriv->rf_pwrstate) {
#ifdef CONFIG_AUTOSUSPEND
if (pwrpriv->brfoffbyhw == true) {
DBG_8192D("hw still in rf_off state ...........\n");
ret = _FAIL;
goto exit;
} else if (padapter->registrypriv.usbss_enable) {
DBG_8192D("%s call autoresume_enter....\n", __func__);
if (_FAIL == autoresume_enter(padapter)) {
DBG_8192D
("======> autoresume fail.............\n");
ret = _FAIL;
goto exit;
}
} else
#endif
{
#ifdef CONFIG_IPS
DBG_8192D("%s call ips_leave....\n", __func__);
if (_FAIL == ips_leave(padapter)) {
DBG_8192D
("======> ips_leave fail.............\n");
ret = _FAIL;
goto exit;
//.........这里部分代码省略.........
开发者ID:Eventide,项目名称:rtl8192du,代码行数:101,代码来源:rtw_pwrctrl.c
示例16: rtw_init_xmit_priv
s32 rtw_init_xmit_priv(PADAPTER padapter)
{
struct xmit_buf *pxmitbuf;
sint res=_SUCCESS;
int i , j=0;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
_rtw_init_queue(&pxmitpriv->free_xmit_queue);
_rtw_init_queue(&pxmitpriv->xmitbuf_pending_queue);
_rtw_spinlock_init(&pxmitpriv->lock_sctx);
_rtw_init_sema(&pxmitpriv->xmit_sema, 0);
//_rtw_init_sema(&padapter->XmitTerminateSema, 0);
pxmitpriv->padapter = padapter;
pxmitpriv->pallocated_freebuf = rtw_zvmalloc(NR_XMITBUFF*sizeof(struct xmit_buf)+4);
if(pxmitpriv->pallocated_freebuf==NULL)
{
DBG_871X("%s: pallocated_freebuf failed!\n", __FUNCTION__);
res = _FAIL;
goto exit;
}
pxmitpriv->xmit_freebuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitpriv->pallocated_freebuf), 4);
pxmitbuf = (struct xmit_buf *)pxmitpriv->xmit_freebuf;
for (i = 0; i < NR_XMITBUFF; i++)
{
_rtw_init_listhead(&(pxmitbuf->list));
pxmitbuf->padapter = padapter;
/* Tx buf allocation may fail sometimes, so sleep and retry. */
if((res=rtw_os_xmit_resource_alloc(padapter, pxmitbuf,(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE)) == _FAIL) {
rtw_msleep_os(10);
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf,(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE);
if (res == _FAIL) {
goto free_os_resource;
}
}
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
pxmitbuf->phead = pxmitbuf->pbuf;
pxmitbuf->pend = pxmitbuf->pbuf + MAX_XMITBUF_SZ;
pxmitbuf->pkt_len = 0;
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
#endif
rtw_list_insert_tail(&(pxmitbuf->list), &(pxmitpriv->free_xmit_queue.queue));
#ifdef DBG_XMIT_BUF
pxmitbuf->no=i;
#endif
pxmitbuf++;
}
pxmitpriv->free_xmitbuf_cnt = NR_XMITBUFF;
#ifdef CONFIG_USB_HCI
pxmitpriv->txirp_cnt=1;
_rtw_init_sema(&(pxmitpriv->tx_retevt), 0);
//per AC pending irp
pxmitpriv->beq_cnt = 0;
pxmitpriv->bkq_cnt = 0;
pxmitpriv->viq_cnt = 0;
pxmitpriv->voq_cnt = 0;
#endif
if((res = rtw_hal_init_xmit_priv(padapter)) == _FAIL)
goto free_os_resource;
free_os_resource:
if(res == _FAIL){
pxmitbuf = (struct xmit_buf *)pxmitpriv->xmit_freebuf;
for(j=1;j<i;j++)
{
rtw_os_xmit_resource_free(padapter, pxmitbuf,(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE);
pxmitbuf++;
}
}
if((res == _FAIL)&&(pxmitpriv->pallocated_freebuf))
rtw_vmfree(pxmitpriv->pallocated_freebuf, NR_XMITBUFF*sizeof(struct xmit_buf)+4);
exit:
_func_exit_;
return res;
}
开发者ID:yangkunming99,项目名称:linux_inic,代码行数:87,代码来源:rtw_xmit.c
示例17: promisc_test_all
static void promisc_test_all(int duration, unsigned char len_used)
{
int ch;
unsigned int start_time;
struct eth_frame *frame;
eth_buffer.head = NULL;
eth_buffer.tail = NULL;
wifi_enter_promisc_mode();
wifi_set_promisc(RTW_PROMISC_ENABLE_2, promisc_callback_all, len_used);
for(ch = 1; ch <= 13; ch ++) {
if(wifi_set_channel(ch) == 0)
printf("\n\n\rSwitch to channel(%d)", ch);
start_time = xTaskGetTickCount();
while(1) {
unsigned int current_time = xTaskGetTickCount();
if((current_time - start_time) < (duration * configTICK_RATE_HZ)) {
frame = retrieve_frame();
if(frame) {
int i;
printf("\n\rTYPE: 0x%x, ", frame->type);
printf("DA:");
for(i = 0; i < 6; i ++)
printf(" %02x", frame->da[i]);
printf(", SA:");
for(i = 0; i < 6; i ++)
printf(" %02x", frame->sa[i]);
printf(", len=%d", frame->len);
printf(", RSSI=%d", frame->rssi);
#if CONFIG_INIC_CMD_RSP
if(inic_frame_tail){
if(inic_frame_cnt < MAX_INIC_FRAME_NUM){
memcpy(inic_frame_tail->da, frame->da, 6);
memcpy(inic_frame_tail->sa, frame->sa, 6);
inic_frame_tail->len = frame->len;
inic_frame_tail->type = frame->type;
inic_frame_tail++;
inic_frame_cnt++;
}
}
#endif
vPortFree((void *) frame);
}
else
vTaskDelay(1); //delay 1 tick
}
else
break;
}
#if CONFIG_INIC_CMD_RSP
if(inic_frame){
inic_c2h_msg("ATWM", RTW_SUCCESS, (char *)inic_frame, sizeof(struct inic_eth_frame)*inic_frame_cnt);
memset(inic_frame, '\0', sizeof(struct inic_eth_frame)*MAX_INIC_FRAME_NUM);
inic_frame_tail = inic_frame;
inic_frame_cnt = 0;
rtw_msleep_os(10);
}
#endif
}
wifi_set_promisc(RTW_PROMISC_DISABLE, NULL, 0);
while((frame = retrieve_frame()) != NULL)
vPortFree((void *) frame);
}
开发者ID:alex1818,项目名称:rtk-8711af,代码行数:70,代码来源:wifi_promisc.c
示例18: rtw_set_ps_mode
void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps)
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
#ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo = &( padapter->wdinfo );
#endif //CONFIG_P2P
#ifdef CONFIG_TDLS
struct sta_priv *pstapriv = &padapter->stapriv;
_irqL irqL;
int i, j;
_list *plist, *phead;
struct sta_info *ptdls_sta;
#endif //CONFIG_TDLS
_func_enter_;
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
("%s: PowerMode=%d Smart_PS=%d\n",
__FUNCTION__, ps_mode, smart_ps));
if(ps_mode > PM_Card_Disable) {
RT_TRACE(_module_rtl871x_pwrctrl_c_,_drv_err_,("ps_mode:%d error\n", ps_mode));
return;
}
if((pwrpriv->pwr_mode == ps_mode) &&
(pwrpriv->smart_ps == smart_ps)){
return;
}
//if(pwrpriv->pwr_mode == PS_MODE_ACTIVE)
if(ps_mode == PS_MODE_ACTIVE)
{
#ifdef CONFIG_P2P_PS
if(pwdinfo->opp_ps == 0)
#endif // CONFIG_P2P_PS
{
#ifdef CONFIG_LPS_LCLK
_enter_pwrlock(&pwrpriv->lock);
#endif
DBG_871X("rtw_set_ps_mode(): Busy Traffic , Leave 802.11 power save..\n");
#ifdef CONFIG_TDLS
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
for(i=0; i< NUM_STA; i++)
{
phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
{
ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
if( ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE )
issue_nulldata_to_TDLS_peer_STA(padapter, ptdls_sta, 0);
plist = get_next(plist);
}
}
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
#endif //CONFIG_TDLS
pwrpriv->smart_ps = smart_ps;
pwrpriv->pwr_mode = ps_mode;
rtw_set_rpwm(padapter, PS_STATE_S4);
#ifdef CONFIG_LPS_LCLK
{
u32 n = 0;
while (pwrpriv->cpwm != PS_STATE_S4) {
n++;
if (n == 10000) break;
if (padapter->bSurpriseRemoved == _TRUE) break;
rtw_msleep_os(1);
}
if (n == 10000)
printk(KERN_ERR "%s: wait CPWM to S4 too long! cpwm=0x%02x\n", __func__, pwrpriv->cpwm);
}
#endif
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
pwrpriv->bFwCurrentInPSMode = _FALSE;
#ifdef CONFIG_LPS_LCLK
_exit_pwrlock(&pwrpriv->lock);
#endif
}
}
开发者ID:lwfinger,项目名称:rtl8192cu,代码行数:87,代码来源:rtw_pwrctrl.c
示例19: mptbt_BtSetGeneral
//.........这里部分代码省略.........
return paraLen;
}
bdAddr[0] = pBtReq->pParamStart[6];
bdAddr[1] = pBtReq->pParamStart[5];
bdAddr[2] = pBtReq->pParamStart[4];
bdAddr[3] = pBtReq->pParamStart[3];
bdAddr[4] = pBtReq->pParamStart[2];
bdAddr[5] = pBtReq->pParamStart[1];
DBG_8192C ("[MPT], target BDAddr:%s", &bdAddr[0]);
}
break;
case BT_GSET_TX_PWR_FINETUNE:
DBG_8192C("[MPT], [BT_GSET_TX_PWR_FINETUNE]\n");
validParaLen = 1;
if(setParaLen == validParaLen)
{
btOpcode = BT_LO_OP_SET_TX_POWER_CALIBRATION;
calVal = pBtReq->pParamStart[1];
if( (calVal<1) || (calVal>9) )
{
pBtRsp->status = (btOpcode<<8)|BT_STATUS_PARAMETER_OUT_OF_RANGE_U;
return paraLen;
}
DBG_8192C ("[MPT], calVal=%d\n", calVal);
}
break;
case BT_GSET_UPDATE_BT_PATCH:
if(IS_HARDWARE_TYPE_8723AE(Adapter) && Adapter->bFWReady)
{
u1Byte i;
DBG_8192C ("[MPT], write regs for load patch\n");
//BTFwPatch8723A(Adapter);
PlatformEFIOWrite1Byte(Adapter, 0xCC, 0x2d);
rtw_msleep_os(50);
PlatformEFIOWrite4Byte(Adapter, 0x68, 0xa005000c);
rtw_msleep_os(50);
PlatformEFIOWrite4Byte(Adapter, 0x68, 0xb005000c);
rtw_msleep_os(50);
PlatformEFIOWrite1Byte(Adapter, 0xCC, 0x29);
for(i=0; i<12; i++)
rtw_msleep_os(100);
//#if (DEV_BUS_TYPE == RT_PCI_INTERFACE)
// BTFwPatch8723A(Adapter);
//#endif
DBG_8192C("[MPT], load BT FW Patch finished!!!\n");
}
break;
default:
{
DBG_8192C ("[MPT], Error!! setType=%d, out of range\n", setType);
pBtRsp->status = BT_STATUS_PARAMETER_OUT_OF_RANGE_U;
return paraLen;
}
break;
}
if(setParaLen != validParaLen)
{
DBG_8192C("[MPT], Error!! wrong parameter length=%d for BT_SET_GEN_CMD cmd id=0x%x, paraLen should=0x%x\n",
setParaLen, setType, validParaLen);
pBtRsp->status = BT_STATUS_PARAMETER_FORMAT_ERROR_U;
return paraLen;
}
//
// execute lower layer opcodes
//
开发者ID:32743069,项目名称:amlogic_common_3050,代码行数:67,代码来源:rtw_bt_mp.c
示例20: rtl8188es_set_wowlan_cmd
void rtl8188es_set_wowlan_cmd(_adapter* padapter, u8 enable)
{
u8 res=_SUCCESS;
u32 test=0;
struct recv_priv *precvpriv = &padapter->recvpriv;
SETWOWLAN_PARM pwowlan_parm;
SETAOAC_GLOBAL_INFO paoac_global_info_parm;
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct security_priv *psecpriv = &padapter->securitypriv;
#ifdef CONFIG_GPIO_WAKEUP
u8 gpio_wake_pin = 7;
u8 gpio_high_active = 0; //default low active
#endif
_func_enter_;
DBG_871X_LEVEL(_drv_always_, "+%s+\n", __func__);
pwowlan_parm.mode =0;
pwowlan_parm.gpio_index=0;
pwowlan_parm.gpio_duration=0;
pwowlan_parm.second_mode =0;
pwowlan_parm.reserve=0;
if(enable){
pwowlan_parm.mode |=FW_WOWLAN_FUN_EN;
pwrpriv->wowlan_magic =_TRUE;
if (psecpriv->dot11PrivacyAlgrthm == _WEP40_ || psecpriv->dot11PrivacyAlgrthm == _WEP104_)
pwrpriv->wowlan_unicast =_TRUE;
if(pwrpriv->wowlan_pattern ==_TRUE){
pwowlan_parm.mode |= FW_WOWLAN_PATTERN_MATCH;
DBG_871X_LEVEL(_drv_info_, "%s 2.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
}
if(pwrpriv->wowlan_magic ==_TRUE){
pwowlan_parm.mode |=FW_WOWLAN_MAGIC_PKT;
DBG_871X_LEVEL(_drv_info_, "%s 3.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
}
if(pwrpriv->wowlan_unicast ==_TRUE){
pwowlan_parm.mode |=FW_WOWLAN_UNICAST;
DBG_871X_LEVEL(_drv_info_, "%s 4.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode );
}
pwowlan_parm.mode |=FW_WOWLAN_REKEY_WAKEUP;
pwowlan_parm.mode |=FW_WOWLAN_DEAUTH_WAKEUP;
//DataPinWakeUp
#ifdef CONFIG_USB_HCI
pwowlan_parm.gpio_index=0x0;
#endif //CONFIG_USB_HCI
#ifdef CONFIG_SDIO_HCI
pwowlan_parm.gpio_index = 0x80;
#endif //CONFIG_SDIO_HCI
#ifdef CONFIG_GPIO_WAKEUP
pwowlan_parm.gpio_index = gpio_wake_pin;
//WOWLAN_GPIO_ACTIVE means GPIO high active
//pwowlan_parm.mode |=FW_WOWLAN_GPIO_ACTIVE;
if (gpio_high_active)
pwowlan_parm.mode |=FW_WOWLAN_GPIO_ACTIVE;
#endif //CONFIG_GPIO_WAKEUP
DBG_871X_LEVEL(_drv_info_, "%s 5.pwowlan_parm.mode=0x%x \n",__FUNCTION__,pwowlan_parm.mode);
DBG_871X_LEVEL(_drv_info_, "%s 6.pwowlan_parm.index=0x%x \n",__FUNCTION__,pwowlan_parm.gpio_index);
res = FillH2CCmd_88E(padapter, H2C_COM_WWLAN, 2, (u8 *)&pwowlan_parm);
rtw_msleep_os(2);
//disconnect decision
pwowlan_parm.mode =1;
pwowlan_parm.gpio_index=0;
pwowlan_parm.gpio_duration=0;
FillH2CCmd_88E(padapter, H2C_COM_DISCNT_DECISION, 3, (u8 *)&pwowlan_parm);
//keep alive period = 10 * 10 BCN interval
pwowlan_parm.mode = FW_WOWLAN_KEEP_ALIVE_EN | FW_ADOPT_USER | FW_WOWLAN_KEEP_ALIVE_PKT_TYPE;
pwowlan_parm.gpio_index = 5;
res = FillH2CCmd_88E(padapter, H2C_COM_KEEP_ALIVE, 2, (u8 *)&pwowlan_parm);
rtw_msleep_os(2);
//Configure STA security information for GTK rekey wakeup event.
paoac_global_info_parm.pairwiseEncAlg =
padapter->securitypriv.dot11PrivacyAlgrthm;
paoac_global_info_parm.groupEncAlg =
padapter->securitypriv.dot118021XGrpPrivacy;
FillH2CCmd_88E(padapter, H2C_COM_AOAC_GLOBAL_INFO, 2, (u8 *)&paoac_global_info_parm);
rtw_msleep_os(2);
//enable Remote wake ctrl
pwowlan_parm.mode = FW_REMOTE_WAKE_CTRL_EN | FW_WOW_FW_UNICAST_EN | FW_ARP_EN;
if (psecpriv->dot11PrivacyAlgrthm == _AES_ || psecpriv->dot11PrivacyAlgrthm == _NO_PRIVACY_)
{
pwowlan_parm.gpio_index=0;
} else {
pwowlan_parm.gpio_index=1;
}
pwowlan_parm.gpio_duration=0;
//.........这里部分代码省略.........
开发者ID:takitr,项目名称:linux-wetek-3.10.y-1,代码行数:101,代码来源:rtl8188e_cmd.c
|
请发表评论