From: Arnd Bergmann <arnd@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-wireless@vger.kernel.org,
Johannes Berg <johannes@sipsolutions.net>,
linux-wpan@vger.kernel.org,
Michael Hennerich <michael.hennerich@analog.com>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, Doug Brown <doug@schmorgal.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 06/10] staging: rtl8712: remove unused legacy ioctl handlers
Date: Mon, 9 Oct 2023 16:19:04 +0200 [thread overview]
Message-ID: <20231009141908.1767241-6-arnd@kernel.org> (raw)
In-Reply-To: <20231009141908.1767241-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
The .ndo_do_ioctl functions are never called, and can just be removed,
especially since this is a staging driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/rtl8712/os_intfs.c | 1 -
drivers/staging/rtl8712/osdep_intf.h | 2 -
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 124 ------------------
3 files changed, 127 deletions(-)
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index b18e6d9c832b8..121edffbd2507 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -191,7 +191,6 @@ static const struct net_device_ops rtl8712_netdev_ops = {
.ndo_start_xmit = r8712_xmit_entry,
.ndo_set_mac_address = r871x_net_set_mac_address,
.ndo_get_stats = r871x_net_get_stats,
- .ndo_do_ioctl = r871x_ioctl,
};
struct net_device *r8712_init_netdev(void)
diff --git a/drivers/staging/rtl8712/osdep_intf.h b/drivers/staging/rtl8712/osdep_intf.h
index 9e75116c987ec..ce823030bfec2 100644
--- a/drivers/staging/rtl8712/osdep_intf.h
+++ b/drivers/staging/rtl8712/osdep_intf.h
@@ -27,6 +27,4 @@ struct intf_priv {
struct completion io_retevt_comp;
};
-int r871x_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-
#endif /*_OSDEP_INTF_H_*/
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 36f6904d25abc..a4a34c9f00b84 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -36,8 +36,6 @@
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
-#define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV + 0x1E)
-
#define SCAN_ITEM_SIZE 768
#define MAX_CUSTOM_LEN 64
#define RATE_COUNT 4
@@ -2066,128 +2064,6 @@ static int r871x_wps_start(struct net_device *dev,
return 0;
}
-static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
-{
- struct _adapter *padapter = netdev_priv(dev);
-
- switch (name) {
- case IEEE_PARAM_WPA_ENABLED:
- padapter->securitypriv.AuthAlgrthm = 2; /* 802.1x */
- switch ((value) & 0xff) {
- case 1: /* WPA */
- padapter->securitypriv.ndisauthtype =
- Ndis802_11AuthModeWPAPSK; /* WPA_PSK */
- padapter->securitypriv.ndisencryptstatus =
- Ndis802_11Encryption2Enabled;
- break;
- case 2: /* WPA2 */
- padapter->securitypriv.ndisauthtype =
- Ndis802_11AuthModeWPA2PSK; /* WPA2_PSK */
- padapter->securitypriv.ndisencryptstatus =
- Ndis802_11Encryption3Enabled;
- break;
- }
- break;
- case IEEE_PARAM_TKIP_COUNTERMEASURES:
- break;
- case IEEE_PARAM_DROP_UNENCRYPTED:
- /* HACK:
- *
- * wpa_supplicant calls set_wpa_enabled when the driver
- * is loaded and unloaded, regardless of if WPA is being
- * used. No other calls are made which can be used to
- * determine if encryption will be used or not prior to
- * association being expected. If encryption is not being
- * used, drop_unencrypted is set to false, else true -- we
- * can use this to determine if the CAP_PRIVACY_ON bit should
- * be set.
- */
- break;
- case IEEE_PARAM_PRIVACY_INVOKED:
- break;
- case IEEE_PARAM_AUTH_ALGS:
- return wpa_set_auth_algs(dev, value);
- case IEEE_PARAM_IEEE_802_1X:
- break;
- case IEEE_PARAM_WPAX_SELECT:
- /* added for WPA2 mixed mode */
- break;
- default:
- return -EOPNOTSUPP;
- }
- return 0;
-}
-
-static int wpa_mlme(struct net_device *dev, u32 command, u32 reason)
-{
- struct _adapter *padapter = netdev_priv(dev);
-
- switch (command) {
- case IEEE_MLME_STA_DEAUTH:
- if (!r8712_set_802_11_disassociate(padapter))
- return -1;
- break;
- case IEEE_MLME_STA_DISASSOC:
- if (!r8712_set_802_11_disassociate(padapter))
- return -1;
- break;
- default:
- return -EOPNOTSUPP;
- }
- return 0;
-}
-
-static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p)
-{
- struct ieee_param *param;
- int ret = 0;
- struct _adapter *padapter = netdev_priv(dev);
-
- if (p->length < sizeof(struct ieee_param) || !p->pointer)
- return -EINVAL;
- param = memdup_user(p->pointer, p->length);
- if (IS_ERR(param))
- return PTR_ERR(param);
- switch (param->cmd) {
- case IEEE_CMD_SET_WPA_PARAM:
- ret = wpa_set_param(dev, param->u.wpa_param.name,
- param->u.wpa_param.value);
- break;
- case IEEE_CMD_SET_WPA_IE:
- ret = r871x_set_wpa_ie(padapter, (char *)param->u.wpa_ie.data,
- (u16)param->u.wpa_ie.len);
- break;
- case IEEE_CMD_SET_ENCRYPTION:
- ret = wpa_set_encryption(dev, param, p->length);
- break;
- case IEEE_CMD_MLME:
- ret = wpa_mlme(dev, param->u.mlme.command,
- param->u.mlme.reason_code);
- break;
- default:
- ret = -EOPNOTSUPP;
- break;
- }
- if (ret == 0 && copy_to_user(p->pointer, param, p->length))
- ret = -EFAULT;
- kfree(param);
- return ret;
-}
-
-/* based on "driver_ipw" and for hostapd */
-int r871x_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-{
- struct iwreq *wrq = (struct iwreq *)rq;
-
- switch (cmd) {
- case RTL_IOCTL_WPA_SUPPLICANT:
- return wpa_supplicant_ioctl(dev, &wrq->u.data);
- default:
- return -EOPNOTSUPP;
- }
- return 0;
-}
-
static iw_handler r8711_handlers[] = {
NULL, /* SIOCSIWCOMMIT */
r8711_wx_get_name, /* SIOCGIWNAME */
--
2.39.2
next prev parent reply other threads:[~2023-10-09 14:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 14:18 [PATCH 01/10] appletalk: remove localtalk and ppp support Arnd Bergmann
2023-10-09 14:19 ` [PATCH 02/10] ieee802154: avoid deprecated .ndo_do_ioctl callback Arnd Bergmann
2023-10-09 14:19 ` [PATCH 03/10] ethernet: sp7021: fix ioctl callback pointer Arnd Bergmann
2023-10-09 14:19 ` [PATCH 04/10] staging: ks7010: remove unused ioctl handler Arnd Bergmann
2023-10-09 15:24 ` Greg Kroah-Hartman
2023-10-09 14:19 ` [PATCH 05/10] staging: rtl8192: remove unused legacy ioctl handlers Arnd Bergmann
2023-10-09 15:24 ` Greg Kroah-Hartman
2023-10-09 14:19 ` Arnd Bergmann [this message]
2023-10-09 15:23 ` [PATCH 06/10] staging: rtl8712: " Greg Kroah-Hartman
2023-10-09 14:19 ` [PATCH 07/10] staging: rtl8723bs: remove dead code Arnd Bergmann
2023-10-09 15:23 ` Greg Kroah-Hartman
2023-10-09 14:19 ` [PATCH 08/10] wireless: atmel: remove unused ioctl function Arnd Bergmann
2023-10-10 6:59 ` Kalle Valo
2023-10-09 14:19 ` [PATCH 09/10] wireless: hostap: " Arnd Bergmann
2023-10-10 7:00 ` Kalle Valo
2023-10-11 13:58 ` Arnd Bergmann
2023-10-09 14:19 ` [PATCH 10/10] net: remove ndo_do_ioctl handler Arnd Bergmann
2023-10-09 16:49 ` [PATCH 01/10] appletalk: remove localtalk and ppp support Rodolfo Zitellini
2023-10-09 17:29 ` Arnd Bergmann
2023-10-10 7:10 ` Rodolfo Zitellini
2023-10-10 7:53 ` [PATCH v2] appletalk: make localtalk and ppp support conditional Arnd Bergmann
2023-10-10 8:15 ` [PATCH 01/10] appletalk: remove localtalk and ppp support Arnd Bergmann
2023-10-11 7:09 ` Rodolfo Zitellini
2023-10-09 23:43 ` Stephen Hemminger
2023-10-10 0:47 ` Jakub Kicinski
2023-10-10 9:21 ` kernel test robot
2023-10-11 9:27 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231009141908.1767241-6-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=doug@schmorgal.com \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).