Lines Matching refs:mphy

50 	struct mt76_phy *mphy;  in mt7996_led_set_config()  local
53 mphy = container_of(led_cdev, struct mt76_phy, leds.cdev); in mt7996_led_set_config()
54 dev = container_of(mphy->dev, struct mt7996_dev, mt76); in mt7996_led_set_config()
69 if (mphy->leds.al) in mt7996_led_set_config()
107 int i, nss = hweight8(dev->mphy.antenna_mask); in mt7996_init_txpower()
117 target_power = mt76_get_rate_power_limits(&dev->mphy, chan, in mt7996_init_txpower()
289 i = dev->mphy.leds.pin ? MT_LED_GPIO_MUX3 : MT_LED_GPIO_MUX2; in mt7996_mac_init()
335 struct mt76_phy *mphy; in mt7996_register_phy() local
352 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7996_ops, band); in mt7996_register_phy()
353 if (!mphy) in mt7996_register_phy()
356 phy = mphy->priv; in mt7996_register_phy()
358 phy->mt76 = mphy; in mt7996_register_phy()
359 mphy->dev->phys[band] = mphy; in mt7996_register_phy()
361 INIT_DELAYED_WORK(&mphy->mac_work, mt7996_mac_work); in mt7996_register_phy()
368 memcpy(mphy->macaddr, dev->mt76.eeprom.data + mac_ofs, ETH_ALEN); in mt7996_register_phy()
372 if (!is_valid_ether_addr(mphy->macaddr)) { in mt7996_register_phy()
373 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7996_register_phy()
375 mphy->macaddr[0] |= 2; in mt7996_register_phy()
376 mphy->macaddr[0] ^= BIT(7); in mt7996_register_phy()
378 mphy->macaddr[0] ^= BIT(6); in mt7996_register_phy()
380 mt76_eeprom_override(mphy); in mt7996_register_phy()
383 mt7996_init_wiphy(mphy->hw); in mt7996_register_phy()
391 ret = mt76_register_phy(mphy, true, mt76_rates, in mt7996_register_phy()
403 mphy->dev->phys[band] = NULL; in mt7996_register_phy()
404 ieee80211_free_hw(mphy->hw); in mt7996_register_phy()
411 struct mt76_phy *mphy; in mt7996_unregister_phy() local
416 mphy = phy->dev->mt76.phys[band]; in mt7996_unregister_phy()
417 mt76_unregister_phy(mphy); in mt7996_unregister_phy()
418 ieee80211_free_hw(mphy->hw); in mt7996_unregister_phy()
429 mt7996_init_txpower(dev, &dev->mphy.sband_2g.sband); in mt7996_init_work()
430 mt7996_init_txpower(dev, &dev->mphy.sband_5g.sband); in mt7996_init_work()
431 mt7996_init_txpower(dev, &dev->mphy.sband_6g.sband); in mt7996_init_work()
459 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt7996_init_hardware()
881 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7996_mac_work); in mt7996_register_device()
898 dev->mphy.leds.cdev.brightness_set = mt7996_led_set_brightness; in mt7996_register_device()
899 dev->mphy.leds.cdev.blink_set = mt7996_led_set_blink; in mt7996_register_device()