main.c (07241519b35794a66fcc429042240424ddf35f3d) | main.c (0d2afe09fad5f8c59e21630f10b66b08cf5c529a) |
---|---|
1// SPDX-License-Identifier: ISC 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#include <linux/etherdevice.h> 5#include <linux/platform_device.h> 6#include <linux/pci.h> 7#include <linux/module.h> 8#include "mt7921.h" --- 250 unchanged lines hidden (view full) --- 259 260 mt7921_mutex_acquire(phy->dev); 261 err = __mt7921_start(phy); 262 mt7921_mutex_release(phy->dev); 263 264 return err; 265} 266 | 1// SPDX-License-Identifier: ISC 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#include <linux/etherdevice.h> 5#include <linux/platform_device.h> 6#include <linux/pci.h> 7#include <linux/module.h> 8#include "mt7921.h" --- 250 unchanged lines hidden (view full) --- 259 260 mt7921_mutex_acquire(phy->dev); 261 err = __mt7921_start(phy); 262 mt7921_mutex_release(phy->dev); 263 264 return err; 265} 266 |
267static void mt7921_stop(struct ieee80211_hw *hw) | 267void mt7921_stop(struct ieee80211_hw *hw) |
268{ 269 struct mt7921_dev *dev = mt7921_hw_dev(hw); 270 struct mt7921_phy *phy = mt7921_hw_phy(hw); 271 272 cancel_delayed_work_sync(&phy->mt76->mac_work); 273 274 cancel_delayed_work_sync(&dev->pm.ps_work); 275 cancel_work_sync(&dev->pm.wake_work); 276 cancel_work_sync(&dev->reset_work); 277 mt76_connac_free_pending_tx_skbs(&dev->pm, NULL); 278 279 mt7921_mutex_acquire(dev); 280 clear_bit(MT76_STATE_RUNNING, &phy->mt76->state); 281 mt76_connac_mcu_set_mac_enable(&dev->mt76, 0, false, false); 282 mt7921_mutex_release(dev); 283} | 268{ 269 struct mt7921_dev *dev = mt7921_hw_dev(hw); 270 struct mt7921_phy *phy = mt7921_hw_phy(hw); 271 272 cancel_delayed_work_sync(&phy->mt76->mac_work); 273 274 cancel_delayed_work_sync(&dev->pm.ps_work); 275 cancel_work_sync(&dev->pm.wake_work); 276 cancel_work_sync(&dev->reset_work); 277 mt76_connac_free_pending_tx_skbs(&dev->pm, NULL); 278 279 mt7921_mutex_acquire(dev); 280 clear_bit(MT76_STATE_RUNNING, &phy->mt76->state); 281 mt76_connac_mcu_set_mac_enable(&dev->mt76, 0, false, false); 282 mt7921_mutex_release(dev); 283} |
284EXPORT_SYMBOL_GPL(mt7921_stop); |
|
284 285static int mt7921_add_interface(struct ieee80211_hw *hw, 286 struct ieee80211_vif *vif) 287{ 288 struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; 289 struct mt7921_dev *dev = mt7921_hw_dev(hw); 290 struct mt7921_phy *phy = mt7921_hw_phy(hw); 291 struct mt76_txq *mtxq; --- 1147 unchanged lines hidden --- | 285 286static int mt7921_add_interface(struct ieee80211_hw *hw, 287 struct ieee80211_vif *vif) 288{ 289 struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv; 290 struct mt7921_dev *dev = mt7921_hw_dev(hw); 291 struct mt7921_phy *phy = mt7921_hw_phy(hw); 292 struct mt76_txq *mtxq; --- 1147 unchanged lines hidden --- |