wifi: cfg80211: add a work abstraction with special semantics
PATCH 1/3 wifi: cfg80211: add a work abstraction with special semantics
From: Johannes Berg <[email protected]>
[ Upstream commit a3ee4dc84c4e9d14cb34dad095fd678127aca5b6 ]
Add a work abstraction at the cfg80211 level that will always hold the wiphy_lock() for any work executed and therefore also can be canceled safely (without waiting) while holding that. This improves on what we do now as with the new wiphy works we don't have to worry about locking while cancelling them safely.
Also, don't let such works run while the device is suspended, since they'll likely need to interact with the device. Flush them before suspend though.
--- include/net/cfg80211.h | 95 ++++++++++++++++++++++++++++++-- net/wireless/core.c | 121 +++++++++++++++++++++++++++++++++++++++++ net/wireless/core.h | 7 +++ net/wireless/sysfs.c | 8 ++- 4 files changed, 226 insertions(+), 5 deletions(-)
include/net/cfg80211.h +91 -4
@@ -5301,12 +5301,17 @@ struct cfg80211_cqm_config;* wiphy_lock - lock the wiphy * @wiphy: the wiphy to lock * -* This is mostly exposed so it can be done around registering and -* unregistering netdevs that aren't created through cfg80211 calls, -* since that requires locking in cfg80211 when the notifiers is -* called, but that cannot differentiate which way it's called. +* This is needed around registering and unregistering netdevs that +* aren't created through cfg80211 calls, since that requires locking +* in cfg80211 when the notifiers is called, but that cannot +* differentiate which way it's called. +* +* It can also be used by drivers for their own purposes. * * When cfg80211 ops are called, the wiphy is already locked. +* +* Note that this makes sure that no workers that have been queued +* with wiphy_queue_work() are running. */ static inline void wiphy_lock(struct wiphy *wiphy) __acquires(&wiphy->mtx)
@@ -5326,6 +5331,88 @@ static inline void wiphy_unlock(struct wiphy *wiphy)mutex_unlock (&wiphy->mtx); } +struct wiphy_work ; +typedef void (*wiphy_work_func_t )(struct wiphy *,struct wiphy_work *); + +struct wiphy_work { +struct list_head entry; +wiphy_work_func_t func; +}; + +static inline void wiphy_work_init (struct wiphy_work *work, +wiphy_work_func_t func) +{ +INIT_LIST_HEAD (&work->entry); + work->func = func; +} + +/** +* wiphy_work_queue - queue work for the wiphy +* @wiphy: the wiphy to queue for +* @work: the work item +* +* This is useful for work that must be done asynchronously, and work +* queued here has the special property that the wiphy mutex will be +* held as if wiphy_lock() was called, and that it cannot be running +* after wiphy_lock() was called. Therefore, wiphy_cancel_work() can +* use just cancel_work() instead of cancel_work_sync(), it requires +* being in a section protected by wiphy_lock(). +*/ +void wiphy_work_queue (struct wiphy *wiphy,struct wiphy_work *work); + +/** +* wiphy_work_cancel - cancel previously queued work +* @wiphy: the wiphy, for debug purposes +* @work: the work to cancel +* +* Cancel the work *without* waiting for it, this assumes being +* called under the wiphy mutex acquired by wiphy_lock(). +*/ +void wiphy_work_cancel (struct wiphy *wiphy,struct wiphy_work *work); + +struct wiphy_delayed_work { +struct wiphy_work work; +struct wiphy *wiphy; +struct timer_list timer; +}; + +void wiphy_delayed_work_timer (struct timer_list *t); + +static inline void wiphy_delayed_work_init (struct wiphy_delayed_work *dwork, +wiphy_work_func_t func) +{ +timer_setup (&dwork->timer, wiphy_delayed_work_timer,0 ); +wiphy_work_init (&dwork->work, func); +} + +/** +* wiphy_delayed_work_queue - queue delayed work for the wiphy +* @wiphy: the wiphy to queue for +* @dwork: the delayable worker +* @delay: number of jiffies to wait before queueing +* +* This is useful for work that must be done asynchronously, and work +* queued here has the special property that the wiphy mutex will be +* held as if wiphy_lock() was called, and that it cannot be running +* after wiphy_lock() was called. Therefore, wiphy_cancel_work() can +* use just cancel_work() instead of cancel_work_sync(), it requires +* being in a section protected by wiphy_lock(). +*/ +void wiphy_delayed_work_queue (struct wiphy *wiphy, +struct wiphy_delayed_work *dwork, +unsigned long delay); + +/** +* wiphy_delayed_work_cancel - cancel previously queued delayed work +* @wiphy: the wiphy, for debug purposes +* @dwork: the delayed work to cancel +* +* Cancel the work *without* waiting for it, this assumes being +* called under the wiphy mutex acquired by wiphy_lock(). +*/ +void wiphy_delayed_work_cancel (struct wiphy *wiphy, +struct wiphy_delayed_work *dwork); +/** * struct wireless_dev - wireless device state *
net/wireless/core.c +121 -0
154 lines not on this page · raw message
net/wireless/core.h +7 -0
@@ -103,6 +103,12 @@ struct cfg80211_registered_device {/* lock for all wdev lists */ spinlock_t mgmt_registrations_lock; +struct work_struct wiphy_work; +struct list_head wiphy_work_list; +/* protects the list above */ +spinlock_t wiphy_work_lock; +bool suspended; +/* must be last because of the way we do wiphy_priv(), * and it should at least be aligned to NETDEV_ALIGN */ struct wiphy wiphy__aligned(NETDEV_ALIGN) ;
@@ -457,6 +463,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, struct net_device *dev, enum nl80211_iftype ntype, struct vif_params *params);void cfg80211_process_rdev_events (struct cfg80211_registered_device *rdev); +void cfg80211_process_wiphy_works (struct cfg80211_registered_device *rdev);void cfg80211_process_wdev_events (struct wireless_dev *wdev); bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range,
net/wireless/sysfs.c +7 -1
@@ -5,7 +5,7 @@* * Copyright 2005-2006 Jiri Benc <[email protected]> * Copyright 2006 Johannes Berg <[email protected]> -* Copyright (C) 2020-2021 Intel Corporation +* Copyright (C) 2020-2021, 2023 Intel Corporation */ #include <linux/device.h>
@@ -105,14 +105,18 @@ static int wiphy_suspend(struct device *dev)cfg80211_leave_all (rdev);cfg80211_process_rdev_events (rdev); } +cfg80211_process_wiphy_works (rdev);if (rdev->ops->suspend) ret =rdev_suspend (rdev, rdev->wiphy.wowlan_config);if (ret ==1 ) {/* Driver refuse to configure wowlan */ cfg80211_leave_all (rdev);cfg80211_process_rdev_events (rdev); +cfg80211_process_wiphy_works (rdev); ret =rdev_suspend (rdev,NULL ); } +if (ret ==0 ) + rdev->suspended = true; }wiphy_unlock (&rdev->wiphy);rtnl_unlock ();
@@ -132,6 +136,8 @@ static int wiphy_resume(struct device *dev)wiphy_lock (&rdev->wiphy);if (rdev->wiphy.registered && rdev->ops->resume) ret =rdev_resume (rdev); + rdev->suspended = false; +schedule_work (&rdev->wiphy_work);wiphy_unlock (&rdev->wiphy);if (ret)
Signature · 1 line
2.53.0.rc2.2.g2258446484
PATCH 2/3 wifi: mac80211: use wiphy work for sdata->work
From: Johannes Berg <[email protected]>
[ Upstream commit 16114496d684a3df4ce09f7c6b7557a8b2922795 ]
We'll need this later to convert other works that might be cancelled from here, so convert this one first.
--- net/mac80211/ibss.c | 8 ++++---- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/iface.c | 10 +++++----- net/mac80211/mesh.c | 10 +++++----- net/mac80211/mesh_hwmp.c | 6 +++--- net/mac80211/mlme.c | 6 +++--- net/mac80211/ocb.c | 6 +++--- net/mac80211/rx.c | 2 +- net/mac80211/scan.c | 2 +- net/mac80211/status.c | 5 +++-- net/mac80211/util.c | 2 +- 11 files changed, 30 insertions(+), 29 deletions(-)
net/mac80211/ibss.c +4 -4
@@ -746,7 +746,7 @@ static void ieee80211_csa_connection_drop_work(struct work_struct *work)skb_queue_purge (&sdata->skb_queue);/* trigger a scan to find another IBSS network to join */ -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work);sdata_unlock (sdata); }
@@ -1245,7 +1245,7 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata,spin_lock (&ifibss->incomplete_lock);list_add (&sta->list, &ifibss->incomplete_stations);spin_unlock (&ifibss->incomplete_lock); -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work); }static void ieee80211_ibss_sta_expire (struct ieee80211_sub_if_data *sdata)
@@ -1726,7 +1726,7 @@ static void ieee80211_ibss_timer(struct timer_list *t)struct ieee80211_sub_if_data *sdata =from_timer (sdata, t, u.ibss.timer); -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); }void ieee80211_ibss_setup_sdata (struct ieee80211_sub_if_data *sdata)
@@ -1861,7 +1861,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, sdata->needed_rx_chains = local->rx_chains; sdata->control_port_over_nl80211 = params->control_port_over_nl80211; -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work);return 0 ; }
net/mac80211/ieee80211_i.h +1 -1
@@ -966,7 +966,7 @@ struct ieee80211_sub_if_data {/* used to reconfigure hardware SM PS */ struct work_struct recalc_smps; -struct work_struct work; +struct wiphy_work work;struct sk_buff_head skb_queue;struct sk_buff_head status_queue;
net/mac80211/iface.c +5 -5
@@ -43,7 +43,7 @@* by either the RTNL, the iflist_mtx or RCU. */ -static void ieee80211_iface_work (struct work_struct *work); +static void ieee80211_iface_work (struct wiphy *wiphy,struct wiphy_work *work);bool __ieee80211_recalc_txpower (struct ieee80211_sub_if_data *sdata) {
@@ -539,7 +539,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_doRCU_INIT_POINTER (local->p2p_sdata,NULL ); fallthrough;default : -cancel_work_sync (&sdata->work); +wiphy_work_cancel (sdata->local->hw.wiphy, &sdata->work);/* * When we get here, the interface is marked down. * Free the remaining keys, if there are any
@@ -1005,7 +1005,7 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local)skb_queue_head_init (&sdata->skb_queue);skb_queue_head_init (&sdata->status_queue); -INIT_WORK (&sdata->work, ieee80211_iface_work); +wiphy_work_init (&sdata->work, ieee80211_iface_work);return 0 ; }
@@ -1487,7 +1487,7 @@ static void ieee80211_iface_process_status(struct ieee80211_sub_if_data *sdata, } } -static void ieee80211_iface_work (struct work_struct *work) +static void ieee80211_iface_work (struct wiphy *wiphy,struct wiphy_work *work) {struct ieee80211_sub_if_data *sdata = container_of(work, struct ieee80211_sub_if_data, work);
@@ -1590,7 +1590,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,skb_queue_head_init (&sdata->skb_queue);skb_queue_head_init (&sdata->status_queue); -INIT_WORK (&sdata->work, ieee80211_iface_work); +wiphy_work_init (&sdata->work, ieee80211_iface_work);INIT_WORK (&sdata->recalc_smps, ieee80211_recalc_smps_work);INIT_WORK (&sdata->csa_finalize_work, ieee80211_csa_finalize_work);INIT_WORK (&sdata->color_change_finalize_work, ieee80211_color_change_finalize_work);
net/mac80211/mesh.c +5 -5
@@ -44,7 +44,7 @@ static void ieee80211_mesh_housekeeping_timer(struct timer_list *t)set_bit (MESH_WORK_HOUSEKEEPING , &ifmsh->wrkq_flags); -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work); }/**
@@ -642,7 +642,7 @@ static void ieee80211_mesh_path_timer(struct timer_list *t)struct ieee80211_sub_if_data *sdata =from_timer (sdata, t, u.mesh.mesh_path_timer); -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); }static void ieee80211_mesh_path_root_timer (struct timer_list *t)
@@ -653,7 +653,7 @@ static void ieee80211_mesh_path_root_timer(struct timer_list *t)set_bit (MESH_WORK_ROOT , &ifmsh->wrkq_flags); -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); }void ieee80211_mesh_root_setup (struct ieee80211_if_mesh *ifmsh)
@@ -1018,7 +1018,7 @@ void ieee80211_mbss_info_change_notify(struct ieee80211_sub_if_data *sdata,for_each_set_bit (bit, &bits,sizeof (changed) *BITS_PER_BYTE )set_bit (bit, &ifmsh->mbss_changed);set_bit (MESH_WORK_MBSS_CHANGED , &ifmsh->wrkq_flags); -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); }int ieee80211_start_mesh (struct ieee80211_sub_if_data *sdata)
@@ -1043,7 +1043,7 @@ int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) ifmsh->sync_offset_clockdrift_max =0 ;set_bit (MESH_WORK_HOUSEKEEPING , &ifmsh->wrkq_flags);ieee80211_mesh_root_setup (ifmsh); -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work); sdata->vif.bss_conf.ht_operation_mode = ifmsh->mshcfg.ht_opmode; sdata->vif.bss_conf.enable_beacon = true;
net/mac80211/mesh_hwmp.c +3 -3
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2008, 2009 open80211s Ltd. -* Copyright (C) 2019, 2021 Intel Corporation +* Copyright (C) 2019, 2021-2023 Intel Corporation * Author: Luis Carlos Cobo <[email protected]> */
@@ -1020,14 +1020,14 @@ static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)spin_unlock_bh (&ifmsh->mesh_preq_queue_lock);if (time_after (jiffies, ifmsh->last_preq +min_preq_int_jiff (sdata))) -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work);else if (time_before (jiffies, ifmsh->last_preq)) {/* avoid long wait if did not send preqs for a long time * and jiffies wrapped around */ ifmsh->last_preq = jiffies -min_preq_int_jiff (sdata) -1 ; -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); }else mod_timer (&ifmsh->mesh_path_timer, ifmsh->last_preq +min_preq_int_jiff (sdata));
net/mac80211/mlme.c +3 -3
@@ -2509,7 +2509,7 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata, sdata->u.mgd.probe_send_count =0 ; else sdata->u.mgd.nullfunc_failed = true; -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); } static void ieee80211_mlme_send_probe_req(struct ieee80211_sub_if_data *sdata,
@@ -4415,7 +4415,7 @@ static void ieee80211_sta_timer(struct timer_list *t)struct ieee80211_sub_if_data *sdata =from_timer (sdata, t, u.mgd.timer); -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); } void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
@@ -4559,7 +4559,7 @@ void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata, sdata->u.mgd.status_acked = acked; sdata->u.mgd.status_received = true; -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work); }void ieee80211_sta_work (struct ieee80211_sub_if_data *sdata)
net/mac80211/ocb.c +3 -3
@@ -80,7 +80,7 @@ void ieee80211_ocb_rx_no_sta(struct ieee80211_sub_if_data *sdata,spin_lock (&ifocb->incomplete_lock);list_add (&sta->list, &ifocb->incomplete_stations);spin_unlock (&ifocb->incomplete_lock); -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work); }static struct sta_info *ieee80211_ocb_finish_sta (struct sta_info *sta)
@@ -156,7 +156,7 @@ static void ieee80211_ocb_housekeeping_timer(struct timer_list *t)set_bit (OCB_WORK_HOUSEKEEPING , &ifocb->wrkq_flags); -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work); }void ieee80211_ocb_setup_sdata (struct ieee80211_sub_if_data *sdata)
@@ -196,7 +196,7 @@ int ieee80211_ocb_join(struct ieee80211_sub_if_data *sdata, ifocb->joined = true;set_bit (OCB_WORK_HOUSEKEEPING , &ifocb->wrkq_flags); -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work);netif_carrier_on (sdata->dev);return 0 ;
net/mac80211/rx.c +1 -1
@@ -219,7 +219,7 @@ static void __ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) {skb_queue_tail (&sdata->skb_queue, skb); -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work);if (sta) sta->rx_stats.packets++; }
net/mac80211/scan.c +1 -1
@@ -498,7 +498,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)*/ list_for_each_entry_rcu (sdata, &local->interfaces, list) {if (ieee80211_sdata_running (sdata)) -ieee80211_queue_work (&sdata->local->hw, &sdata->work); +wiphy_work_queue (sdata->local->hw.wiphy, &sdata->work); }if (was_scanning)
net/mac80211/status.c +3 -2
@@ -5,6 +5,7 @@* Copyright 2006-2007 Jiri Benc <[email protected]> * Copyright 2008-2010 Johannes Berg <[email protected]> * Copyright 2013-2014 Intel Mobile Communications GmbH +* Copyright 2021-2023 Intel Corporation */ #include <linux/export.h>
@@ -716,8 +717,8 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local,if (qskb) {skb_queue_tail (&sdata->status_queue, qskb); -ieee80211_queue_work (&local->hw, - &sdata->work); +wiphy_work_queue (local->hw.wiphy, + &sdata->work); } } }else {
net/mac80211/util.c +1 -1
@@ -2679,7 +2679,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)/* Requeue all works */ list_for_each_entry (sdata, &local->interfaces, list) -ieee80211_queue_work (&local->hw, &sdata->work); +wiphy_work_queue (local->hw.wiphy, &sdata->work); } ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP,
Signature · 1 line
2.53.0.rc2.2.g2258446484
PATCH 3/3 wifi: mac80211: move TDLS work to wiphy work
In reply to Hanne-Lotta MäenpääFrom: Johannes Berg <[email protected]>
[ Upstream commit 777b26002b73127e81643d9286fadf3d41e0e477 ]
Again, to have the wiphy locked for it.
[ Summary of conflict resolutions:
- In mlme.c, move only tdls_peer_del_work
to wiphy work, and none the other works ]
--- net/mac80211/ieee80211_i.h | 4 ++-- net/mac80211/mlme.c | 7 ++++--- net/mac80211/tdls.c | 11 ++++++----- 3 files changed, 12 insertions(+), 10 deletions(-)
net/mac80211/ieee80211_i.h +2 -2
@@ -542,7 +542,7 @@ struct ieee80211_if_managed {/* TDLS support */ u8 tdls_peer[ETH_ALEN ]__aligned(2) ; -struct delayed_work tdls_peer_del_work; +struct wiphy_delayed_work tdls_peer_del_work;struct sk_buff *orig_teardown_skb;/* The original teardown skb */ struct sk_buff *teardown_skb;/* A copy to send through the AP */ spinlock_t teardown_lock;/* To lock changing teardown_skb */
@@ -2494,7 +2494,7 @@ int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, size_t extra_ies_len);int ieee80211_tdls_oper (struct wiphy *wiphy,struct net_device *dev,const u8 *peer,enum nl80211_tdls_operation oper); -void ieee80211_tdls_peer_del_work (struct work_struct *wk); +void ieee80211_tdls_peer_del_work (struct wiphy *wiphy,struct wiphy_work *wk);int ieee80211_tdls_channel_switch (struct wiphy *wiphy,struct net_device *dev,const u8 *addr,u8 oper_class,struct cfg80211_chan_def *chandef);
net/mac80211/mlme.c +4 -3
@@ -4890,8 +4890,8 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)INIT_WORK (&ifmgd->csa_connection_drop_work, ieee80211_csa_connection_drop_work);INIT_WORK (&ifmgd->request_smps_work, ieee80211_request_smps_mgd_work); -INIT_DELAYED_WORK (&ifmgd->tdls_peer_del_work, - ieee80211_tdls_peer_del_work); +wiphy_delayed_work_init (&ifmgd->tdls_peer_del_work, + ieee80211_tdls_peer_del_work);timer_setup (&ifmgd->timer, ieee80211_sta_timer,0 );timer_setup (&ifmgd->bcn_mon_timer, ieee80211_sta_bcn_mon_timer,0 );timer_setup (&ifmgd->conn_mon_timer, ieee80211_sta_conn_mon_timer,0 );
@@ -6010,7 +6010,8 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata)cancel_work_sync (&ifmgd->request_smps_work);cancel_work_sync (&ifmgd->csa_connection_drop_work);cancel_work_sync (&ifmgd->chswitch_work); -cancel_delayed_work_sync (&ifmgd->tdls_peer_del_work); +wiphy_delayed_work_cancel (sdata->local->hw.wiphy, + &ifmgd->tdls_peer_del_work);sdata_lock (sdata);if (ifmgd->assoc_data) {
net/mac80211/tdls.c +6 -5
@@ -21,7 +21,7 @@/* give usermode some time for retries in setting up the TDLS session */ #define TDLS_PEER_SETUP_TIMEOUT (15 * HZ) -void ieee80211_tdls_peer_del_work (struct work_struct *wk) +void ieee80211_tdls_peer_del_work (struct wiphy *wiphy,struct wiphy_work *wk) {struct ieee80211_sub_if_data *sdata;struct ieee80211_local *local;
@@ -1126,9 +1126,9 @@ ieee80211_tdls_mgmt_setup(struct wiphy *wiphy, struct net_device *dev,return ret; } -ieee80211_queue_delayed_work (&sdata->local->hw, - &sdata->u.mgd.tdls_peer_del_work, -TDLS_PEER_SETUP_TIMEOUT ); +wiphy_delayed_work_queue (sdata->local->hw.wiphy, + &sdata->u.mgd.tdls_peer_del_work, +TDLS_PEER_SETUP_TIMEOUT );return 0 ; out_unlock:
@@ -1425,7 +1425,8 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, }if (ret ==0 &ðer_addr_equal (sdata->u.mgd.tdls_peer, peer)) { -cancel_delayed_work (&sdata->u.mgd.tdls_peer_del_work); +wiphy_delayed_work_cancel (sdata->local->hw.wiphy, + &sdata->u.mgd.tdls_peer_del_work);eth_zero_addr (sdata->u.mgd.tdls_peer); }
Signature · 1 line
2.53.0.rc2.2.g2258446484