* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
  * Copyright 2007-2010, Intel Corporation
  * Copyright(c) 2015-2017 Intel Deutschland GmbH
- * Copyright (C) 2018-2022 Intel Corporation
+ * Copyright (C) 2018-2023 Intel Corporation
  */
 
 /**
                if (ba_rx_bitmap & BIT(i))
                        set_bit(i, sta->ampdu_mlme.tid_rx_stop_requested);
 
-       ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(sta->local->hw.wiphy, &sta->ampdu_mlme.work);
        rcu_read_unlock();
 }
 EXPORT_SYMBOL(ieee80211_stop_rx_ba_session);
               sta->sta.addr, tid);
 
        set_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired);
-       ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(sta->local->hw.wiphy, &sta->ampdu_mlme.work);
 }
 
 static void sta_rx_agg_reorder_timer_expired(struct timer_list *t)
                                 const u8 *addr, unsigned int tid)
 {
        struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
-       struct ieee80211_local *local = sdata->local;
        struct sta_info *sta;
 
        rcu_read_lock();
                goto unlock;
 
        set_bit(tid, sta->ampdu_mlme.tid_rx_manage_offl);
-       ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(sta->local->hw.wiphy, &sta->ampdu_mlme.work);
  unlock:
        rcu_read_unlock();
 }
                                   const u8 *addr, unsigned int tid)
 {
        struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
-       struct ieee80211_local *local = sdata->local;
        struct sta_info *sta;
 
        rcu_read_lock();
                goto unlock;
 
        set_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired);
-       ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(sta->local->hw.wiphy, &sta->ampdu_mlme.work);
 
  unlock:
        rcu_read_unlock();
 
         */
        sta->ampdu_mlme.tid_start_tx[tid] = tid_tx;
 
-       ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work);
 
        /* this flow continues off the work */
  err_unlock_sta:
                goto out;
 
        set_bit(HT_AGG_STATE_START_CB, &tid_tx->state);
-       ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work);
  out:
        rcu_read_unlock();
 }
        }
 
        set_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state);
-       ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work);
 
  unlock:
        spin_unlock_bh(&sta->lock);
                goto out;
 
        set_bit(HT_AGG_STATE_STOP_CB, &tid_tx->state);
-       ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
+       wiphy_work_queue(local->hw.wiphy, &sta->ampdu_mlme.work);
  out:
        rcu_read_unlock();
 }
 
         * the BA session, so handle it to properly clean tid_tx data.
         */
        if(reason == AGG_STOP_DESTROY_STA) {
-               cancel_work_sync(&sta->ampdu_mlme.work);
+               wiphy_work_cancel(sta->local->hw.wiphy, &sta->ampdu_mlme.work);
 
                mutex_lock(&sta->ampdu_mlme.mtx);
                for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
        }
 }
 
-void ieee80211_ba_session_work(struct work_struct *work)
+void ieee80211_ba_session_work(struct wiphy *wiphy, struct wiphy_work *work)
 {
        struct sta_info *sta =
                container_of(work, struct sta_info, ampdu_mlme.work);
 
                                mutex_unlock(&sta->ampdu_mlme.mtx);
 
-                               ieee80211_queue_work(&sdata->local->hw, work);
+                               wiphy_work_queue(sdata->local->hw.wiphy, work);
                                return;
                        }
 
 
                              struct tid_ampdu_tx *tid_tx);
 void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid,
                             struct tid_ampdu_tx *tid_tx);
-void ieee80211_ba_session_work(struct work_struct *work);
+void ieee80211_ba_session_work(struct wiphy *wiphy, struct wiphy_work *work);
 void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid);
 void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid);
 
 
        spin_lock_init(&sta->lock);
        spin_lock_init(&sta->ps_lock);
        INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
-       INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
+       wiphy_work_init(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
        mutex_init(&sta->ampdu_mlme.mtx);
 #ifdef CONFIG_MAC80211_MESH
        if (ieee80211_vif_is_mesh(&sdata->vif)) {
 
        unsigned long agg_session_valid[BITS_TO_LONGS(IEEE80211_NUM_TIDS)];
        unsigned long unexpected_agg[BITS_TO_LONGS(IEEE80211_NUM_TIDS)];
        /* tx */
-       struct work_struct work;
+       struct wiphy_work work;
        struct tid_ampdu_tx __rcu *tid_tx[IEEE80211_NUM_TIDS];
        struct tid_ampdu_tx *tid_start_tx[IEEE80211_NUM_TIDS];
        unsigned long last_addba_req_time[IEEE80211_NUM_TIDS];