Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6419697pxb; Wed, 17 Feb 2021 04:12:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwz/VgrBdzNC6mzDegVxdaFdmp9vCibLRSzX4Zs1iY3DzjleN7S8fDRwyCQxZyjYaQL9+GF X-Received: by 2002:a50:fe02:: with SMTP id f2mr6034188edt.173.1613563957805; Wed, 17 Feb 2021 04:12:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613563957; cv=none; d=google.com; s=arc-20160816; b=RmcXtMf46DxtOFzvG8sK4d444FyuPMFkihgwP0n+fg5O3AJpWMF+JEY/zIcUzMxVR/ MWe9vu5vZyzPNtLSxBf9Z6IaydR2wbXxSnJ5NXiEw1iQMHCNoKd5cE0td6skjEifx11C KIcT8Cvz+AgWivluyvbr8s3YXijBB6p52ds4qFxv6oI+nU8D607paghGjf984nsThDpm eCx74bU9s6FtmE3MZ9XJHHQ2jGIIi+/wwQ8sXjDF9xiHDUzGuC+SkfL4KmwpMAU229+w h5iSOYAayoyuQ42SQXF1kO0r1JNijK68EGAExE2RZJ0RhvEmVNCcBiT0KtfWNQgx5UYD 0fXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=F1OhPAgH58U515d3WroXMlobYh5w9SfK2x7Lfv2vkjA=; b=Jc1kmNNlPSG7Gppd8YVb9ZzbqJJYZlK13UL83DTOw4cmLOe+nWj3ZEaEetuKI4dmCf 2eXQ7veWXIPY0BbEEhjptMjXUYeN44LRXcZOPy3FfF6CmvvjpLeJByf0A24pbvnSu9ay u3C3l1z7RrtzugBFpCc70inQfbxejziTcNIsaLenZL0/Znaca/4OMCZUZX7c6nGvj/O8 OryqTNm3+32u+KibIm0N1log5QL4T3599smh8hkb3TN/d1svBRH0RjMprpbB6VHKzdTu jmsYI1NfRCW11SO66Kqpq9GK39alji8akoT6WtB0bSBnkQcfDcRfzNk/4eHDvC5Jh1fm JdIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si1260465edj.572.2021.02.17.04.12.12; Wed, 17 Feb 2021 04:12:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232478AbhBQMK1 (ORCPT + 99 others); Wed, 17 Feb 2021 07:10:27 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:36261 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232684AbhBQMKN (ORCPT ); Wed, 17 Feb 2021 07:10:13 -0500 X-UUID: fa6aa7f5254b44bfb5bdd670b2a67f7c-20210217 X-UUID: fa6aa7f5254b44bfb5bdd670b2a67f7c-20210217 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 833576; Wed, 17 Feb 2021 20:09:24 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 17 Feb 2021 20:09:22 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 17 Feb 2021 20:09:22 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH] mt76: mt7615: enable radar detection for non-offloading firmware Date: Wed, 17 Feb 2021 20:09:21 +0800 Message-ID: <6316b1b277fa1ec36972d4043e3109d51ef9662f.1613563280.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 6B2150D646FAAF0BBE92045F79C86FC20BAC6E077EEE5C3289C2C4E8E4844BD52000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The non-offloading version should support radar detection. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7615/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c index 88a2ee7e7143..debeb66ce182 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c @@ -338,7 +338,7 @@ mt7615_init_wiphy(struct ieee80211_hw *hw) hw->sta_data_size = sizeof(struct mt7615_sta); hw->vif_data_size = sizeof(struct mt7615_vif); - if (is_mt7663(&phy->dev->mt76)) { + if (mt7615_firmware_offload(phy->dev)) { wiphy->iface_combinations = if_comb; wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); } else { diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index f2dd56674acb..72587def7422 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -2238,7 +2238,7 @@ int mt7615_dfs_init_radar_detector(struct mt7615_phy *phy) bool ext_phy = phy != &dev->phy; int err; - if (is_mt7663(&dev->mt76)) + if (mt7615_firmware_offload(dev)) return 0; if (dev->mt76.region == NL80211_DFS_UNSET) { -- 2.18.0