Keep enetaddr and mac hw address in sync.
In default config mismatch in received frame
dest address and mac hw address results
in drop of unicast frames.
This patch will be reverted when mainline version
fix this in the core that's why it is just temporary
solution for now.
http://lists.denx.de/pipermail/u-boot/2015-March/208211.html
Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
writel(ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED100, ®s->nwcfg);
#endif
+ /* set hardware address because of ... */
+ if (!is_valid_ether_addr(dev->enetaddr)) {
+ printf("%s: mac address is not valid\n", dev->name);
+ return -1;
+ }
+
+ zynq_gem_setup_mac(dev);
+
setbits_le32(®s->nwctrl, ZYNQ_GEM_NWCTRL_RXEN_MASK |
ZYNQ_GEM_NWCTRL_TXEN_MASK);