ar71xx: ag71xx: simplify register access functions
[openwrt.git] / target / linux / ar71xx / files / drivers / net / ag71xx / ag71xx_main.c
index 884366f..a8be41b 100644 (file)
@@ -390,7 +390,12 @@ static void ag71xx_hw_init(struct ag71xx *ag)
        mdelay(100);
 
        /* setup MAC configuration registers */
-       ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_INIT);
+       if (pdata->is_ar724x)
+               ag71xx_wr(ag, AG71XX_REG_MAC_CFG1,
+                         MAC_CFG1_INIT | MAC_CFG1_TFC | MAC_CFG1_RFC);
+       else
+               ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_INIT);
+
        ag71xx_sb(ag, AG71XX_REG_MAC_CFG2,
                  MAC_CFG2_PAD_CRC_EN | MAC_CFG2_LEN_CHECK);
 
@@ -486,7 +491,8 @@ static int ag71xx_stop(struct net_device *dev)
        return 0;
 }
 
-static int ag71xx_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ag71xx_hard_start_xmit(struct sk_buff *skb,
+                                         struct net_device *dev)
 {
        struct ag71xx *ag = netdev_priv(dev);
        struct ag71xx_ring *ring = &ag->tx_ring;
@@ -530,13 +536,13 @@ static int ag71xx_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        dev->trans_start = jiffies;
 
-       return 0;
+       return NETDEV_TX_OK;
 
  err_drop:
        dev->stats.tx_dropped++;
 
        dev_kfree_skb(skb);
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 static int ag71xx_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
This page took 0.027731 seconds and 4 git commands to generate.