Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1927491rdb; Mon, 9 Oct 2023 07:20:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETIMInmVbvDVdhdT/9J//oZl8zMgxGlwB3XE4UPdg8dWRScZsdzsA9RGPnXmUMSYPfJwzw X-Received: by 2002:a05:6a20:f3af:b0:134:30a8:9df5 with SMTP id qr47-20020a056a20f3af00b0013430a89df5mr15361153pzb.43.1696861207734; Mon, 09 Oct 2023 07:20:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696861207; cv=none; d=google.com; s=arc-20160816; b=EkjqDatXf657SVCvHrTjLqM81CqUyQOSOiiWLJHIdSctOBTO9gzUKNOSJX6wwtoxcQ erdeRXOuNXPiorzTwLE371hpxPUEqKSUEpwEPz9SjKnnpPbvNQI9CRchlq1pq0UXddFT Gvgrc0ASKXxLtgnytbXe/RbpTVUrxQYjyQEZN0R/ks+snMBu0bvs+gyM6RwVkA4Yw6hA NO2HC4cN7mpqMBCa5PSUKf9whGzzt0GVfHtTPt8ObvghlpQiJR/5uLVWAu+Z1hnpof4b p7KKrEbuBzz1U70WQjqnWefwVeZiS92V3JyQrZwcpkxmmwI/P3nHBW8IlBJUfpqKCtD1 EwkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YUQCF5OTDnTAFBuTTSzaV0gxwx1PTB4IV4P4SewyZvE=; fh=ocKFAYXnDx4VTTGv96jforXecIDhYWw8gY1Cjoj8AGk=; b=Ix/afu3e29Y/mt85wmWZH21a3bAXVyfkeKFz0Sy9izXX52i0rc3EZbjmTWdI8WztB0 tOKS6EglJLoLrkmvqZ3uwWfz1O/mbCZ5cMKiXJYJaG0L4crZpWWqndiCV4Wa9z6i4wCt st90AI+1QxYrg1UjbVRsUV246DPIyWbD/BeFCzH62Iiev/UT0eNzoCC55XtLqFj/PhPT vUqXdvl4cT0OQkevDIj0z4viU4aZiLfs2cCUReX/a3CS5CJDMi4mrmoneOisQ1IlvVNo bC64GfRzmfUZjWA2AmEg6dZM7LUg/ikvFBSQpuzp8EVzp04l3ZTgtXP9RuqQoOyeRLpf KTwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a/8/G3T+"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id r20-20020a6560d4000000b00563d74b6347si6553635pgv.863.2023.10.09.07.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 07:20:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a/8/G3T+"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D1B7780267E3; Mon, 9 Oct 2023 07:19:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377636AbjJIOTy (ORCPT + 52 others); Mon, 9 Oct 2023 10:19:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377643AbjJIOTs (ORCPT ); Mon, 9 Oct 2023 10:19:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1114510A; Mon, 9 Oct 2023 07:19:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29AF9C433CA; Mon, 9 Oct 2023 14:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696861181; bh=qmJVMut1xEsBUjP1aK9YyHaNwg6LnmRsARDmjbUD81U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a/8/G3T+YnPVGddY33p88RXryPCdRgnJOiVDS3DSg5oI1iQQ3psM7fmey5gsDaZZ9 lKI5yr2N2HVLKuZqJYlAMggTE6bZgYVXowmtJC72U0BlPaFghje4KsbX1LQXU/Qpf1 //NnmqMCnbVGjGmIxgH/ThVSIC4C2EVLKtTPgxrSpHBWuWPWqlgsynMV8NyEYxMls1 /N6FgHYAvUH3Sch1jxPxEy1eYZ2oopWZ2rzptjclkJU58PEtNexmUtV0UIdEGtaYpr QB4IgHz4edfLwC9OdFXkPTWXjhq9xJ8/32EfpRZ1+jGp8I9vJkjcttHZCC1afhYqVJ I7h0yPeJQPlhQ== From: Arnd Bergmann To: Jakub Kicinski Cc: netdev@vger.kernel.org, Greg Kroah-Hartman , linux-wireless@vger.kernel.org, Johannes Berg , linux-wpan@vger.kernel.org, Michael Hennerich , Paolo Abeni , Eric Dumazet , "David S . Miller" , linux-kernel@vger.kernel.org, Doug Brown , Arnd Bergmann Subject: [PATCH 06/10] staging: rtl8712: remove unused legacy ioctl handlers Date: Mon, 9 Oct 2023 16:19:04 +0200 Message-Id: <20231009141908.1767241-6-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231009141908.1767241-1-arnd@kernel.org> References: <20231009141908.1767241-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 07:19:57 -0700 (PDT) From: Arnd Bergmann 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 --- 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 #include -#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