本文整理汇总了C++中rtw_led_control函数的典型用法代码示例。如果您正苦于以下问题:C++ rtw_led_control函数的具体用法?C++ rtw_led_control怎么用?C++ rtw_led_control使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rtw_led_control函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rtw_createbss_cmd
u8 rtw_createbss_cmd(struct adapter *padapter)
{
struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_bssid_ex *pdev_network = &padapter->registrypriv.dev_network;
u8 res = _SUCCESS;
rtw_led_control(padapter, LED_CTL_START_TO_LINK);
if (pmlmepriv->assoc_ssid.SsidLength == 0)
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for Any SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
else
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
if (pcmd == NULL) {
res = _FAIL;
goto exit;
}
INIT_LIST_HEAD(&pcmd->list);
pcmd->cmdcode = _CreateBss_CMD_;
pcmd->parmbuf = (unsigned char *)pdev_network;
pcmd->cmdsz = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pdev_network);
pcmd->rsp = NULL;
pcmd->rspsz = 0;
pdev_network->Length = pcmd->cmdsz;
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
exit:
return res;
}
示例2: rtw_hw_suspend23a
int rtw_hw_suspend23a(struct rtw_adapter *padapter)
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct net_device *pnetdev = padapter->pnetdev;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if ((!padapter->bup) || (padapter->bDriverStopped) ||
(padapter->bSurpriseRemoved)) {
DBG_8723A("padapter->bup =%d bDriverStopped =%d bSurpriseRemoved = %d\n",
padapter->bup, padapter->bDriverStopped,
padapter->bSurpriseRemoved);
goto error_exit;
}
if (padapter) { /* system suspend */
LeaveAllPowerSaveMode23a(padapter);
DBG_8723A("==> rtw_hw_suspend23a\n");
down(&pwrpriv->lock);
pwrpriv->bips_processing = true;
/* padapter->net_closed = true; */
/* s1. */
if (pnetdev) {
netif_carrier_off(pnetdev);
netif_tx_stop_all_queues(pnetdev);
}
/* s2. */
rtw_disassoc_cmd23a(padapter, 500, false);
/* s2-2. indicate disconnect to os */
/* rtw_indicate_disconnect23a(padapter); */
if (check_fwstate(pmlmepriv, _FW_LINKED)) {
_clr_fwstate_(pmlmepriv, _FW_LINKED);
rtw_led_control(padapter, LED_CTL_NO_LINK);
rtw_os_indicate_disconnect23a(padapter);
/* donnot enqueue cmd */
rtw_lps_ctrl_wk_cmd23a(padapter,
LPS_CTRL_DISCONNECT, 0);
}
/* s2-3. */
rtw_free_assoc_resources23a(padapter, 1);
/* s2-4. */
rtw_free_network_queue23a(padapter);
rtw_ips_dev_unload23a(padapter);
pwrpriv->rf_pwrstate = rf_off;
pwrpriv->bips_processing = false;
up(&pwrpriv->lock);
} else {
goto error_exit;
}
return 0;
error_exit:
DBG_8723A("%s, failed\n", __func__);
return -1;
}
示例3: rtw_hal_deinit
uint rtw_hal_deinit(_adapter *padapter)
{
uint status = _SUCCESS;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
int i;
_func_enter_;
status = padapter->HalFunc.hal_deinit(padapter);
if(status == _SUCCESS){
rtw_led_control(padapter, LED_CTL_POWER_OFF);
for (i = 0; i<dvobj->iface_nums; i++) {
padapter = dvobj->padapters[i];
padapter->hw_init_completed = _FALSE;
}
}
else
{
DBG_871X("\n rtw_hal_deinit: hal_init fail\n");
}
_func_exit_;
return status;
}
示例4: rtw_hal_init
uint rtw_hal_init(_adapter *padapter)
{
uint status = _SUCCESS;
#ifdef CONFIG_DUALMAC_CONCURRENT
if(padapter->hw_init_completed == _TRUE)
{
DBG_871X("rtw_hal_init: hw_init_completed == _TRUE\n");
return status;
}
// before init mac0, driver must init mac1 first to avoid usb rx error.
if((padapter->pbuddy_adapter != NULL) && (padapter->DualMacConcurrent == _TRUE)
&& (padapter->adapter_type == PRIMARY_ADAPTER))
{
if(padapter->pbuddy_adapter->hw_init_completed == _TRUE)
{
DBG_871X("rtw_hal_init: pbuddy_adapter hw_init_completed == _TRUE\n");
}
else
{
status = padapter->HalFunc.hal_init(padapter->pbuddy_adapter);
if(status == _SUCCESS){
padapter->pbuddy_adapter->hw_init_completed = _TRUE;
}
else{
padapter->pbuddy_adapter->hw_init_completed = _FALSE;
RT_TRACE(_module_hal_init_c_,_drv_err_,("rtw_hal_init: hal__init fail(pbuddy_adapter)\n"));
DBG_871X("rtw_hal_init: hal__init fail(pbuddy_adapter)\n");
return status;
}
}
}
#endif
padapter->hw_init_completed=_FALSE;
status = padapter->HalFunc.hal_init(padapter);
if(status == _SUCCESS){
padapter->hw_init_completed = _TRUE;
if (padapter->registrypriv.notch_filter == 1)
rtw_hal_notch_filter(padapter, 1);
rtw_hal_reset_security_engine(padapter);
rtw_led_control(padapter, LED_CTL_POWER_ON);
}
else{
padapter->hw_init_completed = _FALSE;
DBG_871X("rtw_hal_init: hal__init fail\n");
}
RT_TRACE(_module_hal_init_c_,_drv_err_,("-rtl871x_hal_init:status=0x%x\n",status));
return status;
}
示例5: netdev_close
//extern int rfpwrstate_check(_adapter *padapter);
static int netdev_close(struct net_device *pnetdev)
{
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+871x_drv - drv_close\n"));
if(padapter->pwrctrlpriv.bInternalAutoSuspend == _TRUE)
{
//rfpwrstate_check(padapter);
if(padapter->pwrctrlpriv.rf_pwrstate == rf_off)
padapter->pwrctrlpriv.ps_flag = _TRUE;
}
padapter->net_closed = _TRUE;
/* if(!padapter->hw_init_completed)
{
DBG_8192C("(1)871x_drv - drv_close, bup=%d, hw_init_completed=%d\n", padapter->bup, padapter->hw_init_completed);
padapter->bDriverStopped = _TRUE;
rtw_dev_unload(padapter);
}
else*/
if(padapter->pwrctrlpriv.rf_pwrstate == rf_on){
DBG_8192C("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%d\n", padapter->bup, padapter->hw_init_completed);
//s1.
if(pnetdev)
{
if (!netif_queue_stopped(pnetdev))
netif_stop_queue(pnetdev);
}
#ifndef CONFIG_ANDROID
//s2.
//s2-1. issue rtw_disassoc_cmd to fw
rtw_disassoc_cmd(padapter);
//s2-2. indicate disconnect to os
rtw_indicate_disconnect(padapter);
//s2-3.
rtw_free_assoc_resources(padapter);
//s2-4.
rtw_free_network_queue(padapter,_TRUE);
#endif
// Close LED
rtw_led_control(padapter, LED_CTL_POWER_OFF);
}
RT_TRACE(_module_os_intfs_c_,_drv_info_,("-871x_drv - drv_close\n"));
DBG_8192C("-871x_drv - drv_close, bup=%d\n", padapter->bup);
return 0;
}
示例6: rtw_ips_pwr_down
void rtw_ips_pwr_down(struct adapter *padapter)
{
u32 start_time = jiffies;
DBG_88E("===> rtw_ips_pwr_down...................\n");
padapter->net_closed = true;
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload(padapter);
DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
}
示例7: rtw_ips_pwr_up
int rtw_ips_pwr_up(_adapter *padapter)
{
int result;
u32 start_time = rtw_get_current_time();
DBG_8192C("===> rtw_ips_pwr_up..............\n");
rtw_reset_drv_sw(padapter);
result = ips_netdrv_open(padapter);
rtw_led_control(padapter, LED_CTL_NO_LINK);
DBG_8192C("<=== rtw_ips_pwr_up.............. in %dms\n", rtw_get_passing_time_ms(start_time));
return result;
}
示例8: rtw_ips_pwr_down
void rtw_ips_pwr_down(struct adapter *padapter)
{
unsigned long start_time = jiffies;
DBG_88E("===> rtw_ips_pwr_down...................\n");
padapter->net_closed = true;
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload(padapter);
DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n",
jiffies_to_msecs(jiffies - start_time));
}
示例9: rtw_ips_pwr_down
void rtw_ips_pwr_down(_adapter *padapter)
{
u32 start_time = rtw_get_current_time();
DBG_8192C("===> rtw_ips_pwr_down...................\n");
padapter->bCardDisableWOHSM = _TRUE;
padapter->net_closed = _TRUE;
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload(padapter);
padapter->bCardDisableWOHSM = _FALSE;
DBG_8192C("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
}
示例10: rtw_ips_pwr_down
void rtw_ips_pwr_down(struct adapter *padapter)
{
u32 start_time = rtw_get_current_time();
DBG_88E("===> rtw_ips_pwr_down...................\n");
padapter->bCardDisableWOHSM = true;
padapter->net_closed = true;
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload(padapter);
padapter->bCardDisableWOHSM = false;
DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
}
示例11: netdev_close
int netdev_close(struct net_device *pnetdev)
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+88eu_drv - drv_close\n"));
if (padapter->pwrctrlpriv.bInternalAutoSuspend) {
if (padapter->pwrctrlpriv.rf_pwrstate == rf_off)
padapter->pwrctrlpriv.ps_flag = true;
}
padapter->net_closed = true;
if (padapter->pwrctrlpriv.rf_pwrstate == rf_on) {
DBG_88E("(2)88eu_drv - drv_close, bup =%d, hw_init_completed =%d\n",
padapter->bup, padapter->hw_init_completed);
/* s1. */
if (pnetdev) {
if (!rtw_netif_queue_stopped(pnetdev))
rtw_netif_stop_queue(pnetdev);
}
/* s2. */
LeaveAllPowerSaveMode(padapter);
rtw_disassoc_cmd(padapter, 500, false);
/* 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);
/* Close LED */
rtw_led_control(padapter, LED_CTL_POWER_OFF);
}
nat25_db_cleanup(padapter);
#ifdef CONFIG_88EU_P2P
rtw_p2p_enable(padapter, P2P_ROLE_DISABLE);
#endif /* CONFIG_88EU_P2P */
kfree(dvobj->firmware.szFwBuffer);
dvobj->firmware.szFwBuffer = NULL;
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-88eu_drv - drv_close\n"));
DBG_88E("-88eu_drv - drv_close, bup =%d\n", padapter->bup);
return 0;
}
示例12: rtw_ips_pwr_up
int rtw_ips_pwr_up(struct adapter *padapter)
{
int result;
unsigned long start_time = jiffies;
DBG_88E("===> rtw_ips_pwr_up..............\n");
rtw_reset_drv_sw(padapter);
result = ips_netdrv_open(padapter);
rtw_led_control(padapter, LED_CTL_NO_LINK);
DBG_88E("<=== rtw_ips_pwr_up.............. in %dms\n",
jiffies_to_msecs(jiffies - start_time));
return result;
}
示例13: rtw_ips_pwr_down23a
void rtw_ips_pwr_down23a(struct rtw_adapter *padapter)
{
unsigned long start_time = jiffies;
DBG_8723A("===> rtw_ips_pwr_down23a...................\n");
padapter->bCardDisableWOHSM = true;
padapter->net_closed = true;
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload23a(padapter);
padapter->bCardDisableWOHSM = false;
DBG_8723A("<=== rtw_ips_pwr_down23a..................... in %dms\n",
jiffies_to_msecs(jiffies - start_time));
}
示例14: netdev_close
int netdev_close(struct net_device *pnetdev)
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
struct hal_data_8188e *rtlhal = GET_HAL_DATA(padapter);
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+88eu_drv - drv_close\n"));
if (padapter->pwrctrlpriv.bInternalAutoSuspend) {
if (padapter->pwrctrlpriv.rf_pwrstate == rf_off)
padapter->pwrctrlpriv.ps_flag = true;
}
padapter->net_closed = true;
if (padapter->pwrctrlpriv.rf_pwrstate == rf_on) {
DBG_88E("(2)88eu_drv - drv_close, bup =%d, hw_init_completed =%d\n",
padapter->bup, padapter->hw_init_completed);
/* s1. */
if (pnetdev) {
if (!rtw_netif_queue_stopped(pnetdev))
netif_tx_stop_all_queues(pnetdev);
}
/* s2. */
LeaveAllPowerSaveMode(padapter);
rtw_disassoc_cmd(padapter, 500, false);
/* 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);
/* Close LED */
rtw_led_control(padapter, LED_CTL_POWER_OFF);
}
kfree(rtlhal->pfirmware);
rtlhal->pfirmware = NULL;
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-88eu_drv - drv_close\n"));
DBG_88E("-88eu_drv - drv_close, bup =%d\n", padapter->bup);
return 0;
}
示例15: rtw_hal_init
uint rtw_hal_init(_adapter *padapter)
{
uint status = _SUCCESS;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
int i;
status = padapter->HalFunc.hal_init(padapter);
if(status == _SUCCESS){
for (i = 0; i<dvobj->iface_nums; i++)
dvobj->padapters[i]->hw_init_completed = _TRUE;
if (padapter->registrypriv.notch_filter == 1)
rtw_hal_notch_filter(padapter, 1);
rtw_hal_reset_security_engine(padapter);
for (i = 0; i<dvobj->iface_nums; i++)
rtw_sec_restore_wep_key(dvobj->padapters[i]);
rtw_led_control(padapter, LED_CTL_POWER_ON);
init_hw_mlme_ext(padapter);
rtw_hal_init_opmode(padapter);
#ifdef CONFIG_RF_GAIN_OFFSET
rtw_bb_rf_gain_offset(padapter);
#endif //CONFIG_RF_GAIN_OFFSET
}
else{
for (i = 0; i<dvobj->iface_nums; i++)
dvobj->padapters[i]->hw_init_completed = _FALSE;
DBG_871X("rtw_hal_init: hal__init fail\n");
}
RT_TRACE(_module_hal_init_c_,_drv_err_,("-rtl871x_hal_init:status=0x%x\n",status));
return status;
}