[brcm63xx] Add wps button on alice gate
[openwrt.git] / target / linux / ar7 / patches-2.6.32 / 971-cpmac_cleanup.patch
1 --- a/drivers/net/cpmac.c
2 +++ b/drivers/net/cpmac.c
3 @@ -33,7 +33,6 @@
4 #include <linux/skbuff.h>
5 #include <linux/mii.h>
6 #include <linux/phy.h>
7 -#include <linux/phy_fixed.h>
8 #include <linux/platform_device.h>
9 #include <linux/dma-mapping.h>
10 #include <asm/gpio.h>
11 @@ -1104,8 +1103,6 @@ static const struct net_device_ops cpmac
12 .ndo_set_mac_address = eth_mac_addr,
13 };
14
15 -static int external_switch;
16 -
17 static int __devinit cpmac_probe(struct platform_device *pdev)
18 {
19 int rc, phy_id;
20 @@ -1127,10 +1124,8 @@ static int __devinit cpmac_probe(struct
21 }
22
23 if (phy_id == PHY_MAX_ADDR) {
24 - //This probably wont work as no fixed bus anymore.
25 - dev_err(&pdev->dev, "no PHY present, falling back to switch mode\n");
26 - strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
27 - phy_id = pdev->id;
28 + dev_err(&pdev->dev, "no PHY present\n");
29 + return -ENODEV;
30 }
31
32 dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
33 @@ -1258,14 +1253,8 @@ int __devinit cpmac_init(void)
34 else
35 msleep(10);
36
37 - mask &= 0x7fffffff;
38 - if (mask & (mask - 1)) {
39 - external_switch = 1;
40 - mask = 0;
41 - }
42 -
43 cpmac_mii->phy_mask = ar7_is_titan()? ~(mask | 0x80000000 | 0x40000000):
44 - ~(mask | 0x80000001);
45 + ~(mask | 0x80000000);
46 snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "1");
47
48 res = mdiobus_register(cpmac_mii);
This page took 0.047185 seconds and 5 git commands to generate.