staging: rtl8192e: Remove constant variable promiscuous_on
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Tue, 3 Oct 2023 19:34:01 +0000 (21:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2023 07:59:39 +0000 (09:59 +0200)
Remove variable promiscuous_on 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/07936bcc6a426d6f6d74bece2970ab6028abef44.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_rx.c

index 6cfc2254487bef64780479347ed42f16050a2163..e343e10e011acecd77441d1c1cd8be121c2e8e95 100644 (file)
@@ -706,10 +706,7 @@ void rtl92e_link_change(struct net_device *dev)
 
                reg = rtl92e_readl(dev, RCR);
                if (priv->rtllib->link_state == MAC80211_LINKED) {
-                       if (ieee->intel_promiscuous_md_info.promiscuous_on)
-                               ;
-                       else
-                               priv->receive_config = reg |= RCR_CBSSID;
+                       priv->receive_config = reg |= RCR_CBSSID;
                } else {
                        priv->receive_config = reg &= ~RCR_CBSSID;
                }
index f15f73be41a2e627230b4350382675ab2ebf76ea..ef17472bea05e03eba16a57693f7d50a34c26277 100644 (file)
@@ -740,7 +740,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
        priv->rtllib->mode = WIRELESS_MODE_AUTO;
        priv->rtllib->iw_mode = IW_MODE_INFRA;
        priv->rtllib->net_promiscuous_md = false;
-       priv->rtllib->intel_promiscuous_md_info.promiscuous_on = false;
        priv->rtllib->ieee_up = 0;
        priv->retry_rts = DEFAULT_RETRY_RTS;
        priv->retry_data = DEFAULT_RETRY_DATA;
index 748ae8d35c1ae1e4bbc5dab3bef736bb16df8049..97bb00bdbf4d8e67cd2a2dac0519002f288b3957 100644 (file)
@@ -1175,10 +1175,6 @@ struct rt_pmkid_list {
        u8 bUsed;
 };
 
-struct rt_intel_promisc_mode {
-       bool promiscuous_on;
-};
-
 /*************** DRIVER STATUS   *****/
 #define STATUS_SCANNING                        0
 /*************** DRIVER STATUS   *****/
@@ -1258,7 +1254,6 @@ struct rtllib_device {
 
        int iw_mode; /* operating mode (IW_MODE_*) */
        bool net_promiscuous_md;
-       struct rt_intel_promisc_mode intel_promiscuous_md_info;
 
        spinlock_t lock;
        spinlock_t wpax_suitlist_lock;
index 1086dd0809be9091dd72a6bf7b467edde4417db7..f03ec5f53b3471f85508aa8ebd39bf3c435bfe99 100644 (file)
@@ -959,18 +959,16 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, struct ieee80211_hd
        /* Nullfunc frames may have PS-bit set, so they must be passed to
         * hostap_handle_sta_rx() before being dropped here.
         */
-       if (!ieee->intel_promiscuous_md_info.promiscuous_on) {
-               if (stype != IEEE80211_STYPE_DATA &&
-                   stype != IEEE80211_STYPE_DATA_CFACK &&
-                   stype != IEEE80211_STYPE_DATA_CFPOLL &&
-                   stype != IEEE80211_STYPE_DATA_CFACKPOLL &&
-                   stype != IEEE80211_STYPE_QOS_DATA) {
-                       if (stype != IEEE80211_STYPE_NULLFUNC)
-                               netdev_dbg(ieee->dev,
-                                          "RX: dropped data frame with no data (type=0x%02x, subtype=0x%02x)\n",
-                                          type, stype);
-                       return -1;
-               }
+       if (stype != IEEE80211_STYPE_DATA &&
+           stype != IEEE80211_STYPE_DATA_CFACK &&
+           stype != IEEE80211_STYPE_DATA_CFPOLL &&
+           stype != IEEE80211_STYPE_DATA_CFACKPOLL &&
+           stype != IEEE80211_STYPE_QOS_DATA) {
+               if (stype != IEEE80211_STYPE_NULLFUNC)
+                       netdev_dbg(ieee->dev,
+                                  "RX: dropped data frame with no data (type=0x%02x, subtype=0x%02x)\n",
+                                  type, stype);
+               return -1;
        }
 
        /* packets from our adapter are dropped (echo) */