IB/ipoib: Move init code to ndo_init
Now that we have a proper ndo_uninit, move code that naturally pairs with the ndo_uninit into ndo_init. This allows the netdev core to natually handle ordering. This fixes the situation where register_netdev can fail before calling ndo_init, in which case it wouldn't call ndo_uninit either. Also move a bunch of duplicated init code that is shared between child and parent for clarity. Now the child and parent register functions look very similar. Signed-off-by:Jason Gunthorpe <jgg@mellanox.com> Signed-off-by:
Leon Romanovsky <leonro@mellanox.com>
Showing
- drivers/infiniband/ulp/ipoib/ipoib.h 0 additions, 3 deletionsdrivers/infiniband/ulp/ipoib/ipoib.h
- drivers/infiniband/ulp/ipoib/ipoib_main.c 111 additions, 82 deletionsdrivers/infiniband/ulp/ipoib/ipoib_main.c
- drivers/infiniband/ulp/ipoib/ipoib_netlink.c 0 additions, 6 deletionsdrivers/infiniband/ulp/ipoib/ipoib_netlink.c
- drivers/infiniband/ulp/ipoib/ipoib_vlan.c 3 additions, 28 deletionsdrivers/infiniband/ulp/ipoib/ipoib_vlan.c
Loading
Please register or sign in to comment