OSDN Git Service

net: dsa: remove copy of master ethtool_ops
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 19 Sep 2017 15:56:57 +0000 (11:56 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Sep 2017 23:04:22 +0000 (16:04 -0700)
commitf5619866592c65adc087364cc1a3ba709201ea26
treeec738ec423be6543161bb9a81accb6a075b75fc8
parent69e33b2754ea4fbe4fdd2d18bc8ca05d8670a5c2
net: dsa: remove copy of master ethtool_ops

There is no need to store a copy of the master ethtool ops, storing the
original pointer in DSA and the new one in the master netdev itself is
enough.

In the meantime, set orig_ethtool_ops to NULL when restoring the master
ethtool ops and check the presence of the master original ethtool ops as
well as its needed functions before calling them.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/dsa.c
net/dsa/slave.c