Lines Matching refs:mphy
226 return test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state); in mt7615_wait_for_mcu_init()
275 int i, n_chains = hweight8(dev->mphy.antenna_mask), target_chains; in mt7615_init_txpower()
308 target_power = mt76_get_rate_power_limits(&dev->mphy, chan, in mt7615_init_txpower()
336 struct mt76_phy *mphy = hw->priv; in mt7615_regd_notifier() local
337 struct mt7615_phy *phy = mphy->priv; in mt7615_regd_notifier()
338 struct cfg80211_chan_def *chandef = &mphy->chandef; in mt7615_regd_notifier()
343 mt7615_init_txpower(dev, &mphy->sband_2g.sband); in mt7615_regd_notifier()
344 mt7615_init_txpower(dev, &mphy->sband_5g.sband); in mt7615_regd_notifier()
352 mt76_connac_mcu_set_channel_domain(mphy); in mt7615_regd_notifier()
353 mt76_connac_mcu_set_rate_txpower(mphy); in mt7615_regd_notifier()
420 dev->mphy.sband_5g.sband.vht_cap.cap &= in mt7615_cap_dbdc_enable()
424 dev->mphy.antenna_mask = dev->chainmask >> 2; in mt7615_cap_dbdc_enable()
426 dev->mphy.antenna_mask = dev->chainmask >> 1; in mt7615_cap_dbdc_enable()
427 dev->mphy.chainmask = dev->mphy.antenna_mask; in mt7615_cap_dbdc_enable()
428 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
429 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
430 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_enable()
436 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7615_cap_dbdc_disable()
439 dev->mphy.antenna_mask = dev->chainmask; in mt7615_cap_dbdc_disable()
440 dev->mphy.chainmask = dev->chainmask; in mt7615_cap_dbdc_disable()
441 dev->mphy.hw->wiphy->available_antennas_rx = dev->chainmask; in mt7615_cap_dbdc_disable()
442 dev->mphy.hw->wiphy->available_antennas_tx = dev->chainmask; in mt7615_cap_dbdc_disable()
443 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_disable()
449 struct mt76_phy *mphy; in mt7615_register_ext_phy() local
455 if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) in mt7615_register_ext_phy()
462 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7615_ops, MT_BAND1); in mt7615_register_ext_phy()
463 if (!mphy) in mt7615_register_ext_phy()
466 phy = mphy->priv; in mt7615_register_ext_phy()
468 phy->mt76 = mphy; in mt7615_register_ext_phy()
469 mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask; in mt7615_register_ext_phy()
470 mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1; in mt7615_register_ext_phy()
471 mt7615_init_wiphy(mphy->hw); in mt7615_register_ext_phy()
473 INIT_DELAYED_WORK(&mphy->mac_work, mt7615_mac_work); in mt7615_register_ext_phy()
487 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7615_register_ext_phy()
489 mphy->macaddr[0] |= 2; in mt7615_register_ext_phy()
490 mphy->macaddr[0] ^= BIT(7); in mt7615_register_ext_phy()
491 mt76_eeprom_override(mphy); in mt7615_register_ext_phy()
494 mphy->cap.has_5ghz = true; in mt7615_register_ext_phy()
498 mphy->q_tx[i] = dev->mphy.q_tx[i]; in mt7615_register_ext_phy()
500 ret = mt76_register_phy(mphy, true, mt76_rates, in mt7615_register_ext_phy()
503 ieee80211_free_hw(mphy->hw); in mt7615_register_ext_phy()
512 struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1]; in mt7615_unregister_ext_phy() local
518 mt76_unregister_phy(mphy); in mt7615_unregister_ext_phy()
519 ieee80211_free_hw(mphy->hw); in mt7615_unregister_ext_phy()
538 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7615_mac_work); in mt7615_init_device()