Lines Matching refs:mphy

345 mt7921_get_status_freq_info(struct mt7921_dev *dev, struct mt76_phy *mphy,  in mt7921_get_status_freq_info()  argument
348 if (!test_bit(MT76_HW_SCANNING, &mphy->state) && in mt7921_get_status_freq_info()
349 !test_bit(MT76_HW_SCHED_SCANNING, &mphy->state) && in mt7921_get_status_freq_info()
350 !test_bit(MT76_STATE_ROC, &mphy->state)) { in mt7921_get_status_freq_info()
351 status->freq = mphy->chandef.chan->center_freq; in mt7921_get_status_freq_info()
352 status->band = mphy->chandef.chan->band; in mt7921_get_status_freq_info()
406 struct mt76_phy *mphy = &dev->mt76.phy; in mt7921_mac_fill_rx() local
425 if (!test_bit(MT76_STATE_RUNNING, &mphy->state)) in mt7921_mac_fill_rx()
447 mt7921_get_status_freq_info(dev, mphy, status, chfreq); in mt7921_mac_fill_rx()
451 sband = &mphy->sband_5g.sband; in mt7921_mac_fill_rx()
454 sband = &mphy->sband_6g.sband; in mt7921_mac_fill_rx()
457 sband = &mphy->sband_2g.sband; in mt7921_mac_fill_rx()
569 status->chains = mphy->antenna_mask; in mt7921_mac_fill_rx()
575 for (i = 0; i < hweight8(mphy->antenna_mask); i++) { in mt7921_mac_fill_rx()
844 struct mt76_phy *mphy = &dev->mphy; in mt7921_mac_write_txwi() local
912 rate = mt76_calculate_default_rate(mphy, rateidx); in mt7921_mac_write_txwi()
1000 if (dev->mphy.chandef.chan->band == NL80211_BAND_5GHZ) in mt7921_mac_add_txs_skb()
1001 sband = &dev->mphy.sband_5g.sband; in mt7921_mac_add_txs_skb()
1003 sband = &dev->mphy.sband_2g.sband; in mt7921_mac_add_txs_skb()
1005 rate.mcs = mt76_get_rate(dev->mphy.dev, sband, rate.mcs, cck); in mt7921_mac_add_txs_skb()
1222 mt7921_phy_update_channel(struct mt76_phy *mphy, int idx) in mt7921_phy_update_channel() argument
1224 struct mt7921_dev *dev = container_of(mphy->dev, struct mt7921_dev, mt76); in mt7921_phy_update_channel()
1225 struct mt7921_phy *phy = (struct mt7921_phy *)mphy->priv; in mt7921_phy_update_channel()
1245 state = mphy->chan_state; in mt7921_phy_update_channel()
1253 void mt7921_update_channel(struct mt76_phy *mphy) in mt7921_update_channel() argument
1255 struct mt7921_dev *dev = container_of(mphy->dev, struct mt7921_dev, mt76); in mt7921_update_channel()
1257 if (mt76_connac_pm_wake(mphy, &dev->pm)) in mt7921_update_channel()
1260 mt7921_phy_update_channel(mphy, 0); in mt7921_update_channel()
1264 mt76_connac_power_save_sched(mphy, &dev->pm); in mt7921_update_channel()
1278 mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, true); in mt7921_vif_connect_iter()
1295 cancel_delayed_work_sync(&dev->mphy.mac_work); in mt7921_mac_reset_work()
1308 if (test_and_clear_bit(MT76_HW_SCANNING, &dev->mphy.state)) { in mt7921_mac_reset_work()
1313 ieee80211_scan_completed(dev->mphy.hw, &info); in mt7921_mac_reset_work()
1400 struct mt76_phy *mphy; in mt7921_mac_work() local
1402 mphy = (struct mt76_phy *)container_of(work, struct mt76_phy, in mt7921_mac_work()
1404 phy = mphy->priv; in mt7921_mac_work()
1408 mt76_update_survey(mphy); in mt7921_mac_work()
1409 if (++mphy->mac_work_count == 2) { in mt7921_mac_work()
1410 mphy->mac_work_count = 0; in mt7921_mac_work()
1417 mt76_tx_status_check(mphy->dev, false); in mt7921_mac_work()
1418 ieee80211_queue_delayed_work(phy->mt76->hw, &mphy->mac_work, in mt7921_mac_work()
1425 struct mt76_phy *mphy; in mt7921_pm_wake_work() local
1429 mphy = dev->phy.mt76; in mt7921_pm_wake_work()
1436 mt76_connac_pm_dequeue_skbs(mphy, &dev->pm); in mt7921_pm_wake_work()
1441 mt76_connac_pm_dequeue_skbs(mphy, &dev->pm); in mt7921_pm_wake_work()
1444 if (test_bit(MT76_STATE_RUNNING, &mphy->state)) in mt7921_pm_wake_work()
1445 ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, in mt7921_pm_wake_work()
1449 ieee80211_wake_queues(mphy->hw); in mt7921_pm_wake_work()
1457 struct mt76_phy *mphy; in mt7921_pm_power_save_work() local
1461 mphy = dev->phy.mt76; in mt7921_pm_power_save_work()
1464 if (test_bit(MT76_HW_SCANNING, &mphy->state) || in mt7921_pm_power_save_work()
1465 test_bit(MT76_HW_SCHED_SCANNING, &mphy->state)) in mt7921_pm_power_save_work()
1474 cancel_delayed_work_sync(&mphy->mac_work); in mt7921_pm_power_save_work()