1c3f1cc01a19926133c0fdfe848517c9283b40a6
[openwrt/staging/ansuel.git] /
1 From 4c4323084e9a67210c8d269dceba1be99356c414 Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Tue, 28 May 2019 10:57:18 +0100
4 Subject: [PATCH 606/660] net: phylink: remove netdev from phylink mii ioctl
5 emulation
6
7 The netdev used in the phylink ioctl emulation is never used, so let's
8 remove it.
9
10 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
11 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
14 ---
15 drivers/net/phy/phylink.c | 12 ++++--------
16 1 file changed, 4 insertions(+), 8 deletions(-)
17
18 --- a/drivers/net/phy/phylink.c
19 +++ b/drivers/net/phy/phylink.c
20 @@ -1360,8 +1360,8 @@ EXPORT_SYMBOL_GPL(phylink_ethtool_set_ee
21 *
22 * FIXME: should deal with negotiation state too.
23 */
24 -static int phylink_mii_emul_read(struct net_device *ndev, unsigned int reg,
25 - struct phylink_link_state *state, bool aneg)
26 +static int phylink_mii_emul_read(unsigned int reg,
27 + struct phylink_link_state *state)
28 {
29 struct fixed_phy_status fs;
30 int val;
31 @@ -1376,8 +1376,6 @@ static int phylink_mii_emul_read(struct
32 if (reg == MII_BMSR) {
33 if (!state->an_complete)
34 val &= ~BMSR_ANEGCOMPLETE;
35 - if (!aneg)
36 - val &= ~BMSR_ANEGCAPABLE;
37 }
38 return val;
39 }
40 @@ -1473,8 +1471,7 @@ static int phylink_mii_read(struct phyli
41 case MLO_AN_FIXED:
42 if (phy_id == 0) {
43 phylink_get_fixed_state(pl, &state);
44 - val = phylink_mii_emul_read(pl->netdev, reg, &state,
45 - true);
46 + val = phylink_mii_emul_read(reg, &state);
47 }
48 break;
49
50 @@ -1487,8 +1484,7 @@ static int phylink_mii_read(struct phyli
51 if (val < 0)
52 return val;
53
54 - val = phylink_mii_emul_read(pl->netdev, reg, &state,
55 - true);
56 + val = phylink_mii_emul_read(reg, &state);
57 }
58 break;
59 }