fix endianness issues in mt7663e driver
Subsystems (2)
Lorenzo Bianconi
maintainercover fix endianness issues in mt7663e driver
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(-)
Signature · 1 line
2.25.1
Lorenzo Bianconi
maintainerPATCH 1/3 mt76: mt7615: fix mt7663e firmware struct endianness
Convert fields in mt7663_fw_trailer and mt7663_fw_buf to little-endian
--- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +7 -7
@@ -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",
Signature · 1 line
2.25.1
Lorenzo Bianconi
maintainerPATCH 2/3 mt76: mt7615: fix endianness in unified command
In reply to Lorenzo BianconiFix cid field endianness in unified mt7615_uni_txd header
--- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +1 -1
@@ -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 ;
Signature · 1 line
2.25.1
Lorenzo Bianconi
maintainerPATCH 3/3 mt76: mt7615: add missing declaration in mt7615.h
In reply to Lorenzo BianconiAdd mt7615_mcu_wait_response declaration in mt7615.h since it will be reused adding usb support to mt7615 driver
--- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h +1 -0
@@ -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);
Signature · 1 line
2.25.1
Re: [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness
In reply to Lorenzo BianconiQuoted 5 lines · Lorenzo Bianconi
Convert fields in
mt7663_fw_trailerandmt7663_fw_bufto little-endianReported-by kbuild test robot <[email protected]>Fixes f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support")Signed-off-by Lorenzo Bianconi <[email protected]>
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
Signature · 3 lines
https://patchwork.kernel.org/patch/11445177/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [PATCH 1/3] mt76: mt7615: fix mt7663e firmware struct endianness
In reply to Lorenzo BianconiQuoted 5 lines · Lorenzo Bianconi
Convert fields in
mt7663_fw_trailerandmt7663_fw_bufto little-endianReported-by kbuild test robot <[email protected]>Fixes f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support")Signed-off-by Lorenzo Bianconi <[email protected]>
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
Signature · 8 lines
https://patchwork.kernel.org/patch/11445177/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek