linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] fix endianness issues in mt7663e driver
@ 2020-03-18 12:41 Lorenzo Bianconi
  2020-03-18 12:41 ` [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness Lorenzo Bianconi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2020-03-18 12:41 UTC (permalink / raw)
  To: kvalo
  Cc: linux-wireless, nbd, lorenzo.bianconi, sean.wang, ryder.lee,
	linux-mediatek

Fix endianness issues reported by kbuild test robot

Lorenzo Bianconi (3):
  mt76: mt7615: fix mt7663e firmware struct endianness
  mt76: mt7615: fix endianness in unified command
  mt76: mt7615: add missing declaration in mt7615.h

 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c  | 16 ++++++++--------
 .../net/wireless/mediatek/mt76/mt7615/mt7615.h   |  1 +
 2 files changed, 9 insertions(+), 8 deletions(-)

-- 
2.25.1


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

* [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness
  2020-03-18 12:41 [PATCH 0/3] fix endianness issues in mt7663e driver Lorenzo Bianconi
@ 2020-03-18 12:41 ` Lorenzo Bianconi
  2020-03-23 17:35   ` Kalle Valo
  2020-03-18 12:41 ` [PATCH 2/3] mt76: mt7615: fix endianness in unified command Lorenzo Bianconi
  2020-03-18 12:41 ` [PATCH 3/3] mt76: mt7615: add missing declaration in mt7615.h Lorenzo Bianconi
  2 siblings, 1 reply; 5+ messages in thread
From: Lorenzo Bianconi @ 2020-03-18 12:41 UTC (permalink / raw)
  To: kvalo
  Cc: linux-wireless, nbd, lorenzo.bianconi, sean.wang, ryder.lee,
	linux-mediatek

Convert fields in mt7663_fw_trailer and mt7663_fw_buf to little-endian

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 50c98913d81d..9978f6bb22ab 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -44,16 +44,16 @@ struct mt7663_fw_trailer {
 	u8 reserv[2];
 	char fw_ver[10];
 	char build_date[15];
-	u32 crc;
+	__le32 crc;
 } __packed;
 
 struct mt7663_fw_buf {
-	u32 crc;
-	u32 d_img_size;
-	u32 block_size;
+	__le32 crc;
+	__le32 d_img_size;
+	__le32 block_size;
 	u8 rsv[4];
-	u32 img_dest_addr;
-	u32 img_size;
+	__le32 img_dest_addr;
+	__le32 img_size;
 	u8 feature_set;
 };
 
@@ -1896,7 +1896,7 @@ static int mt7663_load_n9(struct mt7615_dev *dev, const char *name)
 			goto out;
 		}
 
-		offset += buf->img_size;
+		offset += le32_to_cpu(buf->img_size);
 		if (buf->feature_set & DL_MODE_VALID_RAM_ENTRY) {
 			override_addr = le32_to_cpu(buf->img_dest_addr);
 			dev_info(dev->mt76.dev, "Region %d, override_addr = 0x%08x\n",
-- 
2.25.1


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

* [PATCH 2/3] mt76: mt7615: fix endianness in unified command
  2020-03-18 12:41 [PATCH 0/3] fix endianness issues in mt7663e driver Lorenzo Bianconi
  2020-03-18 12:41 ` [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness Lorenzo Bianconi
@ 2020-03-18 12:41 ` Lorenzo Bianconi
  2020-03-18 12:41 ` [PATCH 3/3] mt76: mt7615: add missing declaration in mt7615.h Lorenzo Bianconi
  2 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2020-03-18 12:41 UTC (permalink / raw)
  To: kvalo
  Cc: linux-wireless, nbd, lorenzo.bianconi, sean.wang, ryder.lee,
	linux-mediatek

Fix cid field endianness in unified mt7615_uni_txd header

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 323d7daad363 ("mt76: mt7615: introduce uni cmd command types")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 9978f6bb22ab..610cfa918c7b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -120,9 +120,9 @@ void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
 		uni_txd = (struct mt7615_uni_txd *)txd;
 		uni_txd->len = cpu_to_le16(skb->len - sizeof(uni_txd->txd));
 		uni_txd->option = MCU_CMD_UNI_EXT_ACK;
+		uni_txd->cid = cpu_to_le16(mcu_cmd);
 		uni_txd->s2d_index = MCU_S2D_H2N;
 		uni_txd->pkt_type = MCU_PKT_ID;
-		uni_txd->cid = mcu_cmd;
 		uni_txd->seq = seq;
 
 		return;
-- 
2.25.1


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

* [PATCH 3/3] mt76: mt7615: add missing declaration in mt7615.h
  2020-03-18 12:41 [PATCH 0/3] fix endianness issues in mt7663e driver Lorenzo Bianconi
  2020-03-18 12:41 ` [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness Lorenzo Bianconi
  2020-03-18 12:41 ` [PATCH 2/3] mt76: mt7615: fix endianness in unified command Lorenzo Bianconi
@ 2020-03-18 12:41 ` Lorenzo Bianconi
  2 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2020-03-18 12:41 UTC (permalink / raw)
  To: kvalo
  Cc: linux-wireless, nbd, lorenzo.bianconi, sean.wang, ryder.lee,
	linux-mediatek

Add mt7615_mcu_wait_response declaration in mt7615.h since it will be
reused adding usb support to mt7615 driver

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 044a43256a35 ("mt76: mt7615: introduce mt7615_mcu_wait_response")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
index 8b3d95a2d7b2..676ca622c35a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
@@ -383,6 +383,7 @@ int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
 			    enum set_key_cmd cmd);
 void mt7615_mac_reset_work(struct work_struct *work);
 
+int mt7615_mcu_wait_response(struct mt7615_dev *dev, int cmd, int seq);
 int mt7615_mcu_set_dbdc(struct mt7615_dev *dev);
 int mt7615_mcu_set_eeprom(struct mt7615_dev *dev);
 int mt7615_mcu_set_mac_enable(struct mt7615_dev *dev, int band, bool enable);
-- 
2.25.1


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

* Re: [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness
  2020-03-18 12:41 ` [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness Lorenzo Bianconi
@ 2020-03-23 17:35   ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2020-03-23 17:35 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: linux-wireless, nbd, lorenzo.bianconi, sean.wang, ryder.lee,
	linux-mediatek

Lorenzo Bianconi <lorenzo@kernel.org> wrote:

> Convert fields in mt7663_fw_trailer and mt7663_fw_buf to little-endian
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

3 patches applied to wireless-drivers-next.git, thanks.

54178cc134fd mt76: mt7615: fix mt7663e firmware struct endianness
d14f0a5c62d3 mt76: mt7615: fix endianness in unified command
b899150e60ce mt76: mt7615: add missing declaration in mt7615.h

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

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

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

end of thread, other threads:[~2020-03-23 17:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-18 12:41 [PATCH 0/3] fix endianness issues in mt7663e driver Lorenzo Bianconi
2020-03-18 12:41 ` [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness Lorenzo Bianconi
2020-03-23 17:35   ` Kalle Valo
2020-03-18 12:41 ` [PATCH 2/3] mt76: mt7615: fix endianness in unified command Lorenzo Bianconi
2020-03-18 12:41 ` [PATCH 3/3] mt76: mt7615: add missing declaration in mt7615.h Lorenzo Bianconi

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