From: Lorenzo Bianconi <lorenzo@kernel.org>
To: nbd@nbd.name
Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org,
ryder.lee@mediatek.com, evelyn.tsai@mediatek.com,
owen.peng@mediatek.com, devicetree@vger.kernel.org,
robh@kernel.org
Subject: [PATCH v2 5/6] mt76: mt7915: enable radar background detection
Date: Wed, 12 Jan 2022 18:53:54 +0100 [thread overview]
Message-ID: <f97a4fe5bec70d8e5594c0f4d286b46b844939a5.1642009736.git.lorenzo@kernel.org> (raw)
In-Reply-To: <cover.1642009736.git.lorenzo@kernel.org>
Notify userland the hw supports background radar/CAC detection.
Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 5c1643963506..91c7ce60f296 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -309,6 +309,7 @@ static void
mt7915_init_wiphy(struct ieee80211_hw *hw)
{
struct mt7915_phy *phy = mt7915_hw_phy(hw);
+ struct mt76_dev *mdev = &phy->dev->mt76;
struct wiphy *wiphy = hw->wiphy;
struct mt7915_dev *dev = phy->dev;
@@ -337,6 +338,12 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_RATE_VHT);
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_RATE_HE);
+ if (!mdev->dev->of_node ||
+ !of_property_read_bool(mdev->dev->of_node,
+ "mediatek,disable-radar-background"))
+ wiphy_ext_feature_set(wiphy,
+ NL80211_EXT_FEATURE_RADAR_BACKGROUND);
+
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
ieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);
ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);
--
2.34.1
next prev parent reply other threads:[~2022-01-12 17:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 17:53 [PATCH v2 0/6] introduce background radar support for mt7915 driver Lorenzo Bianconi
2022-01-12 17:53 ` [PATCH v2 1/6] mt76: mt7915: introduce mt7915_set_radar_background routine Lorenzo Bianconi
2022-01-12 17:53 ` [PATCH v2 2/6] mt76: mt7915: enable radar trigger on rdd2 Lorenzo Bianconi
2022-01-12 17:53 ` [PATCH v2 3/6] mt76: mt7915: introduce rdd_monitor debugfs node Lorenzo Bianconi
2022-01-12 17:53 ` [PATCH v2 4/6] mt76: mt7915: report radar pattern if detected by rdd2 Lorenzo Bianconi
2022-01-12 17:53 ` Lorenzo Bianconi [this message]
2022-01-12 17:53 ` [PATCH v2 6/6] dt-bindings:net:wireless:mediatek,mt76: add disable-radar-offchan Lorenzo Bianconi
2022-01-20 13:02 ` Kalle Valo
2022-01-20 13:18 ` Lorenzo Bianconi
2022-01-22 1:07 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f97a4fe5bec70d8e5594c0f4d286b46b844939a5.1642009736.git.lorenzo@kernel.org \
--to=lorenzo@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=evelyn.tsai@mediatek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
--cc=owen.peng@mediatek.com \
--cc=robh@kernel.org \
--cc=ryder.lee@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).