wifi: mac80211: inform the low level if drv_stop() is a suspend
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 18 Jun 2024 16:25:56 +0000 (19:25 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 26 Jun 2024 08:25:46 +0000 (10:25 +0200)
This will allow the low level driver to take different actions for
different flows.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240618192529.739036208b6e.Ie18a2fe8e02bf2717549d39420b350cfdaf3d317@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
70 files changed:
drivers/net/wireless/admtek/adm8211.c
drivers/net/wireless/ath/ar5523/ar5523.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath11k/mac.c
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/base.h
drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/carl9170/main.c
drivers/net/wireless/ath/wcn36xx/main.c
drivers/net/wireless/atmel/at76c50x-usb.c
drivers/net/wireless/broadcom/b43/main.c
drivers/net/wireless/broadcom/b43legacy/main.c
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
drivers/net/wireless/intel/iwlegacy/3945-mac.c
drivers/net/wireless/intel/iwlegacy/4965-mac.c
drivers/net/wireless/intel/iwlegacy/4965.h
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intersil/p54/main.c
drivers/net/wireless/marvell/libertas_tf/main.c
drivers/net/wireless/marvell/mwl8k.c
drivers/net/wireless/mediatek/mt76/mt7603/main.c
drivers/net/wireless/mediatek/mt76/mt7615/main.c
drivers/net/wireless/mediatek/mt76/mt7615/usb.c
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c
drivers/net/wireless/mediatek/mt76/mt7915/main.c
drivers/net/wireless/mediatek/mt76/mt7921/main.c
drivers/net/wireless/mediatek/mt76/mt792x.h
drivers/net/wireless/mediatek/mt76/mt792x_core.c
drivers/net/wireless/mediatek/mt76/mt792x_usb.c
drivers/net/wireless/mediatek/mt76/mt7996/main.c
drivers/net/wireless/mediatek/mt7601u/main.c
drivers/net/wireless/purelifi/plfxlc/mac.c
drivers/net/wireless/purelifi/plfxlc/mac.h
drivers/net/wireless/purelifi/plfxlc/usb.c
drivers/net/wireless/ralink/rt2x00/rt2x00.h
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
drivers/net/wireless/realtek/rtl8xxxu/core.c
drivers/net/wireless/realtek/rtlwifi/core.c
drivers/net/wireless/realtek/rtw88/mac80211.c
drivers/net/wireless/realtek/rtw89/mac80211.c
drivers/net/wireless/rsi/rsi_91x_mac80211.c
drivers/net/wireless/silabs/wfx/sta.c
drivers/net/wireless/silabs/wfx/sta.h
drivers/net/wireless/st/cw1200/sta.c
drivers/net/wireless/st/cw1200/sta.h
drivers/net/wireless/ti/wl1251/main.c
drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/virtual/mac80211_hwsim.c
drivers/net/wireless/zydas/zd1211rw/zd_mac.c
drivers/net/wireless/zydas/zd1211rw/zd_mac.h
drivers/net/wireless/zydas/zd1211rw/zd_usb.c
drivers/staging/vt6655/device_main.c
drivers/staging/vt6656/main_usb.c
include/net/mac80211.h
net/mac80211/driver-ops.c
net/mac80211/driver-ops.h
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/pm.c
net/mac80211/trace.h
net/mac80211/util.c

index e3fd48d..a2d87c3 100644 (file)
@@ -1550,7 +1550,7 @@ fail:
        return retval;
 }
 
-static void adm8211_stop(struct ieee80211_hw *dev)
+static void adm8211_stop(struct ieee80211_hw *dev, bool suspend)
 {
        struct adm8211_priv *priv = dev->priv;
 
index 5a55db3..156f365 100644 (file)
@@ -1061,7 +1061,7 @@ err:
        return error;
 }
 
-static void ar5523_stop(struct ieee80211_hw *hw)
+static void ar5523_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ar5523 *ar = hw->priv;
 
index 3bf67b2..a5da32e 100644 (file)
@@ -5363,7 +5363,7 @@ err:
        return ret;
 }
 
-static void ath10k_stop(struct ieee80211_hw *hw)
+static void ath10k_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ath10k *ar = hw->priv;
        u32 opt;
index a1800c7..c9a13b8 100644 (file)
@@ -6278,7 +6278,7 @@ err:
        return ret;
 }
 
-static void ath11k_mac_op_stop(struct ieee80211_hw *hw)
+static void ath11k_mac_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ath11k *ar = hw->priv;
        struct htt_ppdu_stats_info *ppdu_stats, *tmp;
index 509c02b..bd3e021 100644 (file)
@@ -6112,7 +6112,7 @@ static void ath12k_mac_stop(struct ath12k *ar)
        atomic_set(&ar->num_pending_mgmt_tx, 0);
 }
 
-static void ath12k_mac_op_stop(struct ieee80211_hw *hw)
+static void ath12k_mac_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
        struct ath12k *ar;
index 9f534ed..abe4133 100644 (file)
@@ -2847,7 +2847,7 @@ static void ath5k_stop_tasklets(struct ath5k_hw *ah)
  * if another thread does a system call and the thread doing the
  * stop is preempted).
  */
-void ath5k_stop(struct ieee80211_hw *hw)
+void ath5k_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ath5k_hw *ah = hw->priv;
        int ret;
index 97469d0..594e5b9 100644 (file)
@@ -92,7 +92,7 @@ void ath5k_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif);
 bool ath5k_any_vif_assoc(struct ath5k_hw *ah);
 
 int ath5k_start(struct ieee80211_hw *hw);
-void ath5k_stop(struct ieee80211_hw *hw);
+void ath5k_stop(struct ieee80211_hw *hw, bool suspend);
 
 void ath5k_beacon_update_timers(struct ath5k_hw *ah, u64 bc_tsf);
 int ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
index b389e19..8a03bcc 100644 (file)
@@ -973,7 +973,7 @@ static int ath9k_htc_start(struct ieee80211_hw *hw)
        return ret;
 }
 
-static void ath9k_htc_stop(struct ieee80211_hw *hw)
+static void ath9k_htc_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ath9k_htc_priv *priv = hw->priv;
        struct ath_hw *ah = priv->ah;
index 01173aa..b92c89d 100644 (file)
@@ -895,7 +895,7 @@ static void ath9k_pending_key_del(struct ath_softc *sc, u8 keyix)
        ath_key_delete(common, keyix);
 }
 
-static void ath9k_stop(struct ieee80211_hw *hw)
+static void ath9k_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ath_softc *sc = hw->priv;
        struct ath_hw *ah = sc->sc_ah;
index 7e7797b..755c068 100644 (file)
@@ -439,7 +439,7 @@ static void carl9170_cancel_worker(struct ar9170 *ar)
        cancel_work_sync(&ar->ampdu_work);
 }
 
-static void carl9170_op_stop(struct ieee80211_hw *hw)
+static void carl9170_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct ar9170 *ar = hw->priv;
 
index e760d80..4087765 100644 (file)
@@ -278,7 +278,7 @@ out_err:
        return ret;
 }
 
-static void wcn36xx_stop(struct ieee80211_hw *hw)
+static void wcn36xx_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct wcn36xx *wcn = hw->priv;
 
index baa53cf..504e05e 100644 (file)
@@ -1850,7 +1850,7 @@ error:
        return 0;
 }
 
-static void at76_mac80211_stop(struct ieee80211_hw *hw)
+static void at76_mac80211_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct at76_priv *priv = hw->priv;
 
index badb2f4..8e56dcf 100644 (file)
@@ -5078,7 +5078,7 @@ static int b43_op_start(struct ieee80211_hw *hw)
        return err;
 }
 
-static void b43_op_stop(struct ieee80211_hw *hw)
+static void b43_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct b43_wl *wl = hw_to_b43_wl(hw);
        struct b43_wldev *dev = wl->current_dev;
index 18eb610..441d644 100644 (file)
@@ -3485,7 +3485,7 @@ out_mutex_unlock:
        return err;
 }
 
-static void b43legacy_op_stop(struct ieee80211_hw *hw)
+static void b43legacy_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
        struct b43legacy_wldev *dev = wl->current_dev;
index 860ef9c..9ac6f3c 100644 (file)
@@ -457,7 +457,7 @@ static int brcms_ops_start(struct ieee80211_hw *hw)
        return err;
 }
 
-static void brcms_ops_stop(struct ieee80211_hw *hw)
+static void brcms_ops_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct brcms_info *wl = hw->priv;
        int status;
index 075b705..74fc76c 100644 (file)
@@ -2813,7 +2813,7 @@ out_release_irq:
 }
 
 static void
-il3945_mac_stop(struct ieee80211_hw *hw)
+il3945_mac_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct il_priv *il = hw->priv;
 
index d018f56..1600c34 100644 (file)
@@ -5820,7 +5820,7 @@ out:
 }
 
 void
-il4965_mac_stop(struct ieee80211_hw *hw)
+il4965_mac_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct il_priv *il = hw->priv;
 
index 863e379..951f224 100644 (file)
@@ -151,7 +151,7 @@ void il4965_mac_tx(struct ieee80211_hw *hw,
                   struct ieee80211_tx_control *control,
                   struct sk_buff *skb);
 int il4965_mac_start(struct ieee80211_hw *hw);
-void il4965_mac_stop(struct ieee80211_hw *hw);
+void il4965_mac_stop(struct ieee80211_hw *hw, bool suspend);
 void il4965_configure_filter(struct ieee80211_hw *hw,
                             unsigned int changed_flags,
                             unsigned int *total_flags, u64 multicast);
index 826f129..74d163e 100644 (file)
@@ -300,7 +300,7 @@ static int iwlagn_mac_start(struct ieee80211_hw *hw)
        return ret;
 }
 
-static void iwlagn_mac_stop(struct ieee80211_hw *hw)
+static void iwlagn_mac_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
index 81103a9..896e560 100644 (file)
@@ -1376,7 +1376,7 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
        }
 }
 
-void iwl_mvm_mac_stop(struct ieee80211_hw *hw)
+void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
 
index bce517e..54c3553 100644 (file)
@@ -2818,7 +2818,7 @@ int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
 int iwl_mvm_mac_start(struct ieee80211_hw *hw);
 void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw,
                                   enum ieee80211_reconfig_type reconfig_type);
-void iwl_mvm_mac_stop(struct ieee80211_hw *hw);
+void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend);
 static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, u32 changed)
 {
        return 0;
index 687841b..42111bb 100644 (file)
@@ -197,7 +197,7 @@ out:
        return err;
 }
 
-static void p54_stop(struct ieee80211_hw *dev)
+static void p54_stop(struct ieee80211_hw *dev, bool suspend)
 {
        struct p54_common *priv = dev->priv;
        int i;
index 9cca69f..b47a832 100644 (file)
@@ -267,7 +267,7 @@ static int lbtf_op_start(struct ieee80211_hw *hw)
        return 0;
 }
 
-static void lbtf_op_stop(struct ieee80211_hw *hw)
+static void lbtf_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct lbtf_private *priv = hw->priv;
        unsigned long flags;
index 241a02a..b130e05 100644 (file)
@@ -4768,7 +4768,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
        return rc;
 }
 
-static void mwl8k_stop(struct ieee80211_hw *hw)
+static void mwl8k_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mwl8k_priv *priv = hw->priv;
        int i;
@@ -6023,7 +6023,7 @@ static int mwl8k_reload_firmware(struct ieee80211_hw *hw, char *fw_image)
        struct mwl8k_priv *priv = hw->priv;
        struct mwl8k_vif *vif, *tmp_vif;
 
-       mwl8k_stop(hw);
+       mwl8k_stop(hw, false);
        mwl8k_rxq_deinit(hw, 0);
 
        /*
index 9b49267..f35fa64 100644 (file)
@@ -23,7 +23,7 @@ mt7603_start(struct ieee80211_hw *hw)
 }
 
 static void
-mt7603_stop(struct ieee80211_hw *hw)
+mt7603_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt7603_dev *dev = hw->priv;
 
index c27acaf..50e262c 100644 (file)
@@ -91,7 +91,7 @@ out:
        return ret;
 }
 
-static void mt7615_stop(struct ieee80211_hw *hw)
+static void mt7615_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt7615_dev *dev = mt7615_hw_dev(hw);
        struct mt7615_phy *phy = mt7615_hw_phy(hw);
index df737e1..9335ca0 100644 (file)
@@ -79,7 +79,7 @@ static void mt7663u_copy(struct mt76_dev *dev, u32 offset,
        mutex_unlock(&usb->usb_ctrl_mtx);
 }
 
-static void mt7663u_stop(struct ieee80211_hw *hw)
+static void mt7663u_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt7615_phy *phy = mt7615_hw_phy(hw);
        struct mt7615_dev *dev = hw->priv;
index 79b7996..2ecee7c 100644 (file)
@@ -44,7 +44,7 @@ static void mt76x0e_stop_hw(struct mt76x02_dev *dev)
        mt76_clear(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_RX_DMA_EN);
 }
 
-static void mt76x0e_stop(struct ieee80211_hw *hw)
+static void mt76x0e_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt76x02_dev *dev = hw->priv;
 
index bba44f2..390f502 100644 (file)
@@ -77,7 +77,7 @@ static void mt76x0u_cleanup(struct mt76x02_dev *dev)
        mt76u_queues_deinit(&dev->mt76);
 }
 
-static void mt76x0u_stop(struct ieee80211_hw *hw)
+static void mt76x0u_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt76x02_dev *dev = hw->priv;
 
index bfc8c69..6accea5 100644 (file)
@@ -24,7 +24,7 @@ mt76x2_start(struct ieee80211_hw *hw)
 }
 
 static void
-mt76x2_stop(struct ieee80211_hw *hw)
+mt76x2_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt76x02_dev *dev = hw->priv;
 
index 9fe390f..ba0241c 100644 (file)
@@ -22,7 +22,7 @@ static int mt76x2u_start(struct ieee80211_hw *hw)
        return 0;
 }
 
-static void mt76x2u_stop(struct ieee80211_hw *hw)
+static void mt76x2u_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt76x02_dev *dev = hw->priv;
 
index 2624edb..049223d 100644 (file)
@@ -108,7 +108,7 @@ static int mt7915_start(struct ieee80211_hw *hw)
        return ret;
 }
 
-static void mt7915_stop(struct ieee80211_hw *hw)
+static void mt7915_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt7915_dev *dev = mt7915_hw_dev(hw);
        struct mt7915_phy *phy = mt7915_hw_phy(hw);
index 3e3ad35..4f30426 100644 (file)
@@ -268,7 +268,7 @@ static int mt7921_start(struct ieee80211_hw *hw)
        return err;
 }
 
-static void mt7921_stop(struct ieee80211_hw *hw)
+static void mt7921_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
        int err = 0;
@@ -281,7 +281,7 @@ static void mt7921_stop(struct ieee80211_hw *hw)
                        return;
        }
 
-       mt792x_stop(hw);
+       mt792x_stop(hw, false);
 }
 
 static int
index 2057849..cf14a38 100644 (file)
@@ -251,7 +251,7 @@ static inline bool mt792x_dma_need_reinit(struct mt792x_dev *dev)
 #define mt792x_mutex_release(dev)      \
        mt76_connac_mutex_release(&(dev)->mt76, &(dev)->pm)
 
-void mt792x_stop(struct ieee80211_hw *hw);
+void mt792x_stop(struct ieee80211_hw *hw, bool suspend);
 void mt792x_pm_wake_work(struct work_struct *work);
 void mt792x_pm_power_save_work(struct work_struct *work);
 void mt792x_reset(struct mt76_dev *mdev);
@@ -368,7 +368,7 @@ void mt792xu_wr(struct mt76_dev *dev, u32 addr, u32 val);
 u32 mt792xu_rmw(struct mt76_dev *dev, u32 addr, u32 mask, u32 val);
 void mt792xu_copy(struct mt76_dev *dev, u32 offset, const void *data, int len);
 void mt792xu_disconnect(struct usb_interface *usb_intf);
-void mt792xu_stop(struct ieee80211_hw *hw);
+void mt792xu_stop(struct ieee80211_hw *hw, bool suspend);
 
 static inline void
 mt792x_skb_add_usb_sdio_hdr(struct mt792x_dev *dev, struct sk_buff *skb,
index a405af8..4adca99 100644 (file)
@@ -91,7 +91,7 @@ void mt792x_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
 }
 EXPORT_SYMBOL_GPL(mt792x_tx);
 
-void mt792x_stop(struct ieee80211_hw *hw)
+void mt792x_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
        struct mt792x_phy *phy = mt792x_hw_phy(hw);
index b49668a..76272a0 100644 (file)
@@ -285,12 +285,12 @@ int mt792xu_init_reset(struct mt792x_dev *dev)
 }
 EXPORT_SYMBOL_GPL(mt792xu_init_reset);
 
-void mt792xu_stop(struct ieee80211_hw *hw)
+void mt792xu_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt792x_dev *dev = mt792x_hw_dev(hw);
 
        mt76u_stop_tx(&dev->mt76);
-       mt792x_stop(hw);
+       mt792x_stop(hw, false);
 }
 EXPORT_SYMBOL_GPL(mt792xu_stop);
 
index 7c97140..bce0820 100644 (file)
@@ -93,7 +93,7 @@ static int mt7996_start(struct ieee80211_hw *hw)
        return ret;
 }
 
-static void mt7996_stop(struct ieee80211_hw *hw)
+static void mt7996_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt7996_dev *dev = mt7996_hw_dev(hw);
        struct mt7996_phy *phy = mt7996_hw_phy(hw);
index a733057..7570c6c 100644 (file)
@@ -28,7 +28,7 @@ out:
        return ret;
 }
 
-static void mt7601u_stop(struct ieee80211_hw *hw)
+static void mt7601u_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mt7601u_dev *dev = hw->priv;
 
index 641f847..eae93ef 100644 (file)
@@ -111,7 +111,7 @@ int plfxlc_op_start(struct ieee80211_hw *hw)
        return 0;
 }
 
-void plfxlc_op_stop(struct ieee80211_hw *hw)
+void plfxlc_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct plfxlc_mac *mac = plfxlc_hw_mac(hw);
 
index 49b9241..9384acd 100644 (file)
@@ -178,7 +178,7 @@ int plfxlc_mac_rx(struct ieee80211_hw *hw, const u8 *buffer,
 void plfxlc_mac_tx_failed(struct urb *urb);
 void plfxlc_mac_tx_to_dev(struct sk_buff *skb, int error);
 int plfxlc_op_start(struct ieee80211_hw *hw);
-void plfxlc_op_stop(struct ieee80211_hw *hw);
+void plfxlc_op_stop(struct ieee80211_hw *hw, bool suspend);
 int plfxlc_restore_settings(struct plfxlc_mac *mac);
 
 #endif /* PLFXLC_MAC_H */
index 311676c..1533494 100644 (file)
@@ -408,7 +408,7 @@ void plfxlc_usb_init(struct plfxlc_usb *usb, struct ieee80211_hw *hw,
 
 void plfxlc_usb_release(struct plfxlc_usb *usb)
 {
-       plfxlc_op_stop(plfxlc_usb_to_hw(usb));
+       plfxlc_op_stop(plfxlc_usb_to_hw(usb), false);
        plfxlc_usb_disable_tx(usb);
        plfxlc_usb_disable_rx(usb);
        usb_set_intfdata(usb->intf, NULL);
@@ -761,7 +761,7 @@ static void plfxlc_usb_resume(struct plfxlc_usb *usb)
 
 static void plfxlc_usb_stop(struct plfxlc_usb *usb)
 {
-       plfxlc_op_stop(plfxlc_usb_to_hw(usb));
+       plfxlc_op_stop(plfxlc_usb_to_hw(usb), false);
        plfxlc_usb_disable_tx(usb);
        plfxlc_usb_disable_rx(usb);
 
index bb648f9..dfb4bb3 100644 (file)
@@ -1450,7 +1450,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw,
                  struct ieee80211_tx_control *control,
                  struct sk_buff *skb);
 int rt2x00mac_start(struct ieee80211_hw *hw);
-void rt2x00mac_stop(struct ieee80211_hw *hw);
+void rt2x00mac_stop(struct ieee80211_hw *hw, bool suspend);
 void rt2x00mac_reconfig_complete(struct ieee80211_hw *hw,
                                 enum ieee80211_reconfig_type reconfig_type);
 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
index 75fda72..4516324 100644 (file)
@@ -178,7 +178,7 @@ int rt2x00mac_start(struct ieee80211_hw *hw)
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_start);
 
-void rt2x00mac_stop(struct ieee80211_hw *hw)
+void rt2x00mac_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
 
index 77b6cb7..ded8d4d 100644 (file)
@@ -1249,7 +1249,7 @@ static int rtl8180_start(struct ieee80211_hw *dev)
        return ret;
 }
 
-static void rtl8180_stop(struct ieee80211_hw *dev)
+static void rtl8180_stop(struct ieee80211_hw *dev, bool suspend)
 {
        struct rtl8180_priv *priv = dev->priv;
        u8 reg;
index 78d99af..220ac5b 100644 (file)
@@ -1019,7 +1019,7 @@ rtl8187_start_exit:
        return ret;
 }
 
-static void rtl8187_stop(struct ieee80211_hw *dev)
+static void rtl8187_stop(struct ieee80211_hw *dev, bool suspend)
 {
        struct rtl8187_priv *priv = dev->priv;
        struct sk_buff *skb;
index 89a841b..3685dbe 100644 (file)
@@ -7521,7 +7521,7 @@ error_out:
        return ret;
 }
 
-static void rtl8xxxu_stop(struct ieee80211_hw *hw)
+static void rtl8xxxu_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct rtl8xxxu_priv *priv = hw->priv;
        unsigned long flags;
index 42b7db1..7537f04 100644 (file)
@@ -144,7 +144,7 @@ static int rtl_op_start(struct ieee80211_hw *hw)
        return err;
 }
 
-static void rtl_op_stop(struct ieee80211_hw *hw)
+static void rtl_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
@@ -547,7 +547,7 @@ static int rtl_op_suspend(struct ieee80211_hw *hw,
        rtlhal->enter_pnp_sleep = true;
 
        rtl_lps_leave(hw, true);
-       rtl_op_stop(hw);
+       rtl_op_stop(hw, false);
        device_set_wakeup_enable(wiphy_dev(hw->wiphy), true);
        return 0;
 }
index 0acebbf..63326b3 100644 (file)
@@ -62,7 +62,7 @@ static int rtw_ops_start(struct ieee80211_hw *hw)
        return ret;
 }
 
-static void rtw_ops_stop(struct ieee80211_hw *hw)
+static void rtw_ops_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct rtw_dev *rtwdev = hw->priv;
 
index 41b286d..722d09e 100644 (file)
@@ -66,7 +66,7 @@ static int rtw89_ops_start(struct ieee80211_hw *hw)
        return ret;
 }
 
-static void rtw89_ops_stop(struct ieee80211_hw *hw)
+static void rtw89_ops_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct rtw89_dev *rtwdev = hw->priv;
 
index 211fa25..3425a47 100644 (file)
@@ -410,10 +410,11 @@ static int rsi_mac80211_start(struct ieee80211_hw *hw)
 /**
  * rsi_mac80211_stop() - This is the last handler that 802.11 module calls.
  * @hw: Pointer to the ieee80211_hw structure.
+ * @suspend: true if the this was called from suspend flow.
  *
  * Return: None.
  */
-static void rsi_mac80211_stop(struct ieee80211_hw *hw)
+static void rsi_mac80211_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct rsi_hw *adapter = hw->priv;
        struct rsi_common *common = adapter->priv;
index a904602..216d43c 100644 (file)
@@ -805,7 +805,7 @@ int wfx_start(struct ieee80211_hw *hw)
        return 0;
 }
 
-void wfx_stop(struct ieee80211_hw *hw)
+void wfx_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct wfx_dev *wdev = hw->priv;
 
index c478ddc..7817c7c 100644 (file)
@@ -20,7 +20,7 @@ struct wfx_sta_priv {
 
 /* mac80211 interface */
 int wfx_start(struct ieee80211_hw *hw);
-void wfx_stop(struct ieee80211_hw *hw);
+void wfx_stop(struct ieee80211_hw *hw, bool suspend);
 int wfx_config(struct ieee80211_hw *hw, u32 changed);
 int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
 void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx);
index 8ef1d06..c259da8 100644 (file)
@@ -90,7 +90,7 @@ out:
        return ret;
 }
 
-void cw1200_stop(struct ieee80211_hw *dev)
+void cw1200_stop(struct ieee80211_hw *dev, bool suspend)
 {
        struct cw1200_common *priv = dev->priv;
        LIST_HEAD(list);
index a49f187..b955b92 100644 (file)
@@ -13,7 +13,7 @@
 /* mac80211 API                                                                */
 
 int cw1200_start(struct ieee80211_hw *dev);
-void cw1200_stop(struct ieee80211_hw *dev);
+void cw1200_stop(struct ieee80211_hw *dev, bool suspend);
 int cw1200_add_interface(struct ieee80211_hw *dev,
                         struct ieee80211_vif *vif);
 void cw1200_remove_interface(struct ieee80211_hw *dev,
index 0da2d29..bb53d68 100644 (file)
@@ -415,7 +415,7 @@ out:
        return ret;
 }
 
-static void wl1251_op_stop(struct ieee80211_hw *hw)
+static void wl1251_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct wl1251 *wl = hw->priv;
 
index 35d1114..7e1d30f 100644 (file)
@@ -2085,7 +2085,7 @@ static void wlcore_op_stop_locked(struct wl1271 *wl)
        memset(wl->reg_ch_conf_last, 0, sizeof(wl->reg_ch_conf_last));
 }
 
-static void wlcore_op_stop(struct ieee80211_hw *hw)
+static void wlcore_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct wl1271 *wl = hw->priv;
 
index fbf2487..8491eb3 100644 (file)
@@ -2098,7 +2098,7 @@ static int mac80211_hwsim_start(struct ieee80211_hw *hw)
 }
 
 
-static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
+static void mac80211_hwsim_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct mac80211_hwsim_data *data = hw->priv;
        int i;
index 900c063..f90c33d 100644 (file)
@@ -326,7 +326,7 @@ out:
        return r;
 }
 
-void zd_op_stop(struct ieee80211_hw *hw)
+void zd_op_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct zd_mac *mac = zd_hw_mac(hw);
        struct zd_chip *chip = &mac->chip;
index 5ff84bd..053748a 100644 (file)
@@ -303,7 +303,7 @@ void zd_mac_tx_failed(struct urb *urb);
 void zd_mac_tx_to_dev(struct sk_buff *skb, int error);
 
 int zd_op_start(struct ieee80211_hw *hw);
-void zd_op_stop(struct ieee80211_hw *hw);
+void zd_op_stop(struct ieee80211_hw *hw, bool suspend);
 int zd_restore_settings(struct zd_mac *mac);
 
 #ifdef DEBUG
index 2ee4218..a8a94ed 100644 (file)
@@ -1476,7 +1476,7 @@ static void zd_usb_stop(struct zd_usb *usb)
 {
        dev_dbg_f(zd_usb_dev(usb), "\n");
 
-       zd_op_stop(zd_usb_to_hw(usb));
+       zd_op_stop(zd_usb_to_hw(usb), false);
 
        zd_usb_disable_tx(usb);
        zd_usb_disable_rx(usb);
index 283804b..3ff8103 100644 (file)
@@ -1339,7 +1339,7 @@ err_free_rings:
        return ret;
 }
 
-static void vnt_stop(struct ieee80211_hw *hw)
+static void vnt_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct vnt_private *priv = hw->priv;
 
index 7bbed46..4f09e73 100644 (file)
@@ -613,7 +613,7 @@ err:
        return ret;
 }
 
-static void vnt_stop(struct ieee80211_hw *hw)
+static void vnt_stop(struct ieee80211_hw *hw, bool suspend)
 {
        struct vnt_private *priv = hw->priv;
        int i;
index ecfa65a..9c96e8a 100644 (file)
@@ -4444,7 +4444,7 @@ struct ieee80211_ops {
                   struct ieee80211_tx_control *control,
                   struct sk_buff *skb);
        int (*start)(struct ieee80211_hw *hw);
-       void (*stop)(struct ieee80211_hw *hw);
+       void (*stop)(struct ieee80211_hw *hw, bool suspend);
 #ifdef CONFIG_PM
        int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan);
        int (*resume)(struct ieee80211_hw *hw);
index dce37ba..bef4399 100644 (file)
@@ -33,7 +33,7 @@ int drv_start(struct ieee80211_local *local)
        return ret;
 }
 
-void drv_stop(struct ieee80211_local *local)
+void drv_stop(struct ieee80211_local *local, bool suspend)
 {
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
@@ -41,8 +41,8 @@ void drv_stop(struct ieee80211_local *local)
        if (WARN_ON(!local->started))
                return;
 
-       trace_drv_stop(local);
-       local->ops->stop(&local->hw);
+       trace_drv_stop(local, suspend);
+       local->ops->stop(&local->hw, suspend);
        trace_drv_return_void(local);
 
        /* sync away all work on the tasklet before clearing started */
index d4e73d3..d382d97 100644 (file)
@@ -88,7 +88,7 @@ static inline int drv_get_et_sset_count(struct ieee80211_sub_if_data *sdata,
 }
 
 int drv_start(struct ieee80211_local *local);
-void drv_stop(struct ieee80211_local *local);
+void drv_stop(struct ieee80211_local *local, bool suspend);
 
 #ifdef CONFIG_PM
 static inline int drv_suspend(struct ieee80211_local *local,
index 501f028..6349552 100644 (file)
@@ -2246,7 +2246,7 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
 
 /* Suspend/resume and hw reconfiguration */
 int ieee80211_reconfig(struct ieee80211_local *local);
-void ieee80211_stop_device(struct ieee80211_local *local);
+void ieee80211_stop_device(struct ieee80211_local *local, bool suspend);
 
 int __ieee80211_suspend(struct ieee80211_hw *hw,
                        struct cfg80211_wowlan *wowlan);
index f06e165..6410609 100644 (file)
@@ -698,7 +698,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
                wiphy_delayed_work_flush(local->hw.wiphy, &local->scan_work);
 
        if (local->open_count == 0) {
-               ieee80211_stop_device(local);
+               ieee80211_stop_device(local, false);
 
                /* no reconfiguring after stop! */
                return;
@@ -1435,7 +1435,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
        drv_remove_interface(local, sdata);
  err_stop:
        if (!local->open_count)
-               drv_stop(local);
+               drv_stop(local, false);
  err_del_bss:
        sdata->bss = NULL;
        if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
index c1fa26e..d823d58 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
  * Portions
- * Copyright (C) 2020-2021, 2023 Intel Corporation
+ * Copyright (C) 2020-2021, 2023-2024 Intel Corporation
  */
 #include <net/mac80211.h>
 #include <net/rtnetlink.h>
@@ -171,7 +171,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
        WARN_ON(!list_empty(&local->chanctx_list));
 
        /* stop hardware - this must stop RX */
-       ieee80211_stop_device(local);
+       ieee80211_stop_device(local, true);
 
  suspend:
        local->suspended = true;
index b26aacf..dc498cd 100644 (file)
@@ -328,9 +328,18 @@ TRACE_EVENT(drv_set_wakeup,
        TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
 );
 
-DEFINE_EVENT(local_only_evt, drv_stop,
-       TP_PROTO(struct ieee80211_local *local),
-       TP_ARGS(local)
+TRACE_EVENT(drv_stop,
+       TP_PROTO(struct ieee80211_local *local, bool suspend),
+       TP_ARGS(local, suspend),
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               __field(bool, suspend)
+       ),
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               __entry->suspend = suspend;
+       ),
+       TP_printk(LOCAL_PR_FMT " suspend:%d", LOCAL_PR_ARG, __entry->suspend)
 );
 
 DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
index b3b8873..610f0a9 100644 (file)
@@ -1565,7 +1565,7 @@ u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
        return supp_rates;
 }
 
-void ieee80211_stop_device(struct ieee80211_local *local)
+void ieee80211_stop_device(struct ieee80211_local *local, bool suspend)
 {
        ieee80211_handle_queued_frames(local);
 
@@ -1576,7 +1576,7 @@ void ieee80211_stop_device(struct ieee80211_local *local)
 
        flush_workqueue(local->workqueue);
        wiphy_work_flush(local->hw.wiphy, NULL);
-       drv_stop(local);
+       drv_stop(local, suspend);
 }
 
 static void ieee80211_flush_completed_scan(struct ieee80211_local *local,