OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 10... Line 10...
10 * under the terms of the GNU General Public License version 2 as published 10 * under the terms of the GNU General Public License version 2 as published
11 * by the Free Software Foundation. 11 * by the Free Software Foundation.
12 */ 12 */
Line 13... Line 13...
13   13  
14 #include "ag71xx.h" -  
Line 15... Line 14...
15 #include <linux/version.h> 14 #include "ag71xx.h"
16   15  
17 static int ag71xx_ethtool_get_settings(struct net_device *dev, 16 static int ag71xx_ethtool_get_settings(struct net_device *dev,
18 struct ethtool_cmd *cmd) 17 struct ethtool_cmd *cmd)
19 { 18 {
Line 20... Line 19...
20 struct ag71xx *ag = netdev_priv(dev); 19 struct ag71xx *ag = netdev_priv(dev);
21 struct phy_device *phydev = ag->phy_dev; 20 struct phy_device *phydev = ag->phy_dev;
Line 22... Line -...
22   -  
23 if (!phydev) 21  
24 return -ENODEV; -  
25   -  
26 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) -  
27 return phy_ethtool_gset(phydev, cmd); 22 if (!phydev)
Line 28... Line 23...
28 #else 23 return -ENODEV;
29 return phy_ethtool_ioctl(phydev, cmd); 24  
30 #endif 25 return phy_ethtool_gset(phydev, cmd);
Line 37... Line 32...
37 struct phy_device *phydev = ag->phy_dev; 32 struct phy_device *phydev = ag->phy_dev;
Line 38... Line 33...
38   33  
39 if (!phydev) 34 if (!phydev)
Line 40... Line -...
40 return -ENODEV; -  
41   35 return -ENODEV;
42 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) -  
43 return phy_ethtool_sset(phydev, cmd); -  
44 #else -  
45 return phy_ethtool_ioctl(phydev, cmd); 36  
Line 46... Line 37...
46 #endif 37 return phy_ethtool_sset(phydev, cmd);
47 } 38 }
48   39