staging: rtl8188eu: remove unused rtw_calculate_wlan_pkt_size_by_attribue()
authorMichael Straube <straube.linux@gmail.com>
Sat, 28 Jul 2018 14:29:17 +0000 (16:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jul 2018 08:19:40 +0000 (10:19 +0200)
The function rtw_calculate_wlan_pkt_size_by_attribue() also defined as
rtw_wlan_pkt_size() is never used, so remove it. Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/include/rtw_xmit.h

index 4265ad84547db56080de67de686c130d77ba4409..2130d78e0d9fad3da294f4cd078b71f94e10e54e 100644 (file)
@@ -892,24 +892,6 @@ s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pat
        return ptxservq->qcnt;
 }
 
-/*
- * Calculate wlan 802.11 packet MAX size from pkt_attrib
- * This function doesn't consider fragment case
- */
-u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib)
-{
-       u32     len = 0;
-
-       len = pattrib->hdrlen + pattrib->iv_len; /*  WLAN Header and IV */
-       len += SNAP_SIZE + sizeof(u16); /*  LLC */
-       len += pattrib->pktlen;
-       if (pattrib->encrypt == _TKIP_)
-               len += 8; /*  MIC */
-       len += ((pattrib->bswenc) ? pattrib->icv_len : 0); /*  ICV */
-
-       return len;
-}
-
 /*
 
 This sub-routine will perform all the following:
index af6485aa69004dede6b854004b74a9752d7628ca..788f59c74ea1e45fb7e598a8f83361b586647969 100644 (file)
@@ -326,8 +326,6 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv,
 
 s32 rtw_xmit_classifier(struct adapter *padapter,
                        struct xmit_frame *pxmitframe);
-u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
-#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
 s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt,
                           struct xmit_frame *pxmitframe);
 s32 _rtw_init_hw_txqueue(struct hw_txqueue *phw_txqueue, u8 ac_tag);