Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: inform the low level if drv_stop() is a suspend

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>

authored by

Emmanuel Grumbach and committed by
Johannes Berg
1decf05d 5036eaff

+93 -83
+1 -1
drivers/net/wireless/admtek/adm8211.c
··· 1550 1550 return retval; 1551 1551 } 1552 1552 1553 - static void adm8211_stop(struct ieee80211_hw *dev) 1553 + static void adm8211_stop(struct ieee80211_hw *dev, bool suspend) 1554 1554 { 1555 1555 struct adm8211_priv *priv = dev->priv; 1556 1556
+1 -1
drivers/net/wireless/ath/ar5523/ar5523.c
··· 1061 1061 return error; 1062 1062 } 1063 1063 1064 - static void ar5523_stop(struct ieee80211_hw *hw) 1064 + static void ar5523_stop(struct ieee80211_hw *hw, bool suspend) 1065 1065 { 1066 1066 struct ar5523 *ar = hw->priv; 1067 1067
+1 -1
drivers/net/wireless/ath/ath10k/mac.c
··· 5363 5363 return ret; 5364 5364 } 5365 5365 5366 - static void ath10k_stop(struct ieee80211_hw *hw) 5366 + static void ath10k_stop(struct ieee80211_hw *hw, bool suspend) 5367 5367 { 5368 5368 struct ath10k *ar = hw->priv; 5369 5369 u32 opt;
+1 -1
drivers/net/wireless/ath/ath11k/mac.c
··· 6278 6278 return ret; 6279 6279 } 6280 6280 6281 - static void ath11k_mac_op_stop(struct ieee80211_hw *hw) 6281 + static void ath11k_mac_op_stop(struct ieee80211_hw *hw, bool suspend) 6282 6282 { 6283 6283 struct ath11k *ar = hw->priv; 6284 6284 struct htt_ppdu_stats_info *ppdu_stats, *tmp;
+1 -1
drivers/net/wireless/ath/ath12k/mac.c
··· 6112 6112 atomic_set(&ar->num_pending_mgmt_tx, 0); 6113 6113 } 6114 6114 6115 - static void ath12k_mac_op_stop(struct ieee80211_hw *hw) 6115 + static void ath12k_mac_op_stop(struct ieee80211_hw *hw, bool suspend) 6116 6116 { 6117 6117 struct ath12k_hw *ah = ath12k_hw_to_ah(hw); 6118 6118 struct ath12k *ar;
+1 -1
drivers/net/wireless/ath/ath5k/base.c
··· 2847 2847 * if another thread does a system call and the thread doing the 2848 2848 * stop is preempted). 2849 2849 */ 2850 - void ath5k_stop(struct ieee80211_hw *hw) 2850 + void ath5k_stop(struct ieee80211_hw *hw, bool suspend) 2851 2851 { 2852 2852 struct ath5k_hw *ah = hw->priv; 2853 2853 int ret;
+1 -1
drivers/net/wireless/ath/ath5k/base.h
··· 92 92 bool ath5k_any_vif_assoc(struct ath5k_hw *ah); 93 93 94 94 int ath5k_start(struct ieee80211_hw *hw); 95 - void ath5k_stop(struct ieee80211_hw *hw); 95 + void ath5k_stop(struct ieee80211_hw *hw, bool suspend); 96 96 97 97 void ath5k_beacon_update_timers(struct ath5k_hw *ah, u64 bc_tsf); 98 98 int ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
+1 -1
drivers/net/wireless/ath/ath9k/htc_drv_main.c
··· 973 973 return ret; 974 974 } 975 975 976 - static void ath9k_htc_stop(struct ieee80211_hw *hw) 976 + static void ath9k_htc_stop(struct ieee80211_hw *hw, bool suspend) 977 977 { 978 978 struct ath9k_htc_priv *priv = hw->priv; 979 979 struct ath_hw *ah = priv->ah;
+1 -1
drivers/net/wireless/ath/ath9k/main.c
··· 895 895 ath_key_delete(common, keyix); 896 896 } 897 897 898 - static void ath9k_stop(struct ieee80211_hw *hw) 898 + static void ath9k_stop(struct ieee80211_hw *hw, bool suspend) 899 899 { 900 900 struct ath_softc *sc = hw->priv; 901 901 struct ath_hw *ah = sc->sc_ah;
+1 -1
drivers/net/wireless/ath/carl9170/main.c
··· 439 439 cancel_work_sync(&ar->ampdu_work); 440 440 } 441 441 442 - static void carl9170_op_stop(struct ieee80211_hw *hw) 442 + static void carl9170_op_stop(struct ieee80211_hw *hw, bool suspend) 443 443 { 444 444 struct ar9170 *ar = hw->priv; 445 445
+1 -1
drivers/net/wireless/ath/wcn36xx/main.c
··· 278 278 return ret; 279 279 } 280 280 281 - static void wcn36xx_stop(struct ieee80211_hw *hw) 281 + static void wcn36xx_stop(struct ieee80211_hw *hw, bool suspend) 282 282 { 283 283 struct wcn36xx *wcn = hw->priv; 284 284
+1 -1
drivers/net/wireless/atmel/at76c50x-usb.c
··· 1850 1850 return 0; 1851 1851 } 1852 1852 1853 - static void at76_mac80211_stop(struct ieee80211_hw *hw) 1853 + static void at76_mac80211_stop(struct ieee80211_hw *hw, bool suspend) 1854 1854 { 1855 1855 struct at76_priv *priv = hw->priv; 1856 1856
+1 -1
drivers/net/wireless/broadcom/b43/main.c
··· 5078 5078 return err; 5079 5079 } 5080 5080 5081 - static void b43_op_stop(struct ieee80211_hw *hw) 5081 + static void b43_op_stop(struct ieee80211_hw *hw, bool suspend) 5082 5082 { 5083 5083 struct b43_wl *wl = hw_to_b43_wl(hw); 5084 5084 struct b43_wldev *dev = wl->current_dev;
+1 -1
drivers/net/wireless/broadcom/b43legacy/main.c
··· 3485 3485 return err; 3486 3486 } 3487 3487 3488 - static void b43legacy_op_stop(struct ieee80211_hw *hw) 3488 + static void b43legacy_op_stop(struct ieee80211_hw *hw, bool suspend) 3489 3489 { 3490 3490 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); 3491 3491 struct b43legacy_wldev *dev = wl->current_dev;
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
··· 457 457 return err; 458 458 } 459 459 460 - static void brcms_ops_stop(struct ieee80211_hw *hw) 460 + static void brcms_ops_stop(struct ieee80211_hw *hw, bool suspend) 461 461 { 462 462 struct brcms_info *wl = hw->priv; 463 463 int status;
+1 -1
drivers/net/wireless/intel/iwlegacy/3945-mac.c
··· 2813 2813 } 2814 2814 2815 2815 static void 2816 - il3945_mac_stop(struct ieee80211_hw *hw) 2816 + il3945_mac_stop(struct ieee80211_hw *hw, bool suspend) 2817 2817 { 2818 2818 struct il_priv *il = hw->priv; 2819 2819
+1 -1
drivers/net/wireless/intel/iwlegacy/4965-mac.c
··· 5820 5820 } 5821 5821 5822 5822 void 5823 - il4965_mac_stop(struct ieee80211_hw *hw) 5823 + il4965_mac_stop(struct ieee80211_hw *hw, bool suspend) 5824 5824 { 5825 5825 struct il_priv *il = hw->priv; 5826 5826
+1 -1
drivers/net/wireless/intel/iwlegacy/4965.h
··· 151 151 struct ieee80211_tx_control *control, 152 152 struct sk_buff *skb); 153 153 int il4965_mac_start(struct ieee80211_hw *hw); 154 - void il4965_mac_stop(struct ieee80211_hw *hw); 154 + void il4965_mac_stop(struct ieee80211_hw *hw, bool suspend); 155 155 void il4965_configure_filter(struct ieee80211_hw *hw, 156 156 unsigned int changed_flags, 157 157 unsigned int *total_flags, u64 multicast);
+1 -1
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
··· 300 300 return ret; 301 301 } 302 302 303 - static void iwlagn_mac_stop(struct ieee80211_hw *hw) 303 + static void iwlagn_mac_stop(struct ieee80211_hw *hw, bool suspend) 304 304 { 305 305 struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); 306 306
+1 -1
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
··· 1376 1376 } 1377 1377 } 1378 1378 1379 - void iwl_mvm_mac_stop(struct ieee80211_hw *hw) 1379 + void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend) 1380 1380 { 1381 1381 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 1382 1382
+1 -1
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
··· 2818 2818 int iwl_mvm_mac_start(struct ieee80211_hw *hw); 2819 2819 void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw, 2820 2820 enum ieee80211_reconfig_type reconfig_type); 2821 - void iwl_mvm_mac_stop(struct ieee80211_hw *hw); 2821 + void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend); 2822 2822 static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, u32 changed) 2823 2823 { 2824 2824 return 0;
+1 -1
drivers/net/wireless/intersil/p54/main.c
··· 197 197 return err; 198 198 } 199 199 200 - static void p54_stop(struct ieee80211_hw *dev) 200 + static void p54_stop(struct ieee80211_hw *dev, bool suspend) 201 201 { 202 202 struct p54_common *priv = dev->priv; 203 203 int i;
+1 -1
drivers/net/wireless/marvell/libertas_tf/main.c
··· 267 267 return 0; 268 268 } 269 269 270 - static void lbtf_op_stop(struct ieee80211_hw *hw) 270 + static void lbtf_op_stop(struct ieee80211_hw *hw, bool suspend) 271 271 { 272 272 struct lbtf_private *priv = hw->priv; 273 273 unsigned long flags;
+2 -2
drivers/net/wireless/marvell/mwl8k.c
··· 4768 4768 return rc; 4769 4769 } 4770 4770 4771 - static void mwl8k_stop(struct ieee80211_hw *hw) 4771 + static void mwl8k_stop(struct ieee80211_hw *hw, bool suspend) 4772 4772 { 4773 4773 struct mwl8k_priv *priv = hw->priv; 4774 4774 int i; ··· 6023 6023 struct mwl8k_priv *priv = hw->priv; 6024 6024 struct mwl8k_vif *vif, *tmp_vif; 6025 6025 6026 - mwl8k_stop(hw); 6026 + mwl8k_stop(hw, false); 6027 6027 mwl8k_rxq_deinit(hw, 0); 6028 6028 6029 6029 /*
+1 -1
drivers/net/wireless/mediatek/mt76/mt7603/main.c
··· 23 23 } 24 24 25 25 static void 26 - mt7603_stop(struct ieee80211_hw *hw) 26 + mt7603_stop(struct ieee80211_hw *hw, bool suspend) 27 27 { 28 28 struct mt7603_dev *dev = hw->priv; 29 29
+1 -1
drivers/net/wireless/mediatek/mt76/mt7615/main.c
··· 91 91 return ret; 92 92 } 93 93 94 - static void mt7615_stop(struct ieee80211_hw *hw) 94 + static void mt7615_stop(struct ieee80211_hw *hw, bool suspend) 95 95 { 96 96 struct mt7615_dev *dev = mt7615_hw_dev(hw); 97 97 struct mt7615_phy *phy = mt7615_hw_phy(hw);
+1 -1
drivers/net/wireless/mediatek/mt76/mt7615/usb.c
··· 79 79 mutex_unlock(&usb->usb_ctrl_mtx); 80 80 } 81 81 82 - static void mt7663u_stop(struct ieee80211_hw *hw) 82 + static void mt7663u_stop(struct ieee80211_hw *hw, bool suspend) 83 83 { 84 84 struct mt7615_phy *phy = mt7615_hw_phy(hw); 85 85 struct mt7615_dev *dev = hw->priv;
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
··· 44 44 mt76_clear(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_RX_DMA_EN); 45 45 } 46 46 47 - static void mt76x0e_stop(struct ieee80211_hw *hw) 47 + static void mt76x0e_stop(struct ieee80211_hw *hw, bool suspend) 48 48 { 49 49 struct mt76x02_dev *dev = hw->priv; 50 50
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
··· 77 77 mt76u_queues_deinit(&dev->mt76); 78 78 } 79 79 80 - static void mt76x0u_stop(struct ieee80211_hw *hw) 80 + static void mt76x0u_stop(struct ieee80211_hw *hw, bool suspend) 81 81 { 82 82 struct mt76x02_dev *dev = hw->priv; 83 83
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
··· 24 24 } 25 25 26 26 static void 27 - mt76x2_stop(struct ieee80211_hw *hw) 27 + mt76x2_stop(struct ieee80211_hw *hw, bool suspend) 28 28 { 29 29 struct mt76x02_dev *dev = hw->priv; 30 30
+1 -1
drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c
··· 22 22 return 0; 23 23 } 24 24 25 - static void mt76x2u_stop(struct ieee80211_hw *hw) 25 + static void mt76x2u_stop(struct ieee80211_hw *hw, bool suspend) 26 26 { 27 27 struct mt76x02_dev *dev = hw->priv; 28 28
+1 -1
drivers/net/wireless/mediatek/mt76/mt7915/main.c
··· 108 108 return ret; 109 109 } 110 110 111 - static void mt7915_stop(struct ieee80211_hw *hw) 111 + static void mt7915_stop(struct ieee80211_hw *hw, bool suspend) 112 112 { 113 113 struct mt7915_dev *dev = mt7915_hw_dev(hw); 114 114 struct mt7915_phy *phy = mt7915_hw_phy(hw);
+2 -2
drivers/net/wireless/mediatek/mt76/mt7921/main.c
··· 268 268 return err; 269 269 } 270 270 271 - static void mt7921_stop(struct ieee80211_hw *hw) 271 + static void mt7921_stop(struct ieee80211_hw *hw, bool suspend) 272 272 { 273 273 struct mt792x_dev *dev = mt792x_hw_dev(hw); 274 274 int err = 0; ··· 281 281 return; 282 282 } 283 283 284 - mt792x_stop(hw); 284 + mt792x_stop(hw, false); 285 285 } 286 286 287 287 static int
+2 -2
drivers/net/wireless/mediatek/mt76/mt792x.h
··· 251 251 #define mt792x_mutex_release(dev) \ 252 252 mt76_connac_mutex_release(&(dev)->mt76, &(dev)->pm) 253 253 254 - void mt792x_stop(struct ieee80211_hw *hw); 254 + void mt792x_stop(struct ieee80211_hw *hw, bool suspend); 255 255 void mt792x_pm_wake_work(struct work_struct *work); 256 256 void mt792x_pm_power_save_work(struct work_struct *work); 257 257 void mt792x_reset(struct mt76_dev *mdev); ··· 368 368 u32 mt792xu_rmw(struct mt76_dev *dev, u32 addr, u32 mask, u32 val); 369 369 void mt792xu_copy(struct mt76_dev *dev, u32 offset, const void *data, int len); 370 370 void mt792xu_disconnect(struct usb_interface *usb_intf); 371 - void mt792xu_stop(struct ieee80211_hw *hw); 371 + void mt792xu_stop(struct ieee80211_hw *hw, bool suspend); 372 372 373 373 static inline void 374 374 mt792x_skb_add_usb_sdio_hdr(struct mt792x_dev *dev, struct sk_buff *skb,
+1 -1
drivers/net/wireless/mediatek/mt76/mt792x_core.c
··· 91 91 } 92 92 EXPORT_SYMBOL_GPL(mt792x_tx); 93 93 94 - void mt792x_stop(struct ieee80211_hw *hw) 94 + void mt792x_stop(struct ieee80211_hw *hw, bool suspend) 95 95 { 96 96 struct mt792x_dev *dev = mt792x_hw_dev(hw); 97 97 struct mt792x_phy *phy = mt792x_hw_phy(hw);
+2 -2
drivers/net/wireless/mediatek/mt76/mt792x_usb.c
··· 285 285 } 286 286 EXPORT_SYMBOL_GPL(mt792xu_init_reset); 287 287 288 - void mt792xu_stop(struct ieee80211_hw *hw) 288 + void mt792xu_stop(struct ieee80211_hw *hw, bool suspend) 289 289 { 290 290 struct mt792x_dev *dev = mt792x_hw_dev(hw); 291 291 292 292 mt76u_stop_tx(&dev->mt76); 293 - mt792x_stop(hw); 293 + mt792x_stop(hw, false); 294 294 } 295 295 EXPORT_SYMBOL_GPL(mt792xu_stop); 296 296
+1 -1
drivers/net/wireless/mediatek/mt76/mt7996/main.c
··· 93 93 return ret; 94 94 } 95 95 96 - static void mt7996_stop(struct ieee80211_hw *hw) 96 + static void mt7996_stop(struct ieee80211_hw *hw, bool suspend) 97 97 { 98 98 struct mt7996_dev *dev = mt7996_hw_dev(hw); 99 99 struct mt7996_phy *phy = mt7996_hw_phy(hw);
+1 -1
drivers/net/wireless/mediatek/mt7601u/main.c
··· 28 28 return ret; 29 29 } 30 30 31 - static void mt7601u_stop(struct ieee80211_hw *hw) 31 + static void mt7601u_stop(struct ieee80211_hw *hw, bool suspend) 32 32 { 33 33 struct mt7601u_dev *dev = hw->priv; 34 34
+1 -1
drivers/net/wireless/purelifi/plfxlc/mac.c
··· 111 111 return 0; 112 112 } 113 113 114 - void plfxlc_op_stop(struct ieee80211_hw *hw) 114 + void plfxlc_op_stop(struct ieee80211_hw *hw, bool suspend) 115 115 { 116 116 struct plfxlc_mac *mac = plfxlc_hw_mac(hw); 117 117
+1 -1
drivers/net/wireless/purelifi/plfxlc/mac.h
··· 178 178 void plfxlc_mac_tx_failed(struct urb *urb); 179 179 void plfxlc_mac_tx_to_dev(struct sk_buff *skb, int error); 180 180 int plfxlc_op_start(struct ieee80211_hw *hw); 181 - void plfxlc_op_stop(struct ieee80211_hw *hw); 181 + void plfxlc_op_stop(struct ieee80211_hw *hw, bool suspend); 182 182 int plfxlc_restore_settings(struct plfxlc_mac *mac); 183 183 184 184 #endif /* PLFXLC_MAC_H */
+2 -2
drivers/net/wireless/purelifi/plfxlc/usb.c
··· 408 408 409 409 void plfxlc_usb_release(struct plfxlc_usb *usb) 410 410 { 411 - plfxlc_op_stop(plfxlc_usb_to_hw(usb)); 411 + plfxlc_op_stop(plfxlc_usb_to_hw(usb), false); 412 412 plfxlc_usb_disable_tx(usb); 413 413 plfxlc_usb_disable_rx(usb); 414 414 usb_set_intfdata(usb->intf, NULL); ··· 761 761 762 762 static void plfxlc_usb_stop(struct plfxlc_usb *usb) 763 763 { 764 - plfxlc_op_stop(plfxlc_usb_to_hw(usb)); 764 + plfxlc_op_stop(plfxlc_usb_to_hw(usb), false); 765 765 plfxlc_usb_disable_tx(usb); 766 766 plfxlc_usb_disable_rx(usb); 767 767
+1 -1
drivers/net/wireless/ralink/rt2x00/rt2x00.h
··· 1450 1450 struct ieee80211_tx_control *control, 1451 1451 struct sk_buff *skb); 1452 1452 int rt2x00mac_start(struct ieee80211_hw *hw); 1453 - void rt2x00mac_stop(struct ieee80211_hw *hw); 1453 + void rt2x00mac_stop(struct ieee80211_hw *hw, bool suspend); 1454 1454 void rt2x00mac_reconfig_complete(struct ieee80211_hw *hw, 1455 1455 enum ieee80211_reconfig_type reconfig_type); 1456 1456 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
+1 -1
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
··· 178 178 } 179 179 EXPORT_SYMBOL_GPL(rt2x00mac_start); 180 180 181 - void rt2x00mac_stop(struct ieee80211_hw *hw) 181 + void rt2x00mac_stop(struct ieee80211_hw *hw, bool suspend) 182 182 { 183 183 struct rt2x00_dev *rt2x00dev = hw->priv; 184 184
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
··· 1249 1249 return ret; 1250 1250 } 1251 1251 1252 - static void rtl8180_stop(struct ieee80211_hw *dev) 1252 + static void rtl8180_stop(struct ieee80211_hw *dev, bool suspend) 1253 1253 { 1254 1254 struct rtl8180_priv *priv = dev->priv; 1255 1255 u8 reg;
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
··· 1019 1019 return ret; 1020 1020 } 1021 1021 1022 - static void rtl8187_stop(struct ieee80211_hw *dev) 1022 + static void rtl8187_stop(struct ieee80211_hw *dev, bool suspend) 1023 1023 { 1024 1024 struct rtl8187_priv *priv = dev->priv; 1025 1025 struct sk_buff *skb;
+1 -1
drivers/net/wireless/realtek/rtl8xxxu/core.c
··· 7521 7521 return ret; 7522 7522 } 7523 7523 7524 - static void rtl8xxxu_stop(struct ieee80211_hw *hw) 7524 + static void rtl8xxxu_stop(struct ieee80211_hw *hw, bool suspend) 7525 7525 { 7526 7526 struct rtl8xxxu_priv *priv = hw->priv; 7527 7527 unsigned long flags;
+2 -2
drivers/net/wireless/realtek/rtlwifi/core.c
··· 144 144 return err; 145 145 } 146 146 147 - static void rtl_op_stop(struct ieee80211_hw *hw) 147 + static void rtl_op_stop(struct ieee80211_hw *hw, bool suspend) 148 148 { 149 149 struct rtl_priv *rtlpriv = rtl_priv(hw); 150 150 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); ··· 547 547 rtlhal->enter_pnp_sleep = true; 548 548 549 549 rtl_lps_leave(hw, true); 550 - rtl_op_stop(hw); 550 + rtl_op_stop(hw, false); 551 551 device_set_wakeup_enable(wiphy_dev(hw->wiphy), true); 552 552 return 0; 553 553 }
+1 -1
drivers/net/wireless/realtek/rtw88/mac80211.c
··· 62 62 return ret; 63 63 } 64 64 65 - static void rtw_ops_stop(struct ieee80211_hw *hw) 65 + static void rtw_ops_stop(struct ieee80211_hw *hw, bool suspend) 66 66 { 67 67 struct rtw_dev *rtwdev = hw->priv; 68 68
+1 -1
drivers/net/wireless/realtek/rtw89/mac80211.c
··· 66 66 return ret; 67 67 } 68 68 69 - static void rtw89_ops_stop(struct ieee80211_hw *hw) 69 + static void rtw89_ops_stop(struct ieee80211_hw *hw, bool suspend) 70 70 { 71 71 struct rtw89_dev *rtwdev = hw->priv; 72 72
+2 -1
drivers/net/wireless/rsi/rsi_91x_mac80211.c
··· 410 410 /** 411 411 * rsi_mac80211_stop() - This is the last handler that 802.11 module calls. 412 412 * @hw: Pointer to the ieee80211_hw structure. 413 + * @suspend: true if the this was called from suspend flow. 413 414 * 414 415 * Return: None. 415 416 */ 416 - static void rsi_mac80211_stop(struct ieee80211_hw *hw) 417 + static void rsi_mac80211_stop(struct ieee80211_hw *hw, bool suspend) 417 418 { 418 419 struct rsi_hw *adapter = hw->priv; 419 420 struct rsi_common *common = adapter->priv;
+1 -1
drivers/net/wireless/silabs/wfx/sta.c
··· 805 805 return 0; 806 806 } 807 807 808 - void wfx_stop(struct ieee80211_hw *hw) 808 + void wfx_stop(struct ieee80211_hw *hw, bool suspend) 809 809 { 810 810 struct wfx_dev *wdev = hw->priv; 811 811
+1 -1
drivers/net/wireless/silabs/wfx/sta.h
··· 20 20 21 21 /* mac80211 interface */ 22 22 int wfx_start(struct ieee80211_hw *hw); 23 - void wfx_stop(struct ieee80211_hw *hw); 23 + void wfx_stop(struct ieee80211_hw *hw, bool suspend); 24 24 int wfx_config(struct ieee80211_hw *hw, u32 changed); 25 25 int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value); 26 26 void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx);
+1 -1
drivers/net/wireless/st/cw1200/sta.c
··· 90 90 return ret; 91 91 } 92 92 93 - void cw1200_stop(struct ieee80211_hw *dev) 93 + void cw1200_stop(struct ieee80211_hw *dev, bool suspend) 94 94 { 95 95 struct cw1200_common *priv = dev->priv; 96 96 LIST_HEAD(list);
+1 -1
drivers/net/wireless/st/cw1200/sta.h
··· 13 13 /* mac80211 API */ 14 14 15 15 int cw1200_start(struct ieee80211_hw *dev); 16 - void cw1200_stop(struct ieee80211_hw *dev); 16 + void cw1200_stop(struct ieee80211_hw *dev, bool suspend); 17 17 int cw1200_add_interface(struct ieee80211_hw *dev, 18 18 struct ieee80211_vif *vif); 19 19 void cw1200_remove_interface(struct ieee80211_hw *dev,
+1 -1
drivers/net/wireless/ti/wl1251/main.c
··· 415 415 return ret; 416 416 } 417 417 418 - static void wl1251_op_stop(struct ieee80211_hw *hw) 418 + static void wl1251_op_stop(struct ieee80211_hw *hw, bool suspend) 419 419 { 420 420 struct wl1251 *wl = hw->priv; 421 421
+1 -1
drivers/net/wireless/ti/wlcore/main.c
··· 2085 2085 memset(wl->reg_ch_conf_last, 0, sizeof(wl->reg_ch_conf_last)); 2086 2086 } 2087 2087 2088 - static void wlcore_op_stop(struct ieee80211_hw *hw) 2088 + static void wlcore_op_stop(struct ieee80211_hw *hw, bool suspend) 2089 2089 { 2090 2090 struct wl1271 *wl = hw->priv; 2091 2091
+1 -1
drivers/net/wireless/virtual/mac80211_hwsim.c
··· 2098 2098 } 2099 2099 2100 2100 2101 - static void mac80211_hwsim_stop(struct ieee80211_hw *hw) 2101 + static void mac80211_hwsim_stop(struct ieee80211_hw *hw, bool suspend) 2102 2102 { 2103 2103 struct mac80211_hwsim_data *data = hw->priv; 2104 2104 int i;
+1 -1
drivers/net/wireless/zydas/zd1211rw/zd_mac.c
··· 326 326 return r; 327 327 } 328 328 329 - void zd_op_stop(struct ieee80211_hw *hw) 329 + void zd_op_stop(struct ieee80211_hw *hw, bool suspend) 330 330 { 331 331 struct zd_mac *mac = zd_hw_mac(hw); 332 332 struct zd_chip *chip = &mac->chip;
+1 -1
drivers/net/wireless/zydas/zd1211rw/zd_mac.h
··· 303 303 void zd_mac_tx_to_dev(struct sk_buff *skb, int error); 304 304 305 305 int zd_op_start(struct ieee80211_hw *hw); 306 - void zd_op_stop(struct ieee80211_hw *hw); 306 + void zd_op_stop(struct ieee80211_hw *hw, bool suspend); 307 307 int zd_restore_settings(struct zd_mac *mac); 308 308 309 309 #ifdef DEBUG
+1 -1
drivers/net/wireless/zydas/zd1211rw/zd_usb.c
··· 1476 1476 { 1477 1477 dev_dbg_f(zd_usb_dev(usb), "\n"); 1478 1478 1479 - zd_op_stop(zd_usb_to_hw(usb)); 1479 + zd_op_stop(zd_usb_to_hw(usb), false); 1480 1480 1481 1481 zd_usb_disable_tx(usb); 1482 1482 zd_usb_disable_rx(usb);
+1 -1
drivers/staging/vt6655/device_main.c
··· 1339 1339 return ret; 1340 1340 } 1341 1341 1342 - static void vnt_stop(struct ieee80211_hw *hw) 1342 + static void vnt_stop(struct ieee80211_hw *hw, bool suspend) 1343 1343 { 1344 1344 struct vnt_private *priv = hw->priv; 1345 1345
+1 -1
drivers/staging/vt6656/main_usb.c
··· 613 613 return ret; 614 614 } 615 615 616 - static void vnt_stop(struct ieee80211_hw *hw) 616 + static void vnt_stop(struct ieee80211_hw *hw, bool suspend) 617 617 { 618 618 struct vnt_private *priv = hw->priv; 619 619 int i;
+1 -1
include/net/mac80211.h
··· 4444 4444 struct ieee80211_tx_control *control, 4445 4445 struct sk_buff *skb); 4446 4446 int (*start)(struct ieee80211_hw *hw); 4447 - void (*stop)(struct ieee80211_hw *hw); 4447 + void (*stop)(struct ieee80211_hw *hw, bool suspend); 4448 4448 #ifdef CONFIG_PM 4449 4449 int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); 4450 4450 int (*resume)(struct ieee80211_hw *hw);
+3 -3
net/mac80211/driver-ops.c
··· 33 33 return ret; 34 34 } 35 35 36 - void drv_stop(struct ieee80211_local *local) 36 + void drv_stop(struct ieee80211_local *local, bool suspend) 37 37 { 38 38 might_sleep(); 39 39 lockdep_assert_wiphy(local->hw.wiphy); ··· 41 41 if (WARN_ON(!local->started)) 42 42 return; 43 43 44 - trace_drv_stop(local); 45 - local->ops->stop(&local->hw); 44 + trace_drv_stop(local, suspend); 45 + local->ops->stop(&local->hw, suspend); 46 46 trace_drv_return_void(local); 47 47 48 48 /* sync away all work on the tasklet before clearing started */
+1 -1
net/mac80211/driver-ops.h
··· 88 88 } 89 89 90 90 int drv_start(struct ieee80211_local *local); 91 - void drv_stop(struct ieee80211_local *local); 91 + void drv_stop(struct ieee80211_local *local, bool suspend); 92 92 93 93 #ifdef CONFIG_PM 94 94 static inline int drv_suspend(struct ieee80211_local *local,
+1 -1
net/mac80211/ieee80211_i.h
··· 2246 2246 2247 2247 /* Suspend/resume and hw reconfiguration */ 2248 2248 int ieee80211_reconfig(struct ieee80211_local *local); 2249 - void ieee80211_stop_device(struct ieee80211_local *local); 2249 + void ieee80211_stop_device(struct ieee80211_local *local, bool suspend); 2250 2250 2251 2251 int __ieee80211_suspend(struct ieee80211_hw *hw, 2252 2252 struct cfg80211_wowlan *wowlan);
+2 -2
net/mac80211/iface.c
··· 698 698 wiphy_delayed_work_flush(local->hw.wiphy, &local->scan_work); 699 699 700 700 if (local->open_count == 0) { 701 - ieee80211_stop_device(local); 701 + ieee80211_stop_device(local, false); 702 702 703 703 /* no reconfiguring after stop! */ 704 704 return; ··· 1435 1435 drv_remove_interface(local, sdata); 1436 1436 err_stop: 1437 1437 if (!local->open_count) 1438 - drv_stop(local); 1438 + drv_stop(local, false); 1439 1439 err_del_bss: 1440 1440 sdata->bss = NULL; 1441 1441 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+2 -2
net/mac80211/pm.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 3 * Portions 4 - * Copyright (C) 2020-2021, 2023 Intel Corporation 4 + * Copyright (C) 2020-2021, 2023-2024 Intel Corporation 5 5 */ 6 6 #include <net/mac80211.h> 7 7 #include <net/rtnetlink.h> ··· 171 171 WARN_ON(!list_empty(&local->chanctx_list)); 172 172 173 173 /* stop hardware - this must stop RX */ 174 - ieee80211_stop_device(local); 174 + ieee80211_stop_device(local, true); 175 175 176 176 suspend: 177 177 local->suspended = true;
+12 -3
net/mac80211/trace.h
··· 328 328 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled) 329 329 ); 330 330 331 - DEFINE_EVENT(local_only_evt, drv_stop, 332 - TP_PROTO(struct ieee80211_local *local), 333 - TP_ARGS(local) 331 + TRACE_EVENT(drv_stop, 332 + TP_PROTO(struct ieee80211_local *local, bool suspend), 333 + TP_ARGS(local, suspend), 334 + TP_STRUCT__entry( 335 + LOCAL_ENTRY 336 + __field(bool, suspend) 337 + ), 338 + TP_fast_assign( 339 + LOCAL_ASSIGN; 340 + __entry->suspend = suspend; 341 + ), 342 + TP_printk(LOCAL_PR_FMT " suspend:%d", LOCAL_PR_ARG, __entry->suspend) 334 343 ); 335 344 336 345 DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
+2 -2
net/mac80211/util.c
··· 1565 1565 return supp_rates; 1566 1566 } 1567 1567 1568 - void ieee80211_stop_device(struct ieee80211_local *local) 1568 + void ieee80211_stop_device(struct ieee80211_local *local, bool suspend) 1569 1569 { 1570 1570 ieee80211_handle_queued_frames(local); 1571 1571 ··· 1576 1576 1577 1577 flush_workqueue(local->workqueue); 1578 1578 wiphy_work_flush(local->hw.wiphy, NULL); 1579 - drv_stop(local); 1579 + drv_stop(local, suspend); 1580 1580 } 1581 1581 1582 1582 static void ieee80211_flush_completed_scan(struct ieee80211_local *local,