diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2019-03-19 11:37:36 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-05-01 13:03:56 +0200 |
commit | 8d71aef9c9ca21fca4974815fa584ed01dfeb567 (patch) | |
tree | 8fb581853040a3e9f933f853504dfcc97b47f90d /drivers/net/wireless/mediatek/mt76/mt76x0 | |
parent | cadae4772d2cdfac21fd86975d3860eff38c7e51 (diff) | |
download | linux-stable-8d71aef9c9ca21fca4974815fa584ed01dfeb567.tar.gz linux-stable-8d71aef9c9ca21fca4974815fa584ed01dfeb567.tar.bz2 linux-stable-8d71aef9c9ca21fca4974815fa584ed01dfeb567.zip |
mt76x02: introduce mt76x02_beacon.c
Move most of beaconing code into separate file and separate beacon
initialization for USB and MMIO as pre TBTT implementation for USB
will be different.
Signed-off-by: Stanislaw Gruszka <sgruszka@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.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c index bcb72e019fd2..e5f4ce3b595b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c @@ -259,7 +259,6 @@ int mt76x0_init_hardware(struct mt76x02_dev *dev) return ret; mt76x0_phy_init(dev); - mt76x02_init_beacon_config(dev); return 0; } diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c index e07a62246db7..e35165416cf0 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c @@ -128,6 +128,8 @@ static int mt76x0e_register_device(struct mt76x02_dev *dev) if (err < 0) return err; + mt76x02e_init_beacon_config(dev); + if (mt76_chip(&dev->mt76) == 0x7610) { u16 val; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c index e5a06f74a6f7..eb92c2724ff3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c @@ -175,6 +175,8 @@ static int mt76x0u_init_hardware(struct mt76x02_dev *dev) if (err < 0) return err; + mt76x02u_init_beacon_config(dev); + mt76_rmw(dev, MT_US_CYC_CFG, MT_US_CYC_CNT, 0x1e); mt76_wr(dev, MT_TXOP_CTRL_CFG, FIELD_PREP(MT_TXOP_TRUN_EN, 0x3f) | |