Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp646602ybl; Thu, 22 Aug 2019 02:40:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+KwwfAW58M6gnSA7e/ILPf1PixoE/+I4ZS9c4lZ7695Dipo9hAzfmOydL8FoZ9kXH5bcJ X-Received: by 2002:a63:29c4:: with SMTP id p187mr33503147pgp.330.1566466840748; Thu, 22 Aug 2019 02:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566466840; cv=none; d=google.com; s=arc-20160816; b=JMapyA5x/o5oZJxBWNeRqJ6aoSYnUibyy+KV/HFhGi6BV7JAeT52Ptx1XeTL+DB7XB g/e+y38BS7cQQN5YKqhfvooFaVCq8goQfsGkCw2CpI1ZF6kQ2qs+S1h77rIG4M6IE6dT LCZuCI5qU/Ng7sOsSzuxOhYmysdtyH+y0VkOX0IEE9dydOG6+5r29a4GNOghFdIKMYqE IQ18yR5zSZ8golxuwRNlFG5lfoZve5+SBSI35UyTR9+sAFoYyengLSX/HDj3oKoYZmi4 PP8y9AbAwIheul37EAAjsTefNEM3eOMKhxcYRg2y1JKV5Jf3guiuM76bmxR8CTKjjfVn J1Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=XUEbydkUWToRdqxZOYq1b3X7szSMYb85JlW49Hl/alk=; b=GUvsKdsk4WKFiaknTpdP3Ng0jDUv212tGpnai7uz3kknwdaCSYa3UNur2rInhNUbIA WcfzFLUQhNiqOkYLOSOkn4SbwTLWp5G+aUiLtIsqkyxqRJx+K8Zn5SeuxK8N7DKskd3v kNSuDlz481iZQ0rfgDEu1eSLBeFqmnXnzW3G5R1nr8bdp6bZpZClzSi0/GiO5IxgfGq+ bCxldECh0+JGu2YpcvqPOJqaOnMyXCaTfgixdcqyw13BIm8zyNFZtIEBheGgKnciV5Tx zCoHstZU36rOhwW13rxy7lRKfW2b1iLg0z8w/AnMbnfb073scxrGClU0Gs3yg7XX2XUI EpVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=l3rBZDMe; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15si16177037pgj.71.2019.08.22.02.40.25; Thu, 22 Aug 2019 02:40:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=l3rBZDMe; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731126AbfHVIgZ (ORCPT + 99 others); Thu, 22 Aug 2019 04:36:25 -0400 Received: from nbd.name ([46.4.11.11]:50904 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732465AbfHVIgZ (ORCPT ); Thu, 22 Aug 2019 04:36:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XUEbydkUWToRdqxZOYq1b3X7szSMYb85JlW49Hl/alk=; b=l3rBZDMeUJqf2aKK+G7gV4Tyw9 Zy8+mC3o2GYFtaaWtnrxai6sxAwPos5lPYQ+ErLTRMEJ5nsQo53Smhx+9dTYS/k5m6tjm0pD0qRVl tY1ihaSXBLPizYFa2fThjWOZ61Zy01eB+lY1vK+qe4Lsd+HXwmibyqGasDXI5++99MpI=; Received: from p54ae9443.dip0.t-ipconnect.de ([84.174.148.67] helo=maeck.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i0iZz-0004vO-2C; Thu, 22 Aug 2019 10:36:23 +0200 Received: by maeck.local (Postfix, from userid 501) id 8FCF563FDE2F; Thu, 22 Aug 2019 10:36:22 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: Balakrishna Bandi Subject: [PATCH 2/2] mt76: remove offchannel check in tx scheduling Date: Thu, 22 Aug 2019 10:36:22 +0200 Message-Id: <20190822083622.48998-2-nbd@nbd.name> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190822083622.48998-1-nbd@nbd.name> References: <20190822083622.48998-1-nbd@nbd.name> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org tx queues are already disabled by mac80211 during scanning or other off-channel activity. There is no need to repeat the check in mt76, since scheduled queues are selected by mac80211 as well. Signed-off-by: Balakrishna Bandi Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mac80211.c | 5 ----- drivers/net/wireless/mediatek/mt76/mt76.h | 1 - drivers/net/wireless/mediatek/mt76/tx.c | 6 ++---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 32ddbf088817..fa481d2f11bd 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -406,11 +406,6 @@ void mt76_set_channel(struct mt76_dev *dev) bool offchannel = hw->conf.flags & IEEE80211_CONF_OFFCHANNEL; int timeout = HZ / 5; - if (offchannel) - set_bit(MT76_OFFCHANNEL, &dev->state); - else - clear_bit(MT76_OFFCHANNEL, &dev->state); - wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(dev), timeout); if (dev->drv->update_survey) diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 38f2b17581ef..d67c6a26c87c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -272,7 +272,6 @@ enum { MT76_STATE_MCU_RUNNING, MT76_SCANNING, MT76_RESET, - MT76_OFFCHANNEL, MT76_REMOVED, MT76_READING_STATS, }; diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c index d7982aa83c11..c22a05f06fd0 100644 --- a/drivers/net/wireless/mediatek/mt76/tx.c +++ b/drivers/net/wireless/mediatek/mt76/tx.c @@ -427,8 +427,7 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq, if (probe) break; - if (test_bit(MT76_OFFCHANNEL, &dev->state) || - test_bit(MT76_RESET, &dev->state)) + if (test_bit(MT76_RESET, &dev->state)) return -EBUSY; skb = mt76_txq_dequeue(dev, mtxq, false); @@ -487,8 +486,7 @@ mt76_txq_schedule_list(struct mt76_dev *dev, enum mt76_txq_id qid) if (sq->swq_queued >= 4) break; - if (test_bit(MT76_OFFCHANNEL, &dev->state) || - test_bit(MT76_RESET, &dev->state)) { + if (test_bit(MT76_RESET, &dev->state)) { ret = -EBUSY; break; } -- 2.17.0