mt76: mt76x2: move mt76x02_mac_reset_counters in mt76x02_mac_start

Move mt76x02_mac_reset_counters in mt76x02_mac_start and get rid of
mt76x2_mac_start since it is just a wrapper for mt76x02_mac_start

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Lorenzo Bianconi 2019-09-12 11:06:36 +02:00 committed by Felix Fietkau
parent 7b37cce09d
commit ad571c9316
4 changed files with 5 additions and 16 deletions

View File

@ -343,6 +343,7 @@ EXPORT_SYMBOL_GPL(mt76x02_dma_disable);
void mt76x02_mac_start(struct mt76x02_dev *dev)
{
mt76x02_mac_reset_counters(dev);
mt76x02_dma_enable(dev);
mt76_wr(dev, MT_RX_FILTR_CFG, dev->mt76.rxfilter);
mt76_wr(dev, MT_MAC_SYS_CTRL,

View File

@ -12,7 +12,6 @@ struct mt76x02_dev;
struct mt76x2_sta;
struct mt76x02_vif;
int mt76x2_mac_start(struct mt76x02_dev *dev);
void mt76x2_mac_stop(struct mt76x02_dev *dev, bool force);
static inline void mt76x2_mac_resume(struct mt76x02_dev *dev)

View File

@ -7,6 +7,7 @@
#include "mt76x2.h"
#include "eeprom.h"
#include "mcu.h"
#include "../mt76x02_mac.h"
static void
mt76x2_mac_pbf_init(struct mt76x02_dev *dev)
@ -146,14 +147,6 @@ int mt76x2_mac_reset(struct mt76x02_dev *dev, bool hard)
return 0;
}
int mt76x2_mac_start(struct mt76x02_dev *dev)
{
mt76x02_mac_reset_counters(dev);
mt76x02_mac_start(dev);
return 0;
}
static void
mt76x2_power_on_rf_patch(struct mt76x02_dev *dev)
{
@ -256,9 +249,7 @@ static int mt76x2_init_hardware(struct mt76x02_dev *dev)
return ret;
set_bit(MT76_STATE_INITIALIZED, &dev->mt76.state);
ret = mt76x2_mac_start(dev);
if (ret)
return ret;
mt76x02_mac_start(dev);
ret = mt76x2_mcu_init(dev);
if (ret)

View File

@ -4,6 +4,7 @@
*/
#include "mt76x2.h"
#include "../mt76x02_mac.h"
static int
mt76x2_start(struct ieee80211_hw *hw)
@ -11,10 +12,7 @@ mt76x2_start(struct ieee80211_hw *hw)
struct mt76x02_dev *dev = hw->priv;
int ret;
ret = mt76x2_mac_start(dev);
if (ret)
return ret;
mt76x02_mac_start(dev);
ret = mt76x2_phy_start(dev);
if (ret)
return ret;