mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
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>
This commit is contained in:
committed by
David S. Miller
parent
77651900ce
commit
956baa9957
@@ -53,6 +53,9 @@ struct usbnet {
|
||||
u32 hard_mtu; /* count any extra framing */
|
||||
size_t rx_urb_size; /* size for rx urbs */
|
||||
struct mii_if_info mii;
|
||||
long rx_speed; /* If MII not used */
|
||||
long tx_speed; /* If MII not used */
|
||||
# define SPEED_UNSET -1
|
||||
|
||||
/* various kinds of pending driver work */
|
||||
struct sk_buff_head rxq;
|
||||
@@ -81,8 +84,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)
|
||||
@@ -271,6 +272,8 @@ extern int usbnet_get_link_ksettings_mii(struct net_device *net,
|
||||
struct ethtool_link_ksettings *cmd);
|
||||
extern int usbnet_set_link_ksettings_mii(struct net_device *net,
|
||||
const struct ethtool_link_ksettings *cmd);
|
||||
extern int usbnet_get_link_ksettings_internal(struct net_device *net,
|
||||
struct ethtool_link_ksettings *cmd);
|
||||
extern u32 usbnet_get_link(struct net_device *net);
|
||||
extern u32 usbnet_get_msglevel(struct net_device *);
|
||||
extern void usbnet_set_msglevel(struct net_device *, u32);
|
||||
|
||||
Reference in New Issue
Block a user