[PATCH] [GTA02] Use different MACs for the host and for the device ends of usb link

Paul Fertser fercerpav at gmail.com
Sun May 24 10:41:17 CEST 2009


Werner Almesberger <werner at openmoko.org> writes:
>> Why not just use a loop ? Something like:
>> 
>> 	for (i = 0; i != 6; i++)
>> 		if (!inc_hexchar(mac+18-i))
>> 			break;
>
> Hmm, I have to work on my reading skills. That should have been
> more like this:
>
> 	for (i = 0; i != 8; i++) {
> 		if ((i % 3) == 2)
> 			continue;
> 		if (!inc_hexchar(mac+18-i))
> 			break;
> 	}

Well, using binary + instead of subscription and reference certainly
looks better; as to the loop, it'd prolly make sense be it one byte
more to increment ;)

Anyway it should be fixed, no matter how.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com



More information about the openmoko-kernel mailing list