[ar71xx] ethernet driver preparation for gigabit support
authorGabor Juhos <juhosg@openwrt.org>
Mon, 24 Nov 2008 16:56:36 +0000 (16:56 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Mon, 24 Nov 2008 16:56:36 +0000 (16:56 +0000)
SVN-Revision: 13340

target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c
target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/platform.h

index 3e15e33e0d86e7e17a7fca2af11100830b42baa0..f7865523c345bc0871353569cb35c544836a7b3e 100644 (file)
@@ -37,7 +37,7 @@
 #define ETH_FCS_LEN    4
 
 #define AG71XX_DRV_NAME                "ag71xx"
 #define ETH_FCS_LEN    4
 
 #define AG71XX_DRV_NAME                "ag71xx"
-#define AG71XX_DRV_VERSION     "0.4.3"
+#define AG71XX_DRV_VERSION     "0.4.4"
 
 #define AG71XX_NAPI_TX         1
 
 
 #define AG71XX_NAPI_TX         1
 
index 72428684622b7ca79c9513e5a02fa9d08d08d77b..8728c7c7b974bf6d8bb72d1f3e19f1d7ef584ac6 100644 (file)
@@ -255,13 +255,10 @@ int ag71xx_phy_connect(struct ag71xx *ag)
                }
 
                /* mask with MAC supported features */
                }
 
                /* mask with MAC supported features */
-               phydev->supported &= (SUPPORTED_10baseT_Half
-                       | SUPPORTED_10baseT_Full
-                       | SUPPORTED_100baseT_Half
-                       | SUPPORTED_100baseT_Full
-                       | SUPPORTED_Autoneg
-                       | SUPPORTED_MII
-                       | SUPPORTED_TP);
+               if (pdata->has_gbit)
+                       phydev->supported &= PHY_GBIT_FEATURES;
+               else
+                       phydev->supported &= PHY_BASIC_FEATURES;
 
                phydev->advertising = phydev->supported;
 
 
                phydev->advertising = phydev->supported;
 
index 53ac555c7be0cebaaaa7b4804c2a37f91e1c84b0..f845c42f30942e3303ad1909ac34b2dcc6fc766a 100644 (file)
@@ -28,6 +28,8 @@ struct ag71xx_platform_data {
        u32             flush_reg;
        u32             mii_if;
        u8              mac_addr[ETH_ALEN];
        u32             flush_reg;
        u32             mii_if;
        u8              mac_addr[ETH_ALEN];
+
+       u8              has_gbit:1;
 };
 
 struct ag71xx_mdio_platform_data {
 };
 
 struct ag71xx_mdio_platform_data {