Re: [PATCH net-next 14/19] net: usb: aqc111: Implement set_rx_mode callback

From: Igor Russkikh <hidden>
Date: 2018-10-08 13:49:55
Also in: linux-usb

Hi Andrew,
quoted
+{
+	struct usbnet *dev = netdev_priv(net);
+	struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0];
quoted
+	u8 *m_filter = ((u8 *)dev->data) + 12;
Please could you explain is.
Oh, that was a legacy code, the idea is it used spare area in dev->data array to
keep permanently 8 bytes for mcast filter request.

But the truth is usbnet_write anyway preallocates the data buffer and copies the data in there.

Therefore its really better to just allocate m_filter on stack to make the code clean.

Regards,
  Igor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help