Lines Matching refs:mphy

223 	return test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);  in mt7615_wait_for_mcu_init()
272 int i, n_chains = hweight8(dev->mphy.antenna_mask), target_chains; in mt7615_init_txpower()
305 target_power = mt76_get_rate_power_limits(&dev->mphy, chan, in mt7615_init_txpower()
333 struct mt76_phy *mphy = hw->priv; in mt7615_regd_notifier() local
334 struct mt7615_phy *phy = mphy->priv; in mt7615_regd_notifier()
335 struct cfg80211_chan_def *chandef = &mphy->chandef; in mt7615_regd_notifier()
340 mt7615_init_txpower(dev, &mphy->sband_2g.sband); in mt7615_regd_notifier()
341 mt7615_init_txpower(dev, &mphy->sband_5g.sband); in mt7615_regd_notifier()
349 mt76_connac_mcu_set_channel_domain(mphy); in mt7615_regd_notifier()
350 mt76_connac_mcu_set_rate_txpower(mphy); in mt7615_regd_notifier()
416 dev->mphy.sband_5g.sband.vht_cap.cap &= in mt7615_cap_dbdc_enable()
420 dev->mphy.antenna_mask = dev->chainmask >> 2; in mt7615_cap_dbdc_enable()
422 dev->mphy.antenna_mask = dev->chainmask >> 1; in mt7615_cap_dbdc_enable()
423 dev->mphy.chainmask = dev->mphy.antenna_mask; in mt7615_cap_dbdc_enable()
424 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
425 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
426 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_enable()
432 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7615_cap_dbdc_disable()
435 dev->mphy.antenna_mask = dev->chainmask; in mt7615_cap_dbdc_disable()
436 dev->mphy.chainmask = dev->chainmask; in mt7615_cap_dbdc_disable()
437 dev->mphy.hw->wiphy->available_antennas_rx = dev->chainmask; in mt7615_cap_dbdc_disable()
438 dev->mphy.hw->wiphy->available_antennas_tx = dev->chainmask; in mt7615_cap_dbdc_disable()
439 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_disable()
445 struct mt76_phy *mphy; in mt7615_register_ext_phy() local
451 if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) in mt7615_register_ext_phy()
458 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7615_ops); in mt7615_register_ext_phy()
459 if (!mphy) in mt7615_register_ext_phy()
462 phy = mphy->priv; in mt7615_register_ext_phy()
464 phy->mt76 = mphy; in mt7615_register_ext_phy()
465 mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask; in mt7615_register_ext_phy()
466 mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1; in mt7615_register_ext_phy()
467 mt7615_init_wiphy(mphy->hw); in mt7615_register_ext_phy()
469 INIT_DELAYED_WORK(&mphy->mac_work, mt7615_mac_work); in mt7615_register_ext_phy()
483 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7615_register_ext_phy()
485 mphy->macaddr[0] |= 2; in mt7615_register_ext_phy()
486 mphy->macaddr[0] ^= BIT(7); in mt7615_register_ext_phy()
487 mt76_eeprom_override(mphy); in mt7615_register_ext_phy()
490 mphy->cap.has_5ghz = true; in mt7615_register_ext_phy()
494 mphy->q_tx[i] = dev->mphy.q_tx[i]; in mt7615_register_ext_phy()
496 ret = mt76_register_phy(mphy, true, mt76_rates, in mt7615_register_ext_phy()
499 ieee80211_free_hw(mphy->hw); in mt7615_register_ext_phy()
508 struct mt76_phy *mphy = dev->mt76.phy2; in mt7615_unregister_ext_phy() local
514 mt76_unregister_phy(mphy); in mt7615_unregister_ext_phy()
515 ieee80211_free_hw(mphy->hw); in mt7615_unregister_ext_phy()
534 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7615_mac_work); in mt7615_init_device()