b43: N-PHY: partly implement SPUR workaround
[safe/jmp/linux-2.6] / drivers / net / smsc911x.c
index c266785..4d0d5c5 100644 (file)
@@ -748,8 +748,8 @@ static void smsc911x_phy_adjust_link(struct net_device *dev)
                         * usage is 10/100 indicator */
                        pdata->gpio_setting = smsc911x_reg_read(pdata,
                                GPIO_CFG);
-                       if ((pdata->gpio_setting & GPIO_CFG_LED1_EN_)
-                           && (!pdata->using_extphy)) {
+                       if ((pdata->gpio_setting & GPIO_CFG_LED1_EN_) &&
+                           (!pdata->using_extphy)) {
                                /* Force 10/100 LED off, after saving
                                 * orginal GPIO configuration */
                                pdata->gpio_orig_setting = pdata->gpio_setting;
@@ -986,7 +986,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget)
        struct net_device *dev = pdata->dev;
        int npackets = 0;
 
-       while (likely(netif_running(dev)) && (npackets < budget)) {
+       while (npackets < budget) {
                unsigned int pktlength;
                unsigned int pktwords;
                struct sk_buff *skb;
@@ -1047,7 +1047,6 @@ static int smsc911x_poll(struct napi_struct *napi, int budget)
                /* Update counters */
                dev->stats.rx_packets++;
                dev->stats.rx_bytes += (pktlength - 4);
-               dev->last_rx = jiffies;
        }
 
        /* Return total received packets */
@@ -2072,6 +2071,9 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
        if (is_valid_ether_addr(dev->dev_addr)) {
                smsc911x_set_hw_mac_address(pdata, dev->dev_addr);
                SMSC_TRACE(PROBE, "MAC Address is specified by configuration");
+       } else if (is_valid_ether_addr(pdata->config.mac)) {
+               memcpy(dev->dev_addr, pdata->config.mac, 6);
+               SMSC_TRACE(PROBE, "MAC Address specified by platform data");
        } else {
                /* Try reading mac address from device. if EEPROM is present
                 * it will already have been set */