From patchwork Thu Feb 1 00:27:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10194957 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F1C8F603B4 for ; Thu, 1 Feb 2018 00:27:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0D84286F4 for ; Thu, 1 Feb 2018 00:27:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C440128741; Thu, 1 Feb 2018 00:27:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67935286F4 for ; Thu, 1 Feb 2018 00:27:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755848AbeBAA1s (ORCPT ); Wed, 31 Jan 2018 19:27:48 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34794 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753461AbeBAA1r (ORCPT ); Wed, 31 Jan 2018 19:27:47 -0500 Received: by mail-wr0-f194.google.com with SMTP id 36so17007731wrh.1 for ; Wed, 31 Jan 2018 16:27:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=M4RBNlbEibB92BWc/vgyKkOKMZT9jPBvjETZQzYgvS8=; b=s66vOvy/4npJnZIkTxw6NxDJfk7ItNjYlPko/iB08ht0+f3D4tf15HyYmTgZjVSmMD x1uIuidgxD7Idoeo/D/y6+RYynS2EWJbVIP6tXpj39yD+dSapkO5rE8MEQ2yUqdLkOrl VkMQqpc49y6wflcoNCixQo/uJR6154NLOGhfOIB0MmZyytyjjwXeQh/5l65nbjHi56uf PiIKKzauaJ7TXyq3kbfMlKcfGBziugAW4AzHoLy3svoirDUp2Ll2AfsthHhWIPuM9qq0 1hxaHxCJ5ttV7mBBLU1aXWZHjk3evZzqM9qE+HA1grbQNSeRnAfY9RkD5fUwi42e03Ee 5vHg== X-Gm-Message-State: AKwxyteYK1505yvZj/epQINK7YhE3u2HzNfx45IC8SHG6UabT5E22Ht1 T8dCZKc/+ipMhfx9IxRCnifKfXWTAR4= X-Google-Smtp-Source: AH8x224snpCqM6mAKHgbA863qW4oRi/25TKz+cUtk/i+Sahy6yfeQAY5M1Tjn/TMH6QNajhKj5ed1A== X-Received: by 10.223.191.10 with SMTP id p10mr6071029wrh.62.1517444866801; Wed, 31 Jan 2018 16:27:46 -0800 (PST) Received: from localhost.localdomain.com ([85.93.125.228]) by smtp.gmail.com with ESMTPSA id q16sm3842019wrg.37.2018.01.31.16.27.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jan 2018 16:27:46 -0800 (PST) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org Subject: [PATCH] mt76x2: remove warnings in mt76x2_mac_write_txwi() Date: Thu, 1 Feb 2018 01:27:36 +0100 Message-Id: <39ba1292cb67ee2d4bf0f2813af63786f4241df1.1517443974.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix following sparse warnings in mt76x2_mac_write_txwi: - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: warning: incorrect type in assignment (different base types) - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: expected restricted __le32 [usertype] iv - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: got unsigned int [unsigned] [usertype] - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: warning: incorrect type in assignment (different base types) - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: expected restricted __le32 [usertype] eiv - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: got unsigned int [unsigned] [usertype] Fixes: 23405236460b ("mt76: fix transmission of encrypted management frames") Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c index 6c30b5eaa9ca..279cd8717806 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c @@ -198,8 +198,8 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi, ccmp_pn[5] = pn >> 24; ccmp_pn[6] = pn >> 32; ccmp_pn[7] = pn >> 40; - txwi->iv = *((u32 *) &ccmp_pn[0]); - txwi->eiv = *((u32 *) &ccmp_pn[1]); + txwi->iv = *((__le32 *)&ccmp_pn[0]); + txwi->eiv = *((__le32 *)&ccmp_pn[1]); } spin_lock_bh(&dev->mt76.lock);