All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	Felix Fietkau <nbd@nbd.name>,
	linux-mediatek@lists.infradead.org
Subject: [PATCH 32/42] mt76x0: move stop related routines in mt76x0_mac_stop
Date: Thu,  6 Sep 2018 11:18:48 +0200	[thread overview]
Message-ID: <1536225538-16454-33-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1536225538-16454-1-git-send-email-sgruszka@redhat.com>

From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

Move tear-down routines in mt76x0_mac_stop function.
mt76x0_mac_stop routines will be reused in mt76x0_suspend

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 3 +++
 drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
index d186f509b5a8..b1d5f647eac5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
@@ -361,6 +361,9 @@ static void mt76x0_mac_stop_hw(struct mt76x0_dev *dev)
 
 void mt76x0_mac_stop(struct mt76x0_dev *dev)
 {
+	cancel_delayed_work_sync(&dev->cal_work);
+	cancel_delayed_work_sync(&dev->mac_work);
+	mt76u_stop_stat_wk(&dev->mt76);
 	mt76x0_mac_stop_hw(dev);
 }
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
index 8c8a0f676228..0d3c7accb4f8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
@@ -48,10 +48,6 @@ static void mt76x0_stop(struct ieee80211_hw *hw)
 	mutex_lock(&dev->mt76.mutex);
 
 	clear_bit(MT76_STATE_RUNNING, &dev->mt76.state);
-
-	cancel_delayed_work_sync(&dev->cal_work);
-	cancel_delayed_work_sync(&dev->mac_work);
-	mt76u_stop_stat_wk(&dev->mt76);
 	mt76x0_mac_stop(dev);
 
 	mutex_unlock(&dev->mt76.mutex);
-- 
2.7.5

WARNING: multiple messages have this Message-ID (diff)
From: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Lorenzo Bianconi
	<lorenzo.bianconi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Felix Fietkau <nbd-Vt+b4OUoWG0@public.gmane.org>,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH 32/42] mt76x0: move stop related routines in mt76x0_mac_stop
Date: Thu,  6 Sep 2018 11:18:48 +0200	[thread overview]
Message-ID: <1536225538-16454-33-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1536225538-16454-1-git-send-email-sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

From: Lorenzo Bianconi <lorenzo.bianconi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Move tear-down routines in mt76x0_mac_stop function.
mt76x0_mac_stop routines will be reused in mt76x0_suspend

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 3 +++
 drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
index d186f509b5a8..b1d5f647eac5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
@@ -361,6 +361,9 @@ static void mt76x0_mac_stop_hw(struct mt76x0_dev *dev)
 
 void mt76x0_mac_stop(struct mt76x0_dev *dev)
 {
+	cancel_delayed_work_sync(&dev->cal_work);
+	cancel_delayed_work_sync(&dev->mac_work);
+	mt76u_stop_stat_wk(&dev->mt76);
 	mt76x0_mac_stop_hw(dev);
 }
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
index 8c8a0f676228..0d3c7accb4f8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
@@ -48,10 +48,6 @@ static void mt76x0_stop(struct ieee80211_hw *hw)
 	mutex_lock(&dev->mt76.mutex);
 
 	clear_bit(MT76_STATE_RUNNING, &dev->mt76.state);

  parent reply	other threads:[~2018-09-06 13:54 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  9:18 [PATCH 00/42] mt76 patches 2018-09-06 Stanislaw Gruszka
2018-09-06  9:18 ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 01/42] mt76x2: change mt76x2_tx_complete routine signature Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 02/42] mt76: move mt76x2_tx_complete routine in mt76x02-lib module Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 03/42] mt76: move mt76x2u_remove_dma_hdr " Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 04/42] mt76: move mt76x2u_tx_complete_skb in mt76x02-lib moudule Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 05/42] mt76: move mt76_qsel definition in dma.h Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 06/42] mt76: move mt76x2u_set_txinfo in mt76x02-lib module Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-10  9:45   ` Felix Fietkau
2018-09-10  9:45     ` Felix Fietkau
2018-09-06  9:18 ` [PATCH 07/42] mt76x0: introduce mt76x0_tx_prepare_skb routine Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 08/42] mt76: move mt76x2u_tx_status_data in mt76x02-lib module Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 09/42] mt76x0: init mt76_driver_ops callbacks Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 10/42] mt76x0: use mt76_alloc_device for device allocation Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 11/42] mt76x0: disable usb rx bulk aggregation Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 12/42] mt76x0: mark device as running in mt76x0_start Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 13/42] mt76x0: simplify mt76_mac_process_rx signature Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 14/42] mt76x0: add mt76x0_queue_rx_skb routine Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 15/42] mt76x0: unify tx/rx datapath with mt76x2u driver Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 16/42] mt76x0: stop stat workqueue at hw stop Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 17/42] mt76x0: set max fragments size Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 18/42] mt76x0: remove unused dma.c source file Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 19/42] mt76x0: remove unused stat work_queue Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 20/42] mt76x0: remove unused {tx/rx}_queue definitions Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 21/42] mt76x0: remove unused mt76x0_tx_status routine Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 22/42] mt76x0: remove unused endpoint definitions Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 23/42] mt76x0: remove unused stat_work Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 24/42] mt76x0: enable per-sta tx queueing Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 25/42] mt76x0: init hw capabilities Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 26/42] mt76x0: trim rx skb to proper length Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 27/42] mt76: remove unused MT76_MORE_STATS state Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 28/42] mt76x0: remove mt76x0_stop_hardware routine Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 29/42] mt76: move mt76 rate definitions in mt76x02-lib module Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 30/42] mt76x0: alloc mcu buffers first in mt76x0_mcu_cmd_init Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 31/42] mt76x0: fix memory leak during hw probe Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` Stanislaw Gruszka [this message]
2018-09-06  9:18   ` [PATCH 32/42] mt76x0: move stop related routines in mt76x0_mac_stop Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 33/42] mt76x0: move mt76x0_init_hardware in mt76x0_register_device Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 34/42] mt76x0: do not free/alloc buffers during suspend/resume Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 35/42] mt76x0: remove has_{2,5}ghz fields of mt76x0_eeprom_params Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 36/42] mt76x0: use mt76_register_device for device registration Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 37/42] mt76x0: inital split between pci and usb Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 38/42] mt76: initial separation of mmio part Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:41   ` Felix Fietkau
2018-09-06  9:41     ` Felix Fietkau
2018-09-06  9:18 ` [PATCH 39/42] mt76: move some irq code to common mmio module Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:33   ` Felix Fietkau
2018-09-06  9:33     ` Felix Fietkau
2018-09-06  9:37     ` Lorenzo Bianconi
2018-09-06  9:37       ` Lorenzo Bianconi
2018-09-06  9:40       ` Felix Fietkau
2018-09-06  9:40         ` Felix Fietkau
2018-09-06  9:47         ` Lorenzo Bianconi
2018-09-06  9:47           ` Lorenzo Bianconi
2018-09-06 10:29           ` Stanislaw Gruszka
2018-09-06 10:29             ` Stanislaw Gruszka
2018-09-06 10:43     ` Stanislaw Gruszka
2018-09-06 10:43       ` Stanislaw Gruszka
2018-09-10  9:33       ` Felix Fietkau
2018-09-10  9:33         ` Felix Fietkau
2018-09-06  9:18 ` [PATCH 40/42] mt76x0: remove unused mt76x0_wcid Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 41/42] mt76x0: remove some usb specific code from mt76x0_register_device Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka
2018-09-06  9:18 ` [PATCH 42/42] mt76x0: make device allocation bus neutral Stanislaw Gruszka
2018-09-06  9:18   ` Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536225538-16454-33-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.