• Jason Gunthorpe's avatar
    IB/ipoib: Move init code to ndo_init · eaeb3984
    Jason Gunthorpe authored
    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: default avatarJason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
    eaeb3984
ipoib_netlink.c 4.94 KB