diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2022-12-07 17:19:43 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-12-09 16:45:39 +0100 |
commit | 3abd46ddf80a4f1bbe22372b9b808f12dfe2602b (patch) | |
tree | e8368351ce86dbfa469049ae3e66fce5af5044d1 /drivers/net/wireless/mediatek/mt76/mt7615 | |
parent | wifi: mt76: move leds field in leds struct (diff) | |
download | linux-3abd46ddf80a4f1bbe22372b9b808f12dfe2602b.tar.xz linux-3abd46ddf80a4f1bbe22372b9b808f12dfe2602b.zip |
wifi: mt76: move leds struct in mt76_phy
Move leds struct in mt76_phy in order to have leds associated to phy
(e.g. in dbdc mode) instead of per device.
Tested-by: Frank Wunderlich <frank-w@public-files.de>
Co-developed-by: Ryder Lee <ryder.Lee@mediatek.com>
Signed-off-by: Ryder Lee <ryder.Lee@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c b/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c index 944bae068dab..506a3b561d4a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c @@ -71,32 +71,32 @@ mt7615_led_set_config(struct led_classdev *led_cdev, u8 delay_on, u8 delay_off) { struct mt7615_dev *dev; - struct mt76_dev *mt76; + struct mt76_phy *mphy; u32 val, addr; - mt76 = container_of(led_cdev, struct mt76_dev, leds.cdev); - dev = container_of(mt76, struct mt7615_dev, mt76); + mphy = container_of(led_cdev, struct mt76_phy, leds.cdev); + dev = container_of(mphy->dev, struct mt7615_dev, mt76); - if (!mt76_connac_pm_ref(&dev->mphy, &dev->pm)) + if (!mt76_connac_pm_ref(mphy, &dev->pm)) return; val = FIELD_PREP(MT_LED_STATUS_DURATION, 0xffff) | FIELD_PREP(MT_LED_STATUS_OFF, delay_off) | FIELD_PREP(MT_LED_STATUS_ON, delay_on); - addr = mt7615_reg_map(dev, MT_LED_STATUS_0(mt76->leds.pin)); + addr = mt7615_reg_map(dev, MT_LED_STATUS_0(mphy->leds.pin)); mt76_wr(dev, addr, val); - addr = mt7615_reg_map(dev, MT_LED_STATUS_1(mt76->leds.pin)); + addr = mt7615_reg_map(dev, MT_LED_STATUS_1(mphy->leds.pin)); mt76_wr(dev, addr, val); - val = MT_LED_CTRL_REPLAY(mt76->leds.pin) | - MT_LED_CTRL_KICK(mt76->leds.pin); - if (mt76->leds.al) - val |= MT_LED_CTRL_POLARITY(mt76->leds.pin); + val = MT_LED_CTRL_REPLAY(mphy->leds.pin) | + MT_LED_CTRL_KICK(mphy->leds.pin); + if (mphy->leds.al) + val |= MT_LED_CTRL_POLARITY(mphy->leds.pin); addr = mt7615_reg_map(dev, MT_LED_CTRL); mt76_wr(dev, addr, val); - mt76_connac_pm_unref(&dev->mphy, &dev->pm); + mt76_connac_pm_unref(mphy, &dev->pm); } static int @@ -133,8 +133,8 @@ int mt7615_register_device(struct mt7615_dev *dev) /* init led callbacks */ if (IS_ENABLED(CONFIG_MT76_LEDS)) { - dev->mt76.leds.cdev.brightness_set = mt7615_led_set_brightness; - dev->mt76.leds.cdev.blink_set = mt7615_led_set_blink; + dev->mphy.leds.cdev.brightness_set = mt7615_led_set_brightness; + dev->mphy.leds.cdev.blink_set = mt7615_led_set_blink; } ret = mt7622_wmac_init(dev); |