mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
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 <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38744 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -128,7 +128,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user