Lines Matching refs:mphy

228 	struct mt76_phy *mphy;  in mt7915_led_set_config()  local
231 mphy = container_of(led_cdev, struct mt76_phy, leds.cdev); in mt7915_led_set_config()
232 dev = container_of(mphy->dev, struct mt7915_dev, mt76); in mt7915_led_set_config()
238 mt76_wr(dev, MT_LED_STATUS_0(mphy->band_idx), val); in mt7915_led_set_config()
239 mt76_wr(dev, MT_LED_STATUS_1(mphy->band_idx), val); in mt7915_led_set_config()
242 mt76_wr(dev, MT_LED_EN(mphy->band_idx), 1); in mt7915_led_set_config()
246 if (dev->mphy.leds.al) in mt7915_led_set_config()
248 if (mphy->band_idx) in mt7915_led_set_config()
251 mt76_wr(dev, MT_LED_CTRL(mphy->band_idx), val); in mt7915_led_set_config()
252 mt76_clear(dev, MT_LED_CTRL(mphy->band_idx), MT_LED_CTRL_KICK); in mt7915_led_set_config()
286 int i, n_chains = hweight8(dev->mphy.antenna_mask); in mt7915_init_txpower()
304 target_power = mt76_get_rate_power_limits(&dev->mphy, chan, in mt7915_init_txpower()
321 struct mt76_phy *mphy = hw->priv; in mt7915_regd_notifier() local
322 struct mt7915_phy *phy = mphy->priv; in mt7915_regd_notifier()
330 mt7915_init_txpower(dev, &mphy->sband_2g.sband); in mt7915_regd_notifier()
331 mt7915_init_txpower(dev, &mphy->sband_5g.sband); in mt7915_regd_notifier()
332 mt7915_init_txpower(dev, &mphy->sband_6g.sband); in mt7915_regd_notifier()
334 mphy->dfs_state = MT_DFS_STATE_UNKNOWN; in mt7915_regd_notifier()
341 struct mt76_phy *mphy = phy->mt76; in mt7915_init_wiphy() local
342 struct ieee80211_hw *hw = mphy->hw; in mt7915_init_wiphy()
446 mphy->leds.cdev.brightness_set = mt7915_led_set_brightness; in mt7915_init_wiphy()
447 mphy->leds.cdev.blink_set = mt7915_led_set_blink; in mt7915_init_wiphy()
542 } else if (dev->mphy.leds.pin) { in mt7915_init_led_mux()
631 struct mt76_phy *mphy; in mt7915_alloc_ext_phy() local
636 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7915_ops, MT_BAND1); in mt7915_alloc_ext_phy()
637 if (!mphy) in mt7915_alloc_ext_phy()
640 phy = mphy->priv; in mt7915_alloc_ext_phy()
642 phy->mt76 = mphy; in mt7915_alloc_ext_phy()
653 struct mt76_phy *mphy = phy->mt76; in mt7915_register_ext_phy() local
656 INIT_DELAYED_WORK(&mphy->mac_work, mt7915_mac_work); in mt7915_register_ext_phy()
660 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR2, in mt7915_register_ext_phy()
665 if (!is_valid_ether_addr(mphy->macaddr)) { in mt7915_register_ext_phy()
666 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7915_register_ext_phy()
668 mphy->macaddr[0] |= 2; in mt7915_register_ext_phy()
669 mphy->macaddr[0] ^= BIT(7); in mt7915_register_ext_phy()
671 mt76_eeprom_override(mphy); in mt7915_register_ext_phy()
676 ret = mt76_register_phy(mphy, true, mt76_rates, in mt7915_register_ext_phy()
690 mt76_unregister_phy(mphy); in mt7915_register_ext_phy()
701 mt7915_init_txpower(dev, &dev->mphy.sband_2g.sband); in mt7915_init_work()
702 mt7915_init_txpower(dev, &dev->mphy.sband_5g.sband); in mt7915_init_work()
703 mt7915_init_txpower(dev, &dev->mphy.sband_6g.sband); in mt7915_init_work()
801 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt7915_init_hardware()
1159 struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1]; in mt7915_unregister_ext_phy() local
1165 mt76_unregister_phy(mphy); in mt7915_unregister_ext_phy()
1166 ieee80211_free_hw(mphy->hw); in mt7915_unregister_ext_phy()
1189 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7915_mac_work); in mt7915_register_device()