Lines Matching refs:mphy

229 	return test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);  in mt7615_wait_for_mcu_init()
278 int i, n_chains = hweight8(dev->mphy.antenna_mask), target_chains; in mt7615_init_txpower()
311 target_power = mt76_get_rate_power_limits(&dev->mphy, chan, in mt7615_init_txpower()
339 struct mt76_phy *mphy = hw->priv; in mt7615_regd_notifier() local
340 struct mt7615_phy *phy = mphy->priv; in mt7615_regd_notifier()
341 struct cfg80211_chan_def *chandef = &mphy->chandef; in mt7615_regd_notifier()
346 mt7615_init_txpower(dev, &mphy->sband_2g.sband); in mt7615_regd_notifier()
347 mt7615_init_txpower(dev, &mphy->sband_5g.sband); in mt7615_regd_notifier()
355 mt76_connac_mcu_set_channel_domain(mphy); in mt7615_regd_notifier()
356 mt76_connac_mcu_set_rate_txpower(mphy); in mt7615_regd_notifier()
426 dev->mphy.sband_5g.sband.vht_cap.cap &= in mt7615_cap_dbdc_enable()
430 dev->mphy.antenna_mask = dev->chainmask >> 2; in mt7615_cap_dbdc_enable()
432 dev->mphy.antenna_mask = dev->chainmask >> 1; in mt7615_cap_dbdc_enable()
433 dev->mphy.chainmask = dev->mphy.antenna_mask; in mt7615_cap_dbdc_enable()
434 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
435 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
436 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_enable()
442 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7615_cap_dbdc_disable()
445 dev->mphy.antenna_mask = dev->chainmask; in mt7615_cap_dbdc_disable()
446 dev->mphy.chainmask = dev->chainmask; in mt7615_cap_dbdc_disable()
447 dev->mphy.hw->wiphy->available_antennas_rx = dev->chainmask; in mt7615_cap_dbdc_disable()
448 dev->mphy.hw->wiphy->available_antennas_tx = dev->chainmask; in mt7615_cap_dbdc_disable()
449 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_disable()
474 struct mt76_phy *mphy; in mt7615_led_set_config() local
478 mphy = container_of(led_cdev, struct mt76_phy, leds.cdev); in mt7615_led_set_config()
479 dev = container_of(mphy->dev, struct mt7615_dev, mt76); in mt7615_led_set_config()
481 if (!mt76_connac_pm_ref(mphy, &dev->pm)) in mt7615_led_set_config()
488 index = dev->dbdc_support ? mphy->band_idx : mphy->leds.pin; in mt7615_led_set_config()
495 if (dev->mphy.leds.al) in mt7615_led_set_config()
497 if (mphy->band_idx) in mt7615_led_set_config()
503 mt76_connac_pm_unref(mphy, &dev->pm); in mt7615_led_set_config()
534 struct mt76_phy *mphy; in mt7615_register_ext_phy() local
540 if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) in mt7615_register_ext_phy()
547 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7615_ops, MT_BAND1); in mt7615_register_ext_phy()
548 if (!mphy) in mt7615_register_ext_phy()
551 phy = mphy->priv; in mt7615_register_ext_phy()
553 phy->mt76 = mphy; in mt7615_register_ext_phy()
554 mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask; in mt7615_register_ext_phy()
555 mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1; in mt7615_register_ext_phy()
556 mt7615_init_wiphy(mphy->hw); in mt7615_register_ext_phy()
558 INIT_DELAYED_WORK(&mphy->mac_work, mt7615_mac_work); in mt7615_register_ext_phy()
572 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7615_register_ext_phy()
574 mphy->macaddr[0] |= 2; in mt7615_register_ext_phy()
575 mphy->macaddr[0] ^= BIT(7); in mt7615_register_ext_phy()
576 mt76_eeprom_override(mphy); in mt7615_register_ext_phy()
579 mphy->cap.has_5ghz = true; in mt7615_register_ext_phy()
583 mphy->q_tx[i] = dev->mphy.q_tx[i]; in mt7615_register_ext_phy()
587 mphy->leds.cdev.brightness_set = mt7615_led_set_brightness; in mt7615_register_ext_phy()
588 mphy->leds.cdev.blink_set = mt7615_led_set_blink; in mt7615_register_ext_phy()
591 ret = mt76_register_phy(mphy, true, mt76_rates, in mt7615_register_ext_phy()
594 ieee80211_free_hw(mphy->hw); in mt7615_register_ext_phy()
603 struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1]; in mt7615_unregister_ext_phy() local
609 mt76_unregister_phy(mphy); in mt7615_unregister_ext_phy()
610 ieee80211_free_hw(mphy->hw); in mt7615_unregister_ext_phy()
629 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7615_mac_work); in mt7615_init_device()