fix wep encryption setting for madwifi
[openwrt.git] / target / linux / ixp4xx-2.6 / patches / 133-ixp4xx_net_driver_improve_mac_handling.patch
1 diff -Naupr a/drivers/net/ixp4xx/mac_driver.c b/drivers/net/ixp4xx/mac_driver.c
2 --- a/drivers/net/ixp4xx/mac_driver.c 2007-01-12 21:54:40.000000000 -0700
3 +++ b/drivers/net/ixp4xx/mac_driver.c 2007-01-12 22:27:18.000000000 -0700
4 @@ -350,6 +350,16 @@ static int ixmac_open (struct net_device
5 mac->npe_stat_num = i<NPE_STAT_NUM ? NPE_STAT_NUM_BASE : NPE_STAT_NUM;
6 mac->npe_stat_num += NPE_Q_STAT_NUM;
7
8 + /* Only use platform or random if there's currently no device hw addr */
9 + if (is_zero_ether_addr(dev->dev_addr)) {
10 + if (is_zero_ether_addr(mac->plat->hwaddr)) {
11 + random_ether_addr(dev->dev_addr);
12 + dev->dev_addr[5] = mac->plat->phy_id;
13 + }
14 + else
15 + memcpy(dev->dev_addr, mac->plat->hwaddr, 6);
16 + }
17 +
18 mac_set_uniaddr(dev);
19 media_check(dev, 1);
20 ixmac_set_rx_mode(dev);
21 @@ -691,20 +701,6 @@ static int mac_probe(struct platform_dev
22
23 INIT_WORK(&mac->mdio_thread, mac_mdio_thread, dev);
24
25 - /* The place of the MAC address is very system dependent.
26 - * Here we use a random one to be replaced by one of the
27 - * following commands:
28 - * "ip link set address 02:03:04:04:04:01 dev eth0"
29 - * "ifconfig eth0 hw ether 02:03:04:04:04:07"
30 - */
31 -
32 - if (is_zero_ether_addr(plat->hwaddr)) {
33 - random_ether_addr(dev->dev_addr);
34 - dev->dev_addr[5] = plat->phy_id;
35 - }
36 - else
37 - memcpy(dev->dev_addr, plat->hwaddr, 6);
38 -
39 printk(KERN_INFO IXMAC_NAME " driver " IXMAC_VERSION
40 ": %s on %s with PHY[%d] initialized\n",
41 dev->name, npe->plat->name, plat->phy_id);
This page took 0.052829 seconds and 5 git commands to generate.