usbnet: add method for reporting speed without MII
authorOliver Neukum <oneukum@suse.com>
Mon, 5 Apr 2021 23:13:42 +0000 (16:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Apr 2021 23:22:36 +0000 (16:22 -0700)
commit956baa99571bbaf88f3e91190dfb498c685b0e21
tree6e22dfb175a75afd490fde4542c5c1a1187df712
parent77651900cede54930cd8a039dcd4583bfa308807
usbnet: add method for reporting speed without MII

The old method for reporting link speed assumed a driver uses the
generic phy (mii) MDIO read/write functions. CDC devices don't
expose the phy.

Add a primitive internal version reporting back directly what
the CDC notification/status operations recorded.

v2: rebased on upstream
v3: changed names and made clear which units are used
v4: moved hunks to correct patch; rewrote commmit messages

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Tested-by: Roland Dreier <roland@kernel.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/usbnet.c
include/linux/usb/usbnet.h