From patchwork Wed Nov 6 01:32:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mingyen Hsieh X-Patchwork-Id: 13863817 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4FC7D35E5D for ; Wed, 6 Nov 2024 01:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Ri1dP8qTmKMrFKqN7oRAYijy4l9bHKG+uziEJXybHfA=; b=GnQYN08cWeXE+dGdLqO7U22SF7 J75IrwY+N1T7UIrSzaiVEW2w6DoTTGsrjFRTHs7KW0qqMbZuj78TT7fOBsYTcFirwXFjR3BN27Qa8 37WwIoCPrPSMebqVZxruBDKm52JIRxd31WrkIx5vdI/ZNPoReAyiefsz8gE8a9kRVwpd0tCCJEojt GWtUhXsh/TUQm9sOka4a6qM+H2gU9T9Dh3M67/8S0NroazxtHrj8gqCIBpm4NFZPEk8+URC3/6VUo sRVOfc9xHXc5YBwB4O68AAkYwDEyaW/fWxBrCIqcNQwXm5RyM5nigFBuHLQjCez6GtzicODhM5adU jPQOMXOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8UuQ-00000001KMW-2BM5; Wed, 06 Nov 2024 01:32:34 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t8UuN-00000001KM7-3t5Y for linux-mediatek@lists.infradead.org; Wed, 06 Nov 2024 01:32:33 +0000 X-UUID: faf778a69bde11ef9048ed6ed365623b-20241105 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=Ri1dP8qTmKMrFKqN7oRAYijy4l9bHKG+uziEJXybHfA=; b=pa2ONbeJUYCrFnnJISKyChnxtOxlZJtkCv1k2x2d9zrXv+VjxBXoyENWmT0r0PmSGC/ONrXTcqOPfaxDVPKmgDjS3ElNz34R/PJTtdKmy7S55GZGvQy7o1dN5Qx9K8I2UNpjx3rcPhizzzB+CRc79Mm/s+bLCxU5vyDXiUVqEWQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.42,REQID:3ebd4193-e190-4ece-8878-ac9596738536,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:b0fcdc3,CLOUDID:be5a9b07-7990-429c-b1a0-768435f03014,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: faf778a69bde11ef9048ed6ed365623b-20241105 Received: from mtkmbs09n2.mediatek.inc [(172.21.101.94)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 719339503; Tue, 05 Nov 2024 18:32:26 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 6 Nov 2024 09:32:22 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 6 Nov 2024 09:32:22 +0800 From: Mingyen Hsieh To: , CC: , , , , , , , , , , , , , , , Michael Lo , Ming Yen Hsieh Subject: [PATCH v2] wifi: mt76: mt7925: config the dwell time by firmware Date: Wed, 6 Nov 2024 09:32:21 +0800 Message-ID: <20241106013221.18101-1-mingyen.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--3.676100-8.000000 X-TMASE-MatchedRID: GLqgwom0iafeG4FwcWqASxuZoNKc6pl+5E5u1OdPWsQY0A95tjAn+9D1 SFVeE0DsM+nnsEaleMpfMrorr76P9n45uBZmw209+Fq9Vk/m1NquiRuR9mCaunq20v2fBg+yKk6 C52OIvQM6hUOcTonr9IAy6p60ZV62fJ5/bZ6npdjKayT/BQTiGmGCGZ0is/hFpHlYEKjauX/oaw rSXN+oWyt8lLomVQ74Nhky21Ht6YHxJizFgOHBt/Xjw0U5wIKIxmggkozZRimqXQwORNRFP2Dg1 oiqtsL2dATQdtPksR+3/JiWOe6GXXSWgQ2GpXdZbxffl9hhCBw= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.676100-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 7F26C053AC1D8E30EB939707C38642E8135BCB38EA527B1764D0305CC61253102000:8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241105_173232_208700_4FCCF78B X-CRM114-Status: GOOD ( 11.07 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Michael Lo To optimize the scan time of mt7925, remove the dwell time setting for the scan command and let it be controlled by the firmware as mt7921. Signed-off-by: Michael Lo Signed-off-by: Ming Yen Hsieh --- v2: - change author's mail format drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 0c2a2337c313..4226baf3cfcb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -2643,14 +2643,12 @@ int mt7925_mcu_set_dbdc(struct mt76_phy *phy) return err; } -#define MT76_CONNAC_SCAN_CHANNEL_TIME 60 - int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif, struct ieee80211_scan_request *scan_req) { struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv; struct cfg80211_scan_request *sreq = &scan_req->req; - int n_ssids = 0, err, i, duration; + int n_ssids = 0, err, i; struct ieee80211_channel **scan_list = sreq->channels; struct mt76_dev *mdev = phy->dev; struct mt76_connac_mcu_scan_channel *chan; @@ -2686,14 +2684,6 @@ int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif, req->scan_type = sreq->n_ssids ? 1 : 0; req->probe_req_num = sreq->n_ssids ? 2 : 0; - duration = MT76_CONNAC_SCAN_CHANNEL_TIME; - /* increase channel time for passive scan */ - if (!sreq->n_ssids) - duration *= 2; - req->timeout_value = cpu_to_le16(sreq->n_channels * duration); - req->channel_min_dwell_time = cpu_to_le16(duration); - req->channel_dwell_time = cpu_to_le16(duration); - tlv = mt76_connac_mcu_add_tlv(skb, UNI_SCAN_SSID, sizeof(*ssid)); ssid = (struct scan_ssid_tlv *)tlv; for (i = 0; i < sreq->n_ssids; i++) {