Lines Matching refs:wlan
131 return readl(dev->wlan.base + reg); in wifi_r32()
137 writel(val, dev->wlan.base + reg); in wifi_w32()
453 if (!dev || !dev->wlan.reset) in mtk_wed_fe_reset()
457 err = dev->wlan.reset(dev); in mtk_wed_fe_reset()
479 if (!dev || !dev->wlan.reset_complete) in mtk_wed_fe_reset_complete()
482 dev->wlan.reset_complete(dev); in mtk_wed_fe_reset_complete()
494 if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) { in mtk_wed_assign()
495 hw = hw_list[pci_domain_nr(dev->wlan.pci_dev->bus)]; in mtk_wed_assign()
599 dev->wlan.amsdu_max_len >> 8) | in mtk_wed_amsdu_init()
601 dev->wlan.amsdu_max_subframes)); in mtk_wed_amsdu_init()
625 if (dev->wlan.id == 0x7991) in mtk_wed_amsdu_init()
638 int token = dev->wlan.token_start; in mtk_wed_tx_buffer_alloc()
644 ring_size = dev->wlan.nbuf & ~(MTK_WED_BUF_PER_PAGE - 1); in mtk_wed_tx_buffer_alloc()
700 txd_size = dev->wlan.init_buf(buf, buf_phys, in mtk_wed_tx_buffer_alloc()
773 if (!dev->wlan.hw_rro) in mtk_wed_hwrro_buffer_alloc()
780 dev->hw_rro.size = dev->wlan.rx_nbuf & ~(MTK_WED_BUF_PER_PAGE - 1); in mtk_wed_hwrro_buffer_alloc()
783 dev->wlan.rx_nbuf * sizeof(*desc), in mtk_wed_hwrro_buffer_alloc()
833 dev->rx_buf_ring.size = dev->wlan.rx_nbuf; in mtk_wed_rx_buffer_alloc()
835 dev->wlan.rx_nbuf * sizeof(*desc), in mtk_wed_rx_buffer_alloc()
842 dev->wlan.init_rx_buf(dev, dev->wlan.rx_npkt); in mtk_wed_rx_buffer_alloc()
854 if (!dev->wlan.hw_rro) in mtk_wed_hwrro_free_buffer()
890 dev->wlan.release_rx_buf(dev); in mtk_wed_free_rx_buffer()
900 if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro) in mtk_wed_hwrro_init()
921 FIELD_PREP(MTK_WED_RX_BM_RX_DMAD_SDL0, dev->wlan.rx_size)); in mtk_wed_rx_buffer_hw_init()
924 FIELD_PREP(MTK_WED_RX_BM_SW_TAIL, dev->wlan.rx_npkt)); in mtk_wed_rx_buffer_hw_init()
1141 if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) { in __mtk_wed_detach()
1144 wlan_node = dev->wlan.pci_dev->dev.of_node; in __mtk_wed_detach()
1171 switch (dev->wlan.bus_type) { in mtk_wed_bus_init()
1186 if (dev->wlan.msi) { in mtk_wed_bus_init()
1227 wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_phys); in mtk_wed_set_wpdma()
1233 wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_int); in mtk_wed_set_wpdma()
1234 wed_w32(dev, MTK_WED_WPDMA_CFG_INT_MASK, dev->wlan.wpdma_mask); in mtk_wed_set_wpdma()
1235 wed_w32(dev, MTK_WED_WPDMA_CFG_TX, dev->wlan.wpdma_tx); in mtk_wed_set_wpdma()
1236 wed_w32(dev, MTK_WED_WPDMA_CFG_TX_FREE, dev->wlan.wpdma_txfree); in mtk_wed_set_wpdma()
1241 wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo); in mtk_wed_set_wpdma()
1242 wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx); in mtk_wed_set_wpdma()
1244 if (!dev->wlan.hw_rro) in mtk_wed_set_wpdma()
1247 wed_w32(dev, MTK_WED_RRO_RX_D_CFG(0), dev->wlan.wpdma_rx_rro[0]); in mtk_wed_set_wpdma()
1248 wed_w32(dev, MTK_WED_RRO_RX_D_CFG(1), dev->wlan.wpdma_rx_rro[1]); in mtk_wed_set_wpdma()
1251 dev->wlan.wpdma_rx_pg + i * 0x10); in mtk_wed_set_wpdma()
1477 FIELD_PREP(MTK_WED_TX_BM_TKID_START, dev->wlan.token_start) | in mtk_wed_hw_init()
1479 dev->wlan.token_start + dev->wlan.nbuf - 1)); in mtk_wed_hw_init()
1491 dev->wlan.nbuf / 128) | in mtk_wed_hw_init()
1493 dev->wlan.nbuf / 128)); in mtk_wed_hw_init()
1574 if (dev->wlan.hw_rro) { in mtk_wed_rx_reset()
1628 if (dev->wlan.hw_rro) { in mtk_wed_rx_reset()
1694 if (dev->wlan.hw_rro) { in mtk_wed_rx_reset()
2010 dev->wlan.tx_tbit[0]) | in mtk_wed_configure_irq()
2012 dev->wlan.tx_tbit[1])); in mtk_wed_configure_irq()
2019 dev->wlan.txfree_tbit)); in mtk_wed_configure_irq()
2028 dev->wlan.rx_tbit[0]) | in mtk_wed_configure_irq()
2030 dev->wlan.rx_tbit[1])); in mtk_wed_configure_irq()
2153 dev->wlan.wpdma_rx_glo - in mtk_wed_dma_enable()
2154 dev->wlan.phy_base) | MTK_WFMDA_RX_DMA_EN; in mtk_wed_dma_enable()
2156 dev->wlan.wpdma_rx_glo - dev->wlan.phy_base, in mtk_wed_dma_enable()
2169 if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro) in mtk_wed_start_hw_rro()
2188 dev->wlan.rro_rx_tbit[0]) | in mtk_wed_start_hw_rro()
2190 dev->wlan.rro_rx_tbit[1])); in mtk_wed_start_hw_rro()
2200 dev->wlan.rx_pg_tbit[0]) | in mtk_wed_start_hw_rro()
2202 dev->wlan.rx_pg_tbit[1]) | in mtk_wed_start_hw_rro()
2204 dev->wlan.rx_pg_tbit[2])); in mtk_wed_start_hw_rro()
2277 wed_w32(dev, MTK_WED_RRO_CFG0, dev->wlan.phy_base + in mtk_wed_ind_rx_ring_setup()
2278 dev->wlan.ind_cmd.ack_sn_addr); in mtk_wed_ind_rx_ring_setup()
2281 dev->wlan.ind_cmd.win_size) | in mtk_wed_ind_rx_ring_setup()
2283 dev->wlan.ind_cmd.particular_sid)); in mtk_wed_ind_rx_ring_setup()
2287 dev->wlan.ind_cmd.particular_se_phys); in mtk_wed_ind_rx_ring_setup()
2289 for (i = 0; i < dev->wlan.ind_cmd.se_group_nums; i++) { in mtk_wed_ind_rx_ring_setup()
2291 dev->wlan.ind_cmd.addr_elem_phys[i] >> 4); in mtk_wed_ind_rx_ring_setup()
2304 for (i = 0; i < dev->wlan.ind_cmd.particular_sid; i++) { in mtk_wed_ind_rx_ring_setup()
2344 u32 val = dev->wlan.wpdma_phys | MTK_PCIE_MIRROR_MAP_EN | in mtk_wed_start()
2370 mtk_wed_set_512_support(dev, dev->wlan.wcid_512); in mtk_wed_start()
2388 if ((dev->wlan.bus_type == MTK_WED_BUS_PCIE && in mtk_wed_attach()
2389 pci_domain_nr(dev->wlan.pci_dev->bus) > 1) || in mtk_wed_attach()
2407 device = dev->wlan.bus_type == MTK_WED_BUS_PCIE in mtk_wed_attach()
2408 ? &dev->wlan.pci_dev->dev in mtk_wed_attach()
2409 : &dev->wlan.platform_dev->dev; in mtk_wed_attach()
2623 if (!hw->wed_dev->wlan.offload_enable) in mtk_wed_flow_add()
2631 ret = hw->wed_dev->wlan.offload_enable(hw->wed_dev); in mtk_wed_flow_add()
2651 if (!hw->wed_dev->wlan.offload_disable) in mtk_wed_flow_remove()
2657 hw->wed_dev->wlan.offload_disable(hw->wed_dev); in mtk_wed_flow_remove()