ar71xx: ag71xx: fix mii_bus_dev sanity check
[librecmc/librecmc.git] / target / linux / ar71xx / files / drivers / net / ethernet / atheros / ag71xx / ag71xx_main.c
index fb99d272816c7eaa169a5b9ca21cdebec1b92f49..6dadf94a40259666516fe8c743cee15d9f045085 100644 (file)
@@ -891,7 +891,7 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
                dev->stats.rx_packets++;
                dev->stats.rx_bytes += pktlen;
 
-               skb = build_skb(ring->buf[i].rx_buf);
+               skb = build_skb(ring->buf[i].rx_buf, 0);
                if (!skb) {
                        kfree(ring->buf[i].rx_buf);
                        goto next;
@@ -1071,7 +1071,7 @@ static int __devinit ag71xx_probe(struct platform_device *pdev)
                goto err_out;
        }
 
-       if (pdata->mii_bus_dev == NULL) {
+       if (pdata->mii_bus_dev == NULL && pdata->phy_mask) {
                dev_err(&pdev->dev, "no MII bus device specified\n");
                err = -EINVAL;
                goto err_out;