Skip to content

Commit

Permalink
wl12xx: clear wl->vif on remove_interface
Browse files Browse the repository at this point in the history
wl->vif should be cleared on remove_interface()
(rather than on stop()) even when only a single
vif is supported, because during vif mode change
stop() might not get called (e.g. because of
monitor interface existence)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Nov 8, 2011
1 parent fa5e137 commit 2f8e81a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,6 @@ static void wl1271_op_stop(struct ieee80211_hw *hw)
wl->tx_results_count = 0;
wl->tx_packets_count = 0;
wl->time_offset = 0;
wl->vif = NULL;
wl->tx_spare_blocks = TX_HW_BLOCK_SPARE_DEFAULT;
wl->ap_fw_ps_map = 0;
wl->ap_ps_map = 0;
Expand Down Expand Up @@ -2211,6 +2210,8 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
if (!test_and_clear_bit(WLVIF_FLAG_INITIALIZED, &wlvif->flags))
return;

wl->vif = NULL;

/* because of hardware recovery, we may get here twice */
if (wl->state != WL1271_STATE_ON)
return;
Expand Down

0 comments on commit 2f8e81a

Please sign in to comment.