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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

>> +{
>> +	struct usbnet *dev = netdev_priv(net);
>> +	struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0];
> 
>> +	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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux