From: Hauke Mehrtens Date: Mon, 11 Nov 2013 21:23:29 +0000 (+0000) Subject: brcm47xx: b44: fix logic in BUG_ON() X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=b6e9b377bf0c664e3336269403cd6d89fcf95629 brcm47xx: b44: fix logic in BUG_ON() It is a problem when phydev is not set at this position and not the other way around. Signed-off-by: Hauke Mehrtens SVN-Revision: 38744 --- diff --git a/target/linux/brcm47xx/patches-3.10/205-b44-add-phylib-support.patch b/target/linux/brcm47xx/patches-3.10/205-b44-add-phylib-support.patch index 2386fbe9a3..8c7ba9ccff 100644 --- a/target/linux/brcm47xx/patches-3.10/205-b44-add-phylib-support.patch +++ b/target/linux/brcm47xx/patches-3.10/205-b44-add-phylib-support.patch @@ -128,7 +128,7 @@ Signed-off-by: Hauke Mehrtens spin_lock_irq(&bp->lock); - err = generic_mii_ioctl(&bp->mii_if, data, cmd, NULL); + if (bp->flags & B44_FLAG_EXTERNAL_PHY) { -+ BUG_ON(bp->phydev); ++ BUG_ON(!bp->phydev); + err = phy_mii_ioctl(bp->phydev, ifr, cmd); + } else { + err = generic_mii_ioctl(&bp->mii_if, if_mii(ifr), cmd, NULL);