linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
	lorenzo@kernel.org, sujuan.chen@mediatek.com,
	Linux List Kernel Mailing <linux-wireless@vger.kernel.org>,
	Linux List Kernel Mailing <linux-kernel@vger.kernel.org>
Subject: Re: [6.2][regression] after commit cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae stopping working wifi mt7921e
Date: Wed, 21 Dec 2022 11:45:38 +0100	[thread overview]
Message-ID: <678adc67-9e46-3eef-f274-c951b121570f@nbd.name> (raw)
In-Reply-To: <CABXGCsMEnQd=gYKTd1knRsWuxCb=Etv5nAre+XJS_s5FgVteYA@mail.gmail.com>

On 21.12.22 02:10, Mikhail Gavrilov wrote:
> Hi,
> The kernel 6.2 preparation cycle has begun.
> And after the kernel was updated on my laptop, the wifi stopped working.
> 
> Bisecting blames this commit:
> cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae is the first bad commit
> commit cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae
> Author: Lorenzo Bianconi <lorenzo@kernel.org>
> Date:   Sat Nov 12 16:40:35 2022 +0100
> 
>      wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf
> 
>      Introduce the capability to configure RX WED in mt76_dma_{add,get}_buf
>      utility routines.
> 
>      Tested-by: Daniel Golle <daniel@makrotopia.org>
>      Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
>      Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
>      Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>      Signed-off-by: Felix Fietkau <nbd@nbd.name>
> 
>   drivers/net/wireless/mediatek/mt76/dma.c  | 125 ++++++++++++++++++++----------
>   drivers/net/wireless/mediatek/mt76/mt76.h |   2 +
>   2 files changed, 88 insertions(+), 39 deletions(-)
> 
> Unfortunately, I can't be sure that revert this commit will fix the
> problem. Because after the revert, compile of kernel failing with
> follow error:
> drivers/net/wireless/mediatek/mt76/mt7915/dma.c: In function ‘mt7915_dma_init’:
> drivers/net/wireless/mediatek/mt76/mt7915/dma.c:489:33: error:
> implicit declaration of function ‘MT_WED_Q_RX’; did you mean
> ‘MT_WED_Q_TX’? [-Werror=implicit-function-declaration]
>    489 |                                 MT_WED_Q_RX(MT7915_RXQ_BAND0);
>        |                                 ^~~~~~~~~~~
>        |                                 MT_WED_Q_TX
> cc1: some warnings being treated as errors
>    CC [M]  drivers/net/ethernet/intel/igb/e1000_phy.o
> make[7]: *** [scripts/Makefile.build:252:
> drivers/net/wireless/mediatek/mt76/mt7915/dma.o] Error 1
> make[7]: *** Waiting for unfinished jobs....
I'm pretty sure that commit is unrelated to this issue. However, while
looking at the code I found a bug that would explain your issue.

Please try this patch:
---
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -422,15 +422,15 @@ void mt7921_roc_timer(struct timer_list *timer)
  
  static int mt7921_abort_roc(struct mt7921_phy *phy, struct mt7921_vif *vif)
  {
-	int err;
-
-	if (!test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state))
-		return 0;
+	int err = 0;
  
  	del_timer_sync(&phy->roc_timer);
  	cancel_work_sync(&phy->roc_work);
-	err = mt7921_mcu_abort_roc(phy, vif, phy->roc_token_id);
-	clear_bit(MT76_STATE_ROC, &phy->mt76->state);
+
+	mt7921_mutex_acquire(phy->dev);
+	if (test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state))
+		err = mt7921_mcu_abort_roc(phy, vif, phy->roc_token_id);
+	mt7921_mutex_release(phy->dev);
  
  	return err;
  }
@@ -487,13 +487,8 @@ static int mt7921_cancel_remain_on_channel(struct ieee80211_hw *hw,
  {
  	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
  	struct mt7921_phy *phy = mt7921_hw_phy(hw);
-	int err;
  
-	mt7921_mutex_acquire(phy->dev);
-	err = mt7921_abort_roc(phy, mvif);
-	mt7921_mutex_release(phy->dev);
-
-	return err;
+	return mt7921_abort_roc(phy, mvif);
  }
  
  static int mt7921_set_channel(struct mt7921_phy *phy)
@@ -1778,11 +1773,8 @@ static void mt7921_mgd_complete_tx(struct ieee80211_hw *hw,
  				   struct ieee80211_prep_tx_info *info)
  {
  	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
-	struct mt7921_dev *dev = mt7921_hw_dev(hw);
  
-	mt7921_mutex_acquire(dev);
  	mt7921_abort_roc(mvif->phy, mvif);
-	mt7921_mutex_release(dev);
  }
  
  const struct ieee80211_ops mt7921_ops = {


  reply	other threads:[~2022-12-21 10:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21  1:10 [6.2][regression] after commit cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae stopping working wifi mt7921e Mikhail Gavrilov
2022-12-21 10:45 ` Felix Fietkau [this message]
2022-12-21 11:26   ` Lorenzo Bianconi
2022-12-21 13:10   ` Mikhail Gavrilov
2022-12-21 14:12     ` Felix Fietkau
2022-12-21 16:07       ` Lorenzo Bianconi
2022-12-21 16:46       ` Mikhail Gavrilov
2022-12-21 17:17         ` Felix Fietkau
2022-12-22  6:47           ` Mikhail Gavrilov
2022-12-24  7:55             ` Thorsten Leemhuis
2022-12-26 10:59               ` Thorsten Leemhuis
2023-01-04 14:20           ` Thorsten Leemhuis
2023-01-09  7:32             ` Linux kernel regression tracking (Thorsten Leemhuis)
2023-01-10  7:16               ` Linux kernel regression tracking (Thorsten Leemhuis)
2023-01-10  8:00                 ` Felix Fietkau
2023-01-10  8:41                   ` Linux kernel regression tracking (Thorsten Leemhuis)
2023-01-13 14:11                     ` Kalle Valo
2023-01-10 21:52                   ` Mikhail Gavrilov
2022-12-22 12:36 ` [6.2][regression] after commit cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae stopping working wifi mt7921e #forregzbot Thorsten Leemhuis
2023-01-27 11:36   ` Linux kernel regression tracking (#update)
2023-01-17  0:33 [6.2][regression] after commit cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae stopping working wifi mt7921e Mike Lothian
2023-01-17  5:42 ` Mikhail Gavrilov
2023-01-17  6:42   ` Kalle Valo
2023-01-17 13:06   ` Mike Lothian
2023-01-17 13:13     ` Mikhail Gavrilov

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=678adc67-9e46-3eef-f274-c951b121570f@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=mikhail.v.gavrilov@gmail.com \
    --cc=sujuan.chen@mediatek.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).