Commit 2858f60a authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt76x2: unify mt76x2[u]_mac_resume

They are now the same and short enough to be turned into an inline function
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 4606a26c
...@@ -25,6 +25,12 @@ struct mt76x02_vif; ...@@ -25,6 +25,12 @@ struct mt76x02_vif;
int mt76x2_mac_start(struct mt76x02_dev *dev); int mt76x2_mac_start(struct mt76x02_dev *dev);
void mt76x2_mac_stop(struct mt76x02_dev *dev, bool force); void mt76x2_mac_stop(struct mt76x02_dev *dev, bool force);
void mt76x2_mac_resume(struct mt76x02_dev *dev);
static inline void mt76x2_mac_resume(struct mt76x02_dev *dev)
{
mt76_wr(dev, MT_MAC_SYS_CTRL,
MT_MAC_SYS_CTRL_ENABLE_TX |
MT_MAC_SYS_CTRL_ENABLE_RX);
}
#endif #endif
...@@ -35,7 +35,6 @@ void mt76x2u_cleanup(struct mt76x02_dev *dev); ...@@ -35,7 +35,6 @@ void mt76x2u_cleanup(struct mt76x02_dev *dev);
void mt76x2u_stop_hw(struct mt76x02_dev *dev); void mt76x2u_stop_hw(struct mt76x02_dev *dev);
int mt76x2u_mac_reset(struct mt76x02_dev *dev); int mt76x2u_mac_reset(struct mt76x02_dev *dev);
void mt76x2u_mac_resume(struct mt76x02_dev *dev);
int mt76x2u_mac_start(struct mt76x02_dev *dev); int mt76x2u_mac_start(struct mt76x02_dev *dev);
int mt76x2u_mac_stop(struct mt76x02_dev *dev); int mt76x2u_mac_stop(struct mt76x02_dev *dev);
......
...@@ -173,13 +173,6 @@ int mt76x2_mac_start(struct mt76x02_dev *dev) ...@@ -173,13 +173,6 @@ int mt76x2_mac_start(struct mt76x02_dev *dev)
return 0; return 0;
} }
void mt76x2_mac_resume(struct mt76x02_dev *dev)
{
mt76_wr(dev, MT_MAC_SYS_CTRL,
MT_MAC_SYS_CTRL_ENABLE_TX |
MT_MAC_SYS_CTRL_ENABLE_RX);
}
static void static void
mt76x2_power_on_rf_patch(struct mt76x02_dev *dev) mt76x2_power_on_rf_patch(struct mt76x02_dev *dev)
{ {
......
...@@ -211,10 +211,3 @@ int mt76x2u_mac_stop(struct mt76x02_dev *dev) ...@@ -211,10 +211,3 @@ int mt76x2u_mac_stop(struct mt76x02_dev *dev)
return 0; return 0;
} }
void mt76x2u_mac_resume(struct mt76x02_dev *dev)
{
mt76_wr(dev, MT_MAC_SYS_CTRL,
MT_MAC_SYS_CTRL_ENABLE_TX |
MT_MAC_SYS_CTRL_ENABLE_RX);
}
...@@ -61,7 +61,7 @@ mt76x2u_set_channel(struct mt76x02_dev *dev, ...@@ -61,7 +61,7 @@ mt76x2u_set_channel(struct mt76x02_dev *dev,
err = mt76x2u_phy_set_channel(dev, chandef); err = mt76x2u_phy_set_channel(dev, chandef);
mt76x2u_mac_resume(dev); mt76x2_mac_resume(dev);
mt76x02_edcca_init(dev, true); mt76x02_edcca_init(dev, true);
clear_bit(MT76_RESET, &dev->mt76.state); clear_bit(MT76_RESET, &dev->mt76.state);
......
...@@ -43,7 +43,7 @@ mt76x2u_phy_channel_calibrate(struct mt76x02_dev *dev, bool mac_stopped) ...@@ -43,7 +43,7 @@ mt76x2u_phy_channel_calibrate(struct mt76x02_dev *dev, bool mac_stopped)
mt76x02_mcu_calibrate(dev, MCU_CAL_TX_SHAPING, 0); mt76x02_mcu_calibrate(dev, MCU_CAL_TX_SHAPING, 0);
if (!mac_stopped) if (!mac_stopped)
mt76x2u_mac_resume(dev); mt76x2_mac_resume(dev);
mt76x2_apply_gain_adj(dev); mt76x2_apply_gain_adj(dev);
mt76x02_edcca_init(dev, true); mt76x02_edcca_init(dev, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment