staging: rtl8192e: Remove constant variable fltr_src_sta_frame
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Tue, 3 Oct 2023 19:33:55 +0000 (21:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2023 07:59:39 +0000 (09:59 +0200)
Remove variable fltr_src_sta_frame as it is set to 0 and unchanged. The
equation results accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/1a37a8be464bb25531657aa7c868201676d7abb6.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_rx.c

index 9c872819969add4dc697f6f39bbcbe940582d6b4..f15f73be41a2e627230b4350382675ab2ebf76ea 100644 (file)
@@ -741,8 +741,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
        priv->rtllib->iw_mode = IW_MODE_INFRA;
        priv->rtllib->net_promiscuous_md = false;
        priv->rtllib->intel_promiscuous_md_info.promiscuous_on = false;
-       priv->rtllib->intel_promiscuous_md_info.fltr_src_sta_frame =
-                                                                false;
        priv->rtllib->ieee_up = 0;
        priv->retry_rts = DEFAULT_RETRY_RTS;
        priv->retry_data = DEFAULT_RETRY_DATA;
index a02e8c976ca0eba2484c7c7246f366c507b1166d..748ae8d35c1ae1e4bbc5dab3bef736bb16df8049 100644 (file)
@@ -1177,7 +1177,6 @@ struct rt_pmkid_list {
 
 struct rt_intel_promisc_mode {
        bool promiscuous_on;
-       bool fltr_src_sta_frame;
 };
 
 /*************** DRIVER STATUS   *****/
index a7b6f837024d1b5ec555cab8987b87dadfe5a217..1086dd0809be9091dd72a6bf7b467edde4417db7 100644 (file)
@@ -956,16 +956,6 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, struct ieee80211_hd
                return -1;
        }
 
-       /* Filter packets sent by an STA that will be forwarded by AP */
-       if (ieee->intel_promiscuous_md_info.promiscuous_on  &&
-               ieee->intel_promiscuous_md_info.fltr_src_sta_frame) {
-               if ((fc & IEEE80211_FCTL_TODS) && !(fc & IEEE80211_FCTL_FROMDS) &&
-                   !ether_addr_equal(dst, ieee->current_network.bssid) &&
-                   ether_addr_equal(bssid, ieee->current_network.bssid)) {
-                       return -1;
-               }
-       }
-
        /* Nullfunc frames may have PS-bit set, so they must be passed to
         * hostap_handle_sta_rx() before being dropped here.
         */