mt76x2: move mt76x2_set_channel to mt76x2_main.c

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2016-02-03 15:58:40 +01:00
parent ebb8d3a74b
commit 71fae84d55
3 changed files with 16 additions and 16 deletions
-1
View File
@@ -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);
-15
View File
@@ -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;
}
+16
View File
@@ -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)
{