[OpenWrt-Devel] [PATCH v3 7/7] ar71xx: add support for the devolo dLAN pro 1200+ WiFi ac
John Crispin
blogic at openwrt.org
Thu Jul 9 02:41:47 EDT 2015
Hi,
this function seem to be overly complicated. do you really need this ?
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 at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list