diff options
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r-- | drivers/net/usb/usbnet.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 20615bbd693b..3a6770a65d78 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1052,6 +1052,21 @@ static void __handle_link_change(struct usbnet *dev) | |||
1052 | clear_bit(EVENT_LINK_CHANGE, &dev->flags); | 1052 | clear_bit(EVENT_LINK_CHANGE, &dev->flags); |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | static void usbnet_set_rx_mode(struct net_device *net) | ||
1056 | { | ||
1057 | struct usbnet *dev = netdev_priv(net); | ||
1058 | |||
1059 | usbnet_defer_kevent(dev, EVENT_SET_RX_MODE); | ||
1060 | } | ||
1061 | |||
1062 | static void __handle_set_rx_mode(struct usbnet *dev) | ||
1063 | { | ||
1064 | if (dev->driver_info->set_rx_mode) | ||
1065 | (dev->driver_info->set_rx_mode)(dev); | ||
1066 | |||
1067 | clear_bit(EVENT_SET_RX_MODE, &dev->flags); | ||
1068 | } | ||
1069 | |||
1055 | /* work that cannot be done in interrupt context uses keventd. | 1070 | /* work that cannot be done in interrupt context uses keventd. |
1056 | * | 1071 | * |
1057 | * NOTE: with 2.5 we could do more of this using completion callbacks, | 1072 | * NOTE: with 2.5 we could do more of this using completion callbacks, |
@@ -1157,6 +1172,10 @@ skip_reset: | |||
1157 | if (test_bit (EVENT_LINK_CHANGE, &dev->flags)) | 1172 | if (test_bit (EVENT_LINK_CHANGE, &dev->flags)) |
1158 | __handle_link_change(dev); | 1173 | __handle_link_change(dev); |
1159 | 1174 | ||
1175 | if (test_bit (EVENT_SET_RX_MODE, &dev->flags)) | ||
1176 | __handle_set_rx_mode(dev); | ||
1177 | |||
1178 | |||
1160 | if (dev->flags) | 1179 | if (dev->flags) |
1161 | netdev_dbg(dev->net, "kevent done, flags = 0x%lx\n", dev->flags); | 1180 | netdev_dbg(dev->net, "kevent done, flags = 0x%lx\n", dev->flags); |
1162 | } | 1181 | } |
@@ -1525,6 +1544,7 @@ static const struct net_device_ops usbnet_netdev_ops = { | |||
1525 | .ndo_stop = usbnet_stop, | 1544 | .ndo_stop = usbnet_stop, |
1526 | .ndo_start_xmit = usbnet_start_xmit, | 1545 | .ndo_start_xmit = usbnet_start_xmit, |
1527 | .ndo_tx_timeout = usbnet_tx_timeout, | 1546 | .ndo_tx_timeout = usbnet_tx_timeout, |
1547 | .ndo_set_rx_mode = usbnet_set_rx_mode, | ||
1528 | .ndo_change_mtu = usbnet_change_mtu, | 1548 | .ndo_change_mtu = usbnet_change_mtu, |
1529 | .ndo_set_mac_address = eth_mac_addr, | 1549 | .ndo_set_mac_address = eth_mac_addr, |
1530 | .ndo_validate_addr = eth_validate_addr, | 1550 | .ndo_validate_addr = eth_validate_addr, |