Re: [PATCH 1/2] cdc_ncm: Hook into usbnet_change_mtu respecting usbnet,driver_info
From: Miguel Rodríguez Pérez <hidden>
Date: 2018-06-30 14:22:11
Also in:
linux-usb
From: Miguel Rodríguez Pérez <hidden>
Date: 2018-06-30 14:22:11
Also in:
linux-usb
On 30/06/18 14:01, Bjørn Mork wrote:
Miguel Rodríguez Pérez [off-list ref] writes:quoted
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