> -----Original Message----- > From: John Crispin [mailto:blo...@openwrt.org] > Sent: Thursday, July 09, 2015 8:42 AM > To: Guenther Kelleter; openwrt-devel@lists.openwrt.org > Subject: Re: [OpenWrt-Devel] [PATCH v3 7/7] ar71xx: add support for the devolo > dLAN pro 1200+ WiFi ac > > Hi, > > this function seem to be overly complicated. do you really need this ?
No not really. Now I see that I can use ath79_init_mac instead. Günther > > John > > On 07/07/2015 14:58, Günther Kelleter wrote: > > +static void inc_mac_addr(u8 *base_mac, u8 *dst_mac, u8 inc) { > > + u32 tmp = 0; > > + char index = 6; > > + > > + tmp = base_mac[5] + inc; > > + while ((tmp > 255) && (index > 0)) { > > + dst_mac[index-1] = tmp - 256; > > + index--; > > + tmp = base_mac[index-1] + 1; > > + } > > + > > + dst_mac[index-1] = tmp; > > + index--; > > + > > + while (index > 0) { > > + dst_mac[index-1] = base_mac[index-1]; > > + index--; > > + } > > +} _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel