public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mt76: mt7615: set hw scan limits only for firmware with offload support
@ 2020-04-09 10:00 Felix Fietkau
  2020-04-09 10:00 ` [PATCH 2/2] mt76: mt7615: disable hw/sched scan ops for non-offload firmware Felix Fietkau
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2020-04-09 10:00 UTC (permalink / raw)
  To: linux-wireless

They do not apply to software scan

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 .../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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-09 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-09 10:00 [PATCH 1/2] mt76: mt7615: set hw scan limits only for firmware with offload support Felix Fietkau
2020-04-09 10:00 ` [PATCH 2/2] mt76: mt7615: disable hw/sched scan ops for non-offload firmware Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox