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()
423 dev->mphy.sband_5g.sband.vht_cap.cap &= in mt7615_cap_dbdc_enable()
427 dev->mphy.antenna_mask = dev->chainmask >> 2; in mt7615_cap_dbdc_enable()
429 dev->mphy.antenna_mask = dev->chainmask >> 1; in mt7615_cap_dbdc_enable()
430 dev->mphy.chainmask = dev->mphy.antenna_mask; in mt7615_cap_dbdc_enable()
431 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
432 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
433 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_enable()
439 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7615_cap_dbdc_disable()
442 dev->mphy.antenna_mask = dev->chainmask; in mt7615_cap_dbdc_disable()
443 dev->mphy.chainmask = dev->chainmask; in mt7615_cap_dbdc_disable()
444 dev->mphy.hw->wiphy->available_antennas_rx = dev->chainmask; in mt7615_cap_dbdc_disable()
445 dev->mphy.hw->wiphy->available_antennas_tx = dev->chainmask; in mt7615_cap_dbdc_disable()
446 mt76_set_stream_caps(&dev->mphy, true); in mt7615_cap_dbdc_disable()
471 struct mt76_phy *mphy; in mt7615_led_set_config() local
475 mphy = container_of(led_cdev, struct mt76_phy, leds.cdev); in mt7615_led_set_config()
476 dev = container_of(mphy->dev, struct mt7615_dev, mt76); in mt7615_led_set_config()
478 if (!mt76_connac_pm_ref(mphy, &dev->pm)) in mt7615_led_set_config()
485 index = dev->dbdc_support ? mphy->band_idx : mphy->leds.pin; in mt7615_led_set_config()
492 if (dev->mphy.leds.al) in mt7615_led_set_config()
494 if (mphy->band_idx) in mt7615_led_set_config()
500 mt76_connac_pm_unref(mphy, &dev->pm); in mt7615_led_set_config()
531 struct mt76_phy *mphy; in mt7615_register_ext_phy() local
537 if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) in mt7615_register_ext_phy()
544 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7615_ops, MT_BAND1); in mt7615_register_ext_phy()
545 if (!mphy) in mt7615_register_ext_phy()
548 phy = mphy->priv; in mt7615_register_ext_phy()
550 phy->mt76 = mphy; in mt7615_register_ext_phy()
551 mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask; in mt7615_register_ext_phy()
552 mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1; in mt7615_register_ext_phy()
553 mt7615_init_wiphy(mphy->hw); in mt7615_register_ext_phy()
555 INIT_DELAYED_WORK(&mphy->mac_work, mt7615_mac_work); in mt7615_register_ext_phy()
569 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7615_register_ext_phy()
571 mphy->macaddr[0] |= 2; in mt7615_register_ext_phy()
572 mphy->macaddr[0] ^= BIT(7); in mt7615_register_ext_phy()
573 mt76_eeprom_override(mphy); in mt7615_register_ext_phy()
576 mphy->cap.has_5ghz = true; in mt7615_register_ext_phy()
580 mphy->q_tx[i] = dev->mphy.q_tx[i]; in mt7615_register_ext_phy()
584 mphy->leds.cdev.brightness_set = mt7615_led_set_brightness; in mt7615_register_ext_phy()
585 mphy->leds.cdev.blink_set = mt7615_led_set_blink; in mt7615_register_ext_phy()
588 ret = mt76_register_phy(mphy, true, mt76_rates, in mt7615_register_ext_phy()
591 ieee80211_free_hw(mphy->hw); in mt7615_register_ext_phy()
600 struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1]; in mt7615_unregister_ext_phy() local
606 mt76_unregister_phy(mphy); in mt7615_unregister_ext_phy()
607 ieee80211_free_hw(mphy->hw); in mt7615_unregister_ext_phy()
626 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7615_mac_work); in mt7615_init_device()