Lines Matching full:wlan
91 return readl(dev->wlan.base + reg); in wifi_r32()
97 writel(val, dev->wlan.base + reg); in wifi_w32()
232 if (!dev || !dev->wlan.reset) in mtk_wed_fe_reset()
235 /* reset callback blocks until WLAN reset is completed */ in mtk_wed_fe_reset()
236 err = dev->wlan.reset(dev); in mtk_wed_fe_reset()
238 dev_err(dev->dev, "wlan reset failed: %d\n", err); in mtk_wed_fe_reset()
258 if (!dev || !dev->wlan.reset_complete) in mtk_wed_fe_reset_complete()
261 dev->wlan.reset_complete(dev); in mtk_wed_fe_reset_complete()
273 if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) { in mtk_wed_assign()
274 hw = hw_list[pci_domain_nr(dev->wlan.pci_dev->bus)]; in mtk_wed_assign()
306 int token = dev->wlan.token_start; in mtk_wed_tx_buffer_alloc()
311 ring_size = dev->wlan.nbuf & ~(MTK_WED_BUF_PER_PAGE - 1); in mtk_wed_tx_buffer_alloc()
357 txd_size = dev->wlan.init_buf(buf, buf_phys, token++); in mtk_wed_tx_buffer_alloc()
428 dev->rx_buf_ring.size = dev->wlan.rx_nbuf; in mtk_wed_rx_buffer_alloc()
430 dev->wlan.rx_nbuf * sizeof(*desc), in mtk_wed_rx_buffer_alloc()
437 dev->wlan.init_rx_buf(dev, dev->wlan.rx_npkt); in mtk_wed_rx_buffer_alloc()
450 dev->wlan.release_rx_buf(dev); in mtk_wed_free_rx_buffer()
459 FIELD_PREP(MTK_WED_RX_BM_RX_DMAD_SDL0, dev->wlan.rx_size)); in mtk_wed_rx_buffer_hw_init()
462 FIELD_PREP(MTK_WED_RX_BM_SW_TAIL, dev->wlan.rx_npkt)); in mtk_wed_rx_buffer_hw_init()
557 val = wifi_r32(dev, dev->wlan.wpdma_rx_glo - dev->wlan.phy_base) | in mtk_wed_check_wfdma_rx_fill()
559 wifi_w32(dev, dev->wlan.wpdma_rx_glo - dev->wlan.phy_base, val); in mtk_wed_check_wfdma_rx_fill()
656 if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) { in __mtk_wed_detach()
659 wlan_node = dev->wlan.pci_dev->dev.of_node; in __mtk_wed_detach()
687 switch (dev->wlan.bus_type) { in mtk_wed_bus_init()
734 wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys); in mtk_wed_set_wpdma()
738 wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_int); in mtk_wed_set_wpdma()
739 wed_w32(dev, MTK_WED_WPDMA_CFG_INT_MASK, dev->wlan.wpdma_mask); in mtk_wed_set_wpdma()
740 wed_w32(dev, MTK_WED_WPDMA_CFG_TX, dev->wlan.wpdma_tx); in mtk_wed_set_wpdma()
741 wed_w32(dev, MTK_WED_WPDMA_CFG_TX_FREE, dev->wlan.wpdma_txfree); in mtk_wed_set_wpdma()
742 wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo); in mtk_wed_set_wpdma()
743 wed_w32(dev, MTK_WED_WPDMA_RX_RING, dev->wlan.wpdma_rx); in mtk_wed_set_wpdma()
940 dev->wlan.token_start) | in mtk_wed_hw_init()
942 dev->wlan.token_start + in mtk_wed_hw_init()
943 dev->wlan.nbuf - 1)); in mtk_wed_hw_init()
950 dev->wlan.token_start) | in mtk_wed_hw_init()
952 dev->wlan.token_start + in mtk_wed_hw_init()
953 dev->wlan.nbuf - 1)); in mtk_wed_hw_init()
1365 dev->wlan.tx_tbit[0]) | in mtk_wed_configure_irq()
1367 dev->wlan.tx_tbit[1])); in mtk_wed_configure_irq()
1374 dev->wlan.txfree_tbit)); in mtk_wed_configure_irq()
1382 dev->wlan.rx_tbit[0]) | in mtk_wed_configure_irq()
1384 dev->wlan.rx_tbit[1])); in mtk_wed_configure_irq()
1469 u32 val = dev->wlan.wpdma_phys | MTK_PCIE_MIRROR_MAP_EN | in mtk_wed_start()
1490 mtk_wed_set_512_support(dev, dev->wlan.wcid_512); in mtk_wed_start()
1507 if ((dev->wlan.bus_type == MTK_WED_BUS_PCIE && in mtk_wed_attach()
1508 pci_domain_nr(dev->wlan.pci_dev->bus) > 1) || in mtk_wed_attach()
1526 device = dev->wlan.bus_type == MTK_WED_BUS_PCIE in mtk_wed_attach()
1527 ? &dev->wlan.pci_dev->dev in mtk_wed_attach()
1528 : &dev->wlan.platform_dev->dev; in mtk_wed_attach()
1579 * Instead of configuring the WLAN PDMA TX ring directly, the WLAN in mtk_wed_tx_ring_setup()
1583 * WED driver posts its own DMA ring as WLAN PDMA TX and configures it in mtk_wed_tx_ring_setup()
1625 * and WLAN. The WLAN driver accesses the ring index registers through in mtk_wed_txfree_ring_setup()
1728 ret = hw->wed_dev->wlan.offload_enable(hw->wed_dev); in mtk_wed_flow_add()
1753 hw->wed_dev->wlan.offload_disable(hw->wed_dev); in mtk_wed_flow_remove()