• Brian Norris's avatar
    mwifiex: reunite copy-and-pasted remove/reset code · b6658b66
    Brian Norris authored
    When PCIe FLR code was added, it explicitly copy-and-pasted much of
    mwifiex_remove_card() into mwifiex_shutdown_sw(). This is unnecessary,
    as almost all of the code should be reused.
    
    Let's reunite what we can for now.
    
    The only functional changes for now:
    
     * call netif_device_detach() in the remove() code path -- this wasn't
       done before, but it really should be a no-op, when the device is
       getting totally unregistered soon anyway
    
     * call the ->down_dev() driver callback only after we've finished all
       SW teardown -- this should have no significant effect, since the only
       user (pcie.c) does very minimal work there, and it doesn't matter
       that we reorder this
    Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    b6658b66
main.c 47.7 KB