]> git.baikalelectronics.ru Git - kernel.git/commit
rtnetlink: add alloc() method to rtnl_link_ops
authorJohannes Berg <johannes.berg@intel.com>
Sat, 12 Jun 2021 08:20:54 +0000 (10:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Jun 2021 20:16:45 +0000 (13:16 -0700)
commit42e00caa07c1cc559d6550be3feca2c0bf1ba5fd
tree0e1fd314f469a3ddadf83411fc74df9ca35ff8b4
parent3df61b1c1aa6c9d9fdc04ab725ad2c9d646a635b
rtnetlink: add alloc() method to rtnl_link_ops

In order to make rtnetlink ops that can create different
kinds of devices, like what we want to add to the WWAN
framework, the priv_size and setup parameters aren't quite
sufficient. Make this easier to manage by allowing ops to
allocate their own netdev via an @alloc method that gets
the tb netlink data.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/rtnetlink.h
net/core/rtnetlink.c