mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
Revert "net: usb: cdc_ncm: don't spew notifications"
This reverts commit de658a195e 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 <gregkh@google.com>
Change-Id: I2bfa5e180f377af552230ff170ea0a45fef1347e
This commit is contained in:
parent
9e08e97ec6
commit
1ac622485e
|
|
@ -1827,15 +1827,6 @@ cdc_ncm_speed_change(struct usbnet *dev,
|
||||||
uint32_t rx_speed = le32_to_cpu(data->DLBitRRate);
|
uint32_t rx_speed = le32_to_cpu(data->DLBitRRate);
|
||||||
uint32_t tx_speed = le32_to_cpu(data->ULBitRate);
|
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
|
* Currently the USB-NET API does not support reporting the actual
|
||||||
* device speed. Do print it instead.
|
* 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
|
* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
|
||||||
* sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
|
* 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;
|
break;
|
||||||
|
|
||||||
case USB_CDC_NOTIFY_SPEED_CHANGE:
|
case USB_CDC_NOTIFY_SPEED_CHANGE:
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,6 @@ struct usbnet {
|
||||||
# define EVENT_LINK_CHANGE 11
|
# define EVENT_LINK_CHANGE 11
|
||||||
# define EVENT_SET_RX_MODE 12
|
# define EVENT_SET_RX_MODE 12
|
||||||
# define EVENT_NO_IP_ALIGN 13
|
# 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)
|
static inline struct usb_driver *driver_of(struct usb_interface *intf)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user