diff options
author | Olivier Blin <olivier.blin@softathome.com> | 2014-10-24 13:43:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-28 17:26:20 -0400 |
commit | b77e26d191590c73b4a982ea3b3b87194069a56a (patch) | |
tree | 4260ecf2fef1fb632e6d814323e420919b7d9a97 /drivers/net/usb/cdc_ether.c | |
parent | d80c679bc1526183f1cf4adc54b0b72e8798555e (diff) |
cdc-ether: handle promiscuous mode with a set_rx_mode callback
Promiscuous mode was not supported anymore with my Lenovo adapters
(RTL8153) since commit c472ab68ad67db23c9907a27649b7dc0899b61f9
(cdc-ether: clean packet filter upon probe).
It was not possible to use them in a bridge anymore.
Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
Also-analyzed-by: Loïc Yhuel <loic.yhuel@softathome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/cdc_ether.c')
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index bee3689beeb4..d3920b54a92c 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -76,6 +76,9 @@ static void usbnet_cdc_update_filter(struct usbnet *dev) | |||
76 | USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED | | 76 | USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED | |
77 | USB_CDC_PACKET_TYPE_BROADCAST; | 77 | USB_CDC_PACKET_TYPE_BROADCAST; |
78 | 78 | ||
79 | if (dev->net->flags & IFF_PROMISC) | ||
80 | cdc_filter |= USB_CDC_PACKET_TYPE_PROMISCUOUS; | ||
81 | |||
79 | /* FIXME cdc-ether has some multicast code too, though it complains | 82 | /* FIXME cdc-ether has some multicast code too, though it complains |
80 | * in routine cases. info->ether describes the multicast support. | 83 | * in routine cases. info->ether describes the multicast support. |
81 | * Implement that here, manipulating the cdc filter as needed. | 84 | * Implement that here, manipulating the cdc filter as needed. |
@@ -496,6 +499,7 @@ static const struct driver_info cdc_info = { | |||
496 | .bind = usbnet_cdc_bind, | 499 | .bind = usbnet_cdc_bind, |
497 | .unbind = usbnet_cdc_unbind, | 500 | .unbind = usbnet_cdc_unbind, |
498 | .status = usbnet_cdc_status, | 501 | .status = usbnet_cdc_status, |
502 | .set_rx_mode = usbnet_cdc_update_filter, | ||
499 | .manage_power = usbnet_manage_power, | 503 | .manage_power = usbnet_manage_power, |
500 | }; | 504 | }; |
501 | 505 | ||
@@ -505,6 +509,7 @@ static const struct driver_info wwan_info = { | |||
505 | .bind = usbnet_cdc_bind, | 509 | .bind = usbnet_cdc_bind, |
506 | .unbind = usbnet_cdc_unbind, | 510 | .unbind = usbnet_cdc_unbind, |
507 | .status = usbnet_cdc_status, | 511 | .status = usbnet_cdc_status, |
512 | .set_rx_mode = usbnet_cdc_update_filter, | ||
508 | .manage_power = usbnet_manage_power, | 513 | .manage_power = usbnet_manage_power, |
509 | }; | 514 | }; |
510 | 515 | ||