rtl8188eu: Change C90 comments to /* */ form

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-19 15:34:32 -06:00
parent 9b5b5c4e12
commit 54abf571c4
21 changed files with 4526 additions and 4764 deletions

View file

@ -40,9 +40,9 @@ void _rtw_init_stainfo(struct sta_info *psta)
_rtw_spinlock_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);
/* _rtw_init_listhead(&psta->asoc_list); */
/* _rtw_init_listhead(&psta->sleep_list); */
/* _rtw_init_listhead(&psta->wakeup_list); */
_rtw_init_queue(&psta->sleep_q);
psta->sleepq_len = 0;
@ -76,11 +76,11 @@ void _rtw_init_stainfo(struct sta_info *psta)
#ifdef CONFIG_TX_MCAST2UNI
psta->under_exist_checking = 0;
#endif // CONFIG_TX_MCAST2UNI
#endif /* CONFIG_TX_MCAST2UNI */
psta->keep_alive_trycnt = 0;
#endif // CONFIG_AP_MODE
#endif /* CONFIG_AP_MODE */
#ifdef DBG_TRX_STA_PKTS
psta->tx_be_cnt = 0;
@ -116,7 +116,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
_rtw_spinlock_init(&pstapriv->sta_hash_lock);
//_rtw_init_queue(&pstapriv->asoc_q);
/* _rtw_init_queue(&pstapriv->asoc_q); */
pstapriv->asoc_sta_count = 0;
_rtw_init_queue(&pstapriv->sleep_q);
_rtw_init_queue(&pstapriv->wakeup_q);
@ -149,14 +149,12 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
pstapriv->asoc_list_cnt = 0;
pstapriv->auth_list_cnt = 0;
pstapriv->auth_to = 3; // 3*2 = 6 sec
pstapriv->auth_to = 3; /* 3*2 = 6 sec */
pstapriv->assoc_to = 3;
//pstapriv->expire_to = 900;// 900*2 = 1800 sec = 30 min, expire after no any traffic.
//pstapriv->expire_to = 30;// 30*2 = 60 sec = 1 min, expire after no any traffic.
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
pstapriv->expire_to = 3; // 3*2 = 6 sec
pstapriv->expire_to = 3; /* 3*2 = 6 sec */
#else
pstapriv->expire_to = 60;// 60*2 = 120 sec = 2 min, expire after no any traffic.
pstapriv->expire_to = 60;/* 60*2 = 120 sec = 2 min, expire after no any traffic. */
#endif
#ifdef CONFIG_ATMEL_RC_PATCH
memset( pstapriv->atmel_rc_pattern, 0, ETH_ALEN);
@ -230,7 +228,7 @@ void rtw_mfree_stainfo(struct sta_info *psta)
}
// this function is used to free the memory of lock || sema for all stainfos
/* this function is used to free the memory of lock || sema for all stainfos */
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv );
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
{
@ -266,7 +264,7 @@ void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
#endif
rtw_mfree_all_stainfo(pstapriv); //be done before free sta_hash_lock
rtw_mfree_all_stainfo(pstapriv); /* be done before free sta_hash_lock */
_rtw_spinlock_free(&pstapriv->free_sta_queue.lock);
@ -328,7 +326,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
}
//struct sta_info *rtw_alloc_stainfo(_queue *pfree_sta_queue, unsigned char *hwaddr)
/* struct sta_info *rtw_alloc_stainfo(_queue *pfree_sta_queue, unsigned char *hwaddr) */
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
{
_irqL irqL, irqL2;
@ -346,7 +344,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
if (_rtw_queue_empty(pfree_sta_queue) == true) {
// _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
psta = NULL;
} else {
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
@ -376,10 +374,10 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
pstapriv->asoc_sta_count ++ ;
// Commented by Albert 2009/08/13
// For the SMC router, the sequence number of first packet of WPS handshake will be 0.
// In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable.
// So, we initialize the tid_rxseq variable as the 0xffff.
/* Commented by Albert 2009/08/13 */
/* For the SMC router, the sequence number of first packet of WPS handshake will be 0. */
/* In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable. */
/* So, we initialize the tid_rxseq variable as the 0xffff. */
for( i = 0; i < 16; i++ )
memcpy( &psta->sta_recvpriv.rxcache.tid_rxseq[ i ], &wRxSeqInitialValue, 2 );
@ -397,9 +395,9 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
init_off_ch_timer(pstapriv->padapter, psta);
init_handshake_timer(pstapriv->padapter, psta);
init_tdls_alive_timer(pstapriv->padapter, psta);
#endif //CONFIG_TDLS
#endif /* CONFIG_TDLS */
//for A-MPDU Rx reordering buffer control
/* for A-MPDU Rx reordering buffer control */
for(i=0; i < 16 ; i++) {
preorder_ctrl = &psta->recvreorder_ctrl[i];
@ -413,8 +411,8 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
preorder_ctrl->indicate_seq);
#endif
preorder_ctrl->wend_b= 0xffff;
//preorder_ctrl->wsize_b = (NR_RECVBUFF-2);
preorder_ctrl->wsize_b = 64;//64;
/* preorder_ctrl->wsize_b = (NR_RECVBUFF-2); */
preorder_ctrl->wsize_b = 64;/* 64; */
_rtw_init_queue(&preorder_ctrl->pending_recvframe_queue);
@ -422,7 +420,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
}
//init for DM
/* init for DM */
psta->rssi_stat.UndecoratedSmoothedPWDB = (-1);
psta->rssi_stat.UndecoratedSmoothedCCK = (-1);
#ifdef CONFIG_ATMEL_RC_PATCH
@ -437,7 +435,7 @@ exit:
}
// using pstapriv->sta_hash_lock to protect
/* using pstapriv->sta_hash_lock to protect */
u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
{
int i;
@ -465,62 +463,56 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
pstaxmitpriv = &psta->sta_xmitpriv;
//rtw_list_delete(&psta->sleep_list);
/* rtw_list_delete(&psta->sleep_list); */
//rtw_list_delete(&psta->wakeup_list);
/* rtw_list_delete(&psta->wakeup_list); */
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
psta->sleepq_len = 0;
//vo
//_enter_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0);
/* 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));
phwxmit = pxmitpriv->hwxmits;
phwxmit->accnt -= pstaxmitpriv->vo_q.qcnt;
pstaxmitpriv->vo_q.qcnt = 0;
//_exit_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0);
/* _exit_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0); */
//vi
//_enter_critical_bh(&(pxmitpriv->vi_pending.lock), &irqL0);
/* 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));
phwxmit = pxmitpriv->hwxmits+1;
phwxmit->accnt -= pstaxmitpriv->vi_q.qcnt;
pstaxmitpriv->vi_q.qcnt = 0;
//_exit_critical_bh(&(pxmitpriv->vi_pending.lock), &irqL0);
/* _exit_critical_bh(&(pxmitpriv->vi_pending.lock), &irqL0); */
//be
//_enter_critical_bh(&(pxmitpriv->be_pending.lock), &irqL0);
/* 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));
phwxmit = pxmitpriv->hwxmits+2;
phwxmit->accnt -= pstaxmitpriv->be_q.qcnt;
pstaxmitpriv->be_q.qcnt = 0;
//_exit_critical_bh(&(pxmitpriv->be_pending.lock), &irqL0);
/* _exit_critical_bh(&(pxmitpriv->be_pending.lock), &irqL0); */
//bk
//_enter_critical_bh(&(pxmitpriv->bk_pending.lock), &irqL0);
/* 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));
phwxmit = pxmitpriv->hwxmits+3;
phwxmit->accnt -= pstaxmitpriv->bk_q.qcnt;
pstaxmitpriv->bk_q.qcnt = 0;
//_exit_critical_bh(&(pxmitpriv->bk_pending.lock), &irqL0);
/* _exit_critical_bh(&(pxmitpriv->bk_pending.lock), &irqL0); */
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
rtw_list_delete(&psta->hash_list);
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x \n",pstapriv->asoc_sta_count , psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2],psta->hwaddr[3],psta->hwaddr[4],psta->hwaddr[5]));
pstapriv->asoc_sta_count --;
// re-init sta_info; 20061114 // will be init in alloc_stainfo
//_rtw_init_sta_xmit_priv(&psta->sta_xmitpriv);
//_rtw_init_sta_recv_priv(&psta->sta_recvpriv);
_cancel_timer_ex(&psta->addba_retry_timer);
#ifdef CONFIG_TDLS
@ -530,9 +522,9 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
_cancel_timer_ex(&psta->off_ch_timer);
_cancel_timer_ex(&psta->alive_timer1);
_cancel_timer_ex(&psta->alive_timer2);
#endif //CONFIG_TDLS
#endif /* CONFIG_TDLS */
//for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer
/* for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer */
for(i=0; i < 16 ; i++)
{
_irqL irqL;
@ -605,7 +597,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
pstapriv->sta_dz_bitmap &=~BIT(psta->aid);
pstapriv->tim_bitmap &=~BIT(psta->aid);
//rtw_indicate_sta_disassoc_event(padapter, psta);
/* rtw_indicate_sta_disassoc_event(padapter, psta); */
if ((psta->aid >0)&&(pstapriv->sta_aid[psta->aid - 1] == psta))
{
@ -613,19 +605,19 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
psta->aid = 0;
}
#endif // CONFIG_NATIVEAP_MLME
#endif /* CONFIG_NATIVEAP_MLME */
#ifdef CONFIG_TX_MCAST2UNI
psta->under_exist_checking = 0;
#endif // CONFIG_TX_MCAST2UNI
#endif /* CONFIG_TX_MCAST2UNI */
#endif // CONFIG_AP_MODE
#endif /* CONFIG_AP_MODE */
_rtw_spinlock_free(&psta->lock);
//_enter_critical_bh(&(pfree_sta_queue->lock), &irqL0);
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
//_exit_critical_bh(&(pfree_sta_queue->lock), &irqL0);
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
exit:
@ -635,7 +627,7 @@ exit:
}
// free all stainfo which in sta_hash[all]
/* free all stainfo which in sta_hash[all] */
void rtw_free_all_stainfo(struct adapter *padapter)
{
_irqL irqL;
@ -721,7 +713,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN))== true)
{ // if found the matched address
{ /* if found the matched address */
break;
}
psta=NULL;
@ -743,7 +735,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
NDIS_802_11_MAC_ADDRESS bcast_addr= {0xff,0xff,0xff,0xff,0xff,0xff};
struct sta_priv *pstapriv = &padapter->stapriv;
//_queue *pstapending = &padapter->xmitpriv.bm_pending;
/* _queue *pstapending = &padapter->xmitpriv.bm_pending; */
;
@ -755,7 +747,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
goto exit;
}
// default broadcast & multicast use macid 1
/* default broadcast & multicast use macid 1 */
psta->mac_id = 1;
ptxservq= &(psta->sta_xmitpriv.be_q);
@ -820,11 +812,11 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
if(pacl_list->mode == 1)//accept unless in deny list
if(pacl_list->mode == 1)/* accept unless in deny list */
{
res = (match == true) ? false:true;
}
else if(pacl_list->mode == 2)//deny unless in accept list
else if(pacl_list->mode == 2)/* deny unless in accept list */
{
res = (match == true) ? true:false;
}