staging:r8188eu: Remove rx_handler_data unnecessary read
authorIvan Safonov <insafonov@gmail.com>
Wed, 9 May 2018 19:44:06 +0000 (22:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 May 2018 09:48:24 +0000 (11:48 +0200)
Rx handler (assigned with netdev_rx_handler_register,
called from __netif_receive_skb()) uses value of dev->rx_handler_data.
The driver has no rx handler and does not need it, so remove rx_handler_data read.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/TODO
drivers/staging/rtl8188eu/os_dep/recv_linux.c

index ce60f07b99773d48e07ba80499ff89b1caf56af7..7581e25f231db54050065afca8a3645e8be68e77 100644 (file)
@@ -9,11 +9,6 @@ TODO:
 - merge Realtek's bugfixes and new features into the driver
 - switch to use LIB80211
 - switch to use MAC80211
-- figure out what to do with this code in rtw_recv_indicatepkt():
-       rcu_read_lock();
-       rcu_dereference(padapter->pnetdev->rx_handler_data);
-       rcu_read_unlock();
-  Perhaps delete it, perhaps assign to some local variable.
 
 Please send any patches to Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
 and Larry Finger <Larry.Finger@lwfinger.net>.
index bda4ab879f5813ab0c836bedec899b2135f6e5ab..7ec53a9dfa2707fd525306c1ebf064dc9fa3a575 100644 (file)
@@ -121,10 +121,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter,
                }
        }
 
-       rcu_read_lock();
-       rcu_dereference(padapter->pnetdev->rx_handler_data);
-       rcu_read_unlock();
-
        skb->ip_summed = CHECKSUM_NONE;
        skb->dev = padapter->pnetdev;
        skb->protocol = eth_type_trans(skb, padapter->pnetdev);