summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt76x0
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>2018-10-20 13:13:31 +0300
committerFelix Fietkau <nbd@nbd.name>2018-11-30 14:21:41 +0300
commitfc245983a8a8cc82046cfb83e327b991aefabaf7 (patch)
tree8160711b63bfc2e0ac29bbf6eb21b88539482ce3 /drivers/net/wireless/mediatek/mt76/mt76x0
parentf7c8a0f2da379dae08075d6023d24b9accf2d1f9 (diff)
downloadlinux-fc245983a8a8cc82046cfb83e327b991aefabaf7.tar.xz
mt76: introduce mt76x02_init_beacon_config routine
Add mt76x02_init_beacon_config utility routine in mt76x02-lib module in order to be reused by mt76x0 driver configuring BSSID registers and remove duplicated code Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x0/init.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
index 95a015281697..64eb6f451541 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
@@ -135,8 +135,6 @@ static void mt76x0_init_mac_registers(struct mt76x02_dev *dev)
{
RANDOM_WRITE(dev, common_mac_reg_table);
- mt76x02_set_beacon_offsets(dev);
-
/* Enable PBF and MAC clock SYS_CTRL[11:10] = 0x3 */
RANDOM_WRITE(dev, mt76x0_mac_reg_table);
@@ -297,11 +295,6 @@ int mt76x0_init_hardware(struct mt76x02_dev *dev)
if (ret)
return ret;
- mt76_clear(dev, MT_BEACON_TIME_CFG, (MT_BEACON_TIME_CFG_TIMER_EN |
- MT_BEACON_TIME_CFG_SYNC_MODE |
- MT_BEACON_TIME_CFG_TBTT_EN |
- MT_BEACON_TIME_CFG_BEACON_TX));
-
mt76x0_reset_counters(dev);
ret = mt76x0_eeprom_init(dev);
@@ -309,6 +302,7 @@ int mt76x0_init_hardware(struct mt76x02_dev *dev)
return ret;
mt76x0_phy_init(dev);
+ mt76x02_init_beacon_config(dev);
return 0;
}