From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Tue, 30 Aug 2011 11:31:13 -0400 Subject: [U-Boot] [PATCH v4 1/3] net: Adds Fast Ethernet Controller driver for Armada100 In-Reply-To: <1314683083-2473-1-git-send-email-ajay.bhargav@einfochips.com> References: <1314683083-2473-1-git-send-email-ajay.bhargav@einfochips.com> Message-ID: <201108301131.14723.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, August 30, 2011 01:44:40 Ajay Bhargav wrote: > +static void update_hash_table_mac_address(struct armdfec_device *darmdfec, > + u8 *oaddr, u8 *addr) > +{ > + u32 mach; > + u32 macl; > + > + /* Delete old entry */ > + if (oaddr) { > + mach = (oaddr[0] << 8) | oaddr[1]; > + macl = (oaddr[2] << 24) | (oaddr[3] << 16) | > + (oaddr[4] << 8) | oaddr[5]; > + add_del_hash_entry(darmdfec, mach, macl, 1, 0, HASH_DELETE); > + } > + > + /* Add new entry */ > + mach = (addr[0] << 8) | addr[1]; > + macl = (addr[2] << 24) | (addr[3] << 16) | (addr[4] << 8) | addr[5]; > + add_del_hash_entry(darmdfec, mach, macl, 1, 0, HASH_ADD); > +} > ... > +static int armdfec_init(struct eth_device *dev, bd_t *bd) > +{ > ... > + update_hash_table_mac_address(darmdfec, dev->enetaddr, dev->enetaddr); i think something got lost along the way here :) you'll probably want to have oaddr[] be a static local in update_hash_table_mac_address and use that to delete the old one when it differs from the new one, and then copy the new one into the static local. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110830/c5636d6f/attachment.pgp