Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1508331ybb; Thu, 9 Apr 2020 03:37:45 -0700 (PDT) X-Google-Smtp-Source: APiQypLBVIijB/Ano7QJTb4kIlcKn+VIsEJvq3Tg1RW681+ttP0P65iKRHxb7kKzk/YOVGBl7/9b X-Received: by 2002:a05:6808:6cb:: with SMTP id m11mr5542796oih.130.1586428664833; Thu, 09 Apr 2020 03:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586428664; cv=none; d=google.com; s=arc-20160816; b=of0GtxUlc7tcZzEl4P1iGb8kKkzI8uKF3yjIzIL8dgetJldTb738SQCjBa3qFurdw4 QK6TZ9q9zZQ7IQkHJUUuXO3GwwDVdi8DH+E4NxZmxO+3esiQ1Zz4guVdg5d2F7xehOiB 6bIeNW5rqLUAZXtiWmPxlFHrO7hLf7UWT8sA1y7ld6jYYR8pP9yVLiWhcJbpDt8S+WyS HmeUVV8kxqeU+YvnI/SISA2Ehs2Po60Oan1449wv3QbiHaLz6voJXyn/U1qeUQTbaLeH k/9QkF30/KiWvF8RhnXQo13KlL+s3IjlKuYo31gVLiefz9bhX8nknD/xp4r/sa32fjnH RV6Q== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=JlhNHtPeBjLZ+eJpgD7FEJqdMiM2F9SJec30IYVInV0=; b=LugNth8v425YNeDqypIfOYOul6b8SIH8BFk9BnZihy9W3k9J364/ONuJHgTTeSapkp xCYKSAl2Y3b5mfQuFiH6yZi6DLeiQkrTZn1S5z6Af0CijsplrJSCULqeVEwCFRLEPN7j /3yydaDRp7EwaPDNmmeiCSRgimu2rCAeO9Tp06/OOCgFvfhrgOpQLB8NqPKc+Be04ODf +2CrswF4nUyj82jRDYz/wfaPFopWcf9RWDacqfEKNuq7Rj/BfSC8ndQ0VOCmr9mSYuPL 76NwekPINrFl1lkJWqNQVqjydqy6DOsoiYkNwzuOrYf398ZuvVOuTn5oJTh+e/U7iHJg fqrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=PxY638O1; 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 h81si3550493oif.20.2020.04.09.03.37.19; Thu, 09 Apr 2020 03:37:44 -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=PxY638O1; 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 S1726589AbgDIKg5 (ORCPT + 99 others); Thu, 9 Apr 2020 06:36:57 -0400 Received: from nbd.name ([46.4.11.11]:34556 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgDIKg4 (ORCPT ); Thu, 9 Apr 2020 06:36:56 -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:References:In-Reply-To: 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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JlhNHtPeBjLZ+eJpgD7FEJqdMiM2F9SJec30IYVInV0=; b=PxY638O1z5N/UdxlWr3OXr1WMN vaK/I4h0xibeutGxBJCMaVNw+WcyqYHd4xoJCO2AjMXXsrN8muebqmzpFxX0FioiXA9auCAi5gMtD X5E81jxDCjLDWFZFXvJqeRCEnagmp0EjzuSFBMEjKlCJle6WfWqUBIfgAnfR9iTtHlpk=; 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 1jMUYK-0006wk-5l for linux-wireless@vger.kernel.org; Thu, 09 Apr 2020 12:36:56 +0200 Received: by maeck.lan (Postfix, from userid 501) id C3926828F03C; Thu, 9 Apr 2020 12:36:55 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH v2 2/2] mt76: mt7615: set hw scan limits only for firmware with offload support Date: Thu, 9 Apr 2020 12:36:55 +0200 Message-Id: <20200409103655.94536-2-nbd@nbd.name> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200409103655.94536-1-nbd@nbd.name> References: <20200409103655.94536-1-nbd@nbd.name> 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 --- drivers/net/wireless/mediatek/mt76/mt7615/init.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c index 7f3683205b8e..96b7c6284833 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c @@ -145,10 +145,19 @@ static void mt7615_init_work(struct work_struct *work) mt7615_mcu_del_wtbl_all(dev); if (!mt7615_firmware_offload(dev)) { + struct wiphy *wiphy = mt76_hw(dev)->wiphy; + dev->ops->hw_scan = NULL; dev->ops->cancel_hw_scan = NULL; dev->ops->sched_scan_start = NULL; dev->ops->sched_scan_stop = NULL; + + wiphy->max_sched_scan_plan_interval = 0; + wiphy->max_sched_scan_ie_len = 0; + wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; + wiphy->max_sched_scan_ssids = 0; + wiphy->max_match_sets = 0; + wiphy->max_sched_scan_reqs = 0; } } -- 2.24.0