From patchwork Wed Jan 1 05:56:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 11314985 X-Patchwork-Delegate: nbd@nbd.name Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 669E114E3 for ; Wed, 1 Jan 2020 05:57:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A16320722 for ; Wed, 1 Jan 2020 05:57:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="bAiToZYs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725862AbgAAF4q (ORCPT ); Wed, 1 Jan 2020 00:56:46 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:6945 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725765AbgAAF4q (ORCPT ); Wed, 1 Jan 2020 00:56:46 -0500 X-UUID: bf8f0a30a2f34b2385b6f8c4becc16b7-20200101 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=hKgJzwzefE+FPfSamusgqvNTI7peHIm1WvPCMjSXGwY=; b=bAiToZYs4Tl0vsvVJPJ/EDIBfXf7fk0GcUluU4KH+m2ULQgqQ4ujMp2blWqx3XciOSm961YnFbCT8We2TrefPMYRGxZibIQr50xkWRbKtH3sS96XgJ4zOL4oNAaG6vvFyskSJCfIZoCYV8iPS8sxOStM3RwrqgTC7STijf6rcBU=; X-UUID: bf8f0a30a2f34b2385b6f8c4becc16b7-20200101 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 194416538; Wed, 01 Jan 2020 13:56:35 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 1 Jan 2020 13:55:42 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 1 Jan 2020 13:56:35 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , Sean Wang , , , Ryder Lee Subject: [PATCH] mt76: mt7615: fix endianness in mt7615_mcu_set_eeprom Date: Wed, 1 Jan 2020 13:56:25 +0800 Message-ID: <4f6dfa450f2bf3ca5be7c7b417d62b2eb339918d.1577856956.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: 858B261DFA2EE7E5F64E35FECBE3FABDF3C6DA8D88590AABFE143C117432EDE82000:8 X-MTK: N Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The field 'u16 len' should be __le16. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index c8d6a36f5d0a..1a60016d8534 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -598,10 +598,10 @@ int mt7615_mcu_set_eeprom(struct mt7615_dev *dev) struct { u8 buffer_mode; u8 pad; - u16 len; + __le16 len; } __packed req_hdr = { .buffer_mode = 1, - .len = __MT_EE_MAX - MT_EE_NIC_CONF_0, + .len = cpu_to_le16(__MT_EE_MAX - MT_EE_NIC_CONF_0), }; int ret, len = sizeof(req_hdr) + __MT_EE_MAX - MT_EE_NIC_CONF_0; u8 *req, *eep = (u8 *)dev->mt76.eeprom.data;