linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2,1/4] Simplify usbnet_cdc_update_filter
@ 2018-07-01  8:15 Greg Kroah-Hartman
  2018-07-01  9:05 ` Miguel Rodríguez Pérez
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-01  8:15 UTC (permalink / raw)
  To: Miguel Rodríguez Pérez; +Cc: linux-usb, netdev

On Sat, Jun 30, 2018 at 07:32:23PM +0200, Miguel Rodríguez Pérez wrote:
> Remove some unneeded varibles to make the code easier to read
> and, replace the generic usb_control_msg function for the
> more specific usbnet_write_cmd.
> ---
>  drivers/net/usb/cdc_ether.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)

None of your patches have a signed-off-by line, and your subject needs
work as well (see other patches for how to do this with the correct
prefix.)

Also work on cc: the correct people, scripts/get_maintainer.pl on the
patch will tell you that, and also use 'git send-email' to properly
thread them.

thanks,

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [v2,1/4] Simplify usbnet_cdc_update_filter
@ 2018-06-30 17:32 Miguel Rodríguez Pérez
  0 siblings, 0 replies; 8+ messages in thread
From: Miguel Rodríguez Pérez @ 2018-06-30 17:32 UTC (permalink / raw)
  To: linux-usb, netdev

Remove some unneeded varibles to make the code easier to read
and, replace the generic usb_control_msg function for the
more specific usbnet_write_cmd.
---
 drivers/net/usb/cdc_ether.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 178b956501a7..815ed0dc18fe 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -77,9 +77,7 @@ 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;
+	struct net_device *net = dev->net;

 	u16 cdc_filter = USB_CDC_PACKET_TYPE_DIRECTED
 			| USB_CDC_PACKET_TYPE_BROADCAST;
@@ -93,16 +91,13 @@ static void usbnet_cdc_update_filter(struct usbnet *dev)
 	if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI))
 		cdc_filter |= USB_CDC_PACKET_TYPE_ALL_MULTICAST;

-	usb_control_msg(dev->udev,
-			usb_sndctrlpipe(dev->udev, 0),
+	usbnet_write_cmd(dev,
 			USB_CDC_SET_ETHERNET_PACKET_FILTER,
-			USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+			USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE,
 			cdc_filter,
-			intf->cur_altsetting->desc.bInterfaceNumber,
+			dev->intf->cur_altsetting->desc.bInterfaceNumber,
 			NULL,
-			0,
-			USB_CTRL_SET_TIMEOUT
-		);
+			0);
 }

 /* probes control interface, claims data interface, collects the bulk

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-14 16:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-01  8:15 [v2,1/4] Simplify usbnet_cdc_update_filter Greg Kroah-Hartman
2018-07-01  9:05 ` Miguel Rodríguez Pérez
2018-07-01  9:05   ` [v3,1/4] " Miguel Rodríguez Pérez
2020-07-13 20:43     ` [PATCH v3 1/4] " Wxcafé
2020-07-14  6:06       ` Greg KH
2020-07-14 15:13         ` Wxcafé
2020-07-14 16:13           ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2018-06-30 17:32 [v2,1/4] " Miguel Rodríguez Pérez

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).