Commit 7b3df1c7 authored by Phillip Potter's avatar Phillip Potter Committed by Greg Kroah-Hartman

staging: rtl8723bs: remove DBG_COUNTER calls from os_dep/xmit_linux.c

Remove all DBG_COUNTER macro calls from os_dep/xmit_linux.c, as the
corresponding variables are only ever written to and not used. This
makes the code cleaner, and is necessary prior to removing the
DBG_COUNTER definition itself.
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPhillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210215233440.80617-3-phil@philpotter.co.ukSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent de69e2b3
...@@ -139,8 +139,6 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb) ...@@ -139,8 +139,6 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
int i; int i;
s32 res; s32 res;
DBG_COUNTER(padapter->tx_logs.os_tx_m2u);
spin_lock_bh(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
...@@ -160,20 +158,14 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb) ...@@ -160,20 +158,14 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
for (i = 0; i < chk_alive_num; i++) { for (i = 0; i < chk_alive_num; i++) {
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]); psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
if (!(psta->state & _FW_LINKED)) { if (!(psta->state & _FW_LINKED))
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_fw_linked);
continue; continue;
}
/* avoid come from STA1 and send back STA1 */ /* avoid come from STA1 and send back STA1 */
if (!memcmp(psta->hwaddr, &skb->data[6], 6) || if (!memcmp(psta->hwaddr, &skb->data[6], 6) ||
!memcmp(psta->hwaddr, null_addr, 6) || !memcmp(psta->hwaddr, null_addr, 6) ||
!memcmp(psta->hwaddr, bc_addr, 6)) { !memcmp(psta->hwaddr, bc_addr, 6))
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_self);
continue; continue;
}
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry);
newskb = rtw_skb_copy(skb); newskb = rtw_skb_copy(skb);
...@@ -181,13 +173,11 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb) ...@@ -181,13 +173,11 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
memcpy(newskb->data, psta->hwaddr, 6); memcpy(newskb->data, psta->hwaddr, 6);
res = rtw_xmit(padapter, &newskb); res = rtw_xmit(padapter, &newskb);
if (res < 0) { if (res < 0) {
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_xmit);
DBG_871X("%s()-%d: rtw_xmit() return error!\n", __func__, __LINE__); DBG_871X("%s()-%d: rtw_xmit() return error!\n", __func__, __LINE__);
pxmitpriv->tx_drop++; pxmitpriv->tx_drop++;
dev_kfree_skb_any(newskb); dev_kfree_skb_any(newskb);
} }
} else { } else {
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_skb);
DBG_871X("%s-%d: rtw_skb_copy() failed!\n", __func__, __LINE__); DBG_871X("%s-%d: rtw_skb_copy() failed!\n", __func__, __LINE__);
pxmitpriv->tx_drop++; pxmitpriv->tx_drop++;
/* dev_kfree_skb_any(skb); */ /* dev_kfree_skb_any(skb); */
...@@ -206,11 +196,9 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) ...@@ -206,11 +196,9 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
s32 res = 0; s32 res = 0;
DBG_COUNTER(padapter->tx_logs.os_tx);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n"));
if (rtw_if_up(padapter) == false) { if (rtw_if_up(padapter) == false) {
DBG_COUNTER(padapter->tx_logs.os_tx_err_up);
RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("rtw_xmit_entry: rtw_if_up fail\n")); RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("rtw_xmit_entry: rtw_if_up fail\n"));
#ifdef DBG_TX_DROP_FRAME #ifdef DBG_TX_DROP_FRAME
DBG_871X("DBG_TX_DROP_FRAME %s if_up fail\n", __func__); DBG_871X("DBG_TX_DROP_FRAME %s if_up fail\n", __func__);
...@@ -236,7 +224,6 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) ...@@ -236,7 +224,6 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
} else { } else {
/* DBG_871X("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */ /* DBG_871X("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */
/* DBG_871X("!m2u); */ /* DBG_871X("!m2u); */
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_stop);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment