Commit 29f5a494 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

wifi: mt76: mt7921: move acpi_sar code in mt792x-lib module



Move acpi_sar code in mt792x-lib module since it is shared between
mt7921 and mt7925 driver.

Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarDeren Wu <deren.wu@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1c025496
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ mt76-connac-lib-y := mt76_connac_mcu.o mt76_connac_mac.o mt76_connac3_mac.o

mt792x-lib-y := mt792x_core.o mt792x_mac.o mt792x_trace.o \
		mt792x_debugfs.o mt792x_dma.o
mt792x-lib-$(CONFIG_ACPI) += mt792x_acpi_sar.o

obj-$(CONFIG_MT76x0_COMMON) += mt76x0/
obj-$(CONFIG_MT76x2_COMMON) += mt76x2/
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ obj-$(CONFIG_MT7921U) += mt7921u.o

mt7921-common-y := mac.o mcu.o main.o init.o debugfs.o
mt7921-common-$(CONFIG_NL80211_TESTMODE) += testmode.o
mt7921-common-$(CONFIG_ACPI) += acpi_sar.o
mt7921e-y := pci.o pci_mac.o pci_mcu.o dma.o
mt7921s-y := sdio.o sdio_mac.o sdio_mcu.o
mt7921u-y := usb.o usb_mac.o
+1 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ int mt7921_register_device(struct mt792x_dev *dev)
	if (!mt76_is_mmio(&dev->mt76))
		hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;

	mt7921_init_acpi_sar(dev);
	mt792x_init_acpi_sar(dev);

	ret = mt792x_init_wcid(dev);
	if (ret)
+4 −7
Original line number Diff line number Diff line
@@ -1153,19 +1153,16 @@ int mt7921_set_tx_sar_pwr(struct ieee80211_hw *hw,
			  const struct cfg80211_sar_specs *sar)
{
	struct mt76_phy *mphy = hw->priv;
	int err;

	if (sar) {
		err = mt76_init_sar_power(hw, sar);
		int err = mt76_init_sar_power(hw, sar);

		if (err)
			return err;
	}
	mt792x_init_acpi_sar_power(mt792x_hw_phy(hw), !sar);

	mt7921_init_acpi_sar_power(mt792x_hw_phy(hw), !sar);

	err = mt76_connac_mcu_set_rate_txpower(mphy);

	return err;
	return mt76_connac_mcu_set_rate_txpower(mphy);
}

static int mt7921_set_sar_specs(struct ieee80211_hw *hw,
+1 −1
Original line number Diff line number Diff line
@@ -1197,7 +1197,7 @@ int __mt7921_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,
	} __packed req = {
		.idx = idx,
		.env = env_cap,
		.acpi_conf = mt7921_acpi_get_flags(&dev->phy),
		.acpi_conf = mt792x_acpi_get_flags(&dev->phy),
	};
	int ret, valid_cnt = 0;
	u8 i, *pos;
Loading