From 1ac622485e4c1b6a2bb21d6f2841b1a308f9eb1d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 10 Jun 2021 21:19:15 +0200 Subject: [PATCH] Revert "net: usb: cdc_ncm: don't spew notifications" This reverts commit de658a195ee23ca6aaffe197d1d2ea040beea0a2 as it breaks the abi at the moment. We will bring it back in a bit, when the next kabi break happens. Signed-off-by: Greg Kroah-Hartman Change-Id: I2bfa5e180f377af552230ff170ea0a45fef1347e --- drivers/net/usb/cdc_ncm.c | 12 +----------- include/linux/usb/usbnet.h | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 1d3bf810f2ca..854c6624e685 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -1827,15 +1827,6 @@ cdc_ncm_speed_change(struct usbnet *dev, uint32_t rx_speed = le32_to_cpu(data->DLBitRRate); uint32_t tx_speed = le32_to_cpu(data->ULBitRate); - /* if the speed hasn't changed, don't report it. - * RTL8156 shipped before 2021 sends notification about every 32ms. - */ - if (dev->rx_speed == rx_speed && dev->tx_speed == tx_speed) - return; - - dev->rx_speed = rx_speed; - dev->tx_speed = tx_speed; - /* * Currently the USB-NET API does not support reporting the actual * device speed. Do print it instead. @@ -1876,8 +1867,7 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb) * USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be * sent by device after USB_CDC_NOTIFY_SPEED_CHANGE. */ - if (netif_carrier_ok(dev->net) != !!event->wValue) - usbnet_link_change(dev, !!event->wValue, 0); + usbnet_link_change(dev, !!event->wValue, 0); break; case USB_CDC_NOTIFY_SPEED_CHANGE: diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 8110c29fab42..2e4f7721fc4e 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -83,8 +83,6 @@ struct usbnet { # define EVENT_LINK_CHANGE 11 # define EVENT_SET_RX_MODE 12 # define EVENT_NO_IP_ALIGN 13 - u32 rx_speed; /* in bps - NOT Mbps */ - u32 tx_speed; /* in bps - NOT Mbps */ }; static inline struct usb_driver *driver_of(struct usb_interface *intf)