From patchwork Wed Oct 11 14:02:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 732442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01A9ECD6E74 for ; Wed, 11 Oct 2023 14:02:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346819AbjJKOCz (ORCPT ); Wed, 11 Oct 2023 10:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbjJKOCx (ORCPT ); Wed, 11 Oct 2023 10:02:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2BB790; Wed, 11 Oct 2023 07:02:51 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6597EC433C8; Wed, 11 Oct 2023 14:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697032971; bh=8y++Dow0qT4H4v31iD3eDd6yuRGhJL1WFuL2+EdHCQw=; h=From:To:Cc:Subject:Date:From; b=nLhar/mHt1fULKI5WRRcM8uDjCXe+qNEBA0GkquKiSy5+2CP4KuA5j9cG01oO9zrL h5+q0O94MLa44OMcxLO+B0q0YkLkMeUrpO6U3c2H+4nTCLSL5nYT6gy7Rff4ZU5rt2 8nQgecvjSMJR7MncavIMjp3WSIxvCxhrn8DUmkeAfuNTtD31OIyOGRiJc+MrDt32qQ O3vnj2591HgL2Zq0GQc3nZDuEX4DXao0Qig6SX7f3sDHWDnbHq0fkQZ6nKKD+LXOGT 4rgRzCRTHk38gdQkxd3+zHSiZrgLzK7UlB6PrX3sN6f1VxCaJSDgod9cyfxRJuv0/O 6K4wutNYJAsDA== 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" , Rodolfo Zitellini , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 01/10] appletalk: make localtalk and ppp support conditional Date: Wed, 11 Oct 2023 16:02:16 +0200 Message-Id: <20231011140225.253106-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Arnd Bergmann The last localtalk driver is gone now, and ppp support was never fully merged, but the code to support them for phase1 networking still calls the deprecated .ndo_do_ioctl() helper. In order to better isolate the localtalk and ppp portions of appletalk, guard all of the corresponding code with CONFIG_DEV_APPLETALK checks, including a preprocessor conditional that guards the internal ioctl calls. This is currently all dead code and will now be left out of the module since this Kconfig symbol is always undefined, but there are plans to add a new driver for localtalk again in the future. When that happens, the logic can be cleaned up to work properly without the need for the ioctl. Link: https://lore.kernel.org/lkml/790BA488-B6F6-41ED-96EF-2089EF1C043B@xhero.org/ Signed-off-by: Arnd Bergmann --- v2: only add compile-time consitionals rather than removing localtalk support entirely --- include/linux/atalk.h | 1 - net/appletalk/Makefile | 3 ++- net/appletalk/aarp.c | 24 +++++++++++++++--------- net/appletalk/ddp.c | 24 +++++++++++++----------- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/include/linux/atalk.h b/include/linux/atalk.h index a55bfc6567d01..2896f2ac9568e 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h @@ -121,7 +121,6 @@ static inline struct atalk_iface *atalk_find_dev(struct net_device *dev) #endif extern struct atalk_addr *atalk_find_dev_addr(struct net_device *dev); -extern struct net_device *atrtr_get_dev(struct atalk_addr *sa); extern int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb, struct atalk_addr *sa, void *hwaddr); diff --git a/net/appletalk/Makefile b/net/appletalk/Makefile index 33164d972d379..410d52f9113e2 100644 --- a/net/appletalk/Makefile +++ b/net/appletalk/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_ATALK) += appletalk.o -appletalk-y := aarp.o ddp.o dev.o +appletalk-y := aarp.o ddp.o appletalk-$(CONFIG_PROC_FS) += atalk_proc.o appletalk-$(CONFIG_SYSCTL) += sysctl_net_atalk.o +appletalk-$(CONFIG_DEV_APPLETALK) += dev.o diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 9fa0b246902be..b15f67293ac4c 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c @@ -438,14 +438,17 @@ static struct atalk_addr *__aarp_proxy_find(struct net_device *dev, */ static void aarp_send_probe_phase1(struct atalk_iface *iface) { +#if IS_ENABLED(CONFIG_DEV_APPLETALK) struct ifreq atreq; struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr; const struct net_device_ops *ops = iface->dev->netdev_ops; sa->sat_addr.s_node = iface->address.s_node; sa->sat_addr.s_net = ntohs(iface->address.s_net); - - /* We pass the Net:Node to the drivers/cards by a Device ioctl. */ + /* + * We used to pass the address via device ioctl, this has to + * be rewritten if we bring back localtalk. + */ if (!(ops->ndo_do_ioctl(iface->dev, &atreq, SIOCSIFADDR))) { ops->ndo_do_ioctl(iface->dev, &atreq, SIOCGIFADDR); if (iface->address.s_net != htons(sa->sat_addr.s_net) || @@ -455,13 +458,15 @@ static void aarp_send_probe_phase1(struct atalk_iface *iface) iface->address.s_net = htons(sa->sat_addr.s_net); iface->address.s_node = sa->sat_addr.s_node; } +#endif } void aarp_probe_network(struct atalk_iface *atif) { - if (atif->dev->type == ARPHRD_LOCALTLK || - atif->dev->type == ARPHRD_PPP) + if (IS_ENABLED(CONFIG_DEV_APPLETALK) && + (atif->dev->type == ARPHRD_LOCALTLK || + atif->dev->type == ARPHRD_PPP)) aarp_send_probe_phase1(atif); else { unsigned int count; @@ -488,8 +493,9 @@ int aarp_proxy_probe_network(struct atalk_iface *atif, struct atalk_addr *sa) * we don't currently support LocalTalk or PPP for proxy AARP; * if someone wants to try and add it, have fun */ - if (atif->dev->type == ARPHRD_LOCALTLK || - atif->dev->type == ARPHRD_PPP) + if (IS_ENABLED(CONFIG_DEV_APPLETALK) && + (atif->dev->type == ARPHRD_LOCALTLK || + atif->dev->type == ARPHRD_PPP)) goto out; /* @@ -550,7 +556,8 @@ int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb, skb_reset_network_header(skb); /* Check for LocalTalk first */ - if (dev->type == ARPHRD_LOCALTLK) { + if (IS_ENABLED(CONFIG_DEV_APPLETALK) && + dev->type == ARPHRD_LOCALTLK) { struct atalk_addr *at = atalk_find_dev_addr(dev); struct ddpehdr *ddp = (struct ddpehdr *)skb->data; int ft = 2; @@ -588,7 +595,7 @@ int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb, } /* On a PPP link we neither compress nor aarp. */ - if (dev->type == ARPHRD_PPP) { + if (IS_ENABLED(CONFIG_DEV_APPLETALK) && dev->type == ARPHRD_PPP) { skb->protocol = htons(ETH_P_PPPTALK); skb->dev = dev; goto sendit; @@ -674,7 +681,6 @@ int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb, drop: return NET_XMIT_DROP; } -EXPORT_SYMBOL(aarp_send_ddp); /* * An entry in the aarp unresolved queue has become resolved. Send diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 8978fb6212ffb..d4dc6a9fd3b6b 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -473,7 +473,7 @@ static struct atalk_route *atrtr_find(struct atalk_addr *target) * Given an AppleTalk network, find the device to use. This can be * a simple lookup. */ -struct net_device *atrtr_get_dev(struct atalk_addr *sa) +static struct net_device *atrtr_get_dev(struct atalk_addr *sa) { struct atalk_route *atr = atrtr_find(sa); return atr ? atr->dev : NULL; @@ -1947,10 +1947,6 @@ static struct packet_type ppptalk_packet_type __read_mostly = { static unsigned char ddp_snap_id[] = { 0x08, 0x00, 0x07, 0x80, 0x9B }; -/* Export symbols for use by drivers when AppleTalk is a module */ -EXPORT_SYMBOL(atrtr_get_dev); -EXPORT_SYMBOL(atalk_find_dev_addr); - /* Called by proto.c on kernel start up */ static int __init atalk_init(void) { @@ -1971,8 +1967,10 @@ static int __init atalk_init(void) goto out_sock; } - dev_add_pack(<alk_packet_type); - dev_add_pack(&ppptalk_packet_type); + if (IS_ENABLED(CONFIG_DEV_APPLETALK)) { + dev_add_pack(<alk_packet_type); + dev_add_pack(&ppptalk_packet_type); + } rc = register_netdevice_notifier(&ddp_notifier); if (rc) @@ -1998,8 +1996,10 @@ static int __init atalk_init(void) out_dev: unregister_netdevice_notifier(&ddp_notifier); out_snap: - dev_remove_pack(&ppptalk_packet_type); - dev_remove_pack(<alk_packet_type); + if (IS_ENABLED(CONFIG_DEV_APPLETALK)) { + dev_remove_pack(&ppptalk_packet_type); + dev_remove_pack(<alk_packet_type); + } unregister_snap_client(ddp_dl); out_sock: sock_unregister(PF_APPLETALK); @@ -2026,8 +2026,10 @@ static void __exit atalk_exit(void) atalk_proc_exit(); aarp_cleanup_module(); /* General aarp clean-up. */ unregister_netdevice_notifier(&ddp_notifier); - dev_remove_pack(<alk_packet_type); - dev_remove_pack(&ppptalk_packet_type); + if (IS_ENABLED(CONFIG_DEV_APPLETALK)) { + dev_remove_pack(<alk_packet_type); + dev_remove_pack(&ppptalk_packet_type); + } unregister_snap_client(ddp_dl); sock_unregister(PF_APPLETALK); proto_unregister(&ddp_proto); From patchwork Wed Oct 11 14:02:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 732441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD27CD6E72 for ; Wed, 11 Oct 2023 14:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346959AbjJKODD (ORCPT ); Wed, 11 Oct 2023 10:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235010AbjJKOC7 (ORCPT ); Wed, 11 Oct 2023 10:02:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B882FB8; Wed, 11 Oct 2023 07:02:58 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57007C433CD; Wed, 11 Oct 2023 14:02:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697032978; bh=5o5h5CgRG4H4Z5qjk2eknSticE7hPec++pW0EBNapec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OWVOdK03/KwWJmBcC+LI8aDOa3bDpFqUIrBwFqpe3tZwQOVJvD85Tb918ZCwLvjcA p/PH9RLQoG3abHY/EYhuW9aidUAbgTHvt6tog9Uy4YkANKUd5IPWNe1UR8qUurGJqh HsDWm/uH4U3VLAlOQBnhd5o3rrbPx5xi6r14OdqH0wGjXlcmiIHMNWZg1oBLCPk2/E GQZFYEobq+8Wg/9NDW0IQShbNuJGpaNJEc165SF06oH1XzBMmxoWKeQzrJnTHN2Wn4 yRKDcjwL1+lJkuL7r8x3q4mg4FnQRjKCK+GdP/uAvpflLOFGQG7DLaBmusEtZbGWLb w6MmltWuXESBQ== 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" , Rodolfo Zitellini , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 03/10] ethernet: sp7021: fix ioctl callback pointer Date: Wed, 11 Oct 2023 16:02:18 +0200 Message-Id: <20231011140225.253106-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011140225.253106-1-arnd@kernel.org> References: <20231011140225.253106-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Arnd Bergmann The old .ndo_do_ioctl() callback is never called any more, instead the driver should set .ndo_eth_ioctl() for the phy operations. Fixes: fd3040b9394c5 ("net: ethernet: Add driver for Sunplus SP7021") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/sunplus/spl2sw_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sunplus/spl2sw_driver.c b/drivers/net/ethernet/sunplus/spl2sw_driver.c index 391a1bc7f4463..bb4514f4e8157 100644 --- a/drivers/net/ethernet/sunplus/spl2sw_driver.c +++ b/drivers/net/ethernet/sunplus/spl2sw_driver.c @@ -199,7 +199,7 @@ static const struct net_device_ops netdev_ops = { .ndo_start_xmit = spl2sw_ethernet_start_xmit, .ndo_set_rx_mode = spl2sw_ethernet_set_rx_mode, .ndo_set_mac_address = spl2sw_ethernet_set_mac_address, - .ndo_do_ioctl = phy_do_ioctl, + .ndo_eth_ioctl = phy_do_ioctl, .ndo_tx_timeout = spl2sw_ethernet_tx_timeout, }; From patchwork Wed Oct 11 14:02:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 732440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 633C7CD6E73 for ; Wed, 11 Oct 2023 14:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347047AbjJKODU (ORCPT ); Wed, 11 Oct 2023 10:03:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347015AbjJKODL (ORCPT ); Wed, 11 Oct 2023 10:03:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19C43E8; Wed, 11 Oct 2023 07:03:06 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6931FC433C7; Wed, 11 Oct 2023 14:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697032985; bh=pBsdQK7MCTzPLcjzg3nWmnN/eYz9+yxpVt8ibNe/wD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GY4SrYYm1sULach12gP79RuJzBdrGKH9urxWH57KQossftjhcRMSTbN8aWZLOJDAn oqxDZ4kf2QEJQ7HqeS76VGZoWpZAMmXbpC1tO+jS6KF55JFX+Fre+cI6xZfRUy7hHs /DanVd8oBgPOOPiqyrSdwaVcfqnd3XP5IqzvOdOuMvbfSa+QnGNYynYBJWoUFJUG0B Ld8YEx8J1Z5vl04grO2Gg5uQ8v4UFNKT/nuuaVciDJWABYjIa2fXEFY5nixlHRHmBj Uhx4//0V2RoZ67CS/P1Uo4JhJAiSWXfp5Kdj7rxpOmo4Ijk1sDssGZHT/JBU91F2N2 qH7bcC+5C6vTw== 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" , Rodolfo Zitellini , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 05/10] staging: rtl8192: remove unused legacy ioctl handlers Date: Wed, 11 Oct 2023 16:02:20 +0200 Message-Id: <20231011140225.253106-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011140225.253106-1-arnd@kernel.org> References: <20231011140225.253106-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Arnd Bergmann The .ndo_do_ioctl functions are never called, and can just be removed, especially since this is a staging driver. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 41 -- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 - .../staging/rtl8192u/ieee80211/ieee80211.h | 12 - .../rtl8192u/ieee80211/ieee80211_softmac.c | 563 ------------------ drivers/staging/rtl8192u/r8192U.h | 2 - drivers/staging/rtl8192u/r8192U_core.c | 109 ---- 6 files changed, 729 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c index ddaf66fa0f936..8a72c1e9eb1e1 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.c +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c @@ -97,22 +97,6 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, } EXPORT_SYMBOL(dot11d_update_country_ie); -u8 dot11d_get_max_tx_pwr_in_dbm(struct ieee80211_device *dev, u8 Channel) -{ - struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev); - u8 MaxTxPwrInDbm = 255; - - if (Channel > MAX_CHANNEL_NUMBER) { - netdev_err(dev->dev, "%s: Invalid Channel\n", __func__); - return MaxTxPwrInDbm; - } - if (dot11d_info->channel_map[Channel]) - MaxTxPwrInDbm = dot11d_info->max_tx_pwr_dbm_list[Channel]; - - return MaxTxPwrInDbm; -} -EXPORT_SYMBOL(dot11d_get_max_tx_pwr_in_dbm); - void dot11d_scan_complete(struct ieee80211_device *dev) { struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev); @@ -147,28 +131,3 @@ int is_legal_channel(struct ieee80211_device *dev, u8 channel) return 0; } EXPORT_SYMBOL(is_legal_channel); - -int to_legal_channel(struct ieee80211_device *dev, u8 channel) -{ - struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev); - u8 default_chn = 0; - u32 i = 0; - - for (i = 1; i <= MAX_CHANNEL_NUMBER; i++) { - if (dot11d_info->channel_map[i] > 0) { - default_chn = i; - break; - } - } - - if (channel > MAX_CHANNEL_NUMBER) { - netdev_err(dev->dev, "%s: Invalid Channel\n", __func__); - return default_chn; - } - - if (dot11d_info->channel_map[channel] > 0) - return channel; - - return default_chn; -} -EXPORT_SYMBOL(to_legal_channel); diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h index 8b485fa180898..fd774265211a5 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.h +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h @@ -49,9 +49,7 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *addr, u16 coutry_ie_len, u8 *coutry_ie); -u8 dot11d_get_max_tx_pwr_in_dbm(struct ieee80211_device *dev, u8 channel); void dot11d_scan_complete(struct ieee80211_device *dev); int is_legal_channel(struct ieee80211_device *dev, u8 channel); -int to_legal_channel(struct ieee80211_device *dev, u8 channel); #endif /* #ifndef __INC_DOT11D_H */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 694d1b18f81c7..fc4201757c408 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -223,11 +223,7 @@ struct cb_desc { #define MAX_IE_LEN 0xff // added for kernel conflict -#define ieee80211_wake_queue ieee80211_wake_queue_rsl -#define ieee80211_stop_queue ieee80211_stop_queue_rsl #define notify_wx_assoc_event notify_wx_assoc_event_rsl -#define SendDisassociation SendDisassociation_rsl - struct ieee_param { u32 cmd; @@ -2152,7 +2148,6 @@ int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len); /* ieee80211_softmac.c */ short ieee80211_is_54g(const struct ieee80211_network *net); -short ieee80211_is_shortslot(const struct ieee80211_network *net); int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, struct ieee80211_rx_stats *rx_stats, @@ -2160,7 +2155,6 @@ int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net); -void SendDisassociation(struct ieee80211_device *ieee, u8 *asSta, u8 asRsn); void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee); @@ -2182,13 +2176,7 @@ void ieee80211_stop_protocol(struct ieee80211_device *ieee); void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee); void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee); void ieee80211_reset_queue(struct ieee80211_device *ieee); -void ieee80211_wake_queue(struct ieee80211_device *ieee); -void ieee80211_stop_queue(struct ieee80211_device *ieee); -struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee); void ieee80211_start_send_beacons(struct ieee80211_device *ieee); -int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, - struct iw_point *p); -void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success); void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee); diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 92001cb36730b..8cb2f48dbefec 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -27,12 +27,6 @@ short ieee80211_is_54g(const struct ieee80211_network *net) } EXPORT_SYMBOL(ieee80211_is_54g); -short ieee80211_is_shortslot(const struct ieee80211_network *net) -{ - return net->capability & WLAN_CAPABILITY_SHORT_SLOT; -} -EXPORT_SYMBOL(ieee80211_is_shortslot); - /* returns the total length needed for placing the RATE MFIE * tag and the EXTENDED RATE MFIE tag if needed. * It includes two bytes per tag for the tag itself and its len @@ -154,21 +148,6 @@ static void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb) //return 0; } -static struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee) -{ - struct sk_buff *ret; - - if (ieee->mgmt_queue_tail == ieee->mgmt_queue_head) - return NULL; - - ret = ieee->mgmt_queue_ring[ieee->mgmt_queue_tail]; - - ieee->mgmt_queue_tail = - (ieee->mgmt_queue_tail + 1) % MGMT_QUEUE_NUM; - - return ret; -} - static void init_mgmt_queue(struct ieee80211_device *ieee) { ieee->mgmt_queue_tail = ieee->mgmt_queue_head = 0; @@ -1772,33 +1751,6 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl) } } -void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success) -{ - unsigned long flags, flags2; - - spin_lock_irqsave(&ieee->lock, flags); - - if (ieee->sta_sleep == 2) { - /* Null frame with PS bit set */ - if (success) { - ieee->sta_sleep = 1; - ieee->enter_sleep_state(ieee->dev, ieee->ps_th, ieee->ps_tl); - } - /* if the card report not success we can't be sure the AP - * has not RXed so we can't assume the AP believe us awake - */ - } else { - /* 21112005 - tx again null without PS bit if lost */ - if ((ieee->sta_sleep == 0) && !success) { - spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); - ieee80211_sta_ps_send_null_frame(ieee, 0); - spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); - } - } - spin_unlock_irqrestore(&ieee->lock, flags); -} -EXPORT_SYMBOL(ieee80211_ps_tx_ack); - static void ieee80211_process_action(struct ieee80211_device *ieee, struct sk_buff *skb) { @@ -2068,7 +2020,6 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device * * to check it any more. * */ //printk("error:no descriptor left@queue_index %d\n", queue_index); - //ieee80211_stop_queue(ieee); #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE skb_queue_tail(&ieee->skb_drv_aggQ[queue_index], txb->fragments[i]); #else @@ -2089,27 +2040,6 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device * } EXPORT_SYMBOL(ieee80211_softmac_xmit); -/* called with ieee->lock acquired */ -static void ieee80211_resume_tx(struct ieee80211_device *ieee) -{ - int i; - for (i = ieee->tx_pending.frag; i < ieee->tx_pending.txb->nr_frags; i++) { - if (ieee->queue_stop) { - ieee->tx_pending.frag = i; - return; - } else { - ieee->softmac_data_hard_start_xmit(ieee->tx_pending.txb->fragments[i], - ieee->dev, ieee->rate); - //(i+1)tx_pending.txb->nr_frags); - ieee->stats.tx_packets++; - netif_trans_update(ieee->dev); - } - } - - ieee80211_txb_free(ieee->tx_pending.txb); - ieee->tx_pending.txb = NULL; -} - void ieee80211_reset_queue(struct ieee80211_device *ieee) { unsigned long flags; @@ -2125,59 +2055,6 @@ void ieee80211_reset_queue(struct ieee80211_device *ieee) } EXPORT_SYMBOL(ieee80211_reset_queue); -void ieee80211_wake_queue(struct ieee80211_device *ieee) -{ - unsigned long flags; - struct sk_buff *skb; - struct rtl_80211_hdr_3addr *header; - - spin_lock_irqsave(&ieee->lock, flags); - if (!ieee->queue_stop) - goto exit; - - ieee->queue_stop = 0; - - if (ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE) { - while (!ieee->queue_stop && (skb = dequeue_mgmt(ieee))) { - header = (struct rtl_80211_hdr_3addr *)skb->data; - - header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4); - - if (ieee->seq_ctrl[0] == 0xFFF) - ieee->seq_ctrl[0] = 0; - else - ieee->seq_ctrl[0]++; - - ieee->softmac_data_hard_start_xmit(skb, ieee->dev, ieee->basic_rate); - //dev_kfree_skb_any(skb);//edit by thomas - } - } - if (!ieee->queue_stop && ieee->tx_pending.txb) - ieee80211_resume_tx(ieee); - - if (!ieee->queue_stop && netif_queue_stopped(ieee->dev)) { - ieee->softmac_stats.swtxawake++; - netif_wake_queue(ieee->dev); - } -exit: - spin_unlock_irqrestore(&ieee->lock, flags); -} -EXPORT_SYMBOL(ieee80211_wake_queue); - -void ieee80211_stop_queue(struct ieee80211_device *ieee) -{ - //unsigned long flags; - //spin_lock_irqsave(&ieee->lock,flags); - - if (!netif_queue_stopped(ieee->dev)) { - netif_stop_queue(ieee->dev); - ieee->softmac_stats.swtxstop++; - } - ieee->queue_stop = 1; - //spin_unlock_irqrestore(&ieee->lock,flags); -} -EXPORT_SYMBOL(ieee80211_stop_queue); - /* called in user context only */ void ieee80211_start_master_bss(struct ieee80211_device *ieee) { @@ -2438,27 +2315,6 @@ struct sk_buff *ieee80211_get_beacon_(struct ieee80211_device *ieee) return skb; } -struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee) -{ - struct sk_buff *skb; - struct ieee80211_probe_response *b; - - skb = ieee80211_get_beacon_(ieee); - if (!skb) - return NULL; - - b = (struct ieee80211_probe_response *)skb->data; - b->header.seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4); - - if (ieee->seq_ctrl[0] == 0xFFF) - ieee->seq_ctrl[0] = 0; - else - ieee->seq_ctrl[0]++; - - return skb; -} -EXPORT_SYMBOL(ieee80211_get_beacon); - void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee) { ieee->sync_scan_hurryup = 1; @@ -2623,425 +2479,6 @@ void ieee80211_softmac_free(struct ieee80211_device *ieee) mutex_unlock(&ieee->wx_mutex); } -/******************************************************** - * Start of WPA code. * - * this is stolen from the ipw2200 driver * - ********************************************************/ -static int ieee80211_wpa_enable(struct ieee80211_device *ieee, int value) -{ - /* This is called when wpa_supplicant loads and closes the driver - * interface. */ - printk("%s WPA\n", value ? "enabling" : "disabling"); - ieee->wpa_enabled = value; - return 0; -} - -static void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee, - char *wpa_ie, int wpa_ie_len) -{ - /* make sure WPA is enabled */ - ieee80211_wpa_enable(ieee, 1); - - ieee80211_disassociate(ieee); -} - -static int ieee80211_wpa_mlme(struct ieee80211_device *ieee, int command, int reason) -{ - int ret = 0; - - switch (command) { - case IEEE_MLME_STA_DEAUTH: - // silently ignore - break; - - case IEEE_MLME_STA_DISASSOC: - ieee80211_disassociate(ieee); - break; - - default: - printk("Unknown MLME request: %d\n", command); - ret = -EOPNOTSUPP; - } - - return ret; -} - -static int ieee80211_wpa_set_wpa_ie(struct ieee80211_device *ieee, - struct ieee_param *param, int plen) -{ - u8 *buf; - - if (param->u.wpa_ie.len > MAX_WPA_IE_LEN) - return -EINVAL; - - if (param->u.wpa_ie.len) { - buf = kmemdup(param->u.wpa_ie.data, param->u.wpa_ie.len, - GFP_KERNEL); - if (!buf) - return -ENOMEM; - - kfree(ieee->wpa_ie); - ieee->wpa_ie = buf; - ieee->wpa_ie_len = param->u.wpa_ie.len; - } else { - kfree(ieee->wpa_ie); - ieee->wpa_ie = NULL; - ieee->wpa_ie_len = 0; - } - - ieee80211_wpa_assoc_frame(ieee, ieee->wpa_ie, ieee->wpa_ie_len); - return 0; -} - -#define AUTH_ALG_OPEN_SYSTEM 0x1 -#define AUTH_ALG_SHARED_KEY 0x2 - -static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value) -{ - struct ieee80211_security sec = { - .flags = SEC_AUTH_MODE, - }; - - if (value & AUTH_ALG_SHARED_KEY) { - sec.auth_mode = WLAN_AUTH_SHARED_KEY; - ieee->open_wep = 0; - ieee->auth_mode = 1; - } else if (value & AUTH_ALG_OPEN_SYSTEM) { - sec.auth_mode = WLAN_AUTH_OPEN; - ieee->open_wep = 1; - ieee->auth_mode = 0; - } else if (value & IW_AUTH_ALG_LEAP) { - sec.auth_mode = WLAN_AUTH_LEAP; - ieee->open_wep = 1; - ieee->auth_mode = 2; - } - - if (ieee->set_security) - ieee->set_security(ieee->dev, &sec); - //else - // ret = -EOPNOTSUPP; - - return 0; -} - -static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 value) -{ - int ret = 0; - unsigned long flags; - - switch (name) { - case IEEE_PARAM_WPA_ENABLED: - ret = ieee80211_wpa_enable(ieee, value); - break; - - case IEEE_PARAM_TKIP_COUNTERMEASURES: - ieee->tkip_countermeasures = value; - 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. - */ - struct ieee80211_security sec = { - .flags = SEC_ENABLED, - .enabled = value, - }; - ieee->drop_unencrypted = value; - /* We only change SEC_LEVEL for open mode. Others - * are set by ipw_wpa_set_encryption. - */ - if (!value) { - sec.flags |= SEC_LEVEL; - sec.level = SEC_LEVEL_0; - } else { - sec.flags |= SEC_LEVEL; - sec.level = SEC_LEVEL_1; - } - if (ieee->set_security) - ieee->set_security(ieee->dev, &sec); - break; - } - - case IEEE_PARAM_PRIVACY_INVOKED: - ieee->privacy_invoked = value; - break; - - case IEEE_PARAM_AUTH_ALGS: - ret = ieee80211_wpa_set_auth_algs(ieee, value); - break; - - case IEEE_PARAM_IEEE_802_1X: - ieee->ieee802_1x = value; - break; - case IEEE_PARAM_WPAX_SELECT: - // added for WPA2 mixed mode - spin_lock_irqsave(&ieee->wpax_suitlist_lock, flags); - ieee->wpax_type_set = 1; - ieee->wpax_type_notify = value; - spin_unlock_irqrestore(&ieee->wpax_suitlist_lock, flags); - break; - - default: - printk("Unknown WPA param: %d\n", name); - ret = -EOPNOTSUPP; - } - - return ret; -} - -/* implementation borrowed from hostap driver */ -static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee, - struct ieee_param *param, int param_len) -{ - int ret = 0; - const char *module = NULL; - - struct ieee80211_crypto_ops *ops = NULL; - struct ieee80211_crypt_data **crypt; - - struct ieee80211_security sec = { - .flags = 0, - }; - - param->u.crypt.err = 0; - param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; - - if (param_len != - (int)((char *)param->u.crypt.key - (char *)param) + - param->u.crypt.key_len) { - printk("Len mismatch %d, %d\n", param_len, - param->u.crypt.key_len); - return -EINVAL; - } - if (is_broadcast_ether_addr(param->sta_addr)) { - if (param->u.crypt.idx >= WEP_KEYS) - return -EINVAL; - crypt = &ieee->crypt[param->u.crypt.idx]; - } else { - return -EINVAL; - } - - if (strcmp(param->u.crypt.alg, "none") == 0) { - if (crypt) { - sec.enabled = 0; - // FIXME FIXME - //sec.encrypt = 0; - sec.level = SEC_LEVEL_0; - sec.flags |= SEC_ENABLED | SEC_LEVEL; - ieee80211_crypt_delayed_deinit(ieee, crypt); - } - goto done; - } - sec.enabled = 1; -// FIXME FIXME -// sec.encrypt = 1; - sec.flags |= SEC_ENABLED; - - /* IPW HW cannot build TKIP MIC, host decryption still needed. */ - if (!(ieee->host_encrypt || ieee->host_decrypt) && - strcmp(param->u.crypt.alg, "TKIP")) - goto skip_host_crypt; - - //set WEP40 first, it will be modified according to WEP104 or WEP40 at other place - if (!strcmp(param->u.crypt.alg, "WEP")) - module = "ieee80211_crypt_wep"; - else if (!strcmp(param->u.crypt.alg, "TKIP")) - module = "ieee80211_crypt_tkip"; - else if (!strcmp(param->u.crypt.alg, "CCMP")) - module = "ieee80211_crypt_ccmp"; - if (module) - ops = try_then_request_module(ieee80211_get_crypto_ops(param->u.crypt.alg), - module); - if (!ops) { - printk("unknown crypto alg '%s'\n", param->u.crypt.alg); - param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG; - ret = -EINVAL; - goto done; - } - - if (!*crypt || (*crypt)->ops != ops) { - struct ieee80211_crypt_data *new_crypt; - - ieee80211_crypt_delayed_deinit(ieee, crypt); - - new_crypt = kzalloc(sizeof(*new_crypt), GFP_KERNEL); - if (!new_crypt) { - ret = -ENOMEM; - goto done; - } - new_crypt->ops = ops; - if (new_crypt->ops && try_module_get(new_crypt->ops->owner)) - new_crypt->priv = - new_crypt->ops->init(param->u.crypt.idx); - - if (!new_crypt->priv) { - kfree(new_crypt); - param->u.crypt.err = IEEE_CRYPT_ERR_CRYPT_INIT_FAILED; - ret = -EINVAL; - goto done; - } - - *crypt = new_crypt; - } - - if (param->u.crypt.key_len > 0 && (*crypt)->ops->set_key && - (*crypt)->ops->set_key(param->u.crypt.key, - param->u.crypt.key_len, param->u.crypt.seq, - (*crypt)->priv) < 0) { - printk("key setting failed\n"); - param->u.crypt.err = IEEE_CRYPT_ERR_KEY_SET_FAILED; - ret = -EINVAL; - goto done; - } - - skip_host_crypt: - if (param->u.crypt.set_tx) { - ieee->tx_keyidx = param->u.crypt.idx; - sec.active_key = param->u.crypt.idx; - sec.flags |= SEC_ACTIVE_KEY; - } else { - sec.flags &= ~SEC_ACTIVE_KEY; - } - memcpy(sec.keys[param->u.crypt.idx], - param->u.crypt.key, - param->u.crypt.key_len); - sec.key_sizes[param->u.crypt.idx] = param->u.crypt.key_len; - sec.flags |= (1 << param->u.crypt.idx); - - if (strcmp(param->u.crypt.alg, "WEP") == 0) { - sec.flags |= SEC_LEVEL; - sec.level = SEC_LEVEL_1; - } else if (strcmp(param->u.crypt.alg, "TKIP") == 0) { - sec.flags |= SEC_LEVEL; - sec.level = SEC_LEVEL_2; - } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) { - sec.flags |= SEC_LEVEL; - sec.level = SEC_LEVEL_3; - } - done: - if (ieee->set_security) - ieee->set_security(ieee->dev, &sec); - - /* Do not reset port if card is in Managed mode since resetting will - * generate new IEEE 802.11 authentication which may end up in looping - * with IEEE 802.1X. If your hardware requires a reset after WEP - * configuration (for example... Prism2), implement the reset_port in - * the callbacks structures used to initialize the 802.11 stack. */ - if (ieee->reset_on_keychange && - ieee->iw_mode != IW_MODE_INFRA && - ieee->reset_port && - ieee->reset_port(ieee->dev)) { - printk("reset_port failed\n"); - param->u.crypt.err = IEEE_CRYPT_ERR_CARD_CONF_FAILED; - return -EINVAL; - } - - return ret; -} - -static inline struct sk_buff *ieee80211_disassociate_skb(struct ieee80211_network *beacon, - struct ieee80211_device *ieee, - u8 asRsn) -{ - struct sk_buff *skb; - struct ieee80211_disassoc *disass; - - skb = dev_alloc_skb(sizeof(struct ieee80211_disassoc)); - if (!skb) - return NULL; - - disass = skb_put(skb, sizeof(struct ieee80211_disassoc)); - disass->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_DISASSOC); - disass->header.duration_id = 0; - - memcpy(disass->header.addr1, beacon->bssid, ETH_ALEN); - memcpy(disass->header.addr2, ieee->dev->dev_addr, ETH_ALEN); - memcpy(disass->header.addr3, beacon->bssid, ETH_ALEN); - - disass->reason = cpu_to_le16(asRsn); - return skb; -} - -void -SendDisassociation(struct ieee80211_device *ieee, - u8 *asSta, - u8 asRsn -) -{ - struct ieee80211_network *beacon = &ieee->current_network; - struct sk_buff *skb; - - skb = ieee80211_disassociate_skb(beacon, ieee, asRsn); - if (skb) { - softmac_mgmt_xmit(skb, ieee); - //dev_kfree_skb_any(skb);//edit by thomas - } -} -EXPORT_SYMBOL(SendDisassociation); - -int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p) -{ - struct ieee_param *param; - int ret = 0; - - mutex_lock(&ieee->wx_mutex); - //IEEE_DEBUG_INFO("wpa_supplicant: len=%d\n", p->length); - - if (p->length < sizeof(struct ieee_param) || !p->pointer) { - ret = -EINVAL; - goto out; - } - - param = memdup_user(p->pointer, p->length); - if (IS_ERR(param)) { - ret = PTR_ERR(param); - goto out; - } - - switch (param->cmd) { - case IEEE_CMD_SET_WPA_PARAM: - ret = ieee80211_wpa_set_param(ieee, param->u.wpa_param.name, - param->u.wpa_param.value); - break; - - case IEEE_CMD_SET_WPA_IE: - ret = ieee80211_wpa_set_wpa_ie(ieee, param, p->length); - break; - - case IEEE_CMD_SET_ENCRYPTION: - ret = ieee80211_wpa_set_encryption(ieee, param, p->length); - break; - - case IEEE_CMD_MLME: - ret = ieee80211_wpa_mlme(ieee, param->u.mlme.command, - param->u.mlme.reason_code); - break; - - default: - printk("Unknown WPA supplicant request: %d\n", param->cmd); - ret = -EOPNOTSUPP; - break; - } - - if (ret == 0 && copy_to_user(p->pointer, param, p->length)) - ret = -EFAULT; - - kfree(param); -out: - mutex_unlock(&ieee->wx_mutex); - - return ret; -} -EXPORT_SYMBOL(ieee80211_wpa_supplicant_ioctl); - void notify_wx_assoc_event(struct ieee80211_device *ieee) { union iwreq_data wrqu; diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index ff0ada00bf414..ef59c785f950a 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -453,8 +453,6 @@ typedef enum _WIRELESS_MODE { WIRELESS_MODE_N_5G = 0x20 } WIRELESS_MODE; -#define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV + 30) - typedef struct buffer { struct buffer *next; u32 *buf; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 0a60ef20107c4..295b514043336 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3284,114 +3284,6 @@ static int r8192_set_mac_adr(struct net_device *dev, void *mac) return 0; } -/* based on ipw2200 driver */ -static int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); - struct iwreq *wrq = (struct iwreq *)rq; - int ret = -1; - struct ieee80211_device *ieee = priv->ieee80211; - u32 key[4]; - u8 broadcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - struct iw_point *p = &wrq->u.data; - struct ieee_param *ipw = NULL; - - mutex_lock(&priv->wx_mutex); - - if (p->length < sizeof(struct ieee_param) || !p->pointer) { - ret = -EINVAL; - goto out; - } - - ipw = memdup_user(p->pointer, p->length); - if (IS_ERR(ipw)) { - ret = PTR_ERR(ipw); - goto out; - } - - switch (cmd) { - case RTL_IOCTL_WPA_SUPPLICANT: - /* parse here for HW security */ - if (ipw->cmd == IEEE_CMD_SET_ENCRYPTION) { - if (ipw->u.crypt.set_tx) { - if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) { - ieee->pairwise_key_type = KEY_TYPE_CCMP; - } else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0) { - ieee->pairwise_key_type = KEY_TYPE_TKIP; - } else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) { - if (ipw->u.crypt.key_len == 13) - ieee->pairwise_key_type = KEY_TYPE_WEP104; - else if (ipw->u.crypt.key_len == 5) - ieee->pairwise_key_type = KEY_TYPE_WEP40; - } else { - ieee->pairwise_key_type = KEY_TYPE_NA; - } - - if (ieee->pairwise_key_type) { - memcpy((u8 *)key, ipw->u.crypt.key, 16); - EnableHWSecurityConfig8192(dev); - /* We fill both index entry and 4th - * entry for pairwise key as in IPW - * interface, adhoc will only get here, - * so we need index entry for its - * default key serching! - */ - setKey(dev, 4, ipw->u.crypt.idx, - ieee->pairwise_key_type, - (u8 *)ieee->ap_mac_addr, - 0, key); - if (ieee->auth_mode != 2) - setKey(dev, ipw->u.crypt.idx, - ipw->u.crypt.idx, - ieee->pairwise_key_type, - (u8 *)ieee->ap_mac_addr, - 0, key); - } - } else { - memcpy((u8 *)key, ipw->u.crypt.key, 16); - if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) { - ieee->group_key_type = KEY_TYPE_CCMP; - } else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0) { - ieee->group_key_type = KEY_TYPE_TKIP; - } else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) { - if (ipw->u.crypt.key_len == 13) - ieee->group_key_type = KEY_TYPE_WEP104; - else if (ipw->u.crypt.key_len == 5) - ieee->group_key_type = KEY_TYPE_WEP40; - } else { - ieee->group_key_type = KEY_TYPE_NA; - } - - if (ieee->group_key_type) { - setKey(dev, ipw->u.crypt.idx, - /* KeyIndex */ - ipw->u.crypt.idx, - /* KeyType */ - ieee->group_key_type, - /* MacAddr */ - broadcast_addr, - /* DefaultKey */ - 0, - /* KeyContent */ - key); - } - } - } - ret = ieee80211_wpa_supplicant_ioctl(priv->ieee80211, - &wrq->u.data); - break; - - default: - ret = -EOPNOTSUPP; - break; - } - kfree(ipw); - ipw = NULL; -out: - mutex_unlock(&priv->wx_mutex); - return ret; -} - static u8 HwRateToMRate90(bool bIsHT, u8 rate) { u8 ret_rate = 0xff; @@ -4496,7 +4388,6 @@ static const struct net_device_ops rtl8192_netdev_ops = { .ndo_stop = rtl8192_close, .ndo_get_stats = rtl8192_stats, .ndo_tx_timeout = tx_timeout, - .ndo_do_ioctl = rtl8192_ioctl, .ndo_set_rx_mode = r8192_set_multicast, .ndo_set_mac_address = r8192_set_mac_adr, .ndo_validate_addr = eth_validate_addr, From patchwork Wed Oct 11 14:02:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 732439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F284CD6E74 for ; Wed, 11 Oct 2023 14:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346995AbjJKODk (ORCPT ); Wed, 11 Oct 2023 10:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347061AbjJKODX (ORCPT ); Wed, 11 Oct 2023 10:03:23 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 751AAE5; Wed, 11 Oct 2023 07:03:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F4D7C433CB; Wed, 11 Oct 2023 14:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697032996; bh=N/HC4aN9VSOyAziYJUcabvcvg/4uj3ZeRvuFPX72uUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OURP0UMv6EgweTj0Rs590/LwjwTau2qo9h2IdP8oq7Lq97yicqRuDZrF8QR8zOpJk 760QbfnousJd7q2sYcoh8cs6PFw3zNVsgoUIOTx3Zx2zTjjaaqvPaybtMOJkUNXrzm 0bDPxJVsdOR3EEWDtJ3886RKmBArz3CXm7mTt1Yz61ImKQFzd7/gpiJ5p9rdsdvWDy LefCqIwwWMwFNXs0pOid5iOLu8WkDXpiMdJYDc20wkEQOKD4o0HEvjFOx3EG3iieDZ eRHRPoh8uTfdVGjsxjN663MzrRwnyjNZZwq6Pv4R0Q1fbkxM1scmh7UZlQ7m20Z9vA J7gwh9KhoByEA== 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" , Rodolfo Zitellini , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Kalle Valo Subject: [PATCH v2 08/10] wifi: atmel: remove unused ioctl function Date: Wed, 11 Oct 2023 16:02:23 +0200 Message-Id: <20231011140225.253106-8-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011140225.253106-1-arnd@kernel.org> References: <20231011140225.253106-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Arnd Bergmann This function has no callers, and for the past 20 years, the request_firmware interface has been in place instead of the custom firmware loader. Acked-by: Kalle Valo Signed-off-by: Arnd Bergmann --- drivers/staging/wireless/atmel/atmel.c | 72 -------------------------- 1 file changed, 72 deletions(-) diff --git a/drivers/staging/wireless/atmel/atmel.c b/drivers/staging/wireless/atmel/atmel.c index 7c2d1c588156d..461dce21de2b0 100644 --- a/drivers/staging/wireless/atmel/atmel.c +++ b/drivers/staging/wireless/atmel/atmel.c @@ -571,7 +571,6 @@ static const struct { { REG_DOMAIN_ISRAEL, 3, 9, "Israel"} }; static void build_wpa_mib(struct atmel_private *priv); -static int atmel_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void atmel_copy_to_card(struct net_device *dev, u16 dest, const unsigned char *src, u16 len); static void atmel_copy_to_host(struct net_device *dev, unsigned char *dest, @@ -1487,7 +1486,6 @@ static const struct net_device_ops atmel_netdev_ops = { .ndo_stop = atmel_close, .ndo_set_mac_address = atmel_set_mac_address, .ndo_start_xmit = start_tx, - .ndo_do_ioctl = atmel_ioctl, .ndo_validate_addr = eth_validate_addr, }; @@ -2616,76 +2614,6 @@ static const struct iw_handler_def atmel_handler_def = { .get_wireless_stats = atmel_get_wireless_stats }; -static int atmel_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - int i, rc = 0; - struct atmel_private *priv = netdev_priv(dev); - struct atmel_priv_ioctl com; - struct iwreq *wrq = (struct iwreq *) rq; - unsigned char *new_firmware; - char domain[REGDOMAINSZ + 1]; - - switch (cmd) { - case ATMELIDIFC: - wrq->u.param.value = ATMELMAGIC; - break; - - case ATMELFWL: - if (copy_from_user(&com, rq->ifr_data, sizeof(com))) { - rc = -EFAULT; - break; - } - - if (!capable(CAP_NET_ADMIN)) { - rc = -EPERM; - break; - } - - new_firmware = memdup_user(com.data, com.len); - if (IS_ERR(new_firmware)) { - rc = PTR_ERR(new_firmware); - break; - } - - kfree(priv->firmware); - - priv->firmware = new_firmware; - priv->firmware_length = com.len; - strncpy(priv->firmware_id, com.id, 31); - priv->firmware_id[31] = '\0'; - break; - - case ATMELRD: - if (copy_from_user(domain, rq->ifr_data, REGDOMAINSZ)) { - rc = -EFAULT; - break; - } - - if (!capable(CAP_NET_ADMIN)) { - rc = -EPERM; - break; - } - - domain[REGDOMAINSZ] = 0; - rc = -EINVAL; - for (i = 0; i < ARRAY_SIZE(channel_table); i++) { - if (!strcasecmp(channel_table[i].name, domain)) { - priv->config_reg_domain = channel_table[i].reg_domain; - rc = 0; - } - } - - if (rc == 0 && priv->station_state != STATION_STATE_DOWN) - rc = atmel_open(dev); - break; - - default: - rc = -EOPNOTSUPP; - } - - return rc; -} - struct auth_body { __le16 alg; __le16 trans_seq; From patchwork Wed Oct 11 14:02:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 732438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1616CD6E77 for ; Wed, 11 Oct 2023 14:03:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347033AbjJKODn (ORCPT ); Wed, 11 Oct 2023 10:03:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235048AbjJKOD3 (ORCPT ); Wed, 11 Oct 2023 10:03:29 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD565103; Wed, 11 Oct 2023 07:03:21 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5813BC433C8; Wed, 11 Oct 2023 14:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697033000; bh=swFjHYRAcIq+7y7eoCfw/OikCf4A6aTlX7mu0sQjbyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WT7PE9Y7o+usoU/jopmxSwxzD0zuzQRSz749t5aYzXMhB9F7lR/Sw/H/Q88nb1gTw fiPHfrm7V4uVQ19XFpYD0srIVnQiUU6bnX3Bmwt08vR2KFcIrahZ1KAh89BwFIbYs0 wlDTk9tm+RLKl6gAVbk69kJBEJJm9QBYsY1tg6ya/L5qXBvUDLXMdQ2+i37dSp+2bz RwW9xj4Es5qrwmSPzZ/74OiXkPqP2ilAFdZcFJzK/cBzoo8h64G1OuWM+g8BZ34nBY S3NyNTbxWoCRGgjn7AmCCBg1PZwMnmyR9Idv9v1y0+m+OL2P+45a9hCHZrE6PSRPWY x9fYPiz9KdpxQ== 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" , Rodolfo Zitellini , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Kalle Valo Subject: [PATCH v2 09/10] wifi: hostap: remove unused ioctl function Date: Wed, 11 Oct 2023 16:02:24 +0200 Message-Id: <20231011140225.253106-9-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011140225.253106-1-arnd@kernel.org> References: <20231011140225.253106-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Arnd Bergmann The ioctl handler has no actual callers in the kernel and is useless. All the functionality should be reachable through the regualar interfaces. Acked-by: Kalle Valo Signed-off-by: Arnd Bergmann --- drivers/staging/wireless/hostap/hostap.h | 1 - .../staging/wireless/hostap/hostap_ioctl.c | 228 ------------------ drivers/staging/wireless/hostap/hostap_main.c | 3 - 3 files changed, 232 deletions(-) diff --git a/drivers/staging/wireless/hostap/hostap.h b/drivers/staging/wireless/hostap/hostap.h index c17ab6dbbb538..552ae33d78751 100644 --- a/drivers/staging/wireless/hostap/hostap.h +++ b/drivers/staging/wireless/hostap/hostap.h @@ -92,7 +92,6 @@ void hostap_info_process(local_info_t *local, struct sk_buff *skb); extern const struct iw_handler_def hostap_iw_handler_def; extern const struct ethtool_ops prism2_ethtool_ops; -int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); int hostap_siocdevprivate(struct net_device *dev, struct ifreq *ifr, void __user *data, int cmd); diff --git a/drivers/staging/wireless/hostap/hostap_ioctl.c b/drivers/staging/wireless/hostap/hostap_ioctl.c index b4adfc190ae87..26162f92e3c3d 100644 --- a/drivers/staging/wireless/hostap/hostap_ioctl.c +++ b/drivers/staging/wireless/hostap/hostap_ioctl.c @@ -2316,21 +2316,6 @@ static const struct iw_priv_args prism2_priv[] = { }; -static int prism2_ioctl_priv_inquire(struct net_device *dev, int *i) -{ - struct hostap_interface *iface; - local_info_t *local; - - iface = netdev_priv(dev); - local = iface->local; - - if (local->func->cmd(dev, HFA384X_CMDCODE_INQUIRE, *i, NULL, NULL)) - return -EOPNOTSUPP; - - return 0; -} - - static int prism2_ioctl_priv_prism2_param(struct net_device *dev, struct iw_request_info *info, union iwreq_data *uwrq, char *extra) @@ -2910,146 +2895,6 @@ static int prism2_ioctl_priv_writemif(struct net_device *dev, } -static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i) -{ - struct hostap_interface *iface; - local_info_t *local; - int ret = 0; - union iwreq_data wrqu; - - iface = netdev_priv(dev); - local = iface->local; - - printk(KERN_DEBUG "%s: process %d (%s) used deprecated iwpriv monitor " - "- update software to use iwconfig mode monitor\n", - dev->name, task_pid_nr(current), current->comm); - - /* Backward compatibility code - this can be removed at some point */ - - if (*i == 0) { - /* Disable monitor mode - old mode was not saved, so go to - * Master mode */ - wrqu.mode = IW_MODE_MASTER; - ret = prism2_ioctl_siwmode(dev, NULL, &wrqu, NULL); - } else if (*i == 1) { - /* netlink socket mode is not supported anymore since it did - * not separate different devices from each other and was not - * best method for delivering large amount of packets to - * user space */ - ret = -EOPNOTSUPP; - } else if (*i == 2 || *i == 3) { - switch (*i) { - case 2: - local->monitor_type = PRISM2_MONITOR_80211; - break; - case 3: - local->monitor_type = PRISM2_MONITOR_PRISM; - break; - } - wrqu.mode = IW_MODE_MONITOR; - ret = prism2_ioctl_siwmode(dev, NULL, &wrqu, NULL); - hostap_monitor_mode_enable(local); - } else - ret = -EINVAL; - - return ret; -} - - -static int prism2_ioctl_priv_reset(struct net_device *dev, int *i) -{ - struct hostap_interface *iface; - local_info_t *local; - - iface = netdev_priv(dev); - local = iface->local; - - printk(KERN_DEBUG "%s: manual reset request(%d)\n", dev->name, *i); - switch (*i) { - case 0: - /* Disable and enable card */ - local->func->hw_shutdown(dev, 1); - local->func->hw_config(dev, 0); - break; - - case 1: - /* COR sreset */ - local->func->hw_reset(dev); - break; - - case 2: - /* Disable and enable port 0 */ - local->func->reset_port(dev); - break; - - case 3: - prism2_sta_deauth(local, WLAN_REASON_DEAUTH_LEAVING); - if (local->func->cmd(dev, HFA384X_CMDCODE_DISABLE, 0, NULL, - NULL)) - return -EINVAL; - break; - - case 4: - if (local->func->cmd(dev, HFA384X_CMDCODE_ENABLE, 0, NULL, - NULL)) - return -EINVAL; - break; - - default: - printk(KERN_DEBUG "Unknown reset request %d\n", *i); - return -EOPNOTSUPP; - } - - return 0; -} - - -static int prism2_ioctl_priv_set_rid_word(struct net_device *dev, int *i) -{ - int rid = *i; - int value = *(i + 1); - - printk(KERN_DEBUG "%s: Set RID[0x%X] = %d\n", dev->name, rid, value); - - if (hostap_set_word(dev, rid, value)) - return -EINVAL; - - return 0; -} - - -#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT -static int ap_mac_cmd_ioctl(local_info_t *local, int *cmd) -{ - int ret = 0; - - switch (*cmd) { - case AP_MAC_CMD_POLICY_OPEN: - local->ap->mac_restrictions.policy = MAC_POLICY_OPEN; - break; - case AP_MAC_CMD_POLICY_ALLOW: - local->ap->mac_restrictions.policy = MAC_POLICY_ALLOW; - break; - case AP_MAC_CMD_POLICY_DENY: - local->ap->mac_restrictions.policy = MAC_POLICY_DENY; - break; - case AP_MAC_CMD_FLUSH: - ap_control_flush_macs(&local->ap->mac_restrictions); - break; - case AP_MAC_CMD_KICKALL: - ap_control_kickall(local->ap); - hostap_deauth_all_stas(local->dev, local->ap, 0); - break; - default: - ret = -EOPNOTSUPP; - break; - } - - return ret; -} -#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ - - #ifdef PRISM2_DOWNLOAD_SUPPORT static int prism2_ioctl_priv_download(local_info_t *local, struct iw_point *p) { @@ -3963,79 +3808,6 @@ const struct iw_handler_def hostap_iw_handler_def = .get_wireless_stats = hostap_get_wireless_stats, }; -/* Private ioctls (iwpriv) that have not yet been converted - * into new wireless extensions API */ -int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) -{ - struct iwreq *wrq = (struct iwreq *) ifr; - struct hostap_interface *iface; - local_info_t *local; - int ret = 0; - - iface = netdev_priv(dev); - local = iface->local; - - switch (cmd) { - case PRISM2_IOCTL_INQUIRE: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = prism2_ioctl_priv_inquire(dev, (int *) wrq->u.name); - break; - - case PRISM2_IOCTL_MONITOR: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = prism2_ioctl_priv_monitor(dev, (int *) wrq->u.name); - break; - - case PRISM2_IOCTL_RESET: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = prism2_ioctl_priv_reset(dev, (int *) wrq->u.name); - break; - - case PRISM2_IOCTL_WDS_ADD: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = prism2_wds_add(local, wrq->u.ap_addr.sa_data, 1); - break; - - case PRISM2_IOCTL_WDS_DEL: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = prism2_wds_del(local, wrq->u.ap_addr.sa_data, 1, 0); - break; - - case PRISM2_IOCTL_SET_RID_WORD: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = prism2_ioctl_priv_set_rid_word(dev, - (int *) wrq->u.name); - break; - -#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT - case PRISM2_IOCTL_MACCMD: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = ap_mac_cmd_ioctl(local, (int *) wrq->u.name); - break; - - case PRISM2_IOCTL_ADDMAC: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = ap_control_add_mac(&local->ap->mac_restrictions, - wrq->u.ap_addr.sa_data); - break; - case PRISM2_IOCTL_DELMAC: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = ap_control_del_mac(&local->ap->mac_restrictions, - wrq->u.ap_addr.sa_data); - break; - case PRISM2_IOCTL_KICKMAC: - if (!capable(CAP_NET_ADMIN)) ret = -EPERM; - else ret = ap_control_kick_mac(local->ap, local->dev, - wrq->u.ap_addr.sa_data); - break; -#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ - default: - ret = -EOPNOTSUPP; - break; - } - - return ret; -} /* Private ioctls that are not used with iwpriv; * in SIOCDEVPRIVATE range */ diff --git a/drivers/staging/wireless/hostap/hostap_main.c b/drivers/staging/wireless/hostap/hostap_main.c index 787f685e70b49..bf86ac26c2acc 100644 --- a/drivers/staging/wireless/hostap/hostap_main.c +++ b/drivers/staging/wireless/hostap/hostap_main.c @@ -796,7 +796,6 @@ static const struct net_device_ops hostap_netdev_ops = { .ndo_open = prism2_open, .ndo_stop = prism2_close, - .ndo_do_ioctl = hostap_ioctl, .ndo_siocdevprivate = hostap_siocdevprivate, .ndo_set_mac_address = prism2_set_mac_address, .ndo_set_rx_mode = hostap_set_multicast_list, @@ -809,7 +808,6 @@ static const struct net_device_ops hostap_mgmt_netdev_ops = { .ndo_open = prism2_open, .ndo_stop = prism2_close, - .ndo_do_ioctl = hostap_ioctl, .ndo_siocdevprivate = hostap_siocdevprivate, .ndo_set_mac_address = prism2_set_mac_address, .ndo_set_rx_mode = hostap_set_multicast_list, @@ -822,7 +820,6 @@ static const struct net_device_ops hostap_master_ops = { .ndo_open = prism2_open, .ndo_stop = prism2_close, - .ndo_do_ioctl = hostap_ioctl, .ndo_siocdevprivate = hostap_siocdevprivate, .ndo_set_mac_address = prism2_set_mac_address, .ndo_set_rx_mode = hostap_set_multicast_list,