mt76: move WIPHY_FLAG_HAS_CHANNEL_SWITCH in mt76_phy_init
authorLorenzo Bianconi <lorenzo@kernel.org>
Tue, 7 Jan 2020 13:59:34 +0000 (14:59 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 14 Feb 2020 09:06:04 +0000 (10:06 +0100)
Move WIPHY_FLAG_HAS_CHANNEL_SWITCH in mt76-core module since now all
drivers support Channel Switch Announcement

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c
drivers/net/wireless/mediatek/mt76/mt7603/init.c
drivers/net/wireless/mediatek/mt76/mt7615/init.c
drivers/net/wireless/mediatek/mt76/mt76x02_util.c

index d752fb5393514d26f374cbc63d490583eb294966..8295bdb974fce4283ca6bc4cf2da35fafd40175f 100644 (file)
@@ -279,6 +279,7 @@ mt76_phy_init(struct mt76_dev *dev, struct ieee80211_hw *hw)
        SET_IEEE80211_PERM_ADDR(hw, dev->macaddr);
 
        wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
+       wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
 
        wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
        wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS);
index 32fdb81b2bb0d55cfe965f1f9397dc63de67add2..182ce5a86f651b02eacbb13c33fa6af7d48c91ab 100644 (file)
@@ -564,7 +564,6 @@ int mt7603_register_device(struct mt7603_dev *dev)
                dev->mt76.led_cdev.blink_set = mt7603_led_set_blink;
        }
 
-       wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
        wiphy->reg_notifier = mt7603_regd_notifier;
 
        ret = mt76_register_device(&dev->mt76, true, mt7603_rates,
index a14fd9587b702a747f32f606eafda099e097174f..1af941f83213848e8581687fbb6071ee526d4a74 100644 (file)
@@ -341,7 +341,6 @@ mt7615_init_wiphy(struct ieee80211_hw *hw)
        wiphy->iface_combinations = if_comb;
        wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
        wiphy->reg_notifier = mt7615_regd_notifier;
-       wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
 
        wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
 
index 28d8d447fc7638d15a464ebbf3340a8d0d43e01c..48da4f3a17dbbfa9cd435e286bc486332a7a2ae5 100644 (file)
@@ -175,7 +175,6 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
                }
        }
 
-       wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
        wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
 
        hw->sta_data_size = sizeof(struct mt76x02_sta);