Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 23:34:51 +0530 Anant Thazhemadam wrote: > On 10/10/20 10:29 pm, Jakub Kicinski wrote: > > On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: > >> get_registers() directly returns the return value of > >> usb_control_msg_recv() - 0 if successful, and negative error num

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: > get_registers() directly returns the return value of > usb_control_msg_recv() - 0 if successful, and negative error number > otherwise. Are you expecting Greg to take this as a part of some USB subsystem changes? I don't see usb_contro

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Jakub Kicinski
On Sun, 11 Oct 2020 00:14:05 +0530 Anant Thazhemadam wrote: > Ah, my apologies. You're right. It doesn't look like those helpers have made > their way into the networking tree yet. > > (This gets mentioned here as well, >     https://www.mail-archive.com/netdev@vger.kernel.org/msg357843.html) > >

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Anant Thazhemadam
Hi, On 10/10/20 10:29 pm, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: >> get_registers() directly returns the return value of >> usb_control_msg_recv() - 0 if successful, and negative error number >> otherwise. > Are you expecting Greg to take this as a par

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Anant Thazhemadam
On 10/10/20 11:46 pm, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 23:34:51 +0530 Anant Thazhemadam wrote: >> On 10/10/20 10:29 pm, Jakub Kicinski wrote: >>> On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: get_registers() directly returns the return value of usb_control_msg

[PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-09 Thread Anant Thazhemadam
get_registers() directly returns the return value of usb_control_msg_recv() - 0 if successful, and negative error number otherwise. However, in set_ethernet_addr(), this return value is incorrectly checked. Since this return value will never be equal to sizeof(node_id), a random MAC address wil