{
int res = _SUCCESS;
-_func_enter_;
sema_init(&(pcmdpriv->cmd_queue_sema), 0);
/* sema_init(&(pcmdpriv->cmd_done_sema), 0); */
pcmdpriv->cmd_done_cnt = 0;
pcmdpriv->rsp_cnt = 0;
exit:
-_func_exit_;
return res;
}
{
int res = _SUCCESS;
-_func_enter_;
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
atomic_set(&pevtpriv->event_seq, 0);
pevtpriv->c2h_wk_alive = false;
pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1);
-_func_exit_;
return res;
}
void rtw_free_evt_priv(struct evt_priv *pevtpriv)
{
-_func_enter_;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+rtw_free_evt_priv\n"));
}
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("-rtw_free_evt_priv\n"));
-_func_exit_;
}
void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv)
{
-_func_enter_;
if (pcmdpriv) {
if (pcmdpriv->cmd_allocated_buf)
if (pcmdpriv->rsp_allocated_buf)
kfree(pcmdpriv->rsp_allocated_buf);
}
-_func_exit_;
}
/*
{
unsigned long irqL;
-_func_enter_;
if (obj == NULL)
goto exit;
exit:
-_func_exit_;
return _SUCCESS;
}
unsigned long irqL;
struct cmd_obj *obj;
-_func_enter_;
spin_lock_irqsave(&queue->lock, irqL);
if (rtw_is_list_empty(&(queue->queue))) {
spin_unlock_irqrestore(&queue->lock, irqL);
-_func_exit_;
return obj;
}
u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
{
u32 res;
-_func_enter_;
res = _rtw_init_cmd_priv (pcmdpriv);
-_func_exit_;
return res;
}
u32 rtw_init_evt_priv (struct evt_priv *pevtpriv)
{
int res;
-_func_enter_;
res = _rtw_init_evt_priv(pevtpriv);
-_func_exit_;
return res;
}
void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
{
-_func_enter_;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("rtw_free_cmd_priv\n"));
_rtw_free_cmd_priv(pcmdpriv);
-_func_exit_;
}
static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
int res = _FAIL;
struct adapter *padapter = pcmdpriv->padapter;
-_func_enter_;
if (cmd_obj == NULL)
goto exit;
exit:
-_func_exit_;
return res;
}
{
struct cmd_obj *cmd_obj;
-_func_enter_;
cmd_obj = _rtw_dequeue_cmd(&pcmdpriv->cmd_queue);
-_func_exit_;
return cmd_obj;
}
void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv)
{
-_func_enter_;
pcmdpriv->cmd_done_cnt++;
/* up(&(pcmdpriv->cmd_done_sema)); */
-_func_exit_;
}
void rtw_free_cmd_obj(struct cmd_obj *pcmd)
{
-_func_enter_;
if ((pcmd->cmdcode != _JoinBss_CMD_) && (pcmd->cmdcode != _CreateBss_CMD_)) {
/* free parmbuf in cmd_obj */
/* free cmd_obj */
kfree(pcmd);
-_func_exit_;
}
int rtw_cmd_thread(void *context)
struct adapter *padapter = (struct adapter *)context;
struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
-_func_enter_;
thread_enter("RTW_CMD_THREAD");
up(&pcmdpriv->terminate_cmdthread_sema);
-_func_exit_;
complete_and_exit(NULL, 0);
}
u8 ret = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
exit:
-_func_exit_;
return ret;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
}
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
}
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
struct writeRF_parm *pwriterfparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
exit:
-_func_exit_;
return res;
}
void rtw_getbbrfreg_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd)
{
- _func_enter_;
kfree(pcmd->parmbuf);
kfree(pcmd);
if (padapter->registrypriv.mp_mode == 1)
padapter->mppriv.workparam.bcompleted = true;
-_func_exit_;
}
void rtw_readtssi_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd)
{
- _func_enter_;
kfree(pcmd->parmbuf);
kfree(pcmd);
if (padapter->registrypriv.mp_mode == 1)
padapter->mppriv.workparam.bcompleted = true;
-_func_exit_;
}
u8 rtw_createbss_cmd(struct adapter *padapter)
struct wlan_bssid_ex *pdev_network = &padapter->registrypriv.dev_network;
u8 res = _SUCCESS;
-_func_enter_;
rtw_led_control(padapter, LED_CTL_START_TO_LINK);
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL) {
exit:
-_func_exit_;
return res;
}
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
-_func_enter_;
rtw_led_control(padapter, LED_CTL_START_TO_LINK);
exit:
-_func_exit_;
return res;
}
struct cmd_priv *cmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_disassoc_cmd\n"));
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
exit:
-_func_exit_;
return res;
}
struct sta_info *sta = (struct sta_info *)psta;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
exit:
-_func_exit_;
return res;
}
struct sta_info *sta = (struct sta_info *)psta;
u8 res = _SUCCESS;
-_func_enter_;
if (!enqueue) {
clear_cam_entry(padapter, entry);
}
exit:
-_func_exit_;
return res;
}
struct setratable_parm *psetrttblparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
struct getratable_parm *pgetrttblparm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
exit:
-_func_exit_;
return res;
}
struct addBaReq_parm *paddbareq_parm;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
u8 res = _SUCCESS;
-_func_enter_;
DBG_88E(FUNC_NDEV_FMT" ch:%u, bw:%u, ch_offset:%u\n",
FUNC_NDEV_ARG(padapter->pnetdev), ch, bw, ch_offset);
DBG_88E(FUNC_NDEV_FMT" res:%u\n", FUNC_NDEV_ARG(padapter->pnetdev), res);
-_func_exit_;
return res;
}
u8 res = _SUCCESS;
-_func_enter_;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_chplan_cmd\n"));
exit:
-_func_exit_;
return res;
}
u8 res = _SUCCESS;
-_func_enter_;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_led_blink_cmd\n"));
exit:
-_func_exit_;
return res;
}
u8 res = _SUCCESS;
-_func_enter_;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_csa_cmd\n"));
exit:
-_func_exit_;
return res;
}
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
u8 mstatus;
-_func_enter_;
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true))
break;
}
-_func_exit_;
}
u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
/* struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv; */
u8 res = _SUCCESS;
-_func_enter_;
/* if (!pwrctrlpriv->bLeisurePs) */
/* return res; */
exit:
-_func_exit_;
return res;
}
u8 res = _SUCCESS;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
-_func_exit_;
return res;
}
u8 support_ant_div;
u8 res = _SUCCESS;
-_func_enter_;
rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &support_ant_div);
if (!support_ant_div)
return res;
}
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
return res;
exit:
-_func_exit_;
return res;
}
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
ppscmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ppscmd == NULL) {
exit:
-_func_exit_;
return res;
}
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
if (pcmd->res == H2C_DROPPED) {
/* TODO: cancel timer and do timeout handler directly... */
/* free cmd */
rtw_free_cmd_obj(pcmd);
-_func_exit_;
}
void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
if (pcmd->res != H2C_SUCCESS) {
spin_lock_bh(&pmlmepriv->lock);
spin_unlock_bh(&pmlmepriv->lock);
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n ***Error: disconnect_cmd_callback Fail ***\n."));
-
- goto exit;
+ return;
} else /* clear bridge database */
nat25_db_cleanup(padapter);
/* free cmd */
rtw_free_cmd_obj(pcmd);
-
-exit:
-
-_func_exit_;
}
void rtw_joinbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
if (pcmd->res == H2C_DROPPED) {
/* TODO: cancel timer and do timeout handler directly... */
rtw_free_cmd_obj(pcmd);
-_func_exit_;
}
void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf;
struct wlan_network *tgt_network = &(pmlmepriv->cur_network);
-_func_enter_;
if ((pcmd->res != H2C_SUCCESS)) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n ********Error: rtw_createbss_cmd_callback Fail ************\n\n."));
rtw_free_cmd_obj(pcmd);
-_func_exit_;
}
void rtw_setstaKey_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd)
struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *)(pcmd->rsp);
struct sta_info *psta = rtw_get_stainfo(pstapriv, psetstakey_rsp->addr);
-_func_enter_;
if (psta == NULL) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nERROR: rtw_setstaKey_cmdrsp_callback => can't get sta_info\n\n"));
}
exit:
rtw_free_cmd_obj(pcmd);
-_func_exit_;
}
void rtw_setassocsta_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd)
struct set_assocsta_rsp *passocsta_rsp = (struct set_assocsta_rsp *)(pcmd->rsp);
struct sta_info *psta = rtw_get_stainfo(pstapriv, passocsta_parm->addr);
-_func_enter_;
if (psta == NULL) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nERROR: setassocsta_cmdrsp_callbac => can't get sta_info\n\n"));
exit:
rtw_free_cmd_obj(pcmd);
-_func_exit_;
}
uint *frlen /* frame length */
)
{
-_func_enter_;
*pbuf = (u8)index;
*(pbuf + 1) = (u8)len;
*frlen = *frlen + (len + 2);
-_func_exit_;
return pbuf + len + 2;
}
{
int tmp, i;
u8 *p;
-_func_enter_;
if (limit < 1) {
- _func_exit_;
return NULL;
}
if (i >= limit)
break;
}
-_func_exit_;
return NULL;
}
void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
{
-_func_enter_;
_rtw_memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
break;
}
-_func_exit_;
}
uint rtw_get_rateset_len(u8 *rateset)
{
uint i = 0;
-_func_enter_;
while (1) {
if ((rateset[i]) == 0)
break;
break;
i++;
}
-_func_exit_;
return i;
}
struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;
u8 *ie = pdev_network->IEs;
-_func_enter_;
/* timestamp will be inserted by hardware */
sz += 8;
if (rateLen > 8)
ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz);
-_func_exit_;
return sz;
}
u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01};
uint cnt;
-_func_enter_;
/* Search required WPA or WPA2 IE and copy to sec_ie[] */
}
}
-_func_exit_;
return *rsn_len + *wpa_len;
}
struct intf_hdl *pintfhdl = &(pio_priv->intf);
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
- _func_enter_;
_read8 = pintfhdl->io_ops._read8;
r_val = _read8(pintfhdl, addr);
- _func_exit_;
return r_val;
}
struct io_priv *pio_priv = &adapter->iopriv;
struct intf_hdl *pintfhdl = &(pio_priv->intf);
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
-_func_enter_;
_read16 = pintfhdl->io_ops._read16;
r_val = _read16(pintfhdl, addr);
-_func_exit_;
return r_val;
}
struct io_priv *pio_priv = &adapter->iopriv;
struct intf_hdl *pintfhdl = &(pio_priv->intf);
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
-_func_enter_;
_read32 = pintfhdl->io_ops._read32;
r_val = _read32(pintfhdl, addr);
-_func_exit_;
return r_val;
}
struct intf_hdl *pintfhdl = &(pio_priv->intf);
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
int ret;
- _func_enter_;
_write8 = pintfhdl->io_ops._write8;
ret = _write8(pintfhdl, addr, val);
- _func_exit_;
return RTW_STATUS_CODE(ret);
}
struct intf_hdl *pintfhdl = &(pio_priv->intf);
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
int ret;
- _func_enter_;
_write16 = pintfhdl->io_ops._write16;
ret = _write16(pintfhdl, addr, val);
- _func_exit_;
return RTW_STATUS_CODE(ret);
}
struct intf_hdl *pintfhdl = &(pio_priv->intf);
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
int ret;
- _func_enter_;
_write32 = pintfhdl->io_ops._write32;
ret = _write32(pintfhdl, addr, val);
- _func_exit_;
return RTW_STATUS_CODE(ret);
}
struct intf_hdl *pintfhdl = (struct intf_hdl *)(&(pio_priv->intf));
int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
int ret;
- _func_enter_;
_writeN = pintfhdl->io_ops._writeN;
ret = _writeN(pintfhdl, addr, length, pdata);
- _func_exit_;
return RTW_STATUS_CODE(ret);
}
struct intf_hdl *pintfhdl = &(pio_priv->intf);
int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
int ret;
- _func_enter_;
_write8_async = pintfhdl->io_ops._write8_async;
ret = _write8_async(pintfhdl, addr, val);
- _func_exit_;
return RTW_STATUS_CODE(ret);
}
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
int ret;
-_func_enter_;
_write16_async = pintfhdl->io_ops._write16_async;
ret = _write16_async(pintfhdl, addr, val);
-_func_exit_;
return RTW_STATUS_CODE(ret);
}
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
int ret;
-_func_enter_;
_write32_async = pintfhdl->io_ops._write32_async;
ret = _write32_async(pintfhdl, addr, val);
-_func_exit_;
return RTW_STATUS_CODE(ret);
}
struct io_priv *pio_priv = &adapter->iopriv;
struct intf_hdl *pintfhdl = &(pio_priv->intf);
- _func_enter_;
if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
}
_read_mem = pintfhdl->io_ops._read_mem;
_read_mem(pintfhdl, addr, cnt, pmem);
- _func_exit_;
}
void _rtw_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
struct io_priv *pio_priv = &adapter->iopriv;
struct intf_hdl *pintfhdl = &(pio_priv->intf);
- _func_enter_;
_write_mem = pintfhdl->io_ops._write_mem;
_write_mem(pintfhdl, addr, cnt, pmem);
- _func_exit_;
}
void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
struct io_priv *pio_priv = &adapter->iopriv;
struct intf_hdl *pintfhdl = &(pio_priv->intf);
- _func_enter_;
if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
_read_port(pintfhdl, addr, cnt, pmem);
- _func_exit_;
}
void _rtw_read_port_cancel(struct adapter *adapter)
struct intf_hdl *pintfhdl = &(pio_priv->intf);
u32 ret = _SUCCESS;
- _func_enter_;
_write_port = pintfhdl->io_ops._write_port;
ret = _write_port(pintfhdl, addr, cnt, pmem);
- _func_exit_;
return ret;
}
u8 i;
u8 ret = true;
-_func_enter_;
if (ssid->SsidLength > 32) {
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid length >32\n"));
exit:
-_func_exit_;
-
return ret;
}
struct __queue *queue = &(pmlmepriv->scanned_queue);
u8 ret = _SUCCESS;
-_func_enter_;
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
exit:
-_func_exit_;
return ret;
}
u32 cur_time = 0;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
DBG_88E_LEVEL(_drv_info_, "set bssid:%pM\n", bssid);
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
("rtw_set_802_11_bssid: status=%d\n", status));
-_func_exit_;
return status;
}
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_network *pnetwork = &pmlmepriv->cur_network;
-_func_enter_;
DBG_88E_LEVEL(_drv_info_, "set ssid [%s] fw_state=0x%08x\n",
ssid->Ssid, get_fwstate(pmlmepriv));
exit:
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
("-rtw_set_802_11_ssid: status =%d\n", status));
-_func_exit_;
return status;
}
struct wlan_network *cur_network = &pmlmepriv->cur_network;
enum ndis_802_11_network_infra *pold_state = &(cur_network->network.InfrastructureMode);
-_func_enter_;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_notice_,
("+rtw_set_802_11_infrastructure_mode: old =%d new =%d fw_state = 0x%08x\n",
spin_unlock_bh(&pmlmepriv->lock);
}
-_func_exit_;
return true;
}
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
spin_lock_bh(&pmlmepriv->lock);
spin_unlock_bh(&pmlmepriv->lock);
-_func_exit_;
return true;
}
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 res = true;
-_func_enter_;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("+rtw_set_802_11_bssid_list_scan(), fw_state =%x\n", get_fwstate(pmlmepriv)));
}
exit:
-_func_exit_;
return res;
}
int res;
u8 ret;
-_func_enter_;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_802_11_auth.mode(): mode =%x\n", authmode));
else
ret = false;
-_func_exit_;
return ret;
}
struct security_priv *psecuritypriv = &(padapter->securitypriv);
u8 ret = _SUCCESS;
-_func_enter_;
keyid = wep->KeyIndex & 0x3fffffff;
if (res == _FAIL)
ret = false;
exit:
-_func_exit_;
return ret;
}
{
u8 ret = _SUCCESS;
-_func_enter_;
if (keyindex >= 0x80000000 || padapter == NULL) {
ret = false;
goto exit;
}
exit:
-_func_exit_;
return ret;
}
u8 bgrouptkey = false;/* can be removed later */
u8 ret = _SUCCESS;
-_func_enter_;
if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)) {
/* It is invalid to clear bit 31 and set bit 30. If the miniport driver encounters this combination, */
}
exit:
-_func_exit_;
return ret;
}
u8 keyIndex = (u8)key->KeyIndex & 0x03;
u8 ret = _SUCCESS;
-_func_enter_;
if ((key->KeyIndex & 0xbffffffc) > 0) {
ret = _FAIL;
}
exit:
-_func_exit_;
return ret;
}
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int res = _SUCCESS;
-_func_enter_;
-
/* We don't need to memset padapter->XXX to zero, because adapter is allocated by vzalloc(). */
pmlmepriv->nic_hdl = (u8 *)padapter;
rtw_init_mlme_timer(padapter);
exit:
-
-_func_exit_;
-
return res;
}
void _rtw_free_mlme_priv (struct mlme_priv *pmlmepriv)
{
-_func_enter_;
-
rtw_free_mlme_priv_ie_data(pmlmepriv);
if (pmlmepriv) {
if (pmlmepriv->free_bss_buf)
vfree(pmlmepriv->free_bss_buf);
}
-_func_exit_;
}
int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
{
-_func_enter_;
-
if (pnetwork == NULL)
goto exit;
spin_unlock_bh(&queue->lock);
exit:
-
-_func_exit_;
-
return _SUCCESS;
}
{
struct wlan_network *pnetwork;
-_func_enter_;
-
spin_lock_bh(&queue->lock);
if (_rtw_queue_empty(queue)) {
spin_unlock_bh(&queue->lock);
-_func_exit_;
-
return pnetwork;
}
struct __queue *free_queue = &pmlmepriv->free_bss_pool;
struct list_head *plist = NULL;
-_func_enter_;
-
spin_lock_bh(&free_queue->lock);
if (_rtw_queue_empty(free_queue) == true) {
exit:
spin_unlock_bh(&free_queue->lock);
-_func_exit_;
-
return pnetwork;
}
u32 lifetime = SCANQUEUE_LIFETIME;
struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
-_func_enter_;
-
if (pnetwork == NULL)
- goto exit;
+ return;
if (pnetwork->fixed)
- goto exit;
+ return;
curr_time = jiffies;
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)))
if (!isfreeall) {
delta_time = (curr_time - pnetwork->last_scanned)/HZ;
if (delta_time < lifetime)/* unit:sec */
- goto exit;
+ return;
}
spin_lock_bh(&free_queue->lock);
rtw_list_delete(&(pnetwork->list));
rtw_list_insert_tail(&(pnetwork->list), &(free_queue->queue));
pmlmepriv->num_of_scanned--;
spin_unlock_bh(&free_queue->lock);
-
-exit:
-_func_exit_;
}
void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork)
{
struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
-_func_enter_;
if (pnetwork == NULL)
- goto exit;
+ return;
if (pnetwork->fixed)
- goto exit;
+ return;
rtw_list_delete(&(pnetwork->list));
rtw_list_insert_tail(&(pnetwork->list), get_list_head(free_queue));
pmlmepriv->num_of_scanned--;
-exit:
-
-_func_exit_;
}
/*
struct wlan_network *pnetwork = NULL;
u8 zero_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
-_func_enter_;
if (!memcmp(zero_addr, addr, ETH_ALEN)) {
pnetwork = NULL;
goto exit;
if (plist == phead)
pnetwork = NULL;
exit:
-_func_exit_;
return pnetwork;
}
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct __queue *scanned_queue = &pmlmepriv->scanned_queue;
-_func_enter_;
-
-
spin_lock_bh(&scanned_queue->lock);
phead = get_list_head(scanned_queue);
_rtw_free_network(pmlmepriv, pnetwork, isfreeall);
}
spin_unlock_bh(&scanned_queue->lock);
-_func_exit_;
}
int rtw_if_up(struct adapter *padapter)
{
int res;
-_func_enter_;
if (padapter->bDriverStopped || padapter->bSurpriseRemoved ||
(check_fwstate(&padapter->mlmepriv, _FW_LINKED) == false)) {
} else {
res = true;
}
-
-_func_exit_;
return res;
}
{
u32 curtime = jiffies;
-_func_enter_;
pibss[0] = 0x02; /* in ad-hoc mode bit1 must set to 1 */
pibss[1] = 0x11;
pibss[2] = 0x87;
pibss[3] = (u8)(curtime & 0xff);/* p[0]; */
pibss[4] = (u8)((curtime>>8) & 0xff);/* p[1]; */
pibss[5] = (u8)((curtime>>16) & 0xff);/* p[2]; */
-_func_exit_;
return;
}
u16 rtw_get_capability(struct wlan_bssid_ex *bss)
{
__le16 val;
-_func_enter_;
memcpy((u8 *)&val, rtw_get_capability_from_ie(bss->IEs), 2);
-_func_exit_;
return le16_to_cpu(val);
}
int rtw_init_mlme_priv (struct adapter *padapter)/* struct mlme_priv *pmlmepriv) */
{
int res;
-_func_enter_;
res = _rtw_init_mlme_priv(padapter);/* (pmlmepriv); */
-_func_exit_;
return res;
}
void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv)
{
-_func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_free_mlme_priv\n"));
_rtw_free_mlme_priv (pmlmepriv);
-_func_exit_;
}
static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
{
- struct wlan_network *pnetwork;
-_func_enter_;
- pnetwork = _rtw_alloc_network(pmlmepriv);
-_func_exit_;
- return pnetwork;
+ return _rtw_alloc_network(pmlmepriv);
}
static void rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
struct wlan_network *pnetwork)
{
-_func_enter_;
_rtw_free_network_nolock(pmlmepriv, pnetwork);
-_func_exit_;
}
void rtw_free_network_queue(struct adapter *dev, u8 isfreeall)
{
-_func_enter_;
_rtw_free_network_queue(dev, isfreeall);
-_func_exit_;
}
/*
u16 s_cap, d_cap;
__le16 le_scap, le_dcap;
-_func_enter_;
memcpy((u8 *)&le_scap, rtw_get_capability_from_ie(src->IEs), 2);
memcpy((u8 *)&le_dcap, rtw_get_capability_from_ie(dst->IEs), 2);
s_cap = le16_to_cpu(le_scap);
d_cap = le16_to_cpu(le_dcap);
-_func_exit_;
-
return ((src->Ssid.SsidLength == dst->Ssid.SsidLength) &&
((!memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == true) &&
((!memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == true) &&
struct wlan_network *pwlan = NULL;
struct wlan_network *oldest = NULL;
-_func_enter_;
phead = get_list_head(scanned_queue);
plist = phead->next;
plist = plist->next;
}
-_func_exit_;
return oldest;
}
u8 sq_final;
long rssi_final;
-_func_enter_;
rtw_hal_antdiv_rssi_compared(padapter, dst, src); /* this will update src.Rssi, need consider again */
/* The rule below is 1/5 for sample value, 4/5 for history value */
dst->PhyInfo.SignalQuality = sq_final;
dst->Rssi = rssi_final;
-_func_exit_;
}
static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
{
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
-_func_enter_;
-
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) &&
(is_same_network(&(pmlmepriv->cur_network.network), pnetwork))) {
update_network(&(pmlmepriv->cur_network.network), pnetwork, adapter, true);
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof(struct ndis_802_11_fixed_ie),
pmlmepriv->cur_network.network.IELength);
}
-_func_exit_;
}
/*
struct wlan_network *pnetwork = NULL;
struct wlan_network *oldest = NULL;
-_func_enter_;
-
spin_lock_bh(&queue->lock);
phead = get_list_head(queue);
plist = phead->next;
exit:
spin_unlock_bh(&queue->lock);
-_func_exit_;
}
static void rtw_add_network(struct adapter *adapter,
struct wlan_bssid_ex *pnetwork)
{
-_func_enter_;
#if defined(CONFIG_88EU_P2P)
rtw_wlan_bssid_ex_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
#endif
update_current_network(adapter, pnetwork);
rtw_update_scanned_network(adapter, pnetwork);
-_func_exit_;
}
/* select the desired network based on the capability of the (i)bss. */
/* TODO: Perry: For Power Management */
void rtw_atimdone_event_callback(struct adapter *adapter , u8 *pbuf)
{
-_func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("receive atimdone_evet\n"));
-_func_exit_;
return;
}
struct wlan_bssid_ex *pnetwork;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
-_func_enter_;
-
pnetwork = (struct wlan_bssid_ex *)pbuf;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_survey_event_callback, ssid=%s\n", pnetwork->Ssid.Ssid));
exit:
spin_unlock_bh(&pmlmepriv->lock);
-
-_func_exit_;
-
return;
}
-
-
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
{
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct mlme_ext_priv *pmlmeext;
-_func_enter_;
spin_lock_bh(&pmlmepriv->lock);
if (pmlmepriv->wps_probe_req_ie) {
pmlmeext = &adapter->mlmeextpriv;
if (pmlmeext->sitesurvey_res.bss_cnt == 0)
rtw_hal_sreset_reset(adapter);
-_func_exit_;
}
void rtw_dummy_event_callback(struct adapter *adapter , u8 *pbuf)
struct __queue *scan_queue = &pmlmepriv->scanned_queue;
struct list_head *plist, *phead, *ptemp;
-_func_enter_;
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n"));
spin_lock_bh(&scan_queue->lock);
spin_lock_bh(&free_queue->lock);
spin_unlock_bh(&free_queue->lock);
spin_unlock_bh(&scan_queue->lock);
-
-_func_exit_;
}
/*
struct sta_priv *pstapriv = &adapter->stapriv;
struct wlan_network *tgt_network = &pmlmepriv->cur_network;
-_func_enter_;
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+rtw_free_assoc_resources\n"));
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
("tgt_network->network.MacAddress=%pM ssid=%s\n",
if (lock_scanned_queue)
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
pmlmepriv->key_mask = 0;
-_func_exit_;
}
/*
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_connect\n"));
pmlmepriv->to_join = false;
rtw_set_scan_deny(padapter, 3000);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("-rtw_indicate_connect: fw_state=0x%08x\n", get_fwstate(pmlmepriv)));
-_func_exit_;
}
/*
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_disconnect\n"));
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS);
p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1);
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 1);
-
-_func_exit_;
}
inline void rtw_indicate_scan_done(struct adapter *padapter, bool aborted)
struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL;
unsigned int the_same_macaddr = false;
-_func_enter_;
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("joinbss event call back received with res=%d\n", pnetwork->join_res));
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
pnetwork->network.Length = get_wlan_bssid_ex_sz(&pnetwork->network);
if (pnetwork->network.Length > sizeof(struct wlan_bssid_ex)) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n\n ***joinbss_evt_callback return a wrong bss ***\n\n"));
- goto ignore_nolock;
+ return;
}
spin_lock_bh(&pmlmepriv->lock);
ignore_joinbss_callback:
spin_unlock_bh(&pmlmepriv->lock);
-ignore_nolock:
-_func_exit_;
}
void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf)
{
struct wlan_network *pnetwork = (struct wlan_network *)pbuf;
-_func_enter_;
-
mlmeext_joinbss_event_callback(adapter, pnetwork->join_res);
rtw_os_xmit_schedule(adapter);
-
-_func_exit_;
}
static u8 search_max_mac_id(struct adapter *padapter)
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
struct wlan_network *ptarget_wlan = NULL;
-_func_enter_;
-
if (rtw_access_ctrl(adapter, pstassoc->macaddr) == false)
return;
ap_sta_info_defer_update(adapter, psta);
rtw_stassoc_hw_rpt(adapter, psta);
}
- goto exit;
+ return;
}
#endif
/* for AD-HOC mode */
if (psta != NULL) {
/* the sta have been in sta_info_queue => do nothing */
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error: rtw_stassoc_event_callback: sta has been in sta_hash_queue\n"));
- goto exit; /* between drv has received this event before and fw have not yet to set key to CAM_ENTRY) */
+ return; /* between drv has received this event before and fw have not yet to set key to CAM_ENTRY) */
}
psta = rtw_alloc_stainfo(&adapter->stapriv, pstassoc->macaddr);
if (psta == NULL) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't alloc sta_info when rtw_stassoc_event_callback\n"));
- goto exit;
+ return;
}
/* to do: init sta_info variable */
psta->qos_option = 0;
}
spin_unlock_bh(&pmlmepriv->lock);
mlmeext_sta_add_event_callback(adapter, psta);
-exit:
-_func_exit_;
}
void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
struct sta_priv *pstapriv = &adapter->stapriv;
struct wlan_network *tgt_network = &(pmlmepriv->cur_network);
-_func_enter_;
-
psta = rtw_get_stainfo(&adapter->stapriv, pstadel->macaddr);
if (psta)
mac_id = psta->mac_id;
}
}
spin_unlock_bh(&pmlmepriv->lock);
-_func_exit_;
}
void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
{
-_func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_cpwm_event_callback !!!\n"));
-_func_exit_;
}
/*
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
int do_join_r;
-_func_enter_;
-
DBG_88E("%s, fw_state=%x\n", __func__, get_fwstate(pmlmepriv));
if (adapter->bDriverStopped || adapter->bSurpriseRemoved)
free_scanqueue(pmlmepriv);/* */
}
spin_unlock_bh(&pmlmepriv->lock);
-_func_exit_;
}
/*
struct wlan_network *candidate = NULL;
u8 supp_ant_div = false;
-_func_enter_;
-
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
adapter = (struct adapter *)pmlmepriv->nic_hdl;
exit:
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
-
-_func_exit_;
-
return ret;
}
struct cmd_priv *pcmdpriv = &(adapter->cmdpriv);
int res = _SUCCESS;
-_func_enter_;
-
pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL) {
res = _FAIL; /* try again */
psecuritypriv->dot11AuthAlgrthm));
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
exit:
-_func_exit_;
return res;
}
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
int res = _SUCCESS;
-_func_enter_;
pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL) {
res = _FAIL; /* try again */
_rtw_init_listhead(&pcmd->list);
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
exit:
-_func_exit_;
return res;
}
uint ndisauthmode = psecuritypriv->ndisauthtype;
uint ndissecuritytype = psecuritypriv->ndisencryptstatus;
-_func_enter_;
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
("+rtw_restruct_sec_ie: ndisauthmode=%d ndissecuritytype=%d\n",
ndisauthmode, ndissecuritytype));
if (authmode == _WPA2_IE_ID_)
ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
}
-
-_func_exit_;
-
return ielength;
}
struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;
u8 *myhwaddr = myid(peepriv);
-_func_enter_;
-
memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(struct ndis_802_11_ssid));
pdev_network->Configuration.FHConfig.HopPattern = 0;
pdev_network->Configuration.FHConfig.HopSet = 0;
pdev_network->Configuration.FHConfig.DwellTime = 0;
-
-_func_exit_;
}
void rtw_update_registrypriv_dev_network(struct adapter *adapter)
struct security_priv *psecuritypriv = &adapter->securitypriv;
struct wlan_network *cur_network = &adapter->mlmepriv.cur_network;
-_func_enter_;
-
pdev_network->Privacy = (psecuritypriv->dot11PrivacyAlgrthm > 0 ? 1 : 0); /* adhoc no 802.1x */
pdev_network->Rssi = 0;
/* notes: translate IELength & Length after assign the Length to cmdsz in createbss_cmd(); */
/* pdev_network->IELength = cpu_to_le32(sz); */
-_func_exit_;
}
void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter)
{
-_func_enter_;
-_func_exit_;
}
/* the function is at passive_level */
u8 res = _SUCCESS;
int len_diff = 0;
-_func_enter_;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
exit:
-_func_exit_;
return res;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->information_buf_len < sizeof(u8))
return NDIS_STATUS_INVALID_LENGTH;
status = NDIS_STATUS_NOT_ACCEPTED;
}
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_write_bb_reg_hdl\n"));
write_bbreg(Adapter, offset, 0xFFFFFFFF, value);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_read_bb_reg_hdl\n"));
RT_TRACE(_module_mp_, _drv_notice_,
("-rtl8188eu_oid_rt_pro_read_bb_reg_hdl: offset=0x%03X value:0x%08X\n",
offset, value));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_write_rf_reg_hdl\n"));
write_rfreg(Adapter, path, offset, value);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
int status = NDIS_STATUS_SUCCESS;
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_read_rf_reg_hdl\n"));
("-rtl8188eu_oid_rt_pro_read_rf_reg_hdl: path=%d offset=0x%02X value=0x%05X\n",
path, offset, value));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_,
("+rtl8188eu_oid_rt_pro_set_data_rate_hdl\n"));
SetDataRate(Adapter);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_start_test_hdl\n"));
RT_TRACE(_module_mp_, _drv_notice_, ("-rtl8188eu_oid_rt_pro_start_test_hdl: mp_mode=%d\n", Adapter->mppriv.mode));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+Set OID_RT_PRO_STOP_TEST\n"));
RT_TRACE(_module_mp_, _drv_notice_, ("-Set OID_RT_PRO_STOP_TEST\n"));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_set_channel_direct_call_hdl\n"));
SetChannel(Adapter);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_info_,
("+rtl8188eu_oid_rt_set_bandwidth_hdl\n"));
("-rtl8188eu_oid_rt_set_bandwidth_hdl: bandwidth=%d channel_offset=%d\n",
bandwidth, channel_offset));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_set_antenna_bb_hdl\n"));
*(u32 *)poid_par_priv->information_buf = antenna;
}
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_info_, ("+rtl8188eu_oid_rt_pro_set_tx_power_control_hdl\n"));
SetTxPower(Adapter);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != QUERY_OID) {
status = NDIS_STATUS_NOT_ACCEPTED;
status = NDIS_STATUS_INVALID_LENGTH;
}
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != QUERY_OID) {
status = NDIS_STATUS_NOT_ACCEPTED;
status = NDIS_STATUS_INVALID_LENGTH;
}
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != QUERY_OID) {
status = NDIS_STATUS_NOT_ACCEPTED;
status = NDIS_STATUS_INVALID_LENGTH;
}
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != SET_OID) {
status = NDIS_STATUS_NOT_ACCEPTED;
RT_TRACE(_module_mp_, _drv_alert_, ("===> rtl8188eu_oid_rt_pro_reset_tx_packet_sent_hdl.\n"));
Adapter->mppriv.tx_pktcount = 0;
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != SET_OID) {
status = NDIS_STATUS_NOT_ACCEPTED;
status = NDIS_STATUS_INVALID_LENGTH;
}
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != SET_OID) {
status = NDIS_STATUS_NOT_ACCEPTED;
ResetPhyRxPktCount(Adapter);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_info_, ("+rtl8188eu_oid_rt_get_phy_rx_packet_received_hdl\n"));
RT_TRACE(_module_mp_, _drv_notice_, ("-rtl8188eu_oid_rt_get_phy_rx_packet_received_hdl: recv_ok=%d\n", *(u32 *)poid_par_priv->information_buf));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_info_, ("+rtl8188eu_oid_rt_get_phy_rx_packet_crc32_error_hdl\n"));
("-rtl8188eu_oid_rt_get_phy_rx_packet_crc32_error_hdl: recv_err =%d\n",
*(u32 *)poid_par_priv->information_buf));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_set_continuous_tx_hdl\n"));
}
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_alert_, ("+rtl8188eu_oid_rt_pro_set_single_carrier_tx_hdl\n"));
}
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_set_carrier_suppression_tx_hdl\n"));
}
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_alert_, ("+rtl8188eu_oid_rt_pro_set_single_tone_tx_hdl\n"));
SetSingleToneTx(Adapter, (u8)bStartTest);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
{
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
int status = NDIS_STATUS_SUCCESS;
-_func_enter_;
if (poid_par_priv->type_of_oid != SET_OID)
return NDIS_STATUS_NOT_ACCEPTED;
rtw_hal_set_hwreg(Adapter, HW_VAR_TRIGGER_GPIO_0, NULL);
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_info_,
("+rtl8188eu_oid_rt_pro_read_register_hdl\n"));
*poid_par_priv->bytes_rw = width;
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_info_,
("+rtl8188eu_oid_rt_pro_write_register_hdl\n"));
("-rtl8188eu_oid_rt_pro_write_register_hdl: offset=0x%08X width=%d value=0x%X\n",
offset, width, value));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+OID_RT_PRO_SET_DATA_RATE_EX\n"));
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
u8 thermal = 0;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_get_thermal_meter_hdl\n"));
*(u32 *)poid_par_priv->information_buf = (u32)thermal;
*poid_par_priv->bytes_rw = sizeof(u32);
-_func_exit_;
return status;
}
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->information_buf_len < sizeof(u8))
return NDIS_STATUS_INVALID_LENGTH;
}
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != QUERY_OID)
return NDIS_STATUS_NOT_ACCEPTED;
}
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != SET_OID)
return NDIS_STATUS_NOT_ACCEPTED;
status = NDIS_STATUS_FAILURE;
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
*poid_par_priv->bytes_rw = 0;
RT_TRACE(_module_mp_, _drv_info_,
("-rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl: status=0x%08X\n", status));
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != QUERY_OID)
return NDIS_STATUS_NOT_ACCEPTED;
} else {
status = NDIS_STATUS_FAILURE;
}
-_func_exit_;
return status;
}
int status = NDIS_STATUS_SUCCESS;
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
-_func_enter_;
if (poid_par_priv->type_of_oid != QUERY_OID)
return NDIS_STATUS_NOT_ACCEPTED;
("-rtl8188eu_oid_rt_get_efuse_max_size_hdl: size=%d status=0x%08X\n",
*(int *)poid_par_priv->information_buf, status));
-_func_exit_;
return status;
}
{
int status;
-_func_enter_;
RT_TRACE(_module_mp_, _drv_info_, ("+rtl8188eu_oid_rt_pro_efuse_hdl\n"));
RT_TRACE(_module_mp_, _drv_info_, ("-rtl8188eu_oid_rt_pro_efuse_hdl: status=0x%08X\n", status));
-_func_exit_;
return status;
}
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
u16 maplen = 0;
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_efuse_map_hdl\n"));
RT_TRACE(_module_mp_, _drv_info_,
("-rtl8188eu_oid_rt_pro_efuse_map_hdl: status=0x%08X\n", status));
-_func_exit_;
return status;
}
u8 rx_pkt_type;
int status = NDIS_STATUS_SUCCESS;
-_func_enter_;
RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_set_rx_packet_type_hdl\n"));
rx_pkt_type = *((u8 *)poid_par_priv->information_buf);/* 4 */
RT_TRACE(_module_mp_, _drv_info_, ("rx_pkt_type: %x\n", rx_pkt_type));
-_func_exit_;
return status;
}
{
int status = NDIS_STATUS_SUCCESS;
-_func_enter_;
if (poid_par_priv->type_of_oid != SET_OID) {
status = NDIS_STATUS_NOT_ACCEPTED;
/* CALL the power_down function */
_irqlevel_changed_(&oldirql, RAISE);
-_func_exit_;
return status;
}
struct ndis_802_11_ssid ssid;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
_rtw_memset((unsigned char *)&ssid, 0, sizeof(struct ndis_802_11_ssid));
memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
spin_lock_bh(&pmlmepriv->lock);
rtw_sitesurvey_cmd(padapter, &ssid, 1, NULL, 0);
spin_unlock_bh(&pmlmepriv->lock);
-_func_exit_;
}
void p2p_concurrent_handler(struct adapter *padapter);
{
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
-_func_enter_;
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL))
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
/* because this P2P client should stay at the operating channel of P2P GO. */
set_channel_bwmode(padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
}
-_func_exit_;
}
static void pre_tx_invitereq_handler(struct adapter *padapter)
{
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
u8 val8 = 1;
-_func_enter_;
set_channel_bwmode(padapter, pwdinfo->invitereq_info.peer_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
issue_probereq_p2p(padapter, NULL);
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
-_func_exit_;
}
static void pre_tx_provdisc_handler(struct adapter *padapter)
{
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
u8 val8 = 1;
-_func_enter_;
set_channel_bwmode(padapter, pwdinfo->tx_prov_disc_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
issue_probereq_p2p(padapter, NULL);
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
-_func_exit_;
}
static void pre_tx_negoreq_handler(struct adapter *padapter)
{
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
u8 val8 = 1;
-_func_enter_;
set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
issue_probereq_p2p(padapter, NULL);
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
-_func_exit_;
}
void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
{
-_func_enter_;
switch (intCmdType) {
case P2P_FIND_PHASE_WK:
find_phase_handler(padapter);
break;
}
-_func_exit_;
}
void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
u8 find_p2p = false, find_p2p_ps = false;
u8 noa_offset, noa_num, noa_index;
-_func_enter_;
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
return;
p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1);
}
-_func_exit_;
}
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
-_func_enter_;
/* Pre action for p2p state */
switch (p2p_ps_state) {
break;
}
-_func_exit_;
}
u8 p2p_ps_wk_cmd(struct adapter *padapter, u8 p2p_ps_state, u8 enqueue)
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
-_func_enter_;
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
return res;
exit:
-_func_exit_;
return res;
}
u8 rpwm;
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-_func_enter_;
-
pslv = PS_STATE(pslv);
-
if (pwrpriv->btcoex_rfon) {
if (pslv < PS_STATE_S4)
pslv = PS_STATE_S3;
pwrpriv->tog += 0x80;
pwrpriv->cpwm = pslv;
-
-_func_exit_;
}
static u8 PS_RDY_CHECK(struct adapter *padapter)
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
#endif /* CONFIG_88EU_P2P */
-_func_enter_;
-
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
("%s: PowerMode=%d Smart_PS=%d\n",
__func__, ps_mode, smart_ps));
rtw_set_rpwm(padapter, PS_STATE_S2);
}
}
-
-_func_exit_;
}
/*
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-_func_enter_;
-
if (PS_RDY_CHECK(padapter) == false)
return;
pwrpriv->LpsIdleCount++;
}
}
-
-_func_exit_;
}
#define LPS_LEAVE_TIMEOUT_MS 100
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-_func_enter_;
-
if (pwrpriv->bLeisurePs) {
if (pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0);
}
pwrpriv->bpower_saving = false;
-
-_func_exit_;
}
/* */
struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv);
u8 enqueue = 0;
-_func_enter_;
-
if (check_fwstate(pmlmepriv, _FW_LINKED)) { /* connect */
p2p_ps_wk_cmd(Adapter, P2P_PS_DISABLE, enqueue);
rtw_lps_ctrl_wk_cmd(Adapter, LPS_CTRL_LEAVE, enqueue);
}
-
-_func_exit_;
}
void rtw_init_pwrctrl_priv(struct adapter *padapter)
{
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
-_func_enter_;
-
_init_pwrlock(&pwrctrlpriv->lock);
pwrctrlpriv->rf_pwrstate = rf_on;
pwrctrlpriv->ips_enter_cnts = 0;
pwrctrlpriv->btcoex_rfon = false;
_init_timer(&(pwrctrlpriv->pwr_state_check_timer), padapter->pnetdev, pwr_state_check_handler, (u8 *)padapter);
-
-_func_exit_;
}
u8 rtw_interface_ps_func(struct adapter *padapter, enum hal_intf_ps_func efunc_id, u8 *val)
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
{
-_func_enter_;
_rtw_memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv));
_rtw_init_queue(&psta_recvpriv->defrag_q);
-_func_exit_;
}
int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
int res = _SUCCESS;
-_func_enter_;
spin_lock_init(&precvpriv->lock);
_rtw_init_queue(&precvpriv->free_recv_queue);
rtw_set_signal_stat_timer(precvpriv);
exit:
-_func_exit_;
return res;
}
{
struct adapter *padapter = precvpriv->adapter;
-_func_enter_;
rtw_free_uc_swdec_pending_queue(padapter);
rtw_hal_free_recv_priv(padapter);
-_func_exit_;
}
union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
struct list_head *plist, *phead;
struct adapter *padapter;
struct recv_priv *precvpriv;
-_func_enter_;
if (_rtw_queue_empty(pfree_recv_queue)) {
hdr = NULL;
}
}
-_func_exit_;
return (union recv_frame *)hdr;
}
struct adapter *padapter;
struct recv_priv *precvpriv;
-_func_enter_;
if (!precvframe)
return _FAIL;
padapter = precvframe->u.hdr.adapter;
spin_unlock_bh(&pfree_recv_queue->lock);
-_func_exit_;
return _SUCCESS;
}
struct adapter *padapter = precvframe->u.hdr.adapter;
struct recv_priv *precvpriv = &padapter->recvpriv;
-_func_enter_;
rtw_list_delete(&(precvframe->u.hdr.list));
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(queue));
precvpriv->free_recvframe_cnt++;
}
-_func_exit_;
return _SUCCESS;
}
struct recv_frame_hdr *hdr;
struct list_head *plist, *phead;
-_func_enter_;
spin_lock(&pframequeue->lock);
phead = get_list_head(pframequeue);
spin_unlock(&pframequeue->lock);
-_func_exit_;
}
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
-_func_enter_;
stainfo = rtw_get_stainfo(&adapter->stapriv, &prxattrib->ta[0]);
exit:
-_func_exit_;
return res;
}
struct security_priv *psecuritypriv = &padapter->securitypriv;
union recv_frame *return_packet = precv_frame;
u32 res = _SUCCESS;
-_func_enter_;
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("prxstat->decrypted=%x prxattrib->encrypt=0x%03x\n", prxattrib->bdecrypted, prxattrib->encrypt));
return_packet = NULL;
}
-_func_exit_;
return return_packet;
}
struct rx_pkt_attrib *pattrib;
__be16 be_tmp;
-_func_enter_;
pstapriv = &adapter->stapriv;
psta = rtw_get_stainfo(pstapriv, psta_addr);
prtnframe = precv_frame;
}
-_func_exit_;
return prtnframe;
}
u16 seq_ctrl = ((precv_frame->u.hdr.attrib.seq_num&0xffff) << 4) |
(precv_frame->u.hdr.attrib.frag_num & 0xf);
-_func_enter_;
if (tid > 15) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("recv_decache, (tid>15)! seq_ctrl=0x%x, tid=0x%x\n", seq_ctrl, tid));
prxcache->tid_rxseq[tid] = seq_ctrl;
-_func_exit_;
return _SUCCESS;
}
u8 *sta_addr = NULL;
int bmcast = IS_MCAST(pattrib->dst);
-_func_enter_;
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
}
exit:
-_func_exit_;
return ret;
}
u8 *myhwaddr = myid(&adapter->eeprompriv);
int bmcast = IS_MCAST(pattrib->dst);
-_func_enter_;
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) &&
(check_fwstate(pmlmepriv, _FW_LINKED) == true ||
exit:
-_func_exit_;
return ret;
}
unsigned char *mybssid = get_bssid(pmlmepriv);
int ret = _SUCCESS;
-_func_enter_;
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
/* For AP mode, RA = BSSID, TX = STA(SRC_ADDR), A3 = DST_ADDR */
exit:
-_func_exit_;
return ret;
}
struct security_priv *psecuritypriv = &adapter->securitypriv;
int ret = _SUCCESS;
-_func_enter_;
bretry = GetRetry(ptr);
pda = get_da(ptr);
exit:
-_func_exit_;
return ret;
}
u8 ver = (unsigned char) (*ptr)&0x3;
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
-_func_enter_;
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
int ch_set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, rtw_get_oper_ch(adapter));
exit:
-_func_exit_;
return retval;
}
u8 *ptr = get_recvframe_data(precvframe); /* point to frame_ctrl field */
struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib;
-_func_enter_;
if (pattrib->encrypt)
recvframe_pull_tail(precvframe, pattrib->icv_len);
memcpy(ptr+12, &be_tmp, 2);
}
-_func_exit_;
return ret;
}
union recv_frame *prframe, *pnextrframe;
struct __queue *pfree_recv_queue;
-_func_enter_;
curfragnum = 0;
pfree_recv_queue = &adapter->recvpriv.free_recv_queue;
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("Performance defrag!!!!!\n"));
-_func_exit_;
return prframe;
}
union recv_frame *prtnframe = NULL;
struct __queue *pfree_recv_queue, *pdefrag_q;
-_func_enter_;
pstapriv = &padapter->stapriv;
}
}
-_func_exit_;
return prtnframe;
}
struct recv_priv *precvpriv;
s32 ret = _SUCCESS;
-_func_enter_;
padapter = precvframe->u.hdr.adapter;
precvpriv->rx_pkts++;
-_func_exit_;
return ret;
if (padapter->registrypriv.mp_mode == 1)
padapter->mppriv.rx_pktloss = precvpriv->rx_drop;
-_func_exit_;
return ret;
}
u32 stateindex;
u8 *state;
u32 counter;
-_func_enter_;
state = parc4ctx->state;
parc4ctx->x = 0;
parc4ctx->y = 0;
if (++keyindex >= key_len)
keyindex = 0;
}
-_func_exit_;
}
static u32 arcfour_byte(struct arc4context *parc4ctx)
u32 y;
u32 sx, sy;
u8 *state;
-_func_enter_;
state = parc4ctx->state;
x = (parc4ctx->x + 1) & 0xff;
sx = state[x];
parc4ctx->y = y;
state[y] = (u8)sx;
state[x] = (u8)sy;
-_func_exit_;
return state[(sx + sy) & 0xff];
}
static void arcfour_encrypt(struct arc4context *parc4ctx, u8 *dest, u8 *src, u32 len)
{
u32 i;
-_func_enter_;
for (i = 0; i < len; i++)
dest[i] = src[i] ^ (unsigned char)arcfour_byte(parc4ctx);
-_func_exit_;
}
static int bcrc32initialized;
static void crc32_init(void)
{
-_func_enter_;
if (bcrc32initialized == 1) {
- goto exit;
+ return;
} else {
int i, j;
u32 c;
}
bcrc32initialized = 1;
}
-exit:
-_func_exit_;
}
static __le32 getcrc32(u8 *buf, int len)
{
u8 *p;
u32 crc;
-_func_enter_;
if (bcrc32initialized == 0)
crc32_init();
for (p = buf; len > 0; ++p, --len)
crc = crc32_table[(crc ^ *p) & 0xff] ^ (crc >> 8);
-_func_exit_;
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
}
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
-_func_enter_;
if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
return;
}
}
-_func_exit_;
}
void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
struct rx_pkt_attrib *prxattrib = &(((union recv_frame *)precvframe)->u.hdr.attrib);
struct security_priv *psecuritypriv = &padapter->securitypriv;
-_func_enter_;
pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
&crc, &payload[length-4]));
}
}
-_func_exit_;
return;
}
{
s32 i;
u32 res = 0;
-_func_enter_;
for (i = 0; i < 4; i++)
res |= ((u32)(*p++)) << (8*i);
-_func_exit_;
return res;
}
/* Convert from Us3232 to Byte[] in a portable way */
{
long i;
-_func_enter_;
for (i = 0; i < 4; i++) {
*p++ = (u8) (val & 0xff);
val >>= 8;
}
-_func_exit_;
}
static void secmicclear(struct mic_data *pmicdata)
{
/* Reset the state to the empty message. */
-_func_enter_;
pmicdata->L = pmicdata->K0;
pmicdata->R = pmicdata->K1;
pmicdata->nBytesInM = 0;
pmicdata->M = 0;
-_func_exit_;
}
void rtw_secmicsetkey(struct mic_data *pmicdata, u8 *key)
{
/* Set the key */
-_func_enter_;
pmicdata->K0 = secmicgetuint32(key);
pmicdata->K1 = secmicgetuint32(key + 4);
/* and reset the message */
secmicclear(pmicdata);
-_func_exit_;
}
void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b)
{
-_func_enter_;
/* Append the byte to our word-sized buffer */
pmicdata->M |= ((unsigned long)b) << (8*pmicdata->nBytesInM);
pmicdata->nBytesInM++;
pmicdata->M = 0;
pmicdata->nBytesInM = 0;
}
-_func_exit_;
}
void rtw_secmicappend(struct mic_data *pmicdata, u8 *src, u32 nbytes)
{
-_func_enter_;
/* This is simple */
while (nbytes > 0) {
rtw_secmicappendbyte(pmicdata, *src++);
nbytes--;
}
-_func_exit_;
}
void rtw_secgetmic(struct mic_data *pmicdata, u8 *dst)
{
-_func_enter_;
/* Append the minimum padding */
rtw_secmicappendbyte(pmicdata, 0x5a);
rtw_secmicappendbyte(pmicdata, 0);
secmicputuint32(dst+4, pmicdata->R);
/* Reset to the empty message. */
secmicclear(pmicdata);
-_func_exit_;
}
void rtw_seccalctkipmic(u8 *key, u8 *header, u8 *data, u32 data_len, u8 *mic_code, u8 pri)
{
struct mic_data micdata;
u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
-_func_enter_;
rtw_secmicsetkey(&micdata, key);
priority[0] = pri;
rtw_secmicappend(&micdata, data, data_len);
rtw_secgetmic(&micdata, mic_code);
-_func_exit_;
}
static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
{
int i;
-_func_enter_;
/* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */
p1k[0] = Lo16(iv32);
p1k[1] = Hi16(iv32);
p1k[4] += _S_(p1k[3] ^ TK16((i&1)+0));
p1k[4] += (unsigned short)i; /* avoid "slide attacks" */
}
-_func_exit_;
}
/*
{
int i;
u16 PPK[6]; /* temporary key for mixing */
-_func_enter_;
/* Note: all adds in the PPK[] equations below are mod 2**16 */
for (i = 0; i < 5; i++)
PPK[i] = p1k[i]; /* first, copy P1K to PPK */
rc4key[4+2*i] = Lo8(PPK[i]);
rc4key[5+2*i] = Hi8(PPK[i]);
}
-_func_exit_;
}
/* The hlen isn't include the IV */
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
u32 res = _SUCCESS;
-_func_enter_;
if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
return _FAIL;
res = _FAIL;
}
}
-_func_exit_;
return res;
}
struct security_priv *psecuritypriv = &padapter->securitypriv;
u32 res = _SUCCESS;
-_func_enter_;
pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
res = _FAIL;
}
}
-_func_exit_;
exit:
return res;
}
static void xor_128(u8 *a, u8 *b, u8 *out)
{
int i;
-_func_enter_;
for (i = 0; i < 16; i++)
out[i] = a[i] ^ b[i];
-_func_exit_;
}
static void xor_32(u8 *a, u8 *b, u8 *out)
{
int i;
-_func_enter_;
for (i = 0; i < 4; i++)
out[i] = a[i] ^ b[i];
-_func_exit_;
}
static u8 sbox(u8 a)
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0x1b, 0x36, 0x36, 0x36
};
-_func_enter_;
sbox_key[0] = sbox(key[13]);
sbox_key[1] = sbox(key[14]);
sbox_key[2] = sbox(key[15]);
xor_32(&key[4], &key[0], &key[4]);
xor_32(&key[8], &key[4], &key[8]);
xor_32(&key[12], &key[8], &key[12]);
-_func_exit_;
}
static void byte_sub(u8 *in, u8 *out)
{
int i;
-_func_enter_;
for (i = 0; i < 16; i++)
out[i] = sbox(in[i]);
-_func_exit_;
}
static void shift_row(u8 *in, u8 *out)
{
-_func_enter_;
out[0] = in[0];
out[1] = in[5];
out[2] = in[10];
out[13] = in[1];
out[14] = in[6];
out[15] = in[11];
-_func_exit_;
}
static void mix_column(u8 *in, u8 *out)
u8 rotr[4];
u8 temp[4];
u8 tempb[4];
-_func_enter_;
for (i = 0 ; i < 4; i++) {
if ((in[i] & 0x80) == 0x80)
add1b[i] = 0x1b;
xor_32(add1bf7, rotr, temp);
xor_32(swap_halfs, rotl, tempb);
xor_32(temp, tempb, out);
-_func_exit_;
}
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
u8 intermediatea[16];
u8 intermediateb[16];
u8 round_key[16];
-_func_enter_;
for (i = 0; i < 16; i++)
round_key[i] = key[i];
for (round = 0; round < 11; round++) {
next_key(round_key, round);
}
}
-_func_exit_;
}
/************************************************/
uint payload_length, u8 *pn_vector)
{
int i;
-_func_enter_;
mic_iv[0] = 0x59;
if (qc_exists && a4_exists)
mic_iv[1] = mpdu[30] & 0x0f; /* QoS_TC */
mic_iv[i] = pn_vector[13 - i]; /* mic_iv[8:13] = PN[5:0] */
mic_iv[14] = (unsigned char) (payload_length / 256);
mic_iv[15] = (unsigned char) (payload_length % 256);
-_func_exit_;
}
/************************************************/
/************************************************/
static void construct_mic_header1(u8 *mic_header1, int header_length, u8 *mpdu)
{
-_func_enter_;
mic_header1[0] = (u8)((header_length - 2) / 256);
mic_header1[1] = (u8)((header_length - 2) % 256);
mic_header1[2] = mpdu[0] & 0xcf; /* Mute CF poll & CF ack bits */
mic_header1[13] = mpdu[13];
mic_header1[14] = mpdu[14];
mic_header1[15] = mpdu[15];
-_func_exit_;
}
/************************************************/
static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists, int qc_exists)
{
int i;
-_func_enter_;
for (i = 0; i < 16; i++)
mic_header2[i] = 0x00;
mic_header2[15] = mpdu[31] & 0x00;
}
-_func_exit_;
}
/************************************************/
static void construct_ctr_preload(u8 *ctr_preload, int a4_exists, int qc_exists, u8 *mpdu, u8 *pn_vector, int c)
{
int i;
-_func_enter_;
for (i = 0; i < 16; i++)
ctr_preload[i] = 0x00;
i = 0;
ctr_preload[i] = pn_vector[13 - i]; /* ctr_preload[8:13] = PN[5:0] */
ctr_preload[14] = (unsigned char) (c / 256); /* Ctr */
ctr_preload[15] = (unsigned char) (c % 256);
-_func_exit_;
}
/************************************/
static void bitwise_xor(u8 *ina, u8 *inb, u8 *out)
{
int i;
-_func_enter_;
for (i = 0; i < 16; i++)
out[i] = ina[i] ^ inb[i];
-_func_exit_;
}
static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
uint frtype = GetFrameType(pframe);
uint frsubtype = GetFrameSubType(pframe);
-_func_enter_;
frsubtype = frsubtype>>4;
_rtw_memset((void *)mic_iv, 0, 16);
bitwise_xor(aes_out, padded_buffer, chain_buffer);
for (j = 0; j < 8; j++)
pframe[payload_index++] = chain_buffer[j];
-_func_exit_;
return _SUCCESS;
}
/* uint offset = 0; */
u32 res = _SUCCESS;
-_func_enter_;
if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
return _FAIL;
}
-_func_exit_;
return res;
}
/* uint offset = 0; */
uint frtype = GetFrameType(pframe);
uint frsubtype = GetFrameSubType(pframe);
-_func_enter_;
frsubtype = frsubtype>>4;
_rtw_memset((void *)mic_iv, 0, 16);
res = _FAIL;
}
}
-_func_exit_;
return res;
}
struct rx_pkt_attrib *prxattrib = &((union recv_frame *)precvframe)->u.hdr.attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
u32 res = _SUCCESS;
-_func_enter_;
pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
/* 4 start to encrypt each fragment */
if ((prxattrib->encrypt == _AES_)) {
res = _FAIL;
}
}
-_func_exit_;
exit:
return res;
}
{
struct adapter *padapter = (struct adapter *)FunctionContext;
-_func_enter_;
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("^^^rtw_use_tkipkey_handler ^^^\n"));
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n", padapter->securitypriv.busetkipkey));
-_func_exit_;
}
static void _rtw_init_stainfo(struct sta_info *psta)
{
-_func_enter_;
_rtw_memset((u8 *)psta, 0, sizeof (struct sta_info));
spin_lock_init(&psta->lock);
#endif /* CONFIG_88EU_AP_MODE */
-_func_exit_;
}
u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
struct sta_info *psta;
s32 i;
-_func_enter_;
pstapriv->pallocated_stainfo_buf = vzalloc(sizeof(struct sta_info) * NUM_STA + 4);
pstapriv->max_num_sta = NUM_STA;
#endif
-_func_exit_;
return _SUCCESS;
}
struct list_head *plist, *phead;
struct sta_info *psta = NULL;
-_func_enter_;
spin_lock_bh(&pstapriv->sta_hash_lock);
spin_unlock_bh(&pstapriv->sta_hash_lock);
-_func_exit_;
}
static void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
struct recv_reorder_ctrl *preorder_ctrl;
int index;
-_func_enter_;
if (pstapriv) {
/* delete all reordering_ctrl_timer */
spin_lock_bh(&pstapriv->sta_hash_lock);
vfree(pstapriv->pallocated_stainfo_buf);
}
-_func_exit_;
return _SUCCESS;
}
int i = 0;
u16 wRxSeqInitialValue = 0xffff;
-_func_enter_;
pfree_sta_queue = &pstapriv->free_sta_queue;
}
exit:
-
-_func_exit_;
-
return psta;
}
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct sta_priv *pstapriv = &padapter->stapriv;
-_func_enter_;
if (psta == NULL)
goto exit;
exit:
-_func_exit_;
return _SUCCESS;
}
struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_info *pbcmc_stainfo = rtw_get_bcmc_stainfo(padapter);
-_func_enter_;
if (pstapriv->asoc_sta_count == 1)
- goto exit;
+ return;
spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(padapter , psta);
}
}
-
spin_unlock_bh(&pstapriv->sta_hash_lock);
-
-exit:
-
-_func_exit_;
}
/* any station allocated can be searched by hash list */
u8 *addr;
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-_func_enter_;
if (hwaddr == NULL)
return NULL;
}
spin_unlock_bh(&pstapriv->sta_hash_lock);
-_func_exit_;
return psta;
}
unsigned char bcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
struct sta_priv *pstapriv = &padapter->stapriv;
-_func_enter_;
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
psta->mac_id = 1;
exit:
-_func_exit_;
return res;
}
struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv;
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-_func_enter_;
psta = rtw_get_stainfo(pstapriv, bc_addr);
-_func_exit_;
return psta;
}
}
kfree(bssid);
- _func_exit_;
return _SUCCESS;
_mismatch:
kfree(bssid);
- _func_exit_;
return _FAIL;
}
static void _init_txservq(struct tx_servq *ptxservq)
{
-_func_enter_;
_rtw_init_listhead(&ptxservq->tx_pending);
_rtw_init_queue(&ptxservq->sta_pending);
ptxservq->qcnt = 0;
-_func_exit_;
}
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
{
-_func_enter_;
_rtw_memset((unsigned char *)psta_xmitpriv, 0, sizeof (struct sta_xmit_priv));
spin_lock_init(&psta_xmitpriv->lock);
_init_txservq(&psta_xmitpriv->be_q);
_rtw_init_listhead(&psta_xmitpriv->legacy_dz);
_rtw_init_listhead(&psta_xmitpriv->apsd);
-_func_exit_;
}
s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;
-_func_enter_;
/* We don't need to memset padapter->XXX to zero, because adapter is allocated by vzalloc(). */
exit:
-_func_exit_;
return res;
}
u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;
- _func_enter_;
rtw_hal_free_xmit_priv(padapter);
if (pxmitpriv->pxmit_frame_buf == NULL)
- goto out;
+ return;
for (i = 0; i < NR_XMITFRAME; i++) {
rtw_os_xmit_complete(padapter, pxmitframe);
rtw_free_hwxmits(padapter);
mutex_destroy(&pxmitpriv->ack_tx_mutex);
-
-out:
-
-_func_exit_;
}
static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *pxmitframe)
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
int res = _SUCCESS;
- _func_enter_;
_rtw_open_pktfile(pkt, &pktfile);
_rtw_pktfile_read(&pktfile, (u8 *)ðerhdr, ETH_HLEN);
exit:
-_func_exit_;
return res;
}
else
stainfo = rtw_get_stainfo(&padapter->stapriv , &pattrib->ra[0]);
-_func_enter_;
hw_hdr_offset = TXDESC_SIZE + (pxmitframe->pkt_offset * PACKET_OFFSET_SZ);
}
}
-_func_exit_;
return _SUCCESS;
}
{
struct pkt_attrib *pattrib = &pxmitframe->attrib;
-_func_enter_;
if (pattrib->bswenc) {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_, ("### xmitframe_swencrypt\n"));
RT_TRACE(_module_rtl871x_xmit_c_, _drv_notice_, ("### xmitframe_hwencrypt\n"));
}
-_func_exit_;
return _SUCCESS;
}
int bmcst = IS_MCAST(pattrib->ra);
-_func_enter_;
if (pattrib->psta) {
psta = pattrib->psta;
}
exit:
-_func_exit_;
return res;
}
s32 bmcst = IS_MCAST(pattrib->ra);
s32 res = _SUCCESS;
-_func_enter_;
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
exit:
-_func_exit_;
return res;
}
struct ieee80211_snap_hdr *snap;
u8 *oui;
-_func_enter_;
snap = (struct ieee80211_snap_hdr *)data;
snap->dsap = 0xaa;
*(__be16 *)(data + SNAP_SIZE) = htons(h_proto);
-_func_exit_;
return SNAP_SIZE + sizeof(u16);
}
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
-_func_enter_;
switch (pxmitpriv->vcs_setting) {
case DISABLE_VCS:
break;
}
-_func_exit_;
}
void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz)
struct list_head *plist, *phead;
struct __queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
-_func_enter_;
spin_lock_irqsave(&pfree_queue->lock, irql);
spin_unlock_irqrestore(&pfree_queue->lock, irql);
-_func_exit_;
return pxmitbuf;
}
unsigned long irql;
struct __queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
-_func_enter_;
if (pxmitbuf == NULL)
return _FAIL;
spin_unlock_irqrestore(&pfree_queue->lock, irql);
-_func_exit_;
return _SUCCESS;
}
struct list_head *plist, *phead;
struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
-_func_enter_;
/* DBG_88E("+rtw_alloc_xmitbuf\n"); */
}
spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irql);
-_func_exit_;
return pxmitbuf;
}
unsigned long irql;
struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
-_func_enter_;
if (pxmitbuf == NULL)
return _FAIL;
spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irql);
}
-_func_exit_;
return _SUCCESS;
}
struct list_head *plist, *phead;
struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
-_func_enter_;
spin_lock_bh(&pfree_xmit_queue->lock);
spin_unlock_bh(&pfree_xmit_queue->lock);
-_func_exit_;
return pxframe;
}
struct adapter *padapter = pxmitpriv->adapter;
struct sk_buff *pndis_pkt = NULL;
-_func_enter_;
if (pxmitframe == NULL) {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("====== rtw_free_xmitframe():pxmitframe == NULL!!!!!!!!!!\n"));
exit:
-_func_exit_;
return _SUCCESS;
}
struct list_head *plist, *phead;
struct xmit_frame *pxmitframe;
-_func_enter_;
spin_lock_bh(&(pframequeue->lock));
}
spin_unlock_bh(&(pframequeue->lock));
-_func_exit_;
}
s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe)
struct registry_priv *pregpriv = &padapter->registrypriv;
int i, inx[4];
-_func_enter_;
inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3;
}
exit:
spin_unlock_bh(&pxmitpriv->lock);
-_func_exit_;
return pxmitframe;
}
{
struct tx_servq *ptxservq;
-_func_enter_;
switch (up) {
case 1:
case 2:
break;
}
-_func_exit_;
return ptxservq;
}
struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits;
int res = _SUCCESS;
-_func_enter_;
if (pattrib->psta) {
psta = pattrib->psta;
phwxmits[ac_index].accnt++;
exit:
-_func_exit_;
return res;
}
void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry)
{
int i;
-_func_enter_;
for (i = 0; i < entry; i++, phwxmit++)
phwxmit->accnt = 0;
-_func_exit_;
}
static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
{
uint status = _SUCCESS;
-_func_enter_;
-
status = adapt->HalFunc.hal_deinit(adapt);
if (status == _SUCCESS)
else
DBG_88E("\n rtw_hal_deinit: hal_init fail\n");
-_func_exit_;
-
return status;
}
u32 h2c_cmd_ex = 0;
s32 ret = _FAIL;
-_func_enter_;
if (!adapt->bFWReady) {
DBG_88E("FillH2CCmd_88E(): return H2C cmd because fw is not ready\n");
exit:
-_func_exit_;
return ret;
}
{
u8 res = _SUCCESS;
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
-_func_enter_;
if (haldata->fw_ractrl) {
;
res = _FAIL;
}
-_func_exit_;
return res;
}
u8 res = _SUCCESS;
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
-_func_enter_;
if (haldata->fw_ractrl) {
__le32 lmask;
res = _FAIL;
}
-_func_exit_;
return res;
}
struct setpwrmode_parm H2CSetPwrMode;
struct pwrctrl_priv *pwrpriv = &adapt->pwrctrlpriv;
u8 RLBM = 0; /* 0:Min, 1:Max, 2:User define */
-_func_enter_;
DBG_88E("%s: Mode=%d SmartPS=%d UAPSD=%d\n", __func__,
Mode, pwrpriv->smart_ps, adapt->registrypriv.uapsd_enable);
FillH2CCmd_88E(adapt, H2C_PS_PWR_MODE, sizeof(H2CSetPwrMode), (u8 *)&H2CSetPwrMode);
-_func_exit_;
}
void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_rpt)
u8 DLBcnCount = 0;
u32 poll = 0;
-_func_enter_;
DBG_88E("%s mstatus(%x)\n", __func__, mstatus);
haldata->RegCR_1 &= (~BIT0);
rtw_write8(adapt, REG_CR+1, haldata->RegCR_1);
}
-_func_exit_;
}
void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *adapt, u8 p2p_ps_state)
struct P2P_PS_Offload_t *p2p_ps_offload = &haldata->p2p_ps_offload;
u8 i;
-_func_enter_;
switch (p2p_ps_state) {
case P2P_PS_DISABLE:
FillH2CCmd_88E(adapt, H2C_PS_P2P_OFFLOAD, 1, (u8 *)p2p_ps_offload);
#endif
-_func_exit_;
}
u8 hw_init_completed = false;
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
- _func_enter_;
hw_init_completed = Adapter->hw_init_completed;
if (!hw_init_completed)
/* Calculate Tx/Rx statistics. */
dm_CheckStatistics(Adapter);
- _func_exit_;
}
/* ODM */
static void rtl8188e_free_hal_data(struct adapter *padapter)
{
-_func_enter_;
kfree(padapter->HalData);
padapter->HalData = NULL;
-_func_exit_;
}
/* */
#define HAL_INIT_PROFILE_TAG(stage) do {} while (0)
-_func_enter_;
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN);
DBG_88E("%s in %dms\n", __func__, rtw_get_passing_time_ms(init_start_time));
-_func_exit_;
return status;
}
struct recv_priv *precvpriv = &(Adapter->recvpriv);
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-_func_enter_;
_read_port = pintfhdl->io_ops._read_port;
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("<=== usb_inirp_init\n"));
-_func_exit_;
return status;
}
struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter);
struct dm_priv *pdmpriv = &haldata->dmpriv;
struct odm_dm_struct *podmpriv = &haldata->odmpriv;
-_func_enter_;
switch (variable) {
case HW_VAR_MEDIA_STATUS:
default:
break;
}
-_func_exit_;
}
static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
{
struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter);
struct odm_dm_struct *podmpriv = &haldata->odmpriv;
-_func_enter_;
switch (variable) {
case HW_VAR_BASIC_RATE:
break;
}
-_func_exit_;
}
/* */
{
struct hal_ops *halfunc = &adapt->HalFunc;
-_func_enter_;
adapt->HalData = rtw_zmalloc(sizeof(struct hal_data_8188e));
if (adapt->HalData == NULL)
halfunc->interface_ps_func = &rtl8188eu_ps_func;
rtl8188e_set_hal_ops(halfunc);
-_func_exit_;
}
u16 len;
u8 data = 0;
- _func_enter_;
request = 0x05;
requesttype = 0x01;/* read_in */
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
- _func_exit_;
return data;
u16 len;
__le32 data;
-_func_enter_;
request = 0x05;
requesttype = 0x01;/* read_in */
index = 0;/* n/a */
wvalue = (u16)(addr&0x0000ffff);
len = 2;
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-_func_exit_;
return (u16)(le32_to_cpu(data)&0xffff);
}
u16 len;
__le32 data;
-_func_enter_;
request = 0x05;
requesttype = 0x01;/* read_in */
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-_func_exit_;
return le32_to_cpu(data);
}
u8 data;
int ret;
- _func_enter_;
request = 0x05;
requesttype = 0x00;/* write_out */
index = 0;/* n/a */
len = 1;
data = val;
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
- _func_exit_;
return ret;
}
__le32 data;
int ret;
- _func_enter_;
request = 0x05;
requesttype = 0x00;/* write_out */
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
- _func_exit_;
return ret;
}
__le32 data;
int ret;
- _func_enter_;
request = 0x05;
requesttype = 0x00;/* write_out */
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
- _func_exit_;
return ret;
}
u8 buf[VENDOR_CMD_MAX_DATA_LEN] = {0};
int ret;
- _func_enter_;
request = 0x05;
requesttype = 0x00;/* write_out */
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, buf, len, requesttype);
- _func_exit_;
return ret;
}
DBG_88E("%s() RX Warning! bDriverStopped(%d) OR bSurpriseRemoved(%d) bReadPortCancel(%d)\n",
__func__, adapt->bDriverStopped,
adapt->bSurpriseRemoved, adapt->bReadPortCancel);
- goto exit;
+ return;
}
if (purb->status == 0) { /* SUCCESS */
break;
}
}
-
-exit:
-_func_exit_;
}
static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
size_t alignment = 0;
u32 ret = _SUCCESS;
-_func_enter_;
if (adapter->bDriverStopped || adapter->bSurpriseRemoved ||
adapter->pwrctrlpriv.pnp_bstop_trx) {
ret = _FAIL;
}
-_func_exit_;
return ret;
}
void rtl8188eu_set_intf_ops(struct _io_ops *pops)
{
- _func_enter_;
_rtw_memset((u8 *)pops, 0, sizeof(struct _io_ops));
pops->_read8 = &usb_read8;
pops->_read16 = &usb_read16;
pops->_write_port = &usb_write_port;
pops->_read_port_cancel = &usb_read_port_cancel;
pops->_write_port_cancel = &usb_write_port_cancel;
- _func_exit_;
}
void rtl8188eu_set_hw_type(struct adapter *adapt)
} \
} while (0)
-#define _func_enter_ \
- do { \
- if (GlobalDebugLevel >= _drv_debug_) \
- pr_info("%s : %s enters at %d\n", \
- DRIVER_PREFIX, __func__, __LINE__); \
- } while (0)
-
-#define _func_exit_ \
- do { \
- if (GlobalDebugLevel >= _drv_debug_) \
- pr_info("%s : %s exits at %d\n", \
- DRIVER_PREFIX, __func__, __LINE__); \
- } while (0)
-
#define RT_PRINT_DATA(_comp, _level, _titlestring, _hexdata, _hexdatalen)\
do { \
if (_level <= GlobalDebugLevel) { \
#if defined(_RTW_MP_IOCTL_C_)
static int oid_null_function(struct oid_par_priv *poid_par_priv) {
- _func_enter_;
- _func_exit_;
return NDIS_STATUS_SUCCESS;
}
#endif
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
#endif /* CONFIG_88EU_P2P */
-_func_enter_;
-
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
exit:
kfree(pwep);
-
-_func_exit_;
-
return ret;
}
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("cmd_code =%x\n", info->cmd));
- _func_enter_;
-
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
/* parsing HT_CAP_IE */
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength-12);
} else {
snprintf(wrqu->name, IFNAMSIZ, "unassociated");
}
-
- _func_exit_;
-
return 0;
}
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- _func_enter_;
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+rtw_wx_set_freq\n"));
-
- _func_exit_;
-
return 0;
}
enum ndis_802_11_network_infra networkType;
int ret = 0;
- _func_enter_;
-
if (_FAIL == rtw_pwr_wakeup(padapter)) {
ret = -EPERM;
goto exit;
}
rtw_setopmode_cmd(padapter, networkType);
exit:
- _func_exit_;
return ret;
}
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, (" rtw_wx_get_mode\n"));
- _func_enter_;
-
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
wrqu->mode = IW_MODE_INFRA;
else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) ||
else
wrqu->mode = IW_MODE_AUTO;
- _func_exit_;
-
return 0;
}
u16 val;
int i;
- _func_enter_;
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_range. cmd_code =%x\n", info->cmd));
wrqu->data.length = sizeof(*range);
range->scan_capa = IW_SCAN_CAPA_ESSID | IW_SCAN_CAPA_TYPE |
IW_SCAN_CAPA_BSSID | IW_SCAN_CAPA_CHANNEL |
IW_SCAN_CAPA_MODE | IW_SCAN_CAPA_RATE;
- _func_exit_;
-
return 0;
}
struct wlan_network *pnetwork = NULL;
enum ndis_802_11_auth_mode authmode;
- _func_enter_;
-
if (_FAIL == rtw_pwr_wakeup(padapter)) {
ret = -1;
goto exit;
exit:
- _func_exit_;
-
return ret;
}
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_wap\n"));
- _func_enter_;
-
if (((check_fwstate(pmlmepriv, _FW_LINKED)) == true) ||
((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true) ||
((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == true))
memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN);
else
_rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
-
- _func_exit_;
-
return 0;
}
#endif /* CONFIG_88EU_P2P */
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_set_scan\n"));
-_func_enter_;
if (padapter->registrypriv.mp_mode == 1) {
if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
ret = -1;
exit:
-_func_exit_;
return ret;
}
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_scan\n"));
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, (" Start of Query SIOCGIWSCAN .\n"));
- _func_enter_;
-
if (padapter->pwrctrlpriv.brfoffbyhw && padapter->bDriverStopped) {
ret = -EINVAL;
goto exit;
wrqu->data.flags = 0;
exit:
- _func_exit_;
return ret;
}
uint ret = 0, len;
- _func_enter_;
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
("+rtw_wx_set_essid: fw_state = 0x%08x\n", get_fwstate(pmlmepriv)));
DBG_88E("<=%s, ret %d\n", __func__, ret);
- _func_exit_;
return ret;
}
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_essid\n"));
- _func_enter_;
if ((check_fwstate(pmlmepriv, _FW_LINKED)) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) {
exit:
- _func_exit_;
return ret;
}
u32 ratevalue = 0;
u8 mpdatarate[NumRates] = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0xff};
-_func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, (" rtw_wx_set_rate\n"));
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("target_rate = %d, fixed = %d\n", target_rate, fixed));
ret = -1;
}
-_func_exit_;
return ret;
}
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- _func_enter_;
if (wrqu->rts.disabled) {
padapter->registrypriv.rts_thresh = 2347;
DBG_88E("%s, rts_thresh =%d\n", __func__, padapter->registrypriv.rts_thresh);
- _func_exit_;
return 0;
}
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- _func_enter_;
DBG_88E("%s, rts_thresh =%d\n", __func__, padapter->registrypriv.rts_thresh);
wrqu->rts.fixed = 0; /* no auto select */
/* wrqu->rts.disabled = (wrqu->rts.value == DEFAULT_RTS_THRESHOLD); */
- _func_exit_;
return 0;
}
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- _func_enter_;
if (wrqu->frag.disabled) {
padapter->xmitpriv.frag_len = MAX_FRAG_THRESHOLD;
DBG_88E("%s, frag_len =%d\n", __func__, padapter->xmitpriv.frag_len);
- _func_exit_;
return 0;
}
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- _func_enter_;
DBG_88E("%s, frag_len =%d\n", __func__, padapter->xmitpriv.frag_len);
wrqu->frag.value = padapter->xmitpriv.frag_len;
wrqu->frag.fixed = 0; /* no auto select */
- _func_exit_;
return 0;
}
key = erq->flags & IW_ENCODE_INDEX;
- _func_enter_;
if (erq->flags & IW_ENCODE_DISABLED) {
DBG_88E("EncryptionDisabled\n");
exit:
- _func_exit_;
return ret;
}
struct iw_point *erq = &(wrqu->encoding);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
- _func_enter_;
if (check_fwstate(pmlmepriv, _FW_LINKED) != true) {
if (!check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
erq->flags |= IW_ENCODE_DISABLED;
break;
}
- _func_exit_;
return ret;
}
void rtw_os_indicate_connect(struct adapter *adapter)
{
-_func_enter_;
rtw_indicate_wx_assoc_event(adapter);
netif_carrier_on(adapter->pnetdev);
if (adapter->pid[2] != 0)
rtw_signal_process(adapter->pid[2], SIGALRM);
-_func_exit_;
}
void rtw_os_indicate_scan_done(struct adapter *padapter, bool aborted)
void rtw_os_indicate_disconnect(struct adapter *adapter)
{
-_func_enter_;
netif_carrier_off(adapter->pnetdev); /* Do it first for tx broadcast pkt after disconnection issue! */
rtw_indicate_wx_disassoc_event(adapter);
rtw_reset_securitypriv(adapter);
-_func_exit_;
}
void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
u8 *buff, *p, i;
union iwreq_data wrqu;
-_func_enter_;
RT_TRACE(_module_mlme_osdep_c_, _drv_info_,
("+rtw_report_sec_ie, authmode=%d\n", authmode));
buff = NULL;
("rtw_report_sec_ie, authmode=%d\n", authmode));
buff = rtw_malloc(IW_CUSTOM_MAX);
if (!buff)
- goto exit;
+ return;
_rtw_memset(buff, 0, IW_CUSTOM_MAX);
p = buff;
p += sprintf(p, "ASSOCINFO(ReqIEs =");
wireless_send_event(adapter->pnetdev, IWEVCUSTOM, &wrqu, buff);
kfree(buff);
}
-exit:
-_func_exit_;
}
static void _survey_timer_hdl(void *FunctionContext)
uint status = _SUCCESS;
struct registry_priv *registry_par = &padapter->registrypriv;
-_func_enter_;
GlobalDebugLevel = rtw_debug;
registry_par->chip_version = (u8)rtw_chip_version;
snprintf(registry_par->ifname, 16, "%s", ifname);
snprintf(registry_par->if2name, 16, "%s", if2name);
registry_par->notch_filter = (u8)rtw_notch_filter;
-_func_exit_;
return status;
}
{
u8 ret8 = _SUCCESS;
-_func_enter_;
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_init_drv_sw\n"));
exit:
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_init_drv_sw\n"));
- _func_exit_;
return ret8;
}
struct sk_buff *skb;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-_func_enter_;
precvpriv = &(padapter->recvpriv);
pfree_recv_queue = &(precvpriv->free_recv_queue);
RT_TRACE(_module_recv_osdep_c_, _drv_info_,
("\n rtw_recv_indicatepkt :after netif_rx!!!!\n"));
-_func_exit_;
return _SUCCESS;
/* enqueue back to free_recv_queue */
rtw_free_recvframe(precv_frame, pfree_recv_queue);
-_func_exit_;
return _FAIL;
}
struct usb_endpoint_descriptor *pendp_desc;
struct usb_device *pusbd;
-_func_enter_;
pdvobjpriv = (struct dvobj_priv *)rtw_zmalloc(sizeof(*pdvobjpriv));
if (pdvobjpriv == NULL)
pdvobjpriv = NULL;
}
exit:
-_func_exit_;
return pdvobjpriv;
}
{
struct dvobj_priv *dvobj = usb_get_intfdata(usb_intf);
-_func_enter_;
usb_set_intfdata(usb_intf, NULL);
if (dvobj) {
usb_put_dev(interface_to_usbdev(usb_intf));
-_func_exit_;
}
static void chip_by_usb_id(struct adapter *padapter,
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct net_device *pnetdev = padapter->pnetdev;
- _func_enter_;
if ((!padapter->bup) || (padapter->bDriverStopped) ||
(padapter->bSurpriseRemoved)) {
} else {
goto error_exit;
}
- _func_exit_;
return 0;
error_exit:
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct net_device *pnetdev = padapter->pnetdev;
- _func_enter_;
if (padapter) { /* system resume */
DBG_88E("==> rtw_hw_resume\n");
goto error_exit;
}
- _func_exit_;
return 0;
error_exit:
int ret = 0;
u32 start_time = jiffies;
- _func_enter_;
DBG_88E("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
DBG_88E("<=== %s return %d.............. in %dms\n", __func__
, ret, rtw_get_passing_time_ms(start_time));
- _func_exit_;
return ret;
}
struct pwrctrl_priv *pwrpriv = NULL;
int ret = -1;
u32 start_time = jiffies;
- _func_enter_;
DBG_88E("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
DBG_88E("<=== %s return %d.............. in %dms\n", __func__,
ret, rtw_get_passing_time_ms(start_time));
- _func_exit_;
return ret;
}
struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf);
struct adapter *padapter = dvobj->if1;
-_func_enter_;
DBG_88E("+rtw_dev_remove\n");
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+dev_remove()\n"));
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-dev_remove()\n"));
DBG_88E("-r871xu_dev_remove, done\n");
-_func_exit_;
return;
}
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct hal_data_8188e *haldata;
-_func_enter_;
switch (pxmitbuf->flags) {
case VO_QUEUE_INX:
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
-
-_func_exit_;
}
u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
struct xmit_frame *pxmitframe = (struct xmit_frame *)pxmitbuf->priv_data;
struct usb_device *pusbd = pdvobj->pusbdev;
-_func_enter_;
RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("+usb_write_port\n"));
exit:
if (ret != _SUCCESS)
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
-_func_exit_;
return ret;
}
void _rtw_open_pktfile(struct sk_buff *pktptr, struct pkt_file *pfile)
{
-_func_enter_;
pfile->pkt = pktptr;
pfile->cur_addr = pktptr->data;
pfile->cur_buffer = pfile->buf_start;
-_func_exit_;
}
uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen)
{
uint len = 0;
-_func_enter_;
len = rtw_remainder_len(pfile);
len = (rlen > len) ? len : rlen;
pfile->cur_addr += len;
pfile->pkt_len -= len;
-_func_exit_;
return len;
}
int rtw_endofpktfile(struct pkt_file *pfile)
{
-_func_enter_;
if (pfile->pkt_len == 0) {
- _func_exit_;
return true;
}
-_func_exit_;
return false;
}
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
s32 res = 0;
-_func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n"));
exit:
-_func_exit_;
return 0;
}