1 diff -Nur linux-2.6.19.2/drivers/net/ixp4xx/mac_driver.c linux-2.6.19.2-owrt/drivers/net/ixp4xx/mac_driver.c
2 --- linux-2.6.19.2/drivers/net/ixp4xx/mac_driver.c 2007-04-15 14:26:54.000000000 +0200
3 +++ linux-2.6.19.2-owrt/drivers/net/ixp4xx/mac_driver.c 2007-04-15 14:33:44.000000000 +0200
6 struct mac_info *mac = netdev_priv(dev);
8 + if ( mac->mii.phy_id < 0 ) {
10 + netif_carrier_on(mac->mii.dev);
11 + mac->mii.full_duplex = 1;
12 + update_duplex_mode(dev);
18 if (mii_check_media(&mac->mii, netif_msg_link(mac), init)) {
19 update_duplex_mode(dev);
23 if (!try_module_get(THIS_MODULE))
25 - rc = generic_mii_ioctl(&mac->mii, if_mii(rq), cmd, &duplex_changed);
26 + if ( mac->mii.phy_id < 0 ) {
30 + rc = generic_mii_ioctl(&mac->mii, if_mii(rq), cmd, &duplex_changed);
32 module_put(THIS_MODULE);
34 update_duplex_mode(dev);
36 static int ixmac_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
38 struct mac_info *mac = netdev_priv(dev);
39 + if ( mac->mii.phy_id < 0 ) {
42 mii_ethtool_gset(&mac->mii, cmd);
47 struct mac_info *mac = netdev_priv(dev);
49 + if ( mac->mii.phy_id < 0 ) {
52 rc = mii_ethtool_sset(&mac->mii, cmd);
56 static int ixmac_nway_reset(struct net_device *dev)
58 struct mac_info *mac = netdev_priv(dev);
59 + if ( mac->mii.phy_id < 0 ) {
62 return mii_nway_restart(&mac->mii);
65 static u32 ixmac_get_link(struct net_device *dev)
67 struct mac_info *mac = netdev_priv(dev);
68 + if ( mac->mii.phy_id < 0 ) {
71 return mii_link_ok(&mac->mii);