mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 20:43:40 +00:00
rtl8188eu: Remove a number of 'list' wrappers
The wrappers for list_empty(), list_add(), list_add_tail(), INIT_LIST_HEAD(), and list_del_init() are removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
92b97f0a67
commit
cbfa6220ef
21 changed files with 203 additions and 243 deletions
|
@ -327,7 +327,7 @@ void expire_timeout_chk(_adapter *padapter)
|
|||
if (psta->expire_to > 0) {
|
||||
psta->expire_to--;
|
||||
if (psta->expire_to == 0) {
|
||||
rtw_list_delete(&psta->auth_list);
|
||||
list_del_init(&psta->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
|
||||
RTW_INFO("auth expire %02X%02X%02X%02X%02X%02X\n",
|
||||
|
@ -495,7 +495,7 @@ void expire_timeout_chk(_adapter *padapter)
|
|||
continue;
|
||||
}
|
||||
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
RTW_INFO("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING, true);
|
||||
|
@ -575,8 +575,8 @@ void expire_timeout_chk(_adapter *padapter)
|
|||
psta->keep_alive_trycnt = 0;
|
||||
RTW_INFO("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (!rtw_is_list_empty(&psta->asoc_list)) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (!list_empty(&psta->asoc_list)) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING, true);
|
||||
}
|
||||
|
@ -1330,8 +1330,8 @@ update_beacon:
|
|||
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
_enter_critical_bh(&pdvobj->ap_if_q.lock, &irqL);
|
||||
if (rtw_is_list_empty(&padapter->list)) {
|
||||
rtw_list_insert_tail(&padapter->list, get_list_head(&pdvobj->ap_if_q));
|
||||
if (list_empty(&padapter->list)) {
|
||||
list_add_tail(&padapter->list, get_list_head(&pdvobj->ap_if_q));
|
||||
pdvobj->nr_ap_if++;
|
||||
pdvobj->inter_bcn_space = DEFAULT_BCN_INTERVAL / pdvobj->nr_ap_if;
|
||||
}
|
||||
|
@ -1785,11 +1785,11 @@ static void rtw_macaddr_acl_init(_adapter *adapter)
|
|||
unsigned long irqL;
|
||||
|
||||
_enter_critical_bh(&(acl_node_q->lock), &irqL);
|
||||
_rtw_init_listhead(&(acl_node_q->queue));
|
||||
INIT_LIST_HEAD(&(acl_node_q->queue));
|
||||
acl->num = 0;
|
||||
acl->mode = RTW_ACL_MODE_DISABLED;
|
||||
for (i = 0; i < NUM_ACL; i++) {
|
||||
_rtw_init_listhead(&acl->aclnode[i].list);
|
||||
INIT_LIST_HEAD(&acl->aclnode[i].list);
|
||||
acl->aclnode[i].valid = false;
|
||||
}
|
||||
_exit_critical_bh(&(acl_node_q->lock), &irqL);
|
||||
|
@ -1813,7 +1813,7 @@ static void rtw_macaddr_acl_deinit(_adapter *adapter)
|
|||
|
||||
if (acl_node->valid ) {
|
||||
acl_node->valid = false;
|
||||
rtw_list_delete(&acl_node->list);
|
||||
list_del_init(&acl_node->list);
|
||||
acl->num--;
|
||||
}
|
||||
}
|
||||
|
@ -1876,11 +1876,11 @@ int rtw_acl_add_sta(_adapter *adapter, const u8 *addr)
|
|||
acl_node = &acl->aclnode[i];
|
||||
if (acl_node->valid == false) {
|
||||
|
||||
_rtw_init_listhead(&acl_node->list);
|
||||
INIT_LIST_HEAD(&acl_node->list);
|
||||
memcpy(acl_node->addr, addr, ETH_ALEN);
|
||||
acl_node->valid = true;
|
||||
|
||||
rtw_list_insert_tail(&acl_node->list, get_list_head(acl_node_q));
|
||||
list_add_tail(&acl_node->list, get_list_head(acl_node_q));
|
||||
acl->num++;
|
||||
break;
|
||||
}
|
||||
|
@ -1924,7 +1924,7 @@ int rtw_acl_remove_sta(_adapter *adapter, const u8 *addr)
|
|||
if (is_baddr || !memcmp(acl_node->addr, addr, ETH_ALEN)) {
|
||||
if (acl_node->valid ) {
|
||||
acl_node->valid = false;
|
||||
rtw_list_delete(&acl_node->list);
|
||||
list_del_init(&acl_node->list);
|
||||
acl->num--;
|
||||
match = 1;
|
||||
}
|
||||
|
@ -2035,7 +2035,7 @@ static int rtw_ap_set_key(_adapter *padapter, u8 *key, u8 alg, int keyid, u8 set
|
|||
pcmd->rspsz = 0;
|
||||
|
||||
|
||||
_rtw_init_listhead(&pcmd->list);
|
||||
INIT_LIST_HEAD(&pcmd->list);
|
||||
|
||||
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
|
||||
|
||||
|
@ -2109,7 +2109,7 @@ static u8 rtw_ap_bmc_frames_hdl(_adapter *padapter)
|
|||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta_bmc->sleepq_len--;
|
||||
tx_counts++;
|
||||
|
@ -3090,7 +3090,7 @@ int rtw_sta_flush(_adapter *padapter, bool enqueue)
|
|||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
|
||||
|
@ -3331,7 +3331,7 @@ void stop_ap_mode(_adapter *padapter)
|
|||
else
|
||||
pdvobj->inter_bcn_space = DEFAULT_BCN_INTERVAL;
|
||||
|
||||
rtw_list_delete(&padapter->list);
|
||||
list_del_init(&padapter->list);
|
||||
_exit_critical_bh(&pdvobj->ap_if_q.lock, &irqL);
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&pdvobj->inter_bcn_space));
|
||||
|
@ -3685,7 +3685,7 @@ void tx_beacon_handler(struct dvobj_priv *pdvobj)
|
|||
|
||||
/* get first ap mode interface */
|
||||
_enter_critical_bh(&pdvobj->ap_if_q.lock, &irqL);
|
||||
if (rtw_is_list_empty(&pdvobj->ap_if_q.queue) || (pdvobj->nr_ap_if == 0)) {
|
||||
if (list_empty(&pdvobj->ap_if_q.queue) || (pdvobj->nr_ap_if == 0)) {
|
||||
RTW_INFO("[%s] ERROR: ap_if_q is empty!or nr_ap = %d\n", __func__, pdvobj->nr_ap_if);
|
||||
_exit_critical_bh(&pdvobj->ap_if_q.lock, &irqL);
|
||||
return;
|
||||
|
|
|
@ -264,9 +264,9 @@ sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head)
|
|||
_enter_critical(&queue->lock, &irqL);
|
||||
|
||||
if (to_head)
|
||||
rtw_list_insert_head(&obj->list, &queue->queue);
|
||||
list_add(&obj->list, &queue->queue);
|
||||
else
|
||||
rtw_list_insert_tail(&obj->list, &queue->queue);
|
||||
list_add_tail(&obj->list, &queue->queue);
|
||||
|
||||
#ifdef DBG_CMD_QUEUE
|
||||
if (dump_cmd_id) {
|
||||
|
@ -330,7 +330,7 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
|||
#endif /* DBG_CMD_QUEUE */
|
||||
|
||||
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
if (list_empty(&(queue->queue)))
|
||||
obj = NULL;
|
||||
else {
|
||||
obj = LIST_CONTAINOR(get_next(&(queue->queue)), struct cmd_obj, list);
|
||||
|
@ -363,7 +363,7 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
|||
}
|
||||
#endif /* DBG_CMD_QUEUE */
|
||||
|
||||
rtw_list_delete(&obj->list);
|
||||
list_del_init(&obj->list);
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&(queue->lock), &irqL); */
|
||||
|
@ -577,7 +577,7 @@ thread_return rtw_cmd_thread(thread_context context)
|
|||
}
|
||||
|
||||
_enter_critical(&pcmdpriv->cmd_queue.lock, &irqL);
|
||||
if (rtw_is_list_empty(&(pcmdpriv->cmd_queue.queue))) {
|
||||
if (list_empty(&(pcmdpriv->cmd_queue.queue))) {
|
||||
/* RTW_INFO("%s: cmd queue is empty!\n", __func__); */
|
||||
_exit_critical(&pcmdpriv->cmd_queue.lock, &irqL);
|
||||
continue;
|
||||
|
@ -757,7 +757,7 @@ u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj)
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_insert_tail(&obj->list, &queue->queue);
|
||||
list_add_tail(&obj->list, &queue->queue);
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
|
@ -777,11 +777,11 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue)
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
if (list_empty(&(queue->queue)))
|
||||
pevtobj = NULL;
|
||||
else {
|
||||
pevtobj = LIST_CONTAINOR(get_next(&(queue->queue)), struct evt_obj, list);
|
||||
rtw_list_delete(&pevtobj->list);
|
||||
list_del_init(&pevtobj->list);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
|
@ -1141,7 +1141,7 @@ u8 rtw_getbbreg_cmd(_adapter *padapter, u8 offset, u8 *pval)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&ph2c->list);
|
||||
INIT_LIST_HEAD(&ph2c->list);
|
||||
ph2c->cmdcode = GEN_CMD_CODE(_GetBBReg);
|
||||
ph2c->parmbuf = (unsigned char *)prdbbparm;
|
||||
ph2c->cmdsz = sizeof(struct readBB_parm);
|
||||
|
@ -1205,7 +1205,7 @@ u8 rtw_getrfreg_cmd(_adapter *padapter, u8 offset, u8 *pval)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&ph2c->list);
|
||||
INIT_LIST_HEAD(&ph2c->list);
|
||||
ph2c->cmdcode = GEN_CMD_CODE(_GetRFReg);
|
||||
ph2c->parmbuf = (unsigned char *)prdrfparm;
|
||||
ph2c->cmdsz = sizeof(struct readRF_parm);
|
||||
|
@ -1498,7 +1498,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||
}
|
||||
#endif
|
||||
pcmd->cmdsz = sizeof(WLAN_BSSID_EX);
|
||||
_rtw_init_listhead(&pcmd->list);
|
||||
INIT_LIST_HEAD(&pcmd->list);
|
||||
pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */
|
||||
pcmd->parmbuf = (unsigned char *)psecnetwork;
|
||||
pcmd->rsp = NULL;
|
||||
|
@ -1763,7 +1763,7 @@ u8 rtw_getrttbl_cmd(_adapter *padapter, struct getratable_rsp *pval)
|
|||
|
||||
/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable)); */
|
||||
|
||||
_rtw_init_listhead(&ph2c->list);
|
||||
INIT_LIST_HEAD(&ph2c->list);
|
||||
ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable);
|
||||
ph2c->parmbuf = (unsigned char *)pgetrttblparm;
|
||||
ph2c->cmdsz = sizeof(struct getratable_parm);
|
||||
|
@ -4196,7 +4196,7 @@ static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
|||
if (i >= SESSION_TRACKER_REG_ID_NUM)
|
||||
goto chk_sta;
|
||||
|
||||
_rtw_init_listhead(&dlist);
|
||||
INIT_LIST_HEAD(&dlist);
|
||||
|
||||
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
|
||||
|
@ -4211,8 +4211,8 @@ static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
|||
if (st->status != ST_STATUS_ESTABLISH
|
||||
&& rtw_get_passing_time_ms(st->set_time) > ST_EXPIRE_MS
|
||||
) {
|
||||
rtw_list_delete(&st->list);
|
||||
rtw_list_insert_tail(&st->list, &dlist);
|
||||
list_del_init(&st->list);
|
||||
list_add_tail(&st->list, &dlist);
|
||||
}
|
||||
|
||||
/* TODO: check OS for status update */
|
||||
|
@ -4342,7 +4342,7 @@ static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
|||
switch (cmd) {
|
||||
case ST_CMD_DEL:
|
||||
if (st) {
|
||||
rtw_list_delete(plist);
|
||||
list_del_init(plist);
|
||||
free_st = 1;
|
||||
}
|
||||
goto unlock;
|
||||
|
@ -4372,7 +4372,7 @@ unlock:
|
|||
st->status = ST_STATUS_CHECK;
|
||||
|
||||
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
rtw_list_insert_tail(&st->list, phead);
|
||||
list_add_tail(&st->list, phead);
|
||||
_exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
}
|
||||
}
|
||||
|
@ -4613,7 +4613,7 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
|
|||
}
|
||||
pwlan->last_scanned = rtw_get_current_time();
|
||||
} else
|
||||
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
||||
list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
||||
|
||||
pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network);
|
||||
memcpy(&(pwlan->network), pdev_network, pdev_network->Length);
|
||||
|
|
|
@ -4274,8 +4274,8 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t
|
|||
u8 updated = false;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (list_empty(&psta->asoc_list) == false) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_PREV_AUTH_NOT_VALID, true);
|
||||
|
||||
|
|
|
@ -1124,7 +1124,7 @@ static s32 _rtw_mi_buddy_clone_bcmc_packet(_adapter *adapter, union recv_frame *
|
|||
if (pcloneframe) {
|
||||
pcloneframe->u.hdr.adapter = adapter;
|
||||
|
||||
_rtw_init_listhead(&pcloneframe->u.hdr.list);
|
||||
INIT_LIST_HEAD(&pcloneframe->u.hdr.list);
|
||||
pcloneframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf for new arch.*/
|
||||
pcloneframe->u.hdr.len = 0;
|
||||
|
||||
|
|
|
@ -67,9 +67,9 @@ static sint _rtw_init_mlme_priv(_adapter *padapter)
|
|||
pnetwork = (struct wlan_network *)pbuf;
|
||||
|
||||
for (i = 0; i < MAX_BSS_CNT; i++) {
|
||||
_rtw_init_listhead(&(pnetwork->list));
|
||||
INIT_LIST_HEAD(&(pnetwork->list));
|
||||
|
||||
rtw_list_insert_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue));
|
||||
list_add_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue));
|
||||
|
||||
pnetwork++;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ static sint _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_insert_tail(&pnetwork->list, &queue->queue);
|
||||
list_add_tail(&pnetwork->list, &queue->queue);
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
|
@ -321,7 +321,7 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue)
|
|||
{
|
||||
pnetwork = LIST_CONTAINOR(get_next(&queue->queue), struct wlan_network, list);
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
list_del_init(&(pnetwork->list));
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
|
@ -349,7 +349,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv) /* (_queue
|
|||
|
||||
pnetwork = LIST_CONTAINOR(plist , struct wlan_network, list);
|
||||
|
||||
rtw_list_delete(&pnetwork->list);
|
||||
list_del_init(&pnetwork->list);
|
||||
|
||||
pnetwork->network_type = 0;
|
||||
pnetwork->fixed = false;
|
||||
|
@ -392,9 +392,9 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwo
|
|||
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
list_del_init(&(pnetwork->list));
|
||||
|
||||
rtw_list_insert_tail(&(pnetwork->list), &(free_queue->queue));
|
||||
list_add_tail(&(pnetwork->list), &(free_queue->queue));
|
||||
|
||||
pmlmepriv->num_of_scanned--;
|
||||
|
||||
|
@ -421,9 +421,9 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
|
|||
|
||||
/* _enter_critical(&free_queue->lock, &irqL); */
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
list_del_init(&(pnetwork->list));
|
||||
|
||||
rtw_list_insert_tail(&(pnetwork->list), get_list_head(free_queue));
|
||||
list_add_tail(&(pnetwork->list), get_list_head(free_queue));
|
||||
|
||||
pmlmepriv->num_of_scanned--;
|
||||
|
||||
|
@ -961,7 +961,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
|||
if (pnetwork->network.PhyInfo.SignalQuality == 101)
|
||||
pnetwork->network.PhyInfo.SignalQuality = 0;
|
||||
|
||||
rtw_list_insert_tail(&(pnetwork->list), &(queue->queue));
|
||||
list_add_tail(&(pnetwork->list), &(queue->queue));
|
||||
|
||||
}
|
||||
} else {
|
||||
|
@ -1323,8 +1323,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
|||
|
||||
while (plist != phead) {
|
||||
ptemp = get_next(plist);
|
||||
rtw_list_delete(plist);
|
||||
rtw_list_insert_tail(plist, &free_queue->queue);
|
||||
list_del_init(plist);
|
||||
list_add_tail(plist, &free_queue->queue);
|
||||
plist = ptemp;
|
||||
pmlmepriv->num_of_scanned--;
|
||||
}
|
||||
|
@ -2236,8 +2236,8 @@ void rtw_sta_timeout_event_callback(_adapter *adapter, u8 *pbuf)
|
|||
u8 updated = false;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (list_empty(&psta->asoc_list) == false) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(adapter, psta, true, WLAN_REASON_PREV_AUTH_NOT_VALID, true);
|
||||
}
|
||||
|
@ -3279,7 +3279,7 @@ sint rtw_set_auth(_adapter *adapter, struct security_priv *psecuritypriv)
|
|||
pcmd->rspsz = 0;
|
||||
|
||||
|
||||
_rtw_init_listhead(&pcmd->list);
|
||||
INIT_LIST_HEAD(&pcmd->list);
|
||||
|
||||
|
||||
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
|
||||
|
@ -3363,7 +3363,7 @@ sint rtw_set_key(_adapter *adapter, struct security_priv *psecuritypriv, sint ke
|
|||
pcmd->rsp = NULL;
|
||||
pcmd->rspsz = 0;
|
||||
|
||||
_rtw_init_listhead(&pcmd->list);
|
||||
INIT_LIST_HEAD(&pcmd->list);
|
||||
|
||||
/* _rtw_init_sema(&(pcmd->cmd_sem), 0); */
|
||||
|
||||
|
|
|
@ -1652,9 +1652,9 @@ _continue:
|
|||
}
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list)) {
|
||||
if (list_empty(&psta->asoc_list)) {
|
||||
psta->expire_to = pstapriv->expire_to;
|
||||
rtw_list_insert_tail(&psta->asoc_list, &pstapriv->asoc_list);
|
||||
list_add_tail(&psta->asoc_list, &pstapriv->asoc_list);
|
||||
pstapriv->asoc_list_cnt++;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
@ -2178,8 +2178,8 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame)
|
|||
{
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&pstat->asoc_list) == false) {
|
||||
rtw_list_delete(&pstat->asoc_list);
|
||||
if (list_empty(&pstat->asoc_list) == false) {
|
||||
list_del_init(&pstat->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
if (pstat->expire_to > 0)
|
||||
;/* TODO: STA re_auth within expire_to */
|
||||
|
@ -2197,9 +2197,9 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame)
|
|||
#endif /* CONFIG_IEEE80211W */
|
||||
{
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&pstat->auth_list)) {
|
||||
if (list_empty(&pstat->auth_list)) {
|
||||
|
||||
rtw_list_insert_tail(&pstat->auth_list, &pstapriv->auth_list);
|
||||
list_add_tail(&pstat->auth_list, &pstapriv->auth_list);
|
||||
pstapriv->auth_list_cnt++;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
|
@ -2869,16 +2869,16 @@ bypass_ht_chk:
|
|||
#endif /* CONFIG_IEEE80211W */
|
||||
{
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
if (!rtw_is_list_empty(&pstat->auth_list)) {
|
||||
rtw_list_delete(&pstat->auth_list);
|
||||
if (!list_empty(&pstat->auth_list)) {
|
||||
list_del_init(&pstat->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&pstat->asoc_list)) {
|
||||
if (list_empty(&pstat->asoc_list)) {
|
||||
pstat->expire_to = pstapriv->expire_to;
|
||||
rtw_list_insert_tail(&pstat->asoc_list, &pstapriv->asoc_list);
|
||||
list_add_tail(&pstat->asoc_list, &pstapriv->asoc_list);
|
||||
pstapriv->asoc_list_cnt++;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
@ -3125,8 +3125,8 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame)
|
|||
u8 updated = false;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (list_empty(&psta->asoc_list) == false) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, reason, true);
|
||||
|
||||
|
@ -3215,8 +3215,8 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame)
|
|||
u8 updated = false;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (list_empty(&psta->asoc_list) == false) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, reason, true);
|
||||
|
||||
|
@ -11088,7 +11088,7 @@ void report_survey_event(_adapter *padapter, union recv_frame *precv_frame)
|
|||
return;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
|
@ -11143,7 +11143,7 @@ void report_surveydone_event(_adapter *padapter)
|
|||
return;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
|
@ -11191,7 +11191,7 @@ u32 report_join_res(_adapter *padapter, int res)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
|
@ -11243,7 +11243,7 @@ void report_wmm_edca_update(_adapter *padapter)
|
|||
return;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
|
@ -11315,7 +11315,7 @@ u32 report_del_sta_event(_adapter *padapter, unsigned char *MacAddr, unsigned sh
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
pcmd_obj->parmbuf = pevtcmd;
|
||||
|
@ -11355,7 +11355,7 @@ void report_add_sta_event(_adapter *padapter, unsigned char *MacAddr)
|
|||
return;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
|
@ -12257,7 +12257,7 @@ bypass_active_keep_alive:
|
|||
unsigned long irqL;
|
||||
_list *phead, *plist, dlist;
|
||||
|
||||
_rtw_init_listhead(&dlist);
|
||||
INIT_LIST_HEAD(&dlist);
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
|
@ -12278,8 +12278,8 @@ bypass_active_keep_alive:
|
|||
psta->expire_to--;
|
||||
|
||||
if (psta->expire_to <= 0) {
|
||||
rtw_list_delete(&psta->list);
|
||||
rtw_list_insert_tail(&psta->list, &dlist);
|
||||
list_del_init(&psta->list);
|
||||
list_add_tail(&psta->list, &dlist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12290,7 +12290,7 @@ bypass_active_keep_alive:
|
|||
while (rtw_end_of_queue_search(&dlist, plist) == false) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, list);
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&psta->list);
|
||||
list_del_init(&psta->list);
|
||||
RTW_INFO(FUNC_ADPT_FMT" ibss expire "MAC_FMT"\n"
|
||||
, FUNC_ADPT_ARG(padapter), MAC_ARG(psta->hwaddr));
|
||||
report_del_sta_event(padapter, psta->hwaddr, WLAN_REASON_EXPIRATION_CHK, from_timer ? true : false, false);
|
||||
|
@ -12441,7 +12441,7 @@ void report_sta_timeout_event(_adapter *padapter, u8 *MacAddr, unsigned short re
|
|||
return;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
|
@ -12682,7 +12682,7 @@ void report_ft_reassoc_event(_adapter *padapter, u8 *pMacAddr)
|
|||
return;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&pcmd_obj->list);
|
||||
INIT_LIST_HEAD(&pcmd_obj->list);
|
||||
pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
|
||||
pcmd_obj->cmdsz = cmdsz;
|
||||
pcmd_obj->parmbuf = pevtcmd;
|
||||
|
@ -14559,7 +14559,7 @@ u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf)
|
|||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta_bmc->sleepq_len--;
|
||||
if (psta_bmc->sleepq_len > 0)
|
||||
|
|
|
@ -179,8 +179,8 @@ static int init_mp_priv_by_os(struct mp_priv *pmp_priv)
|
|||
pmp_xmitframe = (struct mp_xmit_frame *)pmp_priv->pmp_xmtframe_buf;
|
||||
|
||||
for (i = 0; i < NR_MP_XMITFRAME; i++) {
|
||||
_rtw_init_listhead(&pmp_xmitframe->list);
|
||||
rtw_list_insert_tail(&pmp_xmitframe->list, &pmp_priv->free_mp_xmitqueue.queue);
|
||||
INIT_LIST_HEAD(&pmp_xmitframe->list);
|
||||
list_add_tail(&pmp_xmitframe->list, &pmp_priv->free_mp_xmitqueue.queue);
|
||||
|
||||
pmp_xmitframe->pkt = NULL;
|
||||
pmp_xmitframe->frame_tag = MP_FRAMETAG;
|
||||
|
|
|
@ -117,9 +117,9 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter)
|
|||
|
||||
|
||||
for (i = 0; i < NR_RECVFRAME ; i++) {
|
||||
_rtw_init_listhead(&(precvframe->u.list));
|
||||
INIT_LIST_HEAD(&(precvframe->u.list));
|
||||
|
||||
rtw_list_insert_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue));
|
||||
list_add_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue));
|
||||
|
||||
res = rtw_os_recv_resource_alloc(padapter, precvframe);
|
||||
|
||||
|
@ -223,7 +223,7 @@ union recv_frame *_rtw_alloc_recvframe(_queue *pfree_recv_queue)
|
|||
|
||||
precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
rtw_list_delete(&precvframe->u.hdr.list);
|
||||
list_del_init(&precvframe->u.hdr.list);
|
||||
padapter = precvframe->u.hdr.adapter;
|
||||
if (padapter != NULL) {
|
||||
precvpriv = &padapter->recvpriv;
|
||||
|
@ -254,7 +254,7 @@ union recv_frame *rtw_alloc_recvframe(_queue *pfree_recv_queue)
|
|||
void rtw_init_recvframe(union recv_frame *precvframe, struct recv_priv *precvpriv)
|
||||
{
|
||||
/* Perry: This can be removed */
|
||||
_rtw_init_listhead(&precvframe->u.hdr.list);
|
||||
INIT_LIST_HEAD(&precvframe->u.hdr.list);
|
||||
|
||||
precvframe->u.hdr.len = 0;
|
||||
}
|
||||
|
@ -279,11 +279,11 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
|||
|
||||
_enter_critical_bh(&pfree_recv_queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&(precvframe->u.hdr.list));
|
||||
list_del_init(&(precvframe->u.hdr.list));
|
||||
|
||||
precvframe->u.hdr.len = 0;
|
||||
|
||||
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(pfree_recv_queue));
|
||||
list_add_tail(&(precvframe->u.hdr.list), get_list_head(pfree_recv_queue));
|
||||
|
||||
if (padapter != NULL) {
|
||||
if (pfree_recv_queue == &precvpriv->free_recv_queue)
|
||||
|
@ -307,11 +307,11 @@ sint _rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
|||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
|
||||
|
||||
/* _rtw_init_listhead(&(precvframe->u.hdr.list)); */
|
||||
rtw_list_delete(&(precvframe->u.hdr.list));
|
||||
/* INIT_LIST_HEAD(&(precvframe->u.hdr.list)); */
|
||||
list_del_init(&(precvframe->u.hdr.list));
|
||||
|
||||
|
||||
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(queue));
|
||||
list_add_tail(&(precvframe->u.hdr.list), get_list_head(queue));
|
||||
|
||||
if (padapter != NULL) {
|
||||
if (queue == &precvpriv->free_recv_queue)
|
||||
|
@ -369,7 +369,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
|
|||
|
||||
plist = get_next(plist);
|
||||
|
||||
/* rtw_list_delete(&precvframe->u.hdr.list); */ /* will do this in rtw_free_recvframe() */
|
||||
/* list_del_init(&precvframe->u.hdr.list); */ /* will do this in rtw_free_recvframe() */
|
||||
|
||||
rtw_free_recvframe(precvframe, pfree_recv_queue);
|
||||
}
|
||||
|
@ -401,8 +401,8 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
rtw_list_insert_head(&precvbuf->list, get_list_head(queue));
|
||||
list_del_init(&precvbuf->list);
|
||||
list_add(&precvbuf->list, get_list_head(queue));
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
return _SUCCESS;
|
||||
|
@ -414,9 +414,9 @@ sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
|||
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
list_del_init(&precvbuf->list);
|
||||
|
||||
rtw_list_insert_tail(&precvbuf->list, get_list_head(queue));
|
||||
list_add_tail(&precvbuf->list, get_list_head(queue));
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ struct recv_buf *rtw_dequeue_recvbuf(_queue *queue)
|
|||
|
||||
precvbuf = LIST_CONTAINOR(plist, struct recv_buf, list);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
list_del_init(&precvbuf->list);
|
||||
}
|
||||
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
|
@ -1607,7 +1607,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta->sleepq_len--;
|
||||
|
||||
|
@ -2341,7 +2341,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
|
|||
plist = get_next(phead);
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pfhdr = &prframe->u.hdr;
|
||||
rtw_list_delete(&(prframe->u.list));
|
||||
list_del_init(&(prframe->u.list));
|
||||
|
||||
if (curfragnum != pfhdr->attrib.frag_num) {
|
||||
/* the first fragment number must be 0 */
|
||||
|
@ -2459,7 +2459,7 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
|
|||
|
||||
/* _rtw_spinlock(&pdefrag_q->lock); */
|
||||
phead = get_list_head(pdefrag_q);
|
||||
rtw_list_insert_tail(&pfhdr->list, phead);
|
||||
list_add_tail(&pfhdr->list, phead);
|
||||
/* _rtw_spinunlock(&pdefrag_q->lock); */
|
||||
|
||||
|
||||
|
@ -2479,7 +2479,7 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
|
|||
if (pdefrag_q != NULL) {
|
||||
/* _rtw_spinlock(&pdefrag_q->lock); */
|
||||
phead = get_list_head(pdefrag_q);
|
||||
rtw_list_insert_tail(&pfhdr->list, phead);
|
||||
list_add_tail(&pfhdr->list, phead);
|
||||
/* _rtw_spinunlock(&pdefrag_q->lock); */
|
||||
|
||||
/* call recvframe_defrag to defrag */
|
||||
|
@ -2684,9 +2684,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
|
|||
/* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */
|
||||
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
list_del_init(&(prframe->u.hdr.list));
|
||||
|
||||
rtw_list_insert_tail(&(prframe->u.hdr.list), plist);
|
||||
list_add_tail(&(prframe->u.hdr.list), plist);
|
||||
|
||||
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
|
@ -2733,7 +2733,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
/* Handling some condition for forced indicate case. */
|
||||
if (bforced) {
|
||||
pdbgpriv->dbg_rx_ampdu_forced_indicate_count++;
|
||||
if (rtw_is_list_empty(phead)) {
|
||||
if (list_empty(phead)) {
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
|
||||
return true;
|
||||
|
@ -2753,14 +2753,14 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
|
||||
/* Prepare indication list and indication. */
|
||||
/* Check if there is any packet need indicate. */
|
||||
while (!rtw_is_list_empty(phead)) {
|
||||
while (!list_empty(phead)) {
|
||||
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
|
||||
if (!SN_LESS(preorder_ctrl->indicate_seq, le16_to_cpu(pattrib->seq_num))) {
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
list_del_init(&(prframe->u.hdr.list));
|
||||
|
||||
if (SN_EQUAL(preorder_ctrl->indicate_seq, le16_to_cpu(pattrib->seq_num))) {
|
||||
preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
|
||||
|
|
|
@ -52,7 +52,7 @@ inline void rtw_st_ctl_clear_tracker_q(struct st_ctl_t *st_ctl)
|
|||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&st->list);
|
||||
list_del_init(&st->list);
|
||||
rtw_mfree((u8 *)st, sizeof(struct session_tracker));
|
||||
}
|
||||
_exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
|
@ -164,11 +164,11 @@ void _rtw_init_stainfo(struct sta_info *psta)
|
|||
memset((u8 *)psta, 0, sizeof(struct sta_info));
|
||||
|
||||
spin_lock_init(&psta->lock);
|
||||
_rtw_init_listhead(&psta->list);
|
||||
_rtw_init_listhead(&psta->hash_list);
|
||||
/* _rtw_init_listhead(&psta->asoc_list); */
|
||||
/* _rtw_init_listhead(&psta->sleep_list); */
|
||||
/* _rtw_init_listhead(&psta->wakeup_list); */
|
||||
INIT_LIST_HEAD(&psta->list);
|
||||
INIT_LIST_HEAD(&psta->hash_list);
|
||||
/* INIT_LIST_HEAD(&psta->asoc_list); */
|
||||
/* INIT_LIST_HEAD(&psta->sleep_list); */
|
||||
/* INIT_LIST_HEAD(&psta->wakeup_list); */
|
||||
|
||||
_rtw_init_queue(&psta->sleep_q);
|
||||
psta->sleepq_len = 0;
|
||||
|
@ -178,9 +178,9 @@ void _rtw_init_stainfo(struct sta_info *psta)
|
|||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
_rtw_init_listhead(&psta->asoc_list);
|
||||
INIT_LIST_HEAD(&psta->asoc_list);
|
||||
|
||||
_rtw_init_listhead(&psta->auth_list);
|
||||
INIT_LIST_HEAD(&psta->auth_list);
|
||||
|
||||
psta->expire_to = 0;
|
||||
|
||||
|
@ -246,9 +246,9 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
|||
for (i = 0; i < NUM_STA; i++) {
|
||||
_rtw_init_stainfo(psta);
|
||||
|
||||
_rtw_init_listhead(&(pstapriv->sta_hash[i]));
|
||||
INIT_LIST_HEAD(&(pstapriv->sta_hash[i]));
|
||||
|
||||
rtw_list_insert_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue));
|
||||
list_add_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue));
|
||||
|
||||
psta++;
|
||||
}
|
||||
|
@ -260,8 +260,8 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
|||
pstapriv->sta_dz_bitmap = 0;
|
||||
pstapriv->tim_bitmap = 0;
|
||||
|
||||
_rtw_init_listhead(&pstapriv->asoc_list);
|
||||
_rtw_init_listhead(&pstapriv->auth_list);
|
||||
INIT_LIST_HEAD(&pstapriv->asoc_list);
|
||||
INIT_LIST_HEAD(&pstapriv->auth_list);
|
||||
spin_lock_init(&pstapriv->asoc_list_lock);
|
||||
spin_lock_init(&pstapriv->auth_list_lock);
|
||||
pstapriv->asoc_list_cnt = 0;
|
||||
|
@ -464,7 +464,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
}
|
||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
|
||||
rtw_list_delete(&(psta->list));
|
||||
list_del_init(&(psta->list));
|
||||
|
||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||
|
||||
|
@ -487,7 +487,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
/* _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
|
||||
|
||||
rtw_list_insert_tail(&psta->hash_list, phash_list);
|
||||
list_add_tail(&psta->hash_list, phash_list);
|
||||
|
||||
pstapriv->asoc_sta_count++;
|
||||
|
||||
|
@ -577,7 +577,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
|
||||
if (is_pre_link_sta == false) {
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL0);
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
list_del_init(&psta->hash_list);
|
||||
pstapriv->asoc_sta_count--;
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL0);
|
||||
rtw_mi_update_iface_status(&(padapter->mlmepriv), 0);
|
||||
|
@ -596,9 +596,9 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
|
||||
pstaxmitpriv = &psta->sta_xmitpriv;
|
||||
|
||||
/* rtw_list_delete(&psta->sleep_list); */
|
||||
/* list_del_init(&psta->sleep_list); */
|
||||
|
||||
/* rtw_list_delete(&psta->wakeup_list); */
|
||||
/* list_del_init(&psta->wakeup_list); */
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
|
||||
|
@ -608,7 +608,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
/* vo */
|
||||
/* _enter_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits;
|
||||
phwxmit->accnt -= pstaxmitpriv->vo_q.qcnt;
|
||||
pending_qcnt[0] = pstaxmitpriv->vo_q.qcnt;
|
||||
|
@ -618,7 +618,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
/* vi */
|
||||
/* _enter_critical_bh(&(pxmitpriv->vi_pending.lock), &irqL0); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits + 1;
|
||||
phwxmit->accnt -= pstaxmitpriv->vi_q.qcnt;
|
||||
pending_qcnt[1] = pstaxmitpriv->vi_q.qcnt;
|
||||
|
@ -628,7 +628,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
/* be */
|
||||
/* _enter_critical_bh(&(pxmitpriv->be_pending.lock), &irqL0); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->be_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits + 2;
|
||||
phwxmit->accnt -= pstaxmitpriv->be_q.qcnt;
|
||||
pending_qcnt[2] = pstaxmitpriv->be_q.qcnt;
|
||||
|
@ -638,7 +638,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
/* bk */
|
||||
/* _enter_critical_bh(&(pxmitpriv->bk_pending.lock), &irqL0); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits + 3;
|
||||
phwxmit->accnt -= pstaxmitpriv->bk_q.qcnt;
|
||||
pending_qcnt[3] = pstaxmitpriv->bk_q.qcnt;
|
||||
|
@ -683,12 +683,12 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (!rtw_is_list_empty(phead)) {
|
||||
while (!list_empty(phead)) {
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
list_del_init(&(prframe->u.hdr.list));
|
||||
|
||||
rtw_free_recvframe(prframe, pfree_recv_queue);
|
||||
}
|
||||
|
@ -709,12 +709,12 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
|
||||
/*
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL0);
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL0);
|
||||
*/
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL0);
|
||||
if (!rtw_is_list_empty(&psta->auth_list)) {
|
||||
rtw_list_delete(&psta->auth_list);
|
||||
if (!list_empty(&psta->auth_list)) {
|
||||
list_del_init(&psta->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL0);
|
||||
|
@ -761,7 +761,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
|
||||
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL0);
|
||||
rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
|
||||
list_add_tail(&psta->list, get_list_head(pfree_sta_queue));
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL0);
|
||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
|
||||
}
|
||||
|
@ -800,7 +800,7 @@ void rtw_free_all_stainfo(_adapter *padapter)
|
|||
|
||||
if (pbcmc_stainfo != psta) {
|
||||
if (rtw_is_pre_link_sta(pstapriv, psta->hwaddr) == false)
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
list_del_init(&psta->hash_list);
|
||||
|
||||
stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
|
||||
if (stainfo_offset_valid(stainfo_offset))
|
||||
|
@ -899,8 +899,8 @@ u32 rtw_init_bcmc_stainfo(_adapter *padapter)
|
|||
/*
|
||||
_enter_critical(&pstapending->lock, &irqL0);
|
||||
|
||||
if (rtw_is_list_empty(&ptxservq->tx_pending))
|
||||
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(pstapending));
|
||||
if (list_empty(&ptxservq->tx_pending))
|
||||
list_add_tail(&ptxservq->tx_pending, get_list_head(pstapending));
|
||||
|
||||
_exit_critical(&pstapending->lock, &irqL0);
|
||||
*/
|
||||
|
|
|
@ -2115,7 +2115,7 @@ int On_TDLS_Peer_Traffic_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
|||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
ptdls_sta->sleepq_len--;
|
||||
ptdls_sta->sleepq_ac_len--;
|
||||
|
|
|
@ -28,7 +28,7 @@ static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
|
|||
|
||||
static void _init_txservq(struct tx_servq *ptxservq)
|
||||
{
|
||||
_rtw_init_listhead(&ptxservq->tx_pending);
|
||||
INIT_LIST_HEAD(&ptxservq->tx_pending);
|
||||
_rtw_init_queue(&ptxservq->sta_pending);
|
||||
ptxservq->qcnt = 0;
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
|
|||
_init_txservq(&psta_xmitpriv->bk_q);
|
||||
_init_txservq(&psta_xmitpriv->vi_q);
|
||||
_init_txservq(&psta_xmitpriv->vo_q);
|
||||
_rtw_init_listhead(&psta_xmitpriv->legacy_dz);
|
||||
_rtw_init_listhead(&psta_xmitpriv->apsd);
|
||||
INIT_LIST_HEAD(&psta_xmitpriv->legacy_dz);
|
||||
INIT_LIST_HEAD(&psta_xmitpriv->apsd);
|
||||
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxframe = (struct xmit_frame *) pxmitpriv->pxmit_frame_buf;
|
||||
|
||||
for (i = 0; i < NR_XMITFRAME; i++) {
|
||||
_rtw_init_listhead(&(pxframe->list));
|
||||
INIT_LIST_HEAD(&(pxframe->list));
|
||||
|
||||
pxframe->padapter = padapter;
|
||||
pxframe->frame_tag = NULL_FRAMETAG;
|
||||
|
@ -117,7 +117,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxframe->buf_addr = NULL;
|
||||
pxframe->pxmitbuf = NULL;
|
||||
|
||||
rtw_list_insert_tail(&(pxframe->list), &(pxmitpriv->free_xmit_queue.queue));
|
||||
list_add_tail(&(pxframe->list), &(pxmitpriv->free_xmit_queue.queue));
|
||||
|
||||
pxframe++;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
|
||||
|
||||
for (i = 0; i < NR_XMITBUFF; i++) {
|
||||
_rtw_init_listhead(&pxmitbuf->list);
|
||||
INIT_LIST_HEAD(&pxmitbuf->list);
|
||||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
pxmitbuf->padapter = padapter;
|
||||
|
@ -160,7 +160,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
}
|
||||
pxmitbuf->flags = XMIT_VO_QUEUE;
|
||||
|
||||
rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmitbuf_queue.queue));
|
||||
list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmitbuf_queue.queue));
|
||||
#ifdef DBG_XMIT_BUF
|
||||
pxmitbuf->no = i;
|
||||
#endif
|
||||
|
@ -185,7 +185,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxframe = (struct xmit_frame *)pxmitpriv->xframe_ext;
|
||||
|
||||
for (i = 0; i < NR_XMIT_EXTBUFF; i++) {
|
||||
_rtw_init_listhead(&(pxframe->list));
|
||||
INIT_LIST_HEAD(&(pxframe->list));
|
||||
|
||||
pxframe->padapter = padapter;
|
||||
pxframe->frame_tag = NULL_FRAMETAG;
|
||||
|
@ -197,7 +197,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
|
||||
pxframe->ext_tag = 1;
|
||||
|
||||
rtw_list_insert_tail(&(pxframe->list), &(pxmitpriv->free_xframe_ext_queue.queue));
|
||||
list_add_tail(&(pxframe->list), &(pxmitpriv->free_xframe_ext_queue.queue));
|
||||
|
||||
pxframe++;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
|
||||
|
||||
for (i = 0; i < NR_XMIT_EXTBUFF; i++) {
|
||||
_rtw_init_listhead(&pxmitbuf->list);
|
||||
INIT_LIST_HEAD(&pxmitbuf->list);
|
||||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
pxmitbuf->padapter = padapter;
|
||||
|
@ -230,7 +230,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue));
|
||||
list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue));
|
||||
#ifdef DBG_XMIT_BUF_EXT
|
||||
pxmitbuf->no = i;
|
||||
#endif
|
||||
|
@ -243,7 +243,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
for (i = 0; i < CMDBUF_MAX; i++) {
|
||||
pxmitbuf = &pxmitpriv->pcmd_xmitbuf[i];
|
||||
if (pxmitbuf) {
|
||||
_rtw_init_listhead(&pxmitbuf->list);
|
||||
INIT_LIST_HEAD(&pxmitbuf->list);
|
||||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
pxmitbuf->padapter = padapter;
|
||||
|
@ -2822,7 +2822,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
|||
|
||||
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
|
||||
|
||||
rtw_list_delete(&(pxmitbuf->list));
|
||||
list_del_init(&(pxmitbuf->list));
|
||||
}
|
||||
|
||||
if (pxmitbuf != NULL) {
|
||||
|
@ -2855,9 +2855,9 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
|
||||
_enter_critical(&pfree_queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
list_del_init(&pxmitbuf->list);
|
||||
|
||||
rtw_list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_queue));
|
||||
list_add_tail(&(pxmitbuf->list), get_list_head(pfree_queue));
|
||||
pxmitpriv->free_xmit_extbuf_cnt++;
|
||||
#ifdef DBG_XMIT_BUF_EXT
|
||||
RTW_INFO("DBG_XMIT_BUF_EXT FREE no=%d, free_xmit_extbuf_cnt=%d\n", pxmitbuf->no , pxmitpriv->free_xmit_extbuf_cnt);
|
||||
|
@ -2889,7 +2889,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
|||
|
||||
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
|
||||
|
||||
rtw_list_delete(&(pxmitbuf->list));
|
||||
list_del_init(&(pxmitbuf->list));
|
||||
}
|
||||
|
||||
if (pxmitbuf != NULL) {
|
||||
|
@ -2937,9 +2937,9 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
else {
|
||||
_enter_critical(&pfree_xmitbuf_queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
list_del_init(&pxmitbuf->list);
|
||||
|
||||
rtw_list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
|
||||
list_add_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
|
||||
|
||||
pxmitpriv->free_xmitbuf_cnt++;
|
||||
/* RTW_INFO("FREE, free_xmitbuf_cnt=%d\n", pxmitpriv->free_xmitbuf_cnt); */
|
||||
|
@ -3016,7 +3016,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* (_queue *p
|
|||
|
||||
pxframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
||||
rtw_list_delete(&(pxframe->list));
|
||||
list_del_init(&(pxframe->list));
|
||||
pxmitpriv->free_xmitframe_cnt--;
|
||||
}
|
||||
|
||||
|
@ -3043,7 +3043,7 @@ struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv)
|
|||
plist = get_next(phead);
|
||||
pxframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
||||
rtw_list_delete(&(pxframe->list));
|
||||
list_del_init(&(pxframe->list));
|
||||
pxmitpriv->free_xframe_ext_cnt--;
|
||||
}
|
||||
|
||||
|
@ -3114,8 +3114,8 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(queue));
|
||||
list_del_init(&pxmitframe->list);
|
||||
list_add_tail(&pxmitframe->list, get_list_head(queue));
|
||||
if (pxmitframe->ext_tag == 0) {
|
||||
pxmitpriv->free_xmitframe_cnt++;
|
||||
} else if (pxmitframe->ext_tag == 1) {
|
||||
|
@ -3181,7 +3181,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
|||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
ptxservq->qcnt--;
|
||||
break;
|
||||
|
@ -3310,7 +3310,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
|
||||
/* Remove sta node when there is no pending packets. */
|
||||
if (_rtw_queue_empty(pframe_queue)) /* must be done after get_next and before break */
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
list_del_init(&ptxservq->tx_pending);
|
||||
|
||||
/* _exit_critical_ex(&phwxmit->sta_queue->lock, &irqL0); */
|
||||
|
||||
|
@ -3417,12 +3417,12 @@ s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
|
||||
/* _enter_critical(&pstapending->lock, &irqL0); */
|
||||
|
||||
if (rtw_is_list_empty(&ptxservq->tx_pending))
|
||||
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
|
||||
if (list_empty(&ptxservq->tx_pending))
|
||||
list_add_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
|
||||
|
||||
/* _enter_critical(&ptxservq->sta_pending.lock, &irqL1); */
|
||||
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
|
||||
list_add_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
|
||||
ptxservq->qcnt++;
|
||||
phwxmits[ac_index].accnt++;
|
||||
|
||||
|
@ -3512,7 +3512,7 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry)
|
|||
sint i;
|
||||
for (i = 0; i < entry; i++, phwxmit++) {
|
||||
/* spin_lock_init(&phwxmit->xmit_lock); */
|
||||
/* _rtw_init_listhead(&phwxmit->pending); */
|
||||
/* INIT_LIST_HEAD(&phwxmit->pending); */
|
||||
/* phwxmit->txcmdcnt = 0; */
|
||||
phwxmit->accnt = 0;
|
||||
}
|
||||
|
@ -4026,11 +4026,11 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra
|
|||
_enter_critical_bh(&ptdls_sta->sleep_q.lock, &irqL);
|
||||
|
||||
if (ptdls_sta->state & WIFI_SLEEP_STATE) {
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
/* _enter_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&ptdls_sta->sleep_q));
|
||||
list_add_tail(&pxmitframe->list, get_list_head(&ptdls_sta->sleep_q));
|
||||
|
||||
ptdls_sta->sleepq_len++;
|
||||
ptdls_sta->sleepq_ac_len++;
|
||||
|
@ -4179,11 +4179,11 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
if (pstapriv->sta_dz_bitmap) { /* if anyone sta is in ps mode */
|
||||
/* pattrib->qsel = QSLT_HIGH; */ /* HIQ */
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
/*_enter_critical_bh(&psta->sleep_q.lock, &irqL);*/
|
||||
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
|
||||
list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
|
||||
|
||||
psta->sleepq_len++;
|
||||
|
||||
|
@ -4222,11 +4222,11 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
|||
u8 wmmps_ac = 0;
|
||||
|
||||
if (pstapriv->sta_dz_bitmap & BIT(psta->aid)) {
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
/* _enter_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
|
||||
list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
|
||||
|
||||
psta->sleepq_len++;
|
||||
|
||||
|
@ -4348,16 +4348,16 @@ void stop_sta_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
pstapriv->sta_dz_bitmap |= BIT(psta->aid);
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
if (!(psta->tdls_sta_state & TDLS_LINKED_STATE) && (psta_bmc != NULL)) {
|
||||
|
@ -4366,7 +4366,7 @@ void stop_sta_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
/* for BC/MC Frames */
|
||||
pstaxmitpriv = &psta_bmc->sta_xmitpriv;
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
}
|
||||
|
@ -4398,7 +4398,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
switch (pxmitframe->attrib.priority) {
|
||||
case 1:
|
||||
|
@ -4496,7 +4496,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
|||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta_bmc->sleepq_len--;
|
||||
if (psta_bmc->sleepq_len > 0)
|
||||
|
@ -4591,7 +4591,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
|||
if (!wmmps_ac)
|
||||
continue;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta->sleepq_len--;
|
||||
psta->sleepq_ac_len--;
|
||||
|
@ -4646,8 +4646,8 @@ void enqueue_pending_xmitbuf(
|
|||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
rtw_list_insert_tail(&pxmitbuf->list, get_list_head(pqueue));
|
||||
list_del_init(&pxmitbuf->list);
|
||||
list_add_tail(&pxmitbuf->list, get_list_head(pqueue));
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
_rtw_up_sema(&(pri_adapter->xmitpriv.xmit_sema));
|
||||
}
|
||||
|
@ -4660,8 +4660,8 @@ void enqueue_pending_xmitbuf_to_head(
|
|||
_queue *pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
rtw_list_insert_head(&pxmitbuf->list, get_list_head(pqueue));
|
||||
list_del_init(&pxmitbuf->list);
|
||||
list_add(&pxmitbuf->list, get_list_head(pqueue));
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
}
|
||||
|
||||
|
@ -4683,7 +4683,7 @@ struct xmit_buf *dequeue_pending_xmitbuf(
|
|||
phead = get_list_head(pqueue);
|
||||
plist = get_next(phead);
|
||||
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
list_del_init(&pxmitbuf->list);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
|
@ -4726,7 +4726,7 @@ static struct xmit_buf *dequeue_pending_xmitbuf_under_survey(
|
|||
if ((type == WIFI_PROBEREQ) ||
|
||||
(type == WIFI_DATA_NULL) ||
|
||||
(type == WIFI_QOS_DATA_NULL)) {
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
list_del_init(&pxmitbuf->list);
|
||||
break;
|
||||
}
|
||||
pxmitbuf = NULL;
|
||||
|
@ -4764,7 +4764,7 @@ static struct xmit_buf *dequeue_pending_xmitbuf_ext(
|
|||
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
|
||||
|
||||
if (pxmitbuf->buf_tag == XMITBUF_MGNT) {
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
list_del_init(&pxmitbuf->list);
|
||||
break;
|
||||
}
|
||||
pxmitbuf = NULL;
|
||||
|
|
|
@ -68,7 +68,7 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
|||
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
|
||||
|
||||
for (i = 0; i < NR_RECVBUFF ; i++) {
|
||||
_rtw_init_listhead(&precvbuf->list);
|
||||
INIT_LIST_HEAD(&precvbuf->list);
|
||||
|
||||
spin_lock_init(&precvbuf->recvbuf_lock);
|
||||
|
||||
|
@ -81,7 +81,7 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
|||
precvbuf->ref_cnt = 0;
|
||||
precvbuf->adapter = padapter;
|
||||
|
||||
/* rtw_list_insert_tail(&precvbuf->list, &(precvpriv->free_recv_buf_queue.queue)); */
|
||||
/* list_add_tail(&precvbuf->list, &(precvpriv->free_recv_buf_queue.queue)); */
|
||||
|
||||
precvbuf++;
|
||||
}
|
||||
|
|
|
@ -866,7 +866,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
pxmitframe->pkt_offset = 1;
|
||||
break;
|
||||
}
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
ptxservq->qcnt--;
|
||||
phwxmit->accnt--;
|
||||
|
||||
|
@ -927,11 +927,11 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
}
|
||||
} /* end while( aggregate same priority and same DA(AP or STA) frames) */
|
||||
if (_rtw_queue_empty(&ptxservq->sta_pending) == true)
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
list_del_init(&ptxservq->tx_pending);
|
||||
else if (single_sta_in_queue == false) {
|
||||
/* Re-arrange the order of stations in this ac queue to balance the service for these stations */
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmit->sta_queue));
|
||||
list_del_init(&ptxservq->tx_pending);
|
||||
list_add_tail(&ptxservq->tx_pending, get_list_head(phwxmit->sta_queue));
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
|
|
@ -122,7 +122,7 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr)
|
|||
goto _exit_recvbuf2recvframe;
|
||||
}
|
||||
|
||||
_rtw_init_listhead(&precvframe->u.hdr.list);
|
||||
INIT_LIST_HEAD(&precvframe->u.hdr.list);
|
||||
precvframe->u.hdr.precvbuf = NULL; /* can't access the precvbuf for new arch. */
|
||||
precvframe->u.hdr.len = 0;
|
||||
|
||||
|
|
|
@ -254,11 +254,7 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a
|
|||
extern void *rtw_malloc2d(int h, int w, size_t size);
|
||||
extern void rtw_mfree2d(void *pbuf, int h, int w, int size);
|
||||
|
||||
extern void _rtw_init_listhead(_list *list);
|
||||
extern u32 rtw_is_list_empty(_list *phead);
|
||||
extern void rtw_list_insert_head(_list *plist, _list *phead);
|
||||
extern void rtw_list_insert_tail(_list *plist, _list *phead);
|
||||
extern void rtw_list_delete(_list *plist);
|
||||
extern void list_del_init(_list *plist);
|
||||
|
||||
extern void _rtw_init_sema(_sema *sema, int init_val);
|
||||
extern void _rtw_free_sema(_sema *sema);
|
||||
|
|
|
@ -270,11 +270,6 @@ __inline static void _exit_critical_mutex(_mutex *pmutex, unsigned long *pirqL)
|
|||
#endif
|
||||
}
|
||||
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
list_del_init(plist);
|
||||
}
|
||||
|
||||
#define RTW_TIMER_HDL_ARGS void *FunctionContext
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
|
|
|
@ -118,7 +118,7 @@ struct evt_priv {
|
|||
|
||||
#define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
|
||||
do {\
|
||||
_rtw_init_listhead(&pcmd->list);\
|
||||
INIT_LIST_HEAD(&pcmd->list);\
|
||||
pcmd->cmdcode = code;\
|
||||
pcmd->parmbuf = (u8 *)(pparm);\
|
||||
pcmd->cmdsz = sizeof (*pparm);\
|
||||
|
@ -128,7 +128,7 @@ struct evt_priv {
|
|||
|
||||
#define init_h2fwcmd_w_parm_no_parm_rsp(pcmd, code) \
|
||||
do {\
|
||||
_rtw_init_listhead(&pcmd->list);\
|
||||
INIT_LIST_HEAD(&pcmd->list);\
|
||||
pcmd->cmdcode = code;\
|
||||
pcmd->parmbuf = NULL;\
|
||||
pcmd->cmdsz = 0;\
|
||||
|
|
|
@ -4232,7 +4232,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
|||
else {
|
||||
RTW_INFO("free psta=%p, aid=%d\n", psta, psta->aid);
|
||||
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
/* _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
|
||||
|
|
|
@ -7229,8 +7229,8 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
|
|||
/* RTW_INFO("free psta=%p, aid=%d\n", psta, psta->aid); */
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (list_empty(&psta->asoc_list) == false) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING, true);
|
||||
|
||||
|
|
|
@ -1909,7 +1909,7 @@ u8 rtw_init_drv_sw(_adapter *padapter)
|
|||
{
|
||||
u8 ret8 = _SUCCESS;
|
||||
|
||||
_rtw_init_listhead(&padapter->list);
|
||||
INIT_LIST_HEAD(&padapter->list);
|
||||
ret8 = rtw_init_default_value(padapter);
|
||||
|
||||
if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) {
|
||||
|
|
|
@ -693,37 +693,6 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size)
|
|||
rtw_mfree((u8 *)pbuf, h * sizeof(void *) + w * h * size);
|
||||
}
|
||||
|
||||
void _rtw_init_listhead(_list *list)
|
||||
{
|
||||
INIT_LIST_HEAD(list);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
For the following list_xxx operations,
|
||||
caller must guarantee the atomic context.
|
||||
Otherwise, there will be racing condition.
|
||||
*/
|
||||
u32 rtw_is_list_empty(_list *phead)
|
||||
{
|
||||
if (list_empty(phead))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_list_insert_head(_list *plist, _list *phead)
|
||||
{
|
||||
list_add(plist, phead);
|
||||
}
|
||||
|
||||
void rtw_list_insert_tail(_list *plist, _list *phead)
|
||||
{
|
||||
list_add_tail(plist, phead);
|
||||
}
|
||||
|
||||
/* Caller must check if the list is empty before calling rtw_list_delete */
|
||||
|
||||
void _rtw_init_sema(_sema *sema, int init_val)
|
||||
{
|
||||
sema_init(sema, init_val);
|
||||
|
@ -789,7 +758,7 @@ void _rtw_spinunlock_ex(_lock *plock)
|
|||
|
||||
void _rtw_init_queue(_queue *pqueue)
|
||||
{
|
||||
_rtw_init_listhead(&(pqueue->queue));
|
||||
INIT_LIST_HEAD(&(pqueue->queue));
|
||||
spin_lock_init(&(pqueue->lock));
|
||||
}
|
||||
|
||||
|
@ -800,7 +769,7 @@ void _rtw_deinit_queue(_queue *pqueue)
|
|||
|
||||
u32 _rtw_queue_empty(_queue *pqueue)
|
||||
{
|
||||
return rtw_is_list_empty(&(pqueue->queue));
|
||||
return list_empty(&(pqueue->queue));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue