net: cdc_ether: use dev->intf to get interface information
authorMiguel Rodríguez Pérez <miguel@det.uvigo.gal>
Wed, 15 Jul 2020 18:40:56 +0000 (20:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jul 2020 19:42:47 +0000 (12:42 -0700)
commit0226009ce0f6089f9b31211f7a2703cf9a327a01
treebd87d6e9b6c737bf3b874f29eb2bc85737852a09
parenteac87c413bf9794c14d488998a5265ea5b32f04e
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>
drivers/net/usb/cdc_ether.c