Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1478728ybb; Thu, 9 Apr 2020 03:01:09 -0700 (PDT) X-Google-Smtp-Source: APiQypJDQejNY3QdVVpfxlw3TXRqsoukkbMEYaW9vUyOLx2b6kRVfIYqappKKhbqGqxPeT+wid4D X-Received: by 2002:a9d:7315:: with SMTP id e21mr8171867otk.305.1586426469257; Thu, 09 Apr 2020 03:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586426469; cv=none; d=google.com; s=arc-20160816; b=UOb26ZNEQuJ59d+3Hnxjpz9rsPCkdcrW83n6V0ellLeRtgRiPe6H9VyDi0B7mkzZE4 s++5vfopqw30mh6mUXoj64SB1ghkttR03kJo1btNHI5VS82n+X9eqnqaEGeGw06y2+Q8 1hj3ToLjlEwI3j+B+5AAqIaZqjlJWJp4vGeRJto0lfdkK/RvBAxgcehxxI1mD4y7PMaf gUIqmlo0qZWot1vsHLxgXEmuuT69NREJQlvJKJYBLxy1DYtlq1SvY1raFqxgvBe+AH7F M/mFvZxGlhMvMp7UqsssWk2/YQ2tZpXtBsNnwiVf9Riivf7lWohrRz+R3ekepx6ci/rP gH6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=v/nVcghAqdih6qyBYA3nOkrPXJM2pa0tN2PRfPhCjzI=; b=TtFsbKMpqJPMubthG/0uWJtsulMdmjMvxuUetOOCnqayomuuYBhN8Vn+3wZ5ZFjdps 7T4v+uijtnTOSFaumUBNj45/5JUUprpZNysHDHG5x31Zaqwp38WIPaO+bu/x+JCQzbA0 rNb2wHHB8mwE0/5f3AhAGqvq7FXZeyoAnedDWb2RrBSKMrWLrLNh5qKnXvVeYisXLu7O anVcjQRZqObq6khMxUqBHqX82Dta3R51s7+24TC3B/6hkqa/InBL0AiFcOqYIE1e2SjC fraqHs7R1N7y0hxKl8DmN8ISSXZ7/Y5g3OnyIFSH3aWQabnV007X/3EIz0c//cvYHP2j HT3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="DM/o4duR"; 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 w129si3092593oia.232.2020.04.09.03.00.40; Thu, 09 Apr 2020 03:01:09 -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="DM/o4duR"; 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 S1726793AbgDIKAS (ORCPT + 99 others); Thu, 9 Apr 2020 06:00:18 -0400 Received: from nbd.name ([46.4.11.11]:60824 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbgDIKAS (ORCPT ); Thu, 9 Apr 2020 06:00:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=v/nVcghAqdih6qyBYA3nOkrPXJM2pa0tN2PRfPhCjzI=; b=DM/o4duRLbGlifbrVjXI72t8eu oXrcGpdMG7X558+4UatdE2IK4nMpMjkG7gFJ+ag3F0xpnqD0n6lT8X2kdlgDRpR6HUJIyAHK35+PT wwfk8uX0qdIpcV+tcfd3IMEBIE7xU4ztJ63+k2JsCcq15Q/lhmZinnl+S6mdWjReFClw=; Received: from p54ae91d1.dip0.t-ipconnect.de ([84.174.145.209] helo=maeck.lan) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jMTys-000550-1V for linux-wireless@vger.kernel.org; Thu, 09 Apr 2020 12:00:18 +0200 Received: by maeck.lan (Postfix, from userid 501) id 789A8828EBF5; Thu, 9 Apr 2020 12:00:17 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 1/2] mt76: mt7615: set hw scan limits only for firmware with offload support Date: Thu, 9 Apr 2020 12:00:16 +0200 Message-Id: <20200409100017.92156-1-nbd@nbd.name> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org They do not apply to software scan Signed-off-by: Felix Fietkau --- .../net/wireless/mediatek/mt76/mt7615/init.c | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c index 07d4b259fe8a..b5d5e28b61b4 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c @@ -349,18 +349,21 @@ mt7615_init_wiphy(struct ieee80211_hw *hw) wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); wiphy->reg_notifier = mt7615_regd_notifier; - wiphy->max_sched_scan_plan_interval = MT7615_MAX_SCHED_SCAN_INTERVAL; - wiphy->max_sched_scan_ie_len = IEEE80211_MAX_DATA_LEN; - wiphy->max_scan_ie_len = MT7615_SCAN_IE_LEN; - wiphy->max_sched_scan_ssids = MT7615_MAX_SCHED_SCAN_SSID; - wiphy->max_match_sets = MT7615_MAX_SCAN_MATCH; - wiphy->max_sched_scan_reqs = 1; - wiphy->max_scan_ssids = 4; - - wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL); + if (mt7615_firmware_offload(phy->dev)) { + wiphy->max_sched_scan_plan_interval = MT7615_MAX_SCHED_SCAN_INTERVAL; + wiphy->max_sched_scan_ie_len = IEEE80211_MAX_DATA_LEN; + wiphy->max_scan_ie_len = MT7615_SCAN_IE_LEN; + wiphy->max_sched_scan_ssids = MT7615_MAX_SCHED_SCAN_SSID; + wiphy->max_match_sets = MT7615_MAX_SCAN_MATCH; + wiphy->max_sched_scan_reqs = 1; + wiphy->max_scan_ssids = 4; + + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL); + ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS); + } + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS); - ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS); ieee80211_hw_set(hw, TX_STATUS_NO_AMPDU_LEN); if (is_mt7615(&phy->dev->mt76)) -- 2.24.0