forked from Minki/linux
cdc-ether: handle promiscuous mode with a set_rx_mode callback
Promiscuous mode was not supported anymore with my Lenovo adapters
(RTL8153) since commit c472ab68ad
(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>
This commit is contained in:
parent
d80c679bc1
commit
b77e26d191
@ -76,6 +76,9 @@ static void usbnet_cdc_update_filter(struct usbnet *dev)
|
||||
USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED |
|
||||
USB_CDC_PACKET_TYPE_BROADCAST;
|
||||
|
||||
if (dev->net->flags & IFF_PROMISC)
|
||||
cdc_filter |= USB_CDC_PACKET_TYPE_PROMISCUOUS;
|
||||
|
||||
/* FIXME cdc-ether has some multicast code too, though it complains
|
||||
* in routine cases. info->ether describes the multicast support.
|
||||
* Implement that here, manipulating the cdc filter as needed.
|
||||
@ -496,6 +499,7 @@ static const struct driver_info cdc_info = {
|
||||
.bind = usbnet_cdc_bind,
|
||||
.unbind = usbnet_cdc_unbind,
|
||||
.status = usbnet_cdc_status,
|
||||
.set_rx_mode = usbnet_cdc_update_filter,
|
||||
.manage_power = usbnet_manage_power,
|
||||
};
|
||||
|
||||
@ -505,6 +509,7 @@ static const struct driver_info wwan_info = {
|
||||
.bind = usbnet_cdc_bind,
|
||||
.unbind = usbnet_cdc_unbind,
|
||||
.status = usbnet_cdc_status,
|
||||
.set_rx_mode = usbnet_cdc_update_filter,
|
||||
.manage_power = usbnet_manage_power,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user