Skip to content

Commit 1635953

Browse files
committed
hostap: don't use flush_scheduled_work()
flush_scheduled_work() is on its way out. Drop flush_scheduled_work() from prism2_free_local_data() and replace it with explicit flushing of work items on the respective free functions. Work items in ap_data are flushed from hostap_free_data() and the ones in local_info from prism2_free_local_data(). Flush is used instead of cancel as some process and free items from queue. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jes Sorensen <jes@trained-monkey.org> Cc: netdev@vger.kernel.org
1 parent 781ba45 commit 1635953

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎drivers/net/wireless/hostap/hostap_ap.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,10 @@ void hostap_free_data(struct ap_data *ap)
858858
return;
859859
}
860860

861+
flush_work_sync(&ap->add_sta_proc_queue);
862+
861863
#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
864+
flush_work_sync(&ap->wds_oper_queue);
862865
if (ap->crypt)
863866
ap->crypt->deinit(ap->crypt_priv);
864867
ap->crypt = ap->crypt_priv = NULL;

‎drivers/net/wireless/hostap/hostap_hw.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3317,7 +3317,13 @@ static void prism2_free_local_data(struct net_device *dev)
33173317

33183318
unregister_netdev(local->dev);
33193319

3320-
flush_scheduled_work();
3320+
flush_work_sync(&local->reset_queue);
3321+
flush_work_sync(&local->set_multicast_list_queue);
3322+
flush_work_sync(&local->set_tim_queue);
3323+
#ifndef PRISM2_NO_STATION_MODES
3324+
flush_work_sync(&local->info_queue);
3325+
#endif
3326+
flush_work_sync(&local->comms_qual_update);
33213327

33223328
lib80211_crypt_info_free(&local->crypt_info);
33233329

0 commit comments

Comments
 (0)