linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7615: fix mt7615 firmware path definitions
@ 2019-09-22 13:36 Lorenzo Bianconi
  2019-09-23  4:00 ` Kalle Valo
  2019-09-24 14:46 ` Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2019-09-22 13:36 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, ryder.lee

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(-)

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
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7615: fix mt7615 firmware path definitions
  2019-09-22 13:36 [PATCH] mt76: mt7615: fix mt7615 firmware path definitions Lorenzo Bianconi
@ 2019-09-23  4:00 ` Kalle Valo
  2019-09-23 14:29   ` Lorenzo Bianconi
  2019-09-24 14:46 ` Kalle Valo
  1 sibling, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2019-09-23  4:00 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless, ryder.lee

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.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7615: fix mt7615 firmware path definitions
  2019-09-23  4:00 ` Kalle Valo
@ 2019-09-23 14:29   ` Lorenzo Bianconi
  2019-09-24  5:23     ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Lorenzo Bianconi @ 2019-09-23 14:29 UTC (permalink / raw)
  To: Kalle Valo; +Cc: nbd, lorenzo.bianconi, linux-wireless, ryder.lee

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7615: fix mt7615 firmware path definitions
  2019-09-23 14:29   ` Lorenzo Bianconi
@ 2019-09-24  5:23     ` Kalle Valo
  2019-09-24  8:18       ` Lorenzo Bianconi
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2019-09-24  5:23 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless, ryder.lee

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 :)

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7615: fix mt7615 firmware path definitions
  2019-09-24  5:23     ` Kalle Valo
@ 2019-09-24  8:18       ` Lorenzo Bianconi
  0 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2019-09-24  8:18 UTC (permalink / raw)
  To: Kalle Valo; +Cc: nbd, lorenzo.bianconi, linux-wireless, ryder.lee

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7615: fix mt7615 firmware path definitions
  2019-09-22 13:36 [PATCH] mt76: mt7615: fix mt7615 firmware path definitions Lorenzo Bianconi
  2019-09-23  4:00 ` Kalle Valo
@ 2019-09-24 14:46 ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2019-09-24 14:46 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless, ryder.lee

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

-- 
https://patchwork.kernel.org/patch/11155889/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-24 14:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-22 13:36 [PATCH] mt76: mt7615: fix mt7615 firmware path definitions Lorenzo Bianconi
2019-09-23  4:00 ` Kalle Valo
2019-09-23 14:29   ` Lorenzo Bianconi
2019-09-24  5:23     ` Kalle Valo
2019-09-24  8:18       ` Lorenzo Bianconi
2019-09-24 14:46 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).