Lines Matching +full:d +full:- +full:phy
1 // SPDX-License-Identifier: ISC
11 mt76_wr(dev, dev->mt76.debugfs_reg, val); in mt7615_reg_set()
23 *val = mt76_rr(dev, dev->mt76.debugfs_reg); in mt7615_reg_get()
57 ret = mt76_connac_mcu_chip_config(&dev->mt76); in mt7615_config()
74 mt7615_mac_set_scs(&dev->phy, val); in mt7615_scs_set()
87 *val = dev->phy.scs_en; in mt7615_scs_get()
99 struct mt76_connac_pm *pm = &dev->pm; in mt7615_pm_set()
105 if (!mt7615_firmware_offload(dev) || mt76_is_usb(&dev->mt76)) in mt7615_pm_set()
106 return -EOPNOTSUPP; in mt7615_pm_set()
108 mutex_lock(&dev->mt76.mutex); in mt7615_pm_set()
110 if (val == pm->enable) in mt7615_pm_set()
113 if (dev->phy.n_beacon_vif) { in mt7615_pm_set()
114 ret = -EBUSY; in mt7615_pm_set()
118 if (!pm->enable) { in mt7615_pm_set()
119 pm->stats.last_wake_event = jiffies; in mt7615_pm_set()
120 pm->stats.last_doze_event = jiffies; in mt7615_pm_set()
125 pm->enable = false; in mt7615_pm_set()
126 mt76_connac_pm_wake(&dev->mphy, pm); in mt7615_pm_set()
128 pm->enable = val; in mt7615_pm_set()
129 mt76_connac_power_save_sched(&dev->mphy, pm); in mt7615_pm_set()
131 mutex_unlock(&dev->mt76.mutex); in mt7615_pm_set()
141 *val = dev->pm.enable; in mt7615_pm_get()
151 struct mt7615_dev *dev = dev_get_drvdata(s->private); in mt7615_pm_stats()
152 struct mt76_connac_pm *pm = &dev->pm; in mt7615_pm_stats()
153 unsigned long awake_time = pm->stats.awake_time; in mt7615_pm_stats()
154 unsigned long doze_time = pm->stats.doze_time; in mt7615_pm_stats()
156 if (!test_bit(MT76_STATE_PM, &dev->mphy.state)) in mt7615_pm_stats()
157 awake_time += jiffies - pm->stats.last_wake_event; in mt7615_pm_stats()
159 doze_time += jiffies - pm->stats.last_doze_event; in mt7615_pm_stats()
173 dev->pm.idle_timeout = msecs_to_jiffies(val); in mt7615_pm_idle_timeout_set()
183 *val = jiffies_to_msecs(dev->pm.idle_timeout); in mt7615_pm_idle_timeout_get()
228 dev->fw_debug = val; in mt7615_fw_debug_set()
231 mt7615_mcu_fw_log_2_host(dev, dev->fw_debug ? 2 : 0); in mt7615_fw_debug_set()
242 *val = dev->fw_debug; in mt7615_fw_debug_get()
261 return -ENOMEM; in mt7615_reset_test_set()
266 mt76_tx_queue_skb_raw(dev, dev->mphy.q_tx[0], skb, 0); in mt7615_reset_test_set()
276 mt7615_ampdu_stat_read_phy(struct mt7615_phy *phy, in mt7615_ampdu_stat_read_phy() argument
279 struct mt7615_dev *dev = file->private; in mt7615_ampdu_stat_read_phy()
280 u32 reg = is_mt7663(&dev->mt76) ? MT_MIB_ARNG(0) : MT_AGG_ASRCR0; in mt7615_ampdu_stat_read_phy()
283 if (!phy) in mt7615_ampdu_stat_read_phy()
294 seq_printf(file, "\nPhy %d\n", phy != &dev->phy); in mt7615_ampdu_stat_read_phy()
296 seq_printf(file, "Length: %8d | ", bound[0]); in mt7615_ampdu_stat_read_phy()
297 for (i = 0; i < ARRAY_SIZE(bound) - 1; i++) in mt7615_ampdu_stat_read_phy()
298 seq_printf(file, "%3d -%3d | ", in mt7615_ampdu_stat_read_phy()
303 seq_printf(file, "%8d | ", phy->mt76->aggr_stats[i]); in mt7615_ampdu_stat_read_phy()
306 seq_printf(file, "BA miss count: %d\n", phy->mib.ba_miss_cnt); in mt7615_ampdu_stat_read_phy()
308 phy->mib.aggr_per / 10, phy->mib.aggr_per % 10); in mt7615_ampdu_stat_read_phy()
314 struct mt7615_dev *dev = file->private; in mt7615_ampdu_stat_show()
318 mt7615_ampdu_stat_read_phy(&dev->phy, file); in mt7615_ampdu_stat_show()
329 mt7615_radio_read_phy(struct mt7615_phy *phy, struct seq_file *s) in mt7615_radio_read_phy() argument
331 struct mt7615_dev *dev = dev_get_drvdata(s->private); in mt7615_radio_read_phy()
332 bool ext_phy = phy != &dev->phy; in mt7615_radio_read_phy()
334 if (!phy) in mt7615_radio_read_phy()
337 seq_printf(s, "Radio %d sensitivity: ofdm=%d cck=%d\n", ext_phy, in mt7615_radio_read_phy()
338 phy->ofdm_sensitivity, phy->cck_sensitivity); in mt7615_radio_read_phy()
339 seq_printf(s, "Radio %d false CCA: ofdm=%d cck=%d\n", ext_phy, in mt7615_radio_read_phy()
340 phy->false_cca_ofdm, phy->false_cca_cck); in mt7615_radio_read_phy()
346 struct mt7615_dev *dev = dev_get_drvdata(s->private); in mt7615_radio_read()
348 mt7615_radio_read_phy(&dev->phy, s); in mt7615_radio_read()
357 struct mt7615_dev *dev = dev_get_drvdata(s->private); in mt7615_queues_acq()
367 if (wmm_idx == 3 && is_mt7663(&dev->mt76)) in mt7615_queues_acq()
382 seq_printf(s, "AC%d%d: queued=%d\n", wmm_idx, acs, qlen); in mt7615_queues_acq()
393 struct mt7615_dev *dev = dev_get_drvdata(s->private); in mt7615_queues_read()
398 { dev->mphy.q_tx[MT_TXQ_BE], "PDMA0" }, in mt7615_queues_read()
399 { dev->mt76.q_mcu[MT_MCUQ_WM], "MCUQ" }, in mt7615_queues_read()
400 { dev->mt76.q_mcu[MT_MCUQ_FWDL], "MCUFWQ" }, in mt7615_queues_read()
408 "%s: queued=%d head=%d tail=%d\n", in mt7615_queues_read()
409 queue_map[i].queue, q->queued, q->head, in mt7615_queues_read()
410 q->tail); in mt7615_queues_read()
421 mt7615_rf_wr(dev, dev->debugfs_rf_wf, dev->debugfs_rf_reg, val); in mt7615_rf_reg_set()
431 *val = mt7615_rf_rr(dev, dev->debugfs_rf_wf, dev->debugfs_rf_reg); in mt7615_rf_reg_get()
443 struct mt7615_dev *dev = file->private_data; in mt7615_ext_mac_addr_read()
452 return -ENOMEM; in mt7615_ext_mac_addr_read()
455 if (!(dev->muar_mask & BIT(i))) in mt7615_ext_mac_addr_read()
464 ofs += snprintf(buf + ofs, len - ofs, "%d=%pM\n", i, addr); in mt7615_ext_mac_addr_read()
477 struct mt7615_dev *dev = file->private_data; in mt7615_ext_mac_addr_write()
484 return -EINVAL; in mt7615_ext_mac_addr_write()
487 return -EFAULT; in mt7615_ext_mac_addr_write()
489 buf[sizeof(buf) - 1] = '\0'; in mt7615_ext_mac_addr_write()
497 return -EINVAL; in mt7615_ext_mac_addr_write()
504 return -EINVAL; in mt7615_ext_mac_addr_write()
507 dev->muar_mask |= BIT(idx); in mt7615_ext_mac_addr_write()
510 dev->muar_mask &= ~BIT(idx); in mt7615_ext_mac_addr_write()
521 mt76_rmw_field(dev, MT_WF_RMAC_MORE(0), MT_WF_RMAC_MORE_MUAR_MODE, !!dev->muar_mask); in mt7615_ext_mac_addr_write()
537 struct mt7615_dev *dev = dev_get_drvdata(s->private); in mt7663s_sched_quota_read()
538 struct mt76_sdio *sdio = &dev->mt76.sdio; in mt7663s_sched_quota_read()
540 seq_printf(s, "pse_data_quota\t%d\n", sdio->sched.pse_data_quota); in mt7663s_sched_quota_read()
541 seq_printf(s, "ple_data_quota\t%d\n", sdio->sched.ple_data_quota); in mt7663s_sched_quota_read()
542 seq_printf(s, "pse_mcu_quota\t%d\n", sdio->sched.pse_mcu_quota); in mt7663s_sched_quota_read()
543 seq_printf(s, "sched_deficit\t%d\n", sdio->sched.deficit); in mt7663s_sched_quota_read()
552 dir = mt76_register_debugfs_fops(&dev->mphy, &fops_regval); in mt7615_init_debugfs()
554 return -ENOMEM; in mt7615_init_debugfs()
556 if (is_mt7615(&dev->mt76)) in mt7615_init_debugfs()
557 debugfs_create_devm_seqfile(dev->mt76.dev, "xmit-queues", dir, in mt7615_init_debugfs()
560 debugfs_create_devm_seqfile(dev->mt76.dev, "xmit-queues", dir, in mt7615_init_debugfs()
562 debugfs_create_devm_seqfile(dev->mt76.dev, "acq", dir, in mt7615_init_debugfs()
568 debugfs_create_file("runtime-pm", 0600, dir, dev, &fops_pm); in mt7615_init_debugfs()
569 debugfs_create_file("idle-timeout", 0600, dir, dev, in mt7615_init_debugfs()
571 debugfs_create_devm_seqfile(dev->mt76.dev, "runtime_pm_stats", dir, in mt7615_init_debugfs()
573 debugfs_create_devm_seqfile(dev->mt76.dev, "radio", dir, in mt7615_init_debugfs()
576 if (is_mt7615(&dev->mt76)) { in mt7615_init_debugfs()
578 &dev->hw_pattern); in mt7615_init_debugfs()
581 &dev->radar_pattern.n_pulses); in mt7615_init_debugfs()
583 &dev->radar_pattern.period); in mt7615_init_debugfs()
585 &dev->radar_pattern.width); in mt7615_init_debugfs()
587 &dev->radar_pattern.power); in mt7615_init_debugfs()
596 debugfs_create_u32("rf_wfidx", 0600, dir, &dev->debugfs_rf_wf); in mt7615_init_debugfs()
597 debugfs_create_u32("rf_regidx", 0600, dir, &dev->debugfs_rf_reg); in mt7615_init_debugfs()
600 if (is_mt7663(&dev->mt76)) in mt7615_init_debugfs()
603 if (mt76_is_sdio(&dev->mt76)) in mt7615_init_debugfs()
604 debugfs_create_devm_seqfile(dev->mt76.dev, "sched-quota", dir, in mt7615_init_debugfs()