OSDN Git Service

net: dsa: Setup dsa_netdev_ops
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 20 Jul 2020 03:49:54 +0000 (20:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jul 2020 23:48:22 +0000 (16:48 -0700)
commit9c0c7014f38206a2b63e7e832edf2e881a7b49ad
treec0624b765dec69ddd84fda731835322feaca29b7
parent3369afba1e46b0f7f33b4853a9d06616be6e22d5
net: dsa: Setup dsa_netdev_ops

Now that we have all the infrastructure in place for calling into the
dsa_ptr->netdev_ops function pointers, install them when we configure
the DSA CPU/management interface and tear them down. The flow is
unchanged from before, but now we preserve equality of tests when
network device drivers do tests like dev->netdev_ops == &foo_ops which
was not the case before since we were allocating an entirely new
structure.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/master.c