diff mbox series

mt76: mt7615: fix mt7615 firmware path definitions

Message ID 9e132c0949139155a4fb3375e4c83218159efce7.1569159209.git.lorenzo@kernel.org (mailing list archive)
State Accepted
Commit 9d4d0d06bbf9f7e576b0ebbb2f77672d0fc7f503
Delegated to: Kalle Valo
Headers show
Series mt76: mt7615: fix mt7615 firmware path definitions | expand

Commit Message

Lorenzo Bianconi Sept. 22, 2019, 1:36 p.m. UTC
mt7615 patch/n9/cr4 firmwares are available in mediatek folder in
linux-firmware repository. Fix path definitions.
Moreover remove useless firmware name pointers and use definitions
directly

Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c    | 11 ++++-------
 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h |  6 +++---
 2 files changed, 7 insertions(+), 10 deletions(-)

Comments

Kalle Valo Sept. 23, 2019, 4 a.m. UTC | #1
Lorenzo Bianconi <lorenzo@kernel.org> writes:

> mt7615 patch/n9/cr4 firmwares are available in mediatek folder in
> linux-firmware repository. Fix path definitions.
> Moreover remove useless firmware name pointers and use definitions
> directly
>
> Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

This sounds pretty serious, I guess distros don't work out of box
because of this? So I would like to queue this to v5.4.
Lorenzo Bianconi Sept. 23, 2019, 2:29 p.m. UTC | #2
> Lorenzo Bianconi <lorenzo@kernel.org> writes:
> 
> > mt7615 patch/n9/cr4 firmwares are available in mediatek folder in
> > linux-firmware repository. Fix path definitions.
> > Moreover remove useless firmware name pointers and use definitions
> > directly
> >
> > Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> This sounds pretty serious, I guess distros don't work out of box
> because of this? So I would like to queue this to v5.4.

Hi Kalle,

I have always worked on mt7615 driver using OpenWrt. Yesterday I installed
another distro (Ubuntu) and I figured out the fw paths were wrong. So yes,
distros don't work out of box now.

Regards,
Lorenzo

> 
> -- 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Kalle Valo Sept. 24, 2019, 5:23 a.m. UTC | #3
Lorenzo Bianconi <lorenzo@kernel.org> writes:

>> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>> 
>> > mt7615 patch/n9/cr4 firmwares are available in mediatek folder in
>> > linux-firmware repository. Fix path definitions.
>> > Moreover remove useless firmware name pointers and use definitions
>> > directly
>> >
>> > Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
>> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>> 
>> This sounds pretty serious, I guess distros don't work out of box
>> because of this? So I would like to queue this to v5.4.
>
> I have always worked on mt7615 driver using OpenWrt. Yesterday I installed
> another distro (Ubuntu) and I figured out the fw paths were wrong. So yes,
> distros don't work out of box now.

Thanks, I'll add this to the commit log and queue for v5.4. Shouldn't I
also cc stable? The first release was v5.2-rc1.

In the future I would prefer to have this bug info in the commit log
right from the beginning, it helps a lot with patch priorisation and
reduces email :)
Lorenzo Bianconi Sept. 24, 2019, 8:18 a.m. UTC | #4
On Sep 24, Kalle Valo wrote:
> Lorenzo Bianconi <lorenzo@kernel.org> writes:
> 
> >> Lorenzo Bianconi <lorenzo@kernel.org> writes:
> >> 
> >> > mt7615 patch/n9/cr4 firmwares are available in mediatek folder in
> >> > linux-firmware repository. Fix path definitions.
> >> > Moreover remove useless firmware name pointers and use definitions
> >> > directly
> >> >
> >> > Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
> >> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> >> 
> >> This sounds pretty serious, I guess distros don't work out of box
> >> because of this? So I would like to queue this to v5.4.
> >
> > I have always worked on mt7615 driver using OpenWrt. Yesterday I installed
> > another distro (Ubuntu) and I figured out the fw paths were wrong. So yes,
> > distros don't work out of box now.
> 
> Thanks, I'll add this to the commit log and queue for v5.4. Shouldn't I
> also cc stable? The first release was v5.2-rc1.

Yes, I think so

> 
> In the future I would prefer to have this bug info in the commit log
> right from the beginning, it helps a lot with patch priorisation and
> reduces email :)

Sure, will do. Sorry for not being clear from the beginning.

Regards,
Lorenzo

> 
> -- 
> Kalle Valo
Kalle Valo Sept. 24, 2019, 2:46 p.m. UTC | #5
Lorenzo Bianconi <lorenzo@kernel.org> wrote:

> mt7615 patch/n9/cr4 firmwares are available in mediatek folder in
> linux-firmware repository. Because of this mt7615 won't work on regular
> distributions like Ubuntu. Fix path definitions.  Moreover remove useless
> firmware name pointers and use definitions directly
> 
> Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
> Cc: stable@vger.kernel.org
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

Patch applied to wireless-drivers.git, thanks.

9d4d0d06bbf9 mt76: mt7615: fix mt7615 firmware path definitions
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 275d5eaed3b7..842cd81704db 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -333,7 +333,6 @@  static int mt7615_driver_own(struct mt7615_dev *dev)
 
 static int mt7615_load_patch(struct mt7615_dev *dev)
 {
-	const char *firmware = MT7615_ROM_PATCH;
 	const struct mt7615_patch_hdr *hdr;
 	const struct firmware *fw = NULL;
 	int len, ret, sem;
@@ -349,7 +348,7 @@  static int mt7615_load_patch(struct mt7615_dev *dev)
 		return -EAGAIN;
 	}
 
-	ret = request_firmware(&fw, firmware, dev->mt76.dev);
+	ret = request_firmware(&fw, MT7615_ROM_PATCH, dev->mt76.dev);
 	if (ret)
 		goto out;
 
@@ -447,13 +446,11 @@  mt7615_mcu_send_ram_firmware(struct mt7615_dev *dev,
 
 static int mt7615_load_ram(struct mt7615_dev *dev)
 {
-	const struct firmware *fw;
 	const struct mt7615_fw_trailer *hdr;
-	const char *n9_firmware = MT7615_FIRMWARE_N9;
-	const char *cr4_firmware = MT7615_FIRMWARE_CR4;
+	const struct firmware *fw;
 	int ret;
 
-	ret = request_firmware(&fw, n9_firmware, dev->mt76.dev);
+	ret = request_firmware(&fw, MT7615_FIRMWARE_N9, dev->mt76.dev);
 	if (ret)
 		return ret;
 
@@ -482,7 +479,7 @@  static int mt7615_load_ram(struct mt7615_dev *dev)
 
 	release_firmware(fw);
 
-	ret = request_firmware(&fw, cr4_firmware, dev->mt76.dev);
+	ret = request_firmware(&fw, MT7615_FIRMWARE_CR4, dev->mt76.dev);
 	if (ret)
 		return ret;
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
index cef3fd43cb00..7963e302d705 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
@@ -26,9 +26,9 @@ 
 #define MT7615_RX_RING_SIZE		1024
 #define MT7615_RX_MCU_RING_SIZE		512
 
-#define MT7615_FIRMWARE_CR4		"mt7615_cr4.bin"
-#define MT7615_FIRMWARE_N9		"mt7615_n9.bin"
-#define MT7615_ROM_PATCH		"mt7615_rom_patch.bin"
+#define MT7615_FIRMWARE_CR4		"mediatek/mt7615_cr4.bin"
+#define MT7615_FIRMWARE_N9		"mediatek/mt7615_n9.bin"
+#define MT7615_ROM_PATCH		"mediatek/mt7615_rom_patch.bin"
 
 #define MT7615_EEPROM_SIZE		1024
 #define MT7615_TOKEN_SIZE		4096