aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-12-28 01:21:03 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-12-28 01:21:03 +0000
commit8d7505ad14c9a718d041b6d3711f716b86986b13 (patch)
tree11c272ad00ff7532e11cf0b9be7b26fc244a36d7 /target
parentab812522e48014dc1c9b58edf47ccf2542b304de (diff)
downloadupstream-8d7505ad14c9a718d041b6d3711f716b86986b13.tar.gz
upstream-8d7505ad14c9a718d041b6d3711f716b86986b13.tar.bz2
upstream-8d7505ad14c9a718d041b6d3711f716b86986b13.zip
atheros: instead of resetting the ethernet core on ifup, only upload the new mac address. fixes a tx regression on various devices
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13753 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/atheros/files/drivers/net/ar2313/ar2313.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/target/linux/atheros/files/drivers/net/ar2313/ar2313.c b/target/linux/atheros/files/drivers/net/ar2313/ar2313.c
index 995325a913..727d190b37 100644
--- a/target/linux/atheros/files/drivers/net/ar2313/ar2313.c
+++ b/target/linux/atheros/files/drivers/net/ar2313/ar2313.c
@@ -1120,9 +1120,21 @@ static irqreturn_t ar2313_interrupt(int irq, void *dev_id)
static int ar2313_open(struct net_device *dev)
{
struct ar2313_private *sp = netdev_priv(dev);
+ unsigned int ethsal, ethsah;
/* reset the hardware, in case the MAC address changed */
- ar2313_reset_reg(dev);
+ ethsah = ((((u_int) (dev->dev_addr[5]) << 8) & (u_int) 0x0000FF00) |
+ (((u_int) (dev->dev_addr[4]) << 0) & (u_int) 0x000000FF));
+
+ ethsal = ((((u_int) (dev->dev_addr[3]) << 24) & (u_int) 0xFF000000) |
+ (((u_int) (dev->dev_addr[2]) << 16) & (u_int) 0x00FF0000) |
+ (((u_int) (dev->dev_addr[1]) << 8) & (u_int) 0x0000FF00) |
+ (((u_int) (dev->dev_addr[0]) << 0) & (u_int) 0x000000FF));
+
+ sp->eth_regs->mac_addr[0] = ethsah;
+ sp->eth_regs->mac_addr[1] = ethsal;
+
+ mdelay(10);
dev->mtu = 1500;
netif_start_queue(dev);