From: Hauke Mehrtens Date: Sat, 18 Jan 2014 23:41:38 +0000 (+0100) Subject: backports: fix header of phy_mii_ioctl() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ed058e9c27b8c188f182ce8594e98195aa700e1f;p=openwrt%2Fstaging%2Fblogic.git backports: fix header of phy_mii_ioctl() On kernel versions < 2.6.36 phy_mii_ioctl() gets struct mii_ioctl_data as second parameter and on more recent kernel versions it takes struct ifreq. This patch converts one version to the other. Signed-off-by: Hauke Mehrtens --- diff --git a/backport/backport-include/linux/phy.h b/backport/backport-include/linux/phy.h index 4473e4ed9bbf..ff2aacf16b04 100644 --- a/backport/backport-include/linux/phy.h +++ b/backport/backport-include/linux/phy.h @@ -8,4 +8,14 @@ phy_connect(dev, bus_id, handler, 0, interface) #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) +#include +static inline int backport_phy_mii_ioctl(struct phy_device *phydev, + struct ifreq *ifr, int cmd) +{ + return phy_mii_ioctl(phydev, if_mii(ifr), cmd); +} +#define phy_mii_ioctl LINUX_BACKPORT(phy_mii_ioctl) +#endif + #endif /* __BACKPORT_LINUX_PHY_H */