From patchwork Wed Jul 15 01:28:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Wxcaf=C3=A9?= X-Patchwork-Id: 11663969 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 8844613B6 for ; Wed, 15 Jul 2020 01:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79B2920663 for ; Wed, 15 Jul 2020 01:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbgGOB2I (ORCPT ); Tue, 14 Jul 2020 21:28:08 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:50963 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727798AbgGOB2I (ORCPT ); Tue, 14 Jul 2020 21:28:08 -0400 Received: from cwh (fob.gandi.net [217.70.181.1]) (Authenticated sender: wxcafe@wxcafe.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id A17A8FF806; Wed, 15 Jul 2020 01:28:05 +0000 (UTC) Message-ID: <528220d4c2ab1712c10d86c90eea328ad3446659.camel@wxcafe.net> Subject: [PATCH 4/4] cdc_ncm: hook into set_rx_mode to admit multicast traffic From: =?iso-8859-1?q?Wxcaf=E9?= To: linux-usb@vger.kernel.org Cc: Miguel =?iso-8859-1?q?Rodr=EDguez_P=E9rez?= , oliver@neukum.org, netdev@vger.kernel.org Date: Tue, 14 Jul 2020 21:28:02 -0400 User-Agent: Evolution 3.36.3 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 --- 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 2abaf5f8b23b..c58aae2c90d1 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -1888,6 +1888,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 */ @@ -1901,6 +1902,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 */ @@ -1914,6 +1916,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[] = {