diff --git a/mt76x2.h b/mt76x2.h index 1119c7f8..a61f801a 100644 --- a/mt76x2.h +++ b/mt76x2.h @@ -182,7 +182,6 @@ int mt76x2_apply_calibration_data(struct mt76x2_dev *dev, int channel); void mt76x2_set_tx_ackto(struct mt76x2_dev *dev); int mt76x2_phy_start(struct mt76x2_dev *dev); -int mt76x2_set_channel(struct mt76x2_dev *dev, struct cfg80211_chan_def *chandef); int mt76x2_phy_set_channel(struct mt76x2_dev *dev, struct cfg80211_chan_def *chandef); int mt76x2_phy_get_rssi(struct mt76x2_dev *dev, s8 rssi, int chain); diff --git a/mt76x2_core.c b/mt76x2_core.c index d69dd18c..b104ced2 100644 --- a/mt76x2_core.c +++ b/mt76x2_core.c @@ -77,18 +77,3 @@ irqreturn_t mt76x2_irq_handler(int irq, void *dev_instance) return IRQ_HANDLED; } -int mt76x2_set_channel(struct mt76x2_dev *dev, struct cfg80211_chan_def *chandef) -{ - int ret; - - tasklet_disable(&dev->pre_tbtt_tasklet); - cancel_delayed_work_sync(&dev->cal_work); - - mt76x2_mac_stop(dev, true); - ret = mt76x2_phy_set_channel(dev, chandef); - mt76x2_mac_resume(dev); - tasklet_enable(&dev->pre_tbtt_tasklet); - - return ret; -} - diff --git a/mt76x2_main.c b/mt76x2_main.c index 81e9a454..04a8bad6 100644 --- a/mt76x2_main.c +++ b/mt76x2_main.c @@ -93,6 +93,22 @@ mt76x2_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mt76_txq_remove(&dev->mt76, vif->txq); } +static int +mt76x2_set_channel(struct mt76x2_dev *dev, struct cfg80211_chan_def *chandef) +{ + int ret; + + tasklet_disable(&dev->pre_tbtt_tasklet); + cancel_delayed_work_sync(&dev->cal_work); + + mt76x2_mac_stop(dev, true); + ret = mt76x2_phy_set_channel(dev, chandef); + mt76x2_mac_resume(dev); + tasklet_enable(&dev->pre_tbtt_tasklet); + + return ret; +} + static int mt76x2_config(struct ieee80211_hw *hw, u32 changed) {