staging: rtl8192e: Remove function _rtl92e_wx_set_promisc_mode()
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Tue, 3 Oct 2023 19:33:41 +0000 (21:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2023 07:59:39 +0000 (09:59 +0200)
Remove function _rtl92e_wx_set_promisc_mode() as this functionality is
not commonly used and the tool to access it is deprecated.

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

index f28e70a0da4feb47a9d3730112e699ede86e4d10..2f5acdd713398d3e0b760ee8556a2d8fc805878e 100644 (file)
@@ -918,48 +918,6 @@ static int _rtl92e_wx_get_gen_ie(struct net_device *dev,
        return ret;
 }
 
-#define OID_RT_INTEL_PROMISCUOUS_MODE  0xFF0101F6
-
-static int _rtl92e_wx_set_promisc_mode(struct net_device *dev,
-                                      struct iw_request_info *info,
-                                      union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = rtllib_priv(dev);
-       struct rtllib_device *ieee = priv->rtllib;
-
-       u32 info_buf[3];
-
-       u32 oid;
-       u32 promiscuous_on;
-       u32 fltr_src_sta_frame;
-
-       if (copy_from_user(info_buf, wrqu->data.pointer, sizeof(info_buf)))
-               return -EFAULT;
-
-       oid = info_buf[0];
-       promiscuous_on = info_buf[1];
-       fltr_src_sta_frame = info_buf[2];
-
-       if (oid == OID_RT_INTEL_PROMISCUOUS_MODE) {
-               ieee->intel_promiscuous_md_info.promiscuous_on =
-                                       (promiscuous_on) ? (true) : (false);
-               ieee->intel_promiscuous_md_info.fltr_src_sta_frame =
-                       (fltr_src_sta_frame) ? (true) : (false);
-               (promiscuous_on) ?
-               (rtllib_EnableIntelPromiscuousMode(dev, false)) :
-               (rtllib_DisableIntelPromiscuousMode(dev, false));
-
-               netdev_info(dev,
-                           "=======>%s(), on = %d, filter src sta = %d\n",
-                           __func__, promiscuous_on,
-                           fltr_src_sta_frame);
-       } else {
-               return -1;
-       }
-
-       return 0;
-}
-
 static int _rtl92e_wx_get_promisc_mode(struct net_device *dev,
                                       struct iw_request_info *info,
                                       union iwreq_data *wrqu, char *extra)
@@ -1037,9 +995,6 @@ static const struct iw_priv_args r8192_private_args[] = {
                SIOCIWFIRSTPRIV + 0xb,
                IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, IW_PRIV_TYPE_NONE,
                "lps_force"
-       }, {
-               SIOCIWFIRSTPRIV + 0x16,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0, "setpromisc"
        }, {
                SIOCIWFIRSTPRIV + 0x17,
                0, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 45, "getpromisc"
@@ -1070,7 +1025,7 @@ static iw_handler r8192_private_handler[] = {
        (iw_handler)NULL,
        (iw_handler)NULL,
        (iw_handler)NULL,
-       (iw_handler)_rtl92e_wx_set_promisc_mode,
+       (iw_handler)NULL,
        (iw_handler)_rtl92e_wx_get_promisc_mode,
 };
 
index 546eedfeb43eacd25f644ecc1b78e90433fd11f1..a02e8c976ca0eba2484c7c7246f366c507b1166d 100644 (file)
@@ -1701,9 +1701,7 @@ void rtllib_stop_protocol(struct rtllib_device *ieee);
 
 void rtllib_EnableNetMonitorMode(struct net_device *dev, bool bInitState);
 void rtllib_DisableNetMonitorMode(struct net_device *dev, bool bInitState);
-void rtllib_EnableIntelPromiscuousMode(struct net_device *dev, bool bInitState);
-void rtllib_DisableIntelPromiscuousMode(struct net_device *dev,
-                                       bool bInitState);
+
 void rtllib_softmac_stop_protocol(struct rtllib_device *ieee);
 void rtllib_softmac_start_protocol(struct rtllib_device *ieee);
 
index 11395dbc9d4dba4abeac787fd5c3ee3e75233229..206f8e05d5d02a64489f6879620c61a9b7f343d7 100644 (file)
@@ -406,49 +406,6 @@ void rtllib_DisableNetMonitorMode(struct net_device *dev,
        ieee->AllowAllDestAddrHandler(dev, false, !bInitState);
 }
 
-/* Enables the specialized promiscuous mode required by Intel.
- * In this mode, Intel intends to hear traffics from/to other STAs in the
- * same BSS. Therefore we don't have to disable checking BSSID and we only need
- * to allow all dest. BUT: if we enable checking BSSID then we can't recv
- * packets from other STA.
- */
-void rtllib_EnableIntelPromiscuousMode(struct net_device *dev,
-               bool bInitState)
-{
-       bool bFilterOutNonAssociatedBSSID = false;
-
-       struct rtllib_device *ieee = netdev_priv_rsl(dev);
-
-       netdev_info(dev, "========>Enter Intel Promiscuous Mode\n");
-
-       ieee->AllowAllDestAddrHandler(dev, true, !bInitState);
-       ieee->SetHwRegHandler(dev, HW_VAR_CECHK_BSSID,
-                            (u8 *)&bFilterOutNonAssociatedBSSID);
-
-       ieee->net_promiscuous_md = true;
-}
-EXPORT_SYMBOL(rtllib_EnableIntelPromiscuousMode);
-
-/* Disables the specialized promiscuous mode required by Intel.
- * See MgntEnableIntelPromiscuousMode for detail.
- */
-void rtllib_DisableIntelPromiscuousMode(struct net_device *dev,
-               bool bInitState)
-{
-       bool bFilterOutNonAssociatedBSSID = true;
-
-       struct rtllib_device *ieee = netdev_priv_rsl(dev);
-
-       netdev_info(dev, "========>Exit Intel Promiscuous Mode\n");
-
-       ieee->AllowAllDestAddrHandler(dev, false, !bInitState);
-       ieee->SetHwRegHandler(dev, HW_VAR_CECHK_BSSID,
-                            (u8 *)&bFilterOutNonAssociatedBSSID);
-
-       ieee->net_promiscuous_md = false;
-}
-EXPORT_SYMBOL(rtllib_DisableIntelPromiscuousMode);
-
 static void rtllib_send_probe(struct rtllib_device *ieee)
 {
        struct sk_buff *skb;