]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
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 e3fd48dd39097361f307323fb9ba965e9c846a45..a2d87c3ad196283ac81f21a25f95a8f1c342baa5 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 5a55db349cb57408935af2fd70a46b3b8fc7be3a..156f3650c0066dcdc439cf0f0290f6306c8709fe 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 3bf67b2ecd6dd32c92b7af9029f2bc3dbf1a1788..a5da32e87106c71225e0f7740c2bedd0c1784d06 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 a1800c75d32b18dcf960404a2117e54263d43712..c9a13b88c804c57b2b0420645771cb676add248f 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 509c02bffdae87dc413d7069f4677e533e088fd9..bd3e021e2a814bfde91d31e06dfb0befc1747ecc 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 9f534ed2fbb3d9c7715250d4652e97e7bbcb75db..abe41330fb69292d0fc727fac12ac9d594216667 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 97469d0fbad7676ad9d68a81e7d5c86eff43074a..594e5b945cb7222cc329213cb656ed7e607911e1 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 b389e19381c4449e5c1b6f09ac8418157b1054fc..8a03bcc2789e88a033de5804bdeeb3577b0353f4 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 01173aac304565de6ab0d092a8fabf8444e5da5f..b92c89dad8deac7281e0165c9e1a566ba99ece65 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 7e7797bf44b7deb0ad1a5289720329f6c31ba84e..755c068e4197b57743106d5f9f500e140b9cba5b 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 e760d8002e09d9f5811506d253e6512bc337d0c5..408776562a7e56da3017aa074396bcd241d62f8c 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 baa53cfefe48afb7be569e507bc4fdc85ea67e28..504e05ea30f2982eac2c7152d2049d343d59a822 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 badb2f494035814e61dadb700636330a9fefbd3b..8e56dcf9309d1330b5762534d15a01ad2199e0e6 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 18eb610f600a86e8d08cfa3c4c68fb09364b59f7..441d6440671baf72435ba1c14d9ba44809615032 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 860ef9c11c46d31d5e88f76bbce197dde4068300..9ac6f3c4bdc750e3799c03bacb6d6cca3d5811b6 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 075b705a8d7bb0fee41a10ddcc124c4a27d0b6e8..74fc76c00ebcfcf16e2357b459be757cf9c68f0f 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 d018f56be96645e073162ebed7d1ef2a80de38a5..1600c344edbb2005117213925f6c8b53058a010b 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 863e3792d15399ab390343f36999cfd63dc4a37b..951f2245fefbcd2d306b0008c0c7b1125a4d58df 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 826f129ecefad8cf1b88118abb7cdbb53bb018ae..74d163e5651189827a67ebf7cfc9d24d94e5072c 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 81103a974b202a07a6b5c987dfe58dc1d12a9222..896e560f5a82fab3a8496d3615343d0a6265f9d0 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 bce517effe5589217bae5479fde8fc9bd478155b..54c3553db219a1627839cfb4596df8250f8d2b68 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 687841b2fa2a229b6306e295ca94cc045fa81ac8..42111bb53f582f02cfec552a8e6a0439b895e35a 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 9cca69fe04d78957df9b9ac8c62bb2a4d75d7fcc..b47a832b9ae21420565aa1efc8f2cb5adf900471 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 241a02a0accd70ed64514bfb1b92841199d14281..b130e057370f43c9b47df3777c7ef25fd2900b38 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 9b49267b1eabb67ef04765f018cedd5ec6508127..f35fa643c0da2357cabc3a1f9fff097d2d0e08f6 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 c27acaf0eb1cf7e9698adec73868867f349620e8..50e262c1622f93d87d0abce399f3843556c64400 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 df737e1ff27b79a21c1b92ca899272eb961800f0..9335ca0776febeac10e355ff5ea8238bc537be4d 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 79b7996ad1a811494af6c3d96e790b813e3a08f9..2ecee7c5c80d9f438596ac4dc5d01600428d87e4 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 bba44f289b4e3ed83ee176724cd45747d84a76db..390f502e97f03a5818a49eacb66b8bc51cb5acab 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 bfc8c69f43fa9f8bfe083aba6aa20b778fd408b3..6accea55131906b9f54c8e288aeead6eff8e01e5 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 9fe390fdd7305ef2d82d0208ccf9fd45c831908e..ba0241c366726241ea048089f6a832e360be147e 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 2624edbb59a1a53fffa067d6644ec92245a4d3b9..049223df9beb15dc3d44e2aff5689b2acb68ced3 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 3e3ad3518d85f99f6d4588f25b61cfb2d32c002d..4f30426afbb79d8375257711495f4cf8a670391a 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 20578497a405c2cc3453bb2873704e5e6f42297c..cf14a38c5e723c979e16e62dc75f05f0392503a8 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 a405af8d9052d2468463715961be72520d9021ef..4adca99eb9b8b9ead50f33cd433f489c11627698 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 b49668a4b7849362ab9eb1a51458f9ce7b12f805..76272a03b22e59b9d79a4ab4619812fc77bb0cfd 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 7c97140d8255a79c970c548d5589badcd8909539..bce0820382194db29db7a2bb0547217362cc72ec 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 a7330576486b27c5fc646caa7cbe95458407d2d9..7570c6ceecea1b7fd531edb7e963c9b53e445b6a 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 641f847d47ab080e6ff8fa5c4445f98306a0c142..eae93efa6150444a5789a7c56ff4730050756038 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 49b92413729bfae464e0d7502ef44c28563640c2..9384acddcf26a3d8d44e8ca82ea96880bb62fae6 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 311676c1ece0acbdfccf9ada7e926ae8f4b96897..15334940287d86a6fe5e1dec6e2b645e3f58dd38 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 bb648f95dfdd9d51259de9765288c8697dfe6d61..dfb4bb370f01bceaeb27e6c384b43e997f0794aa 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 75fda72c14ca950890c490e1357b105cc1bdcbe4..4516324888050f98de1440456a8c904db3c7fac8 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 77b6cb7e1f6b496a0127c2173c171c9c97281a51..ded8d4d59289c1415f41fe4ffefff756786e2cf3 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 78d99afa373d5923220ea4b05c58dececf9d48ab..220ac5bdf279a14da1ae6188ecdf5c3da9f440d5 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 89a841b4e8d5d520f3d2121a229929aa0db444d3..3685dbefc9bde1b4764d27a53c04df38e059f3ef 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 42b7db12b1bd41d0c3abbaea60bb2218cbab4894..7537f04b19308746a984db80780bb4072e5e02da 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 0acebbfa13c40b804abc907a39b008bbd011006f..63326b35273895e7f45a4e1ec16af96a5afd4b04 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 41b286da3d591661e89d4d7133703c0b0f1b8e28..722d09e9fbb5c3b8f53ed795c93b37b0fb582f07 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 211fa25b9a78e5972ffcee550264129046af07c0..3425a473b9a1ed937fddff03de60379ebd3a4894 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 a904602f02ce265ef656ff63d5810d7868d9ce0f..216d43c8bd6e9265a728d9aa2e258449e7a340dc 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 c478ddcb934bd35675dad5826a2dcdb818ac4643..7817c7c6f3ddec47dc31e6363c10b47447783320 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 8ef1d06b9bbddb1808fb6965482fbefdefab4bb2..c259da8161e4d5ef16ecc2f7a24a469a4af6051b 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 a49f187c7049e85e92a5f101f9c72aa6c881fa16..b955b92cfd732c1e8074e5e018ea901762912316 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 0da2d29dd7bd89a4114c6dc2b23e671a40f6d7a0..bb53d681c11bab6aac0edb2ac3add218e43d9d85 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 35d1114a28aa52715026e84d0b70b874d2fde6ec..7e1d30f89855f09a7908fea3d8e5e497f00e5577 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 fbf24870209d18faff7e88f2181f31960dc404f0..8491eb32f7603043ad3995b023e2fe829a296268 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 900c063bd724967726cba9b3ee951a900ad86422..f90c33d19b39938a5705185cbde9e27288fbdc88 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 5ff84bdc5a4c6d0e07da19765d7befd4476a8f44..053748a474eccab28c7381b6164cfa1b087b586b 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 2ee4218da1c522e420ad82d9ccef9f2f337b184c..a8a94edf2a707a6e60fb5ffc181109d5ca43a068 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 283804b49e91f1da571d61a606df7f411865fa64..3ff8103366c142518eee0345cc5b89bb689beaa5 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 7bbed462f062b1d5efffab82236321c8b5358e41..4f09e733e7a81e19b5d7a6d99d8cc68fe5041a1d 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 ecfa65ade226252092ae18b5de93e8db9d30c43f..9c96e8ae9ef760f481b8a046564c192abff3a5cc 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 dce37ba8ebe3744700e8dd83abf1ab3216957796..bef43990f07ad0b7bce588626fbde93adecafeba 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 d4e73d3630e0be39a1574bbff18092b2d05ff3db..d382d9729e853f8578fd21105714bbc93f60c40a 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 501f028091353ae1cb518a80cfd8c11914e1c760..6349552e62a885728345fab5514b5fe682e36dd3 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 f06e165d6c7aa4b724ac95409923a50843e2a91b..64106097949a6e8ba5b65b0fb1ac79777b55eee6 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 c1fa26e09479791ff6685be717e6242024602cdf..d823d58303e87216a86998766a383a450754091c 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 b26aacfbc622853f6ed7feeec9f91d5c56bf91d1..dc498cd8cd91916932f0719da9f302c6b6942dde 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 b3b8873a107b20dfef301c612ff2ae4d7124bc8d..610f0a94796c0ddb46cf028b6edba54761dd2efe 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,