Am Donnerstag, den 07.01.2021, 20:27 +0100 schrieb Andrew Lunn:
> On Thu, Jan 07, 2021 at 12:35:17PM +0100, Oliver Neukum wrote:
>
> Hi Oliver
>
> > +++ b/include/linux/usb/usbnet.h
> > @@ -53,6 +53,8 @@ struct usbnet {
> > u32 hard_mtu; /* count any extra framing */
> > size_t rx_urb_size; /* size for rx urbs */
> > struct mii_if_info mii;
> > + long rxspeed; /* if MII is not used */
> > + long txspeed; /* if MII is not used */
>
> How generic is this really? I don't know USB networking, so i cannot
> say for myself.
>
> I'm wondering if these should be added to cdc_ncm_ctx, and
> usbnet_get_link_ksettings_ncm function should be added?
>
> Having said that, USB_CDC_NOTIFY_SPEED_CHANGE seems like it could also
> use this. Should the patch set also handle that notification and set
> usbnet->rxspeed and usbnet->txspeed? These would then be used in
> multiple places and that would justify it being in struct usbnet.
Hi,
yes, everything that gets notification in CDC style should use this
mechanism.
Regards
Oliver