From patchwork Wed Jul 15 18:40:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 11666075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8418A722 for ; Wed, 15 Jul 2020 18:41:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61FD520672 for ; Wed, 15 Jul 2020 18:41:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mork.no header.i=@mork.no header.b="JeAzyrZO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726908AbgGOSl0 (ORCPT ); Wed, 15 Jul 2020 14:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgGOSlZ (ORCPT ); Wed, 15 Jul 2020 14:41:25 -0400 Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A305C08C5CE; Wed, 15 Jul 2020 11:41:24 -0700 (PDT) Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id 06FIfIbD016688 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 15 Jul 2020 20:41:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1594838479; bh=kSgqavwRNLEb1UNcIY5GIGyMmUtam4Z6MFOTH4C9oJE=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=JeAzyrZOvlx/Myi51x8qhSU2paFuZmDGa2y8sCbEgUDBZm9kzIxV2vmuIg/l/Dyh7 V4ggATygS+z40e9d1sSDsAzzkqmuQ0FGpnrWd7BSKfF+vEblNNRgMTeAglPYE+AThI wbV7BpzuODHSXqYBNdZGE2B/PxBKz/ZLziL5inFM= Received: from bjorn by miraculix.mork.no with local (Exim 4.94) (envelope-from ) id 1jvmLG-000SST-6O; Wed, 15 Jul 2020 20:41:18 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: netdev@vger.kernel.org Cc: linux-usb@vger.kernel.org, wxcafe@wxcafe.net, oliver@neukum.org, =?utf-8?q?Miguel_Rodr=C3=ADguez_P=C3=A9rez?= , =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH v5 net-next 1/5] net: cdc_ether: use dev->intf to get interface information Date: Wed, 15 Jul 2020 20:40:56 +0200 Message-Id: <20200715184100.109349-2-bjorn@mork.no> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715184100.109349-1-bjorn@mork.no> References: <20200715184100.109349-1-bjorn@mork.no> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.2 at canardo X-Virus-Status: Clean Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Miguel Rodríguez Pérez usbnet_cdc_update_filter was getting the interface number from the usb_interface struct in cdc_state->control. However, cdc_ncm does not initialize that structure in its bind function, but uses cdc_ncm_ctx instead. Getting intf directly from struct usbnet solves the problem. Signed-off-by: Miguel Rodríguez Pérez Signed-off-by: Bjørn Mork --- drivers/net/usb/cdc_ether.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index a657943c9f01..2afe258e3648 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -65,8 +65,6 @@ static const u8 mbm_guid[16] = { static void usbnet_cdc_update_filter(struct usbnet *dev) { - struct cdc_state *info = (void *) &dev->data; - struct usb_interface *intf = info->control; struct net_device *net = dev->net; u16 cdc_filter = USB_CDC_PACKET_TYPE_DIRECTED @@ -86,7 +84,7 @@ static void usbnet_cdc_update_filter(struct usbnet *dev) USB_CDC_SET_ETHERNET_PACKET_FILTER, USB_TYPE_CLASS | USB_RECIP_INTERFACE, cdc_filter, - intf->cur_altsetting->desc.bInterfaceNumber, + dev->intf->cur_altsetting->desc.bInterfaceNumber, NULL, 0, USB_CTRL_SET_TIMEOUT From patchwork Wed Jul 15 18:40:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 11666069 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60AD6722 for ; Wed, 15 Jul 2020 18:41:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F9E920672 for ; Wed, 15 Jul 2020 18:41:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mork.no header.i=@mork.no header.b="AfpWHi7+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727042AbgGOSlc (ORCPT ); Wed, 15 Jul 2020 14:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbgGOSl0 (ORCPT ); Wed, 15 Jul 2020 14:41:26 -0400 Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A664C061755; Wed, 15 Jul 2020 11:41:25 -0700 (PDT) Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id 06FIfJf0016696 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 15 Jul 2020 20:41:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1594838479; bh=soqXKIMV4UybpZPLXSB5tX+7JJCEadqZphhOw22tfYI=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=AfpWHi7+dCpHnCB4QKGz3dI184INXcEDqyVABdsFvXHMwxBQ9uVntUTwNx6H7Iu25 2D1o+R/s7uPsul9szXtp2PJztBZkJj+2alM9sFNMUXungDuWbPlxFR78Vd1PXXOJ1r f+hjvQ8yF7VuvGDbvsK/S+r32QAVmhgukiEAVqN4= Received: from bjorn by miraculix.mork.no with local (Exim 4.94) (envelope-from ) id 1jvmLG-000SSW-R1; Wed, 15 Jul 2020 20:41:18 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: netdev@vger.kernel.org Cc: linux-usb@vger.kernel.org, wxcafe@wxcafe.net, oliver@neukum.org, =?utf-8?q?Miguel_Rodr=C3=ADguez_P=C3=A9rez?= , Oliver Neukum , =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH v5 net-next 2/5] net: cdc_ether: export usbnet_cdc_update_filter Date: Wed, 15 Jul 2020 20:40:57 +0200 Message-Id: <20200715184100.109349-3-bjorn@mork.no> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715184100.109349-1-bjorn@mork.no> References: <20200715184100.109349-1-bjorn@mork.no> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.2 at canardo X-Virus-Status: Clean Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Miguel Rodríguez Pérez This makes the function available to other drivers, like cdc_ncm. Signed-off-by: Miguel Rodríguez Pérez Acked-by: Oliver Neukum Signed-off-by: Bjørn Mork --- drivers/net/usb/cdc_ether.c | 3 ++- include/linux/usb/usbnet.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 2afe258e3648..8c1d61c2cbac 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -63,7 +63,7 @@ static const u8 mbm_guid[16] = { 0xa6, 0x07, 0xc0, 0xff, 0xcb, 0x7e, 0x39, 0x2a, }; -static void usbnet_cdc_update_filter(struct usbnet *dev) +void usbnet_cdc_update_filter(struct usbnet *dev) { struct net_device *net = dev->net; @@ -90,6 +90,7 @@ static void usbnet_cdc_update_filter(struct usbnet *dev) USB_CTRL_SET_TIMEOUT ); } +EXPORT_SYMBOL_GPL(usbnet_cdc_update_filter); /* probes control interface, claims data interface, collects the bulk * endpoints, activates data interface (if needed), maybe sets MTU. diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index b0bff3083278..3a856963a363 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -207,6 +207,7 @@ struct cdc_state { struct usb_interface *data; }; +extern void usbnet_cdc_update_filter(struct usbnet *dev); extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); extern int usbnet_ether_cdc_bind(struct usbnet *dev, struct usb_interface *intf); extern int usbnet_cdc_bind(struct usbnet *, struct usb_interface *); From patchwork Wed Jul 15 18:40:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 11666071 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72C4C1392 for ; Wed, 15 Jul 2020 18:41:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BD3320672 for ; Wed, 15 Jul 2020 18:41:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mork.no header.i=@mork.no header.b="TOgiaFOe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbgGOSl0 (ORCPT ); Wed, 15 Jul 2020 14:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbgGOSlZ (ORCPT ); Wed, 15 Jul 2020 14:41:25 -0400 Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280C8C08C5DD; Wed, 15 Jul 2020 11:41:24 -0700 (PDT) Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id 06FIfJ8a016708 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 15 Jul 2020 20:41:20 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1594838480; bh=rWusxHE8CMEShjnYmSriODmxyn+mcOq5n2CIK0RIsLw=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=TOgiaFOex+PWeMHlFM21gpO+g2DVMMcGmhEVDEStsKNyvTnyQdcOYGYgmlw2oaTo5 1zZhs7VQfXDFsFZjUIuloj4bjeXHjpFLDS9cZT/2hWd4qjl+e+pseRQQcaHFMtibbF SKl9koeSWGXfti7yAJIAE7VP5ViZngSAi78DxuWQ= Received: from bjorn by miraculix.mork.no with local (Exim 4.94) (envelope-from ) id 1jvmLH-000SSZ-Cr; Wed, 15 Jul 2020 20:41:19 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: netdev@vger.kernel.org Cc: linux-usb@vger.kernel.org, wxcafe@wxcafe.net, oliver@neukum.org, =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH v5 net-next 3/5] net: usbnet: export usbnet_set_rx_mode() Date: Wed, 15 Jul 2020 20:40:58 +0200 Message-Id: <20200715184100.109349-4-bjorn@mork.no> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715184100.109349-1-bjorn@mork.no> References: <20200715184100.109349-1-bjorn@mork.no> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.2 at canardo X-Virus-Status: Clean Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This function can be reused by other usbnet minidrivers. Signed-off-by: Bjørn Mork --- drivers/net/usb/usbnet.c | 3 ++- include/linux/usb/usbnet.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 5ec97def3513..e45935a5856a 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1108,12 +1108,13 @@ static void __handle_link_change(struct usbnet *dev) clear_bit(EVENT_LINK_CHANGE, &dev->flags); } -static void usbnet_set_rx_mode(struct net_device *net) +void usbnet_set_rx_mode(struct net_device *net) { struct usbnet *dev = netdev_priv(net); usbnet_defer_kevent(dev, EVENT_SET_RX_MODE); } +EXPORT_SYMBOL_GPL(usbnet_set_rx_mode); static void __handle_set_rx_mode(struct usbnet *dev) { diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 3a856963a363..2e4f7721fc4e 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -274,6 +274,7 @@ extern int usbnet_set_link_ksettings(struct net_device *net, extern u32 usbnet_get_link(struct net_device *net); extern u32 usbnet_get_msglevel(struct net_device *); extern void usbnet_set_msglevel(struct net_device *, u32); +extern void usbnet_set_rx_mode(struct net_device *net); extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); extern int usbnet_nway_reset(struct net_device *net); From patchwork Wed Jul 15 18:40:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 11666077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FC871392 for ; Wed, 15 Jul 2020 18:41:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E175720663 for ; Wed, 15 Jul 2020 18:41:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mork.no header.i=@mork.no header.b="itXv+UWH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbgGOSlZ (ORCPT ); Wed, 15 Jul 2020 14:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbgGOSlZ (ORCPT ); Wed, 15 Jul 2020 14:41:25 -0400 Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A7FC061755; Wed, 15 Jul 2020 11:41:24 -0700 (PDT) Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id 06FIfKd0016716 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 15 Jul 2020 20:41:20 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1594838480; bh=+ZJVeOnCYoH1fL1NMNFU0O6QN6yyjfZ/F9a8MtxC+uw=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=itXv+UWH0Q5HikHZybIMXFMbbOfuybGU2Xs36JkLHG+B7VVPm7dybw+NNawRxMKkm 5saiBn13YlZTCrfb+KmhdXC5bijIqF4+MlRZtQCDR/l6YHE1oZznonr3viT4GIKH3m O1ER9MiR26q7iB7xCwcDuuEi4EpxEuKFvGDcnFlQ= Received: from bjorn by miraculix.mork.no with local (Exim 4.94) (envelope-from ) id 1jvmLH-000SSc-Us; Wed, 15 Jul 2020 20:41:19 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: netdev@vger.kernel.org Cc: linux-usb@vger.kernel.org, wxcafe@wxcafe.net, oliver@neukum.org, =?utf-8?q?Miguel_Rodr=C3=ADguez_P=C3=A9rez?= , =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH v5 net-next 4/5] net: cdc_ncm: add .ndo_set_rx_mode to cdc_ncm_netdev_ops Date: Wed, 15 Jul 2020 20:40:59 +0200 Message-Id: <20200715184100.109349-5-bjorn@mork.no> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715184100.109349-1-bjorn@mork.no> References: <20200715184100.109349-1-bjorn@mork.no> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.2 at canardo X-Virus-Status: Clean Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Miguel Rodríguez Pérez The cdc_ncm driver overrides the net_device_ops structure used by usbnet to be able to hook into .ndo_change_mtu. However, the structure was missing the .ndo_set_rx_mode field, preventing the driver from hooking into usbnet's set_rx_mode. This patch adds the missing callback to usbnet_set_rx_mode in net_device_ops. Signed-off-by: Miguel Rodríguez Pérez Signed-off-by: Bjørn Mork --- drivers/net/usb/cdc_ncm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 8929669b5e6d..f5d7b933792b 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -792,6 +792,7 @@ static const struct net_device_ops cdc_ncm_netdev_ops = { .ndo_stop = usbnet_stop, .ndo_start_xmit = usbnet_start_xmit, .ndo_tx_timeout = usbnet_tx_timeout, + .ndo_set_rx_mode = usbnet_set_rx_mode, .ndo_get_stats64 = usbnet_get_stats64, .ndo_change_mtu = cdc_ncm_change_mtu, .ndo_set_mac_address = eth_mac_addr, From patchwork Wed Jul 15 18:41:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 11666067 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C26D722 for ; Wed, 15 Jul 2020 18:41:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08DCC20672 for ; Wed, 15 Jul 2020 18:41:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mork.no header.i=@mork.no header.b="nuP9Vuaa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbgGOSl0 (ORCPT ); Wed, 15 Jul 2020 14:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbgGOSlZ (ORCPT ); Wed, 15 Jul 2020 14:41:25 -0400 Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ED08C08C5DE; Wed, 15 Jul 2020 11:41:24 -0700 (PDT) Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id 06FIfLqG016725 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 15 Jul 2020 20:41:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1594838481; bh=O6NGNUTrDmAPLM5aIYNRzBtOHhnhqhtarfs2QFZbUqw=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=nuP9VuaaXzi+IaPkQ/Rq3jhUXORCKFe1ramEdAoiTZf89aua46tgVP0Btzn8DRjbH LRFywMgxaEnMH/skyWBUYozJWsV+P3c3uxaIOyuLcG5DZqjpxSU2mP31irDbMkuPE/ exjZUDLKK0KOuWf760jkd1GHq27lGpvG6vtLqcnQ= Received: from bjorn by miraculix.mork.no with local (Exim 4.94) (envelope-from ) id 1jvmLI-000SSf-Ih; Wed, 15 Jul 2020 20:41:20 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: netdev@vger.kernel.org Cc: linux-usb@vger.kernel.org, wxcafe@wxcafe.net, oliver@neukum.org, =?utf-8?q?Miguel_Rodr=C3=ADguez_P=C3=A9rez?= , =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH v5 net-next 5/5] net: cdc_ncm: hook into set_rx_mode to admit multicast traffic Date: Wed, 15 Jul 2020 20:41:00 +0200 Message-Id: <20200715184100.109349-6-bjorn@mork.no> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715184100.109349-1-bjorn@mork.no> References: <20200715184100.109349-1-bjorn@mork.no> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.2 at canardo X-Virus-Status: Clean Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Miguel Rodríguez Pérez We set set_rx_mode to usbnet_cdc_update_filter provided by cdc_ether that simply admits all multicast traffic if there is more than one multicast filter configured. Signed-off-by: Miguel Rodríguez Pérez Signed-off-by: Bjørn Mork --- drivers/net/usb/cdc_ncm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index f5d7b933792b..e04f588538cc 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -1896,6 +1896,7 @@ static const struct driver_info cdc_ncm_info = { .status = cdc_ncm_status, .rx_fixup = cdc_ncm_rx_fixup, .tx_fixup = cdc_ncm_tx_fixup, + .set_rx_mode = usbnet_cdc_update_filter, }; /* Same as cdc_ncm_info, but with FLAG_WWAN */ @@ -1909,6 +1910,7 @@ static const struct driver_info wwan_info = { .status = cdc_ncm_status, .rx_fixup = cdc_ncm_rx_fixup, .tx_fixup = cdc_ncm_tx_fixup, + .set_rx_mode = usbnet_cdc_update_filter, }; /* Same as wwan_info, but with FLAG_NOARP */ @@ -1922,6 +1924,7 @@ static const struct driver_info wwan_noarp_info = { .status = cdc_ncm_status, .rx_fixup = cdc_ncm_rx_fixup, .tx_fixup = cdc_ncm_tx_fixup, + .set_rx_mode = usbnet_cdc_update_filter, }; static const struct usb_device_id cdc_devs[] = {