Lines Matching full:mphy
259 struct mt76_phy *mphy; in mt7996_led_set_config() local
262 mphy = container_of(led_cdev, struct mt76_phy, leds.cdev); in mt7996_led_set_config()
263 dev = container_of(mphy->dev, struct mt7996_dev, mt76); in mt7996_led_set_config()
266 mt76_rmw_field(dev, MT_TMAC_TCR0(mphy->band_idx), MT_TMAC_TCR0_TX_BLINK, 2); in mt7996_led_set_config()
269 mt76_wr(dev, MT_LED_EN(mphy->band_idx), 1); in mt7996_led_set_config()
274 mt76_wr(dev, MT_LED_TX_BLINK(mphy->band_idx), val); in mt7996_led_set_config()
282 if (mphy->band_idx == MT_BAND1) in mt7996_led_set_config()
286 if (mphy->leds.al) in mt7996_led_set_config()
289 mt76_wr(dev, MT_LED_CTRL(mphy->band_idx), val); in mt7996_led_set_config()
290 mt76_clear(dev, MT_LED_CTRL(mphy->band_idx), MT_LED_CTRL_KICK); in mt7996_led_set_config()
507 dev->mphy.leds.cdev.brightness_set = mt7996_led_set_brightness; in mt7996_init_wiphy()
508 dev->mphy.leds.cdev.blink_set = mt7996_led_set_blink; in mt7996_init_wiphy()
582 i = dev->mphy.leds.pin ? MT_LED_GPIO_MUX3 : MT_LED_GPIO_MUX2; in mt7996_mac_init()
638 struct mt76_phy *mphy; in mt7996_register_phy() local
651 mphy = mt76_alloc_radio_phy(&dev->mt76, sizeof(*phy), band); in mt7996_register_phy()
652 if (!mphy) in mt7996_register_phy()
655 phy = mphy->priv; in mt7996_register_phy()
657 phy->mt76 = mphy; in mt7996_register_phy()
658 mphy->dev->phys[band] = mphy; in mt7996_register_phy()
660 INIT_DELAYED_WORK(&mphy->mac_work, mt7996_mac_work); in mt7996_register_phy()
668 memcpy(mphy->macaddr, dev->mt76.eeprom.data + mac_ofs, ETH_ALEN); in mt7996_register_phy()
670 memcpy(mphy->macaddr, (u8 *)dev->mt76.eeprom.data + mac_ofs, ETH_ALEN); in mt7996_register_phy()
675 if (!is_valid_ether_addr(mphy->macaddr)) { in mt7996_register_phy()
677 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7996_register_phy()
679 memcpy(mphy->macaddr, (u8 *)dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7996_register_phy()
682 mphy->macaddr[0] |= 2; in mt7996_register_phy()
683 mphy->macaddr[0] ^= BIT(7); in mt7996_register_phy()
685 mphy->macaddr[0] ^= BIT(6); in mt7996_register_phy()
687 mt76_eeprom_override(mphy); in mt7996_register_phy()
689 /* init wiphy according to mphy and phy */ in mt7996_register_phy()
690 mt7996_init_wiphy_band(mphy->hw, phy); in mt7996_register_phy()
691 ret = mt7996_init_tx_queues(mphy->priv, in mt7996_register_phy()
699 ret = mt76_register_phy(mphy, true, mt76_rates, in mt7996_register_phy()
714 mphy->dev->phys[band] = NULL; in mt7996_register_phy()
1047 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt7996_init_hardware()
1512 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7996_mac_work); in mt7996_register_device()