mac.c (f1b27f54cf66742965d09c6a92af0360f3203d20) mac.c (dfc7743de1ebb5ff5c2ed323eaff1994da11abd9)
1// SPDX-License-Identifier: ISC
2/* Copyright (C) 2020 MediaTek Inc. */
3
4#include <linux/devcoredump.h>
5#include <linux/etherdevice.h>
6#include <linux/timekeeping.h>
7#include "mt7921.h"
8#include "../dma.h"

--- 1262 unchanged lines hidden (view full) ---

1271 dev->hw_full_reset = true;
1272 ieee80211_stop_queues(hw);
1273
1274 cancel_delayed_work_sync(&dev->mphy.mac_work);
1275 cancel_delayed_work_sync(&pm->ps_work);
1276 cancel_work_sync(&pm->wake_work);
1277
1278 mutex_lock(&dev->mt76.mutex);
1// SPDX-License-Identifier: ISC
2/* Copyright (C) 2020 MediaTek Inc. */
3
4#include <linux/devcoredump.h>
5#include <linux/etherdevice.h>
6#include <linux/timekeeping.h>
7#include "mt7921.h"
8#include "../dma.h"

--- 1262 unchanged lines hidden (view full) ---

1271 dev->hw_full_reset = true;
1272 ieee80211_stop_queues(hw);
1273
1274 cancel_delayed_work_sync(&dev->mphy.mac_work);
1275 cancel_delayed_work_sync(&pm->ps_work);
1276 cancel_work_sync(&pm->wake_work);
1277
1278 mutex_lock(&dev->mt76.mutex);
1279 for (i = 0; i < 10; i++) {
1280 __mt7921_mcu_drv_pmctrl(dev);
1281
1279 for (i = 0; i < 10; i++)
1282 if (!mt7921_dev_reset(dev))
1283 break;
1280 if (!mt7921_dev_reset(dev))
1281 break;
1284 }
1285 mutex_unlock(&dev->mt76.mutex);
1286
1287 if (i == 10)
1288 dev_err(dev->mt76.dev, "chip reset failed\n");
1289
1290 if (test_and_clear_bit(MT76_HW_SCANNING, &dev->mphy.state)) {
1291 struct cfg80211_scan_info info = {
1292 .aborted = true,

--- 180 unchanged lines hidden ---
1282 mutex_unlock(&dev->mt76.mutex);
1283
1284 if (i == 10)
1285 dev_err(dev->mt76.dev, "chip reset failed\n");
1286
1287 if (test_and_clear_bit(MT76_HW_SCANNING, &dev->mphy.state)) {
1288 struct cfg80211_scan_info info = {
1289 .aborted = true,

--- 180 unchanged lines hidden ---