| /freebsd/sys/contrib/dev/mediatek/mt76/mt7996/ |
| H A D | mmio.c | 441 static int mt7996_mmio_wed_reset(struct mtk_wed_device *wed) in mt7996_mmio_wed_reset() argument 443 struct mt76_dev *mdev = container_of(wed, struct mt76_dev, mmio.wed); in mt7996_mmio_wed_reset() 475 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_mmio_wed_init() local 488 wed = &dev->mt76.mmio.wed_hif2; in mt7996_mmio_wed_init() 490 wed->wlan.pci_dev = pci_dev; in mt7996_mmio_wed_init() 491 wed->wlan.bus_type = MTK_WED_BUS_PCIE; in mt7996_mmio_wed_init() 493 wed->wlan.base = devm_ioremap(dev->mt76.dev, in mt7996_mmio_wed_init() 496 if (!wed->wlan.base) in mt7996_mmio_wed_init() 499 wed->wlan.phy_base = pci_resource_start(pci_dev, 0); in mt7996_mmio_wed_init() 502 wed->wlan.wpdma_int = wed->wlan.phy_base + in mt7996_mmio_wed_init() [all …]
|
| H A D | dma.c | 14 int ring_base, struct mtk_wed_device *wed) in mt7996_init_tx_queues() argument 19 if (mtk_wed_device_active(wed)) { in mt7996_init_tx_queues() 23 if (wed == &dev->mt76.mmio.wed_hif2) in mt7996_init_tx_queues() 33 ring_base, wed, flags); in mt7996_init_tx_queues() 299 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_dma_start() local 308 if (mtk_wed_device_active(wed) && mtk_wed_get_rx_capa(wed)) in mt7996_dma_start() 345 if (mtk_wed_device_active(wed) && wed_reset) { in mt7996_dma_start() 350 mtk_wed_device_start(wed, wed_irq_mask); in mt7996_dma_start() 482 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_dma_enable() 509 if (mtk_wed_device_active(&mdev->mmio.wed)) in mt7996_dma_rro_init() [all …]
|
| H A D | init.c | 468 mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed) in mt7996_init_wiphy() argument 483 if (mtk_wed_device_active(wed) || mt76_npu_device_active(mdev)) in mt7996_init_wiphy() 674 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_register_phy() local 683 wed = &dev->mt76.mmio.wed_hif2; in mt7996_register_phy() 738 wed); in mt7996_register_phy() 748 if (wed == &dev->mt76.mmio.wed_hif2 && mtk_wed_device_active(wed)) { in mt7996_register_phy() 791 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_rro_hw_init_v3() local 798 if (mtk_wed_device_active(wed) && mtk_wed_get_rx_capa(wed)) { in mt7996_rro_hw_init_v3() 799 wed->wlan.ind_cmd.win_size = in mt7996_rro_hw_init_v3() 802 wed->wlan.ind_cmd.particular_sid = in mt7996_rro_hw_init_v3() [all …]
|
| H A D | pci.c | 234 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7996_pci_probe() 235 mtk_wed_device_detach(&dev->mt76.mmio.wed); in mt7996_pci_probe()
|
| H A D | mac.c | 448 mtk_wed_device_ppe_check(&dev->mt76.mmio.wed, skb, in mt7996_wed_check_ppe() 1487 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) { in mt7996_mac_add_txs_skb() 2303 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_mac_restart() 2319 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_mac_restart() 2350 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_mac_restart() 2363 mtk_wed_device_start_hw_rro(&dev->mt76.mmio.wed, wed_irq_mask, in mt7996_mac_restart() 2564 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7996_mac_reset_work() 2565 mtk_wed_device_stop(&dev->mt76.mmio.wed); in mt7996_mac_reset_work() 2583 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && in mt7996_mac_reset_work() 2616 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) { in mt7996_mac_reset_work() [all …]
|
| H A D | main.c | 1697 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) { in mt7996_sta_statistics() 2176 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7996_net_fill_forward_path() local 2194 wed = &dev->mt76.mmio.wed_hif2; in mt7996_net_fill_forward_path() 2196 if (!mtk_wed_device_active(wed) && in mt7996_net_fill_forward_path() 2203 if (mtk_wed_device_active(wed)) in mt7996_net_fill_forward_path() 2204 path->mtk_wdma.wdma_idx = wed->wdma_idx; in mt7996_net_fill_forward_path() 2213 mtk_wed_is_amsdu_supported(wed)) in mt7996_net_fill_forward_path()
|
| /freebsd/sys/contrib/dev/mediatek/mt76/ |
| H A D | wed.c | 9 void mt76_wed_release_rx_buf(struct mtk_wed_device *wed) in mt76_wed_release_rx_buf() argument 11 struct mt76_dev *dev = mt76_wed_to_dev(wed); in mt76_wed_release_rx_buf() 32 u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size) in mt76_wed_init_rx_buf() argument 34 struct mtk_wed_bm_desc *desc = wed->rx_buf_ring.desc; in mt76_wed_init_rx_buf() 35 struct mt76_dev *dev = mt76_wed_to_dev(wed); in mt76_wed_init_rx_buf() 75 mt76_wed_release_rx_buf(wed); in mt76_wed_init_rx_buf() 81 int mt76_wed_offload_enable(struct mtk_wed_device *wed) in mt76_wed_offload_enable() argument 83 struct mt76_dev *dev = mt76_wed_to_dev(wed); in mt76_wed_offload_enable() 86 dev->token_size = wed->wlan.token_start; in mt76_wed_offload_enable() 102 if (!q->wed || !mtk_wed_device_active(q->wed)) in mt76_wed_dma_setup() [all …]
|
| H A D | dma.h | 55 _val = mtk_wed_device_reg_read((_q)->wed, \ 66 mtk_wed_device_reg_write((_q)->wed, \ 178 if (mtk_wed_device_active(&dev->mmio.wed)) in mt76_dma_reset_tx_queue()
|
| H A D | mt76.h | 266 struct mtk_wed_device *wed; member 723 struct mtk_wed_device wed; member 1236 void mt76_wed_release_rx_buf(struct mtk_wed_device *wed); 1237 void mt76_wed_offload_disable(struct mtk_wed_device *wed); 1238 void mt76_wed_reset_complete(struct mtk_wed_device *wed); 1244 u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size); 1245 int mt76_wed_offload_enable(struct mtk_wed_device *wed); 1248 static inline u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size) in mt76_wed_init_rx_buf() argument 1253 static inline int mt76_wed_offload_enable(struct mtk_wed_device *wed) in mt76_wed_offload_enable() argument 1287 static inline struct mt76_dev *mt76_wed_to_dev(struct mtk_wed_device *wed) in mt76_wed_to_dev() argument [all …]
|
| H A D | mmio.c | 104 if (mtk_wed_device_active(&dev->mmio.wed)) in mt76_set_irq_mask() 105 mtk_wed_device_irq_set_mask(&dev->mmio.wed, in mt76_set_irq_mask()
|
| H A D | tx.c | 140 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_tx_status_skb_add() 857 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_token_consume() 858 token >= dev->mmio.wed.wlan.token_start) in mt76_token_consume() 901 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_token_release() 902 token >= dev->mmio.wed.wlan.token_start && in mt76_token_release()
|
| H A D | dma.c | 849 if (mtk_wed_device_active(&dev->mmio.wed)) { in mt76_dma_alloc_queue() 850 if ((mtk_wed_get_rx_capa(&dev->mmio.wed) && mt76_queue_is_wed_rro(q)) || in mt76_dma_alloc_queue() 922 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_dma_rx_reset() 1183 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_dma_cleanup() 1193 if (mtk_wed_device_active(&dev->mmio.wed)) in mt76_dma_cleanup() 1194 mtk_wed_device_detach(&dev->mmio.wed); in mt76_dma_cleanup()
|
| H A D | Makefile | 13 tx.o agg-rx.o mcu.o wed.o scan.o channel.o
|
| H A D | mt76_connac_mac.c | 262 int ring_base, void *wed, u32 flags) in mt76_connac_init_tx_queues() argument 267 wed, flags); in mt76_connac_init_tx_queues() 539 if (is_mt7915(dev) && mtk_wed_device_active(&dev->mmio.wed)) in mt76_connac2_mac_write_txwi() 628 if (mtk_wed_device_active(&dev->mmio.wed) && in mt76_connac2_mac_fill_txs()
|
| H A D | mt76_connac.h | 415 int ring_base, void *wed, u32 flags);
|
| H A D | mac80211.c | 1593 if (mtk_wed_device_active(&dev->mmio.wed) || in mt76_rx_poll_complete() 2002 int ring_base, void *wed, u32 flags) in mt76_init_queue() argument 2012 hwq->wed = wed; in mt76_init_queue()
|
| /freebsd/sys/contrib/dev/mediatek/mt76/mt7915/ |
| H A D | mmio.c | 593 static void mt7915_mmio_wed_update_rx_stats(struct mtk_wed_device *wed, in mt7915_mmio_wed_update_rx_stats() argument 600 dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed); in mt7915_mmio_wed_update_rx_stats() 615 static int mt7915_mmio_wed_reset(struct mtk_wed_device *wed) in mt7915_mmio_wed_reset() argument 617 struct mt76_dev *mdev = container_of(wed, struct mt76_dev, mmio.wed); in mt7915_mmio_wed_reset() 649 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7915_mmio_wed_init() local 658 wed->wlan.pci_dev = pci_dev; in mt7915_mmio_wed_init() 659 wed->wlan.bus_type = MTK_WED_BUS_PCIE; in mt7915_mmio_wed_init() 660 wed->wlan.base = devm_ioremap(dev->mt76.dev, in mt7915_mmio_wed_init() 663 if (!wed->wlan.base) in mt7915_mmio_wed_init() 666 wed->wlan.phy_base = pci_resource_start(pci_dev, 0); in mt7915_mmio_wed_init() [all …]
|
| H A D | dma.c | 12 struct mtk_wed_device *wed = NULL; in mt7915_init_tx_queues() local 14 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) { in mt7915_init_tx_queues() 21 wed = &dev->mt76.mmio.wed; in mt7915_init_tx_queues() 25 wed, MT_WED_Q_TX(idx)); in mt7915_init_tx_queues() 87 if (is_mt7916(&dev->mt76) && mtk_wed_device_active(&dev->mt76.mmio.wed)) { in mt7915_dma_config() 309 if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wed_reset) { in mt7915_dma_start() 323 mtk_wed_device_start(&dev->mt76.mmio.wed, wed_irq_mask); in mt7915_dma_start() 424 if (mtk_wed_device_active(&mdev->mmio.wed)) { in mt7915_dma_init() 494 if (mtk_wed_device_active(&mdev->mmio.wed) && is_mt7915(mdev)) { in mt7915_dma_init() 498 mdev->q_rx[MT_RXQ_MCU_WA].wed = &mdev->mmio.wed; in mt7915_dma_init() [all …]
|
| H A D | pci.c | 217 if (mtk_wed_device_active(&mdev->mmio.wed)) in mt7915_pci_probe() 218 mtk_wed_device_detach(&mdev->mmio.wed); in mt7915_pci_probe()
|
| H A D | main.c | 1184 if (mtk_wed_device_active(&phy->dev->mt76.mmio.wed)) { in mt7915_sta_statistics() 1193 if (mtk_wed_get_rx_capa(&phy->dev->mt76.mmio.wed)) { in mt7915_sta_statistics() 1727 struct mtk_wed_device *wed = &dev->mt76.mmio.wed; in mt7915_net_fill_forward_path() local 1729 if (!mtk_wed_device_active(wed)) in mt7915_net_fill_forward_path() 1737 path->mtk_wdma.wdma_idx = wed->wdma_idx; in mt7915_net_fill_forward_path()
|
| H A D | soc.c | 1273 if (mtk_wed_device_active(&mdev->mmio.wed)) in mt798x_wmac_probe() 1274 mtk_wed_device_detach(&mdev->mmio.wed); in mt798x_wmac_probe()
|
| H A D | init.c | 386 if (mtk_wed_device_active(&mdev->mmio.wed)) in mt7915_init_wiphy() 569 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7915_mac_init_band()
|
| /freebsd/sys/contrib/device-tree/src/arm64/mediatek/ |
| H A D | mt7986a.dtsi | 150 wed_pcie: wed-pcie@10003000 { 151 compatible = "mediatek,mt7986-wed-pcie", 498 wed0: wed@15010000 { 499 compatible = "mediatek,mt7986-wed", 511 wed1: wed@15011000 { 512 compatible = "mediatek,mt7986-wed", 560 mediatek,wed-pcie = <&wed_pcie>; 561 mediatek,wed = <&wed0>, <&wed1>;
|
| H A D | mt7622.dtsi | 950 wed0: wed@1020a000 { 951 compatible = "mediatek,mt7622-wed", 957 wed1: wed@1020b000 { 958 compatible = "mediatek,mt7622-wed", 989 mediatek,wed = <&wed0>, <&wed1>;
|
| /freebsd/sys/modules/mt76/core/ |
| H A D | Makefile | 11 SRCS+= channel.c scan.c wed.c
|