mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x2: move mt76x2_set_channel to mt76x2_main.c
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user