Lines Matching full:mt76

24 	return phy && test_bit(MT76_STATE_RUNNING, &phy->mt76->state);  in mt7615_dev_running()
47 ret = mt76_connac_mcu_set_mac_enable(&dev->mt76, 0, true, false); in mt7615_start()
59 ret = mt76_connac_mcu_set_mac_enable(&dev->mt76, 1, true, false); in mt7615_start()
67 ret = mt76_connac_mcu_set_channel_domain(phy->mt76); in mt7615_start()
71 ret = mt76_connac_mcu_set_rate_txpower(phy->mt76); in mt7615_start()
80 set_bit(MT76_STATE_RUNNING, &phy->mt76->state); in mt7615_start()
83 ieee80211_queue_delayed_work(hw, &phy->mt76->mac_work, timeout); in mt7615_start()
99 cancel_delayed_work_sync(&phy->mt76->mac_work); in mt7615_stop()
110 mt76_testmode_reset(phy->mt76, true); in mt7615_stop()
112 clear_bit(MT76_STATE_RUNNING, &phy->mt76->state); in mt7615_stop()
117 mt76_connac_mcu_set_mac_enable(&dev->mt76, 1, false, false); in mt7615_stop()
122 mt76_connac_mcu_set_mac_enable(&dev->mt76, 0, false, false); in mt7615_stop()
191 mt76_testmode_reset(phy->mt76, true); in mt7615_add_interface()
197 mvif->mt76.idx = __ffs64(~dev->mt76.vif_mask); in mt7615_add_interface()
198 if (mvif->mt76.idx >= MT7615_MAX_INTERFACES) { in mt7615_add_interface()
208 mvif->mt76.omac_idx = idx; in mt7615_add_interface()
210 mvif->mt76.band_idx = ext_phy; in mt7615_add_interface()
211 mvif->mt76.wmm_idx = vif->type != NL80211_IFTYPE_AP; in mt7615_add_interface()
213 mvif->mt76.wmm_idx += 2; in mt7615_add_interface()
215 dev->mt76.vif_mask |= BIT_ULL(mvif->mt76.idx); in mt7615_add_interface()
216 dev->omac_mask |= BIT_ULL(mvif->mt76.omac_idx); in mt7615_add_interface()
217 phy->omac_mask |= BIT_ULL(mvif->mt76.omac_idx); in mt7615_add_interface()
223 idx = MT7615_WTBL_RESERVED - mvif->mt76.idx; in mt7615_add_interface()
227 mvif->sta.wcid.phy_idx = mvif->mt76.band_idx; in mt7615_add_interface()
234 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); in mt7615_add_interface()
261 mt76_testmode_reset(phy->mt76, true); in mt7615_remove_interface()
269 rcu_assign_pointer(dev->mt76.wcid[idx], NULL); in mt7615_remove_interface()
271 dev->mt76.vif_mask &= ~BIT_ULL(mvif->mt76.idx); in mt7615_remove_interface()
272 dev->omac_mask &= ~BIT_ULL(mvif->mt76.omac_idx); in mt7615_remove_interface()
273 phy->omac_mask &= ~BIT_ULL(mvif->mt76.omac_idx); in mt7615_remove_interface()
282 mt76_packet_id_flush(&dev->mt76, &mvif->sta.wcid); in mt7615_remove_interface()
291 cancel_delayed_work_sync(&phy->mt76->mac_work); in mt7615_set_channel()
295 set_bit(MT76_RESET, &phy->mt76->state); in mt7615_set_channel()
297 mt76_set_channel(phy->mt76); in mt7615_set_channel()
299 if (is_mt7615(&dev->mt76) && dev->flash_eeprom) { in mt7615_set_channel()
328 clear_bit(MT76_RESET, &phy->mt76->state); in mt7615_set_channel()
332 mt76_worker_schedule(&dev->mt76.tx_worker); in mt7615_set_channel()
333 if (!mt76_testmode_enabled(phy->mt76)) { in mt7615_set_channel()
336 ieee80211_queue_delayed_work(phy->mt76->hw, in mt7615_set_channel()
337 &phy->mt76->mac_work, timeout); in mt7615_set_channel()
387 if (cmd == SET_KEY && !sta && !mvif->mt76.cipher) { in mt7615_set_key()
388 mvif->mt76.cipher = mt76_connac_mcu_get_cipher(key->cipher); in mt7615_set_key()
399 mt76_wcid_key_setup(&dev->mt76, wcid, in mt7615_set_key()
402 if (mt76_is_mmio(&dev->mt76)) in mt7615_set_key()
419 if (!cfg80211_chandef_valid(&phy->mt76->chandef)) in mt7615_set_sar_specs()
427 return mt76_connac_mcu_set_rate_txpower(phy->mt76); in mt7615_set_sar_specs()
446 if (phy->mt76->test.state != MT76_TM_STATE_OFF) { in mt7615_config()
448 mt76_testmode_reset(phy->mt76, false); in mt7615_config()
460 mt76_testmode_reset(phy->mt76, true); in mt7615_config()
516 if (!mt76_testmode_enabled(phy->mt76)) \ in mt7615_configure_filter()
588 mt76_connac_mcu_set_vif_ps(&dev->mt76, vif); in mt7615_bss_info_changed()
594 mt76_connac_mcu_update_arp_filter(&dev->mt76, &mvif->mt76, in mt7615_bss_info_changed()
619 struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76); in mt7615_mac_sta_add()
625 idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7615_WTBL_STA - 1); in mt7615_mac_sta_add()
633 msta->wcid.phy_idx = mvif->mt76.band_idx; in mt7615_mac_sta_add()
635 phy = mvif->mt76.band_idx ? mt7615_ext_phy(dev) : &dev->phy; in mt7615_mac_sta_add()
636 err = mt76_connac_pm_wake(phy->mt76, &dev->pm); in mt7615_mac_sta_add()
652 mt76_connac_power_save_sched(phy->mt76, &dev->pm); in mt7615_mac_sta_add()
661 struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76); in mt7615_mac_sta_remove()
668 phy = mvif->mt76.band_idx ? mt7615_ext_phy(dev) : &dev->phy; in mt7615_mac_sta_remove()
669 mt76_connac_pm_wake(phy->mt76, &dev->pm); in mt7615_mac_sta_remove()
682 mt76_connac_power_save_sched(phy->mt76, &dev->pm); in mt7615_mac_sta_remove()
699 spin_lock_bh(&dev->mt76.lock); in mt7615_sta_rate_tbl_update()
709 if (mt76_connac_pm_ref(phy->mt76, &dev->pm)) { in mt7615_sta_rate_tbl_update()
711 mt76_connac_pm_unref(phy->mt76, &dev->pm); in mt7615_sta_rate_tbl_update()
713 spin_unlock_bh(&dev->mt76.lock); in mt7615_sta_rate_tbl_update()
719 mt76.tx_worker); in mt7615_tx_worker()
722 queue_work(dev->mt76.wq, &dev->pm.wake_work); in mt7615_tx_worker()
726 mt76_tx_worker_run(&dev->mt76); in mt7615_tx_worker()
738 struct mt76_wcid *wcid = &dev->mt76.global_wcid; in mt7615_tx()
777 err = mt76_connac_mcu_set_rts_thresh(&dev->mt76, val, band); in mt7615_set_rts_threshold()
806 mt76_rx_aggr_start(&dev->mt76, &msta->wcid, tid, ssn, in mt7615_ampdu_action()
811 mt76_rx_aggr_stop(&dev->mt76, &msta->wcid, tid); in mt7615_ampdu_action()
887 u16 idx = mvif->mt76.omac_idx; in mt7615_get_tsf()
915 u16 idx = mvif->mt76.omac_idx; in mt7615_set_tsf()
941 u16 idx = mvif->mt76.omac_idx; in mt7615_offset_tsf()
985 phy->mt76->antenna_mask = tx_ant; in mt7615_set_antenna()
992 phy->mt76->chainmask = tx_ant; in mt7615_set_antenna()
994 mt76_set_stream_caps(phy->mt76, true); in mt7615_set_antenna()
1016 if (!test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state)) in mt7615_roc_work()
1020 ieee80211_iterate_active_interfaces(phy->mt76->hw, in mt7615_roc_work()
1024 ieee80211_remain_on_channel_expired(phy->mt76->hw); in mt7615_roc_work()
1031 ieee80211_queue_work(phy->mt76->hw, &phy->roc_work); in mt7615_roc_timer()
1045 spin_lock_bh(&phy->dev->mt76.lock); in mt7615_scan_work()
1047 spin_unlock_bh(&phy->dev->mt76.lock); in mt7615_scan_work()
1054 ieee80211_sched_scan_results(phy->mt76->hw); in mt7615_scan_work()
1056 &phy->mt76->state)) { in mt7615_scan_work()
1061 ieee80211_scan_completed(phy->mt76->hw, &info); in mt7615_scan_work()
1148 if (test_and_set_bit(MT76_STATE_ROC, &phy->mt76->state)) in mt7615_remain_on_channel()
1155 clear_bit(MT76_STATE_ROC, &phy->mt76->state); in mt7615_remain_on_channel()
1161 clear_bit(MT76_STATE_ROC, &phy->mt76->state); in mt7615_remain_on_channel()
1177 if (!test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state)) in mt7615_cancel_remain_on_channel()
1223 clear_bit(MT76_STATE_RUNNING, &phy->mt76->state); in mt7615_suspend()
1225 cancel_delayed_work_sync(&phy->mt76->mac_work); in mt7615_suspend()
1227 set_bit(MT76_STATE_SUSPEND, &phy->mt76->state); in mt7615_suspend()
1231 phy->mt76); in mt7615_suspend()
1234 err = mt76_connac_mcu_set_hif_suspend(&dev->mt76, true); in mt7615_suspend()
1251 set_bit(MT76_STATE_RUNNING, &phy->mt76->state); in mt7615_resume()
1256 err = mt76_connac_mcu_set_hif_suspend(&dev->mt76, false); in mt7615_resume()
1263 clear_bit(MT76_STATE_SUSPEND, &phy->mt76->state); in mt7615_resume()
1267 phy->mt76); in mt7615_resume()
1270 ieee80211_queue_delayed_work(hw, &phy->mt76->mac_work, timeout); in mt7615_resume()
1280 struct mt76_dev *mdev = &dev->mt76; in mt7615_set_wakeup()