mt76x2: reset HW before probe

Signed-off-by: Stanislaw Gruszka <[email protected]>
This commit is contained in:
Stanislaw Gruszka
2018-07-13 16:30:17 +02:00
committed by Felix Fietkau
parent 08719b1129
commit 4d2c565653
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -180,6 +180,7 @@ extern const struct ieee80211_ops mt76x2_ops;
struct mt76x2_dev *mt76x2_alloc_device(struct device *pdev);
int mt76x2_register_device(struct mt76x2_dev *dev);
void mt76x2_set_wlan_state(struct mt76x2_dev *dev, bool enable);
void mt76x2_init_debugfs(struct mt76x2_dev *dev);
irqreturn_t mt76x2_irq_handler(int irq, void *dev_instance);
+1 -1
View File
@@ -505,7 +505,7 @@ void mt76x2_set_tx_ackto(struct mt76x2_dev *dev)
MT_TX_TIMEOUT_CFG_ACKTO, ackto);
}
static void
void
mt76x2_set_wlan_state(struct mt76x2_dev *dev, bool enable)
{
u32 val = mt76_rr(dev, MT_WLAN_FUN_CTRL);
+2
View File
@@ -54,6 +54,8 @@ mt76pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
mt76_mmio_init(&dev->mt76, pcim_iomap_table(pdev)[0]);
mt76x2_set_wlan_state(dev, false);
dev->mt76.rev = mt76_rr(dev, MT_ASIC_VERSION);
dev_info(dev->mt76.dev, "ASIC revision: %08x\n", dev->mt76.rev);