diff options
author | Miguel Rodríguez Pérez <miguel@det.uvigo.gal> | 2020-07-15 20:40:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-17 21:42:47 +0200 |
commit | 0226009ce0f6089f9b31211f7a2703cf9a327a01 (patch) | |
tree | bd87d6e9b6c737bf3b874f29eb2bc85737852a09 /drivers/net | |
parent | net: openvswitch: reorder masks array based on usage (diff) | |
download | linux-0226009ce0f6089f9b31211f7a2703cf9a327a01.tar.xz linux-0226009ce0f6089f9b31211f7a2703cf9a327a01.zip |
net: cdc_ether: use dev->intf to get interface information
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 <miguel@det.uvigo.gal>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 4 |
1 files changed, 1 insertions, 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 |