staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_TCP_CSU...
authorFabio Aiuto <fabioaiuto83@gmail.com>
Fri, 12 Mar 2021 18:34:06 +0000 (19:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Mar 2021 15:57:04 +0000 (16:57 +0100)
remove conditional code blocks checked by unused CONFIG_TCP_CSUM_OFFLOAD_RX

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0975dcb60dfb6abdc6a3233283908bd57472c225.1615572985.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/include/rtw_recv.h
drivers/staging/rtl8723bs/os_dep/recv_linux.c

index 2cc5e0b..484e9d6 100644 (file)
@@ -159,11 +159,6 @@ struct rx_pkt_attrib       {
 
        u8 ack_policy;
 
-/* ifdef CONFIG_TCP_CSUM_OFFLOAD_RX */
-       u8 tcpchk_valid; /*  0: invalid, 1: valid */
-       u8 ip_chkrpt; /* 0: incorrect, 1: correct */
-       u8 tcp_chkrpt; /* 0: incorrect, 1: correct */
-/* endif */
        u8 key_index;
 
        u8 data_rate;
index 160653c..a4a1b34 100644 (file)
@@ -138,15 +138,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, struct sk_buff *pkt, str
                pkt->protocol = eth_type_trans(pkt, padapter->pnetdev);
                pkt->dev = padapter->pnetdev;
 
-#ifdef CONFIG_TCP_CSUM_OFFLOAD_RX
-               if ((pattrib->tcpchk_valid == 1) && (pattrib->tcp_chkrpt == 1))
-                       pkt->ip_summed = CHECKSUM_UNNECESSARY;
-               else
-                       pkt->ip_summed = CHECKSUM_NONE;
-
-#else /* !CONFIG_TCP_CSUM_OFFLOAD_RX */
                pkt->ip_summed = CHECKSUM_NONE;
-#endif /* CONFIG_TCP_CSUM_OFFLOAD_RX */
 
                ret = rtw_netif_rx(padapter->pnetdev, pkt);
        }