diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-10-25 19:34:20 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 12:58:52 +0200 |
commit | 990bd9151927ad55c7e3da3b05cf13ecfe7a31bf (patch) | |
tree | 18c730d33aea2b373b1ddb8c638220f1bd32dd92 /drivers/net/wireless/ath/ath6kl/init.c | |
parent | 478ac0272154023abb813db7ae12dc380caeb68e (diff) |
ath6kl: Maintain virtual interface in a list
This patch removes all references to ar->vif and takes
vif from a list.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 99e4a494143c..61a941db17a5 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c @@ -1628,11 +1628,7 @@ static void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready) void ath6kl_stop_txrx(struct ath6kl *ar) { - struct ath6kl_vif *vif = ar->vif; - struct net_device *ndev = vif->ndev; - - if (!ndev) - return; + struct ath6kl_vif *vif, *tmp_vif; set_bit(DESTROY_IN_PROGRESS, &ar->flag); @@ -1641,7 +1637,14 @@ void ath6kl_stop_txrx(struct ath6kl *ar) return; } - ath6kl_cleanup_vif(ar->vif, test_bit(WMI_READY, &ar->flag)); + spin_lock(&ar->list_lock); + list_for_each_entry_safe(vif, tmp_vif, &ar->vif_list, list) { + list_del(&vif->list); + spin_unlock(&ar->list_lock); + ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); + spin_lock(&ar->list_lock); + } + spin_unlock(&ar->list_lock); clear_bit(WMI_READY, &ar->flag); |