On 30/06/18 14:01, Bjørn Mork wrote: > Miguel Rodríguez Pérez <miguel@xxxxxxxxxxxxx> writes: > >> Change the way cdc_ncm_change_mtu hooks into the netdev_ops >> structure so that changes into usbnet driver_info operations >> can be respected. Without this, is was not possible to hook >> into usbnet_set_rx_mode. > > Please export usbnet_set_rx_mode instead, so that cdc_ncm_netdev_ops > can be kept const. > I don't see how this would help. From my point of view, the problem is that cdc_ncm driver should not be setting net_device_ops in the first place, as that is usbnet.c job. Sadly there seems to be no way currently for cdc_ncm to be notified of mtu changes. This was the least intrusive way I could think of to respect usbnet's net_device_ops structure while keeping cdc_ncm notified of mtu changes. Without this change, set_rx_mode was not getting called for cdc_ncm even after modifying struct driver_info. > > Bjørn > -- Miguel Rodríguez Pérez Laboratorio de Redes EE Telecomunicación – Universidade de Vigo -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html