From patchwork Sun May 20 08:15:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10413241 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 50870602A0 for ; Sun, 20 May 2018 08:15:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45EE128703 for ; Sun, 20 May 2018 08:15:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ADD128714; Sun, 20 May 2018 08:15:42 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 DB5FE28703 for ; Sun, 20 May 2018 08:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751122AbeETIPk (ORCPT ); Sun, 20 May 2018 04:15:40 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:41061 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbeETIPg (ORCPT ); Sun, 20 May 2018 04:15:36 -0400 Received: by mail-wr0-f195.google.com with SMTP id w15-v6so5477903wrp.8 for ; Sun, 20 May 2018 01:15:35 -0700 (PDT) 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; bh=yfqe5KSy4SsKopMtvHioVGt2UXHdGJkfKYjua+bUgpE=; b=V6WHTk13wTzt488W4caG/hvN5FjNFdyWgKQSHjX60PgLX80TChWpTyn4fQDV1yPeVZ AEPTf5ducnwkDdLZ7JJM6SPXQxqVvqHgbwDI029dq9ivwTyW1EWD7YKirrX3YB9PujFB Jbsi+6NYSdrfIRNR0mkPQWUfSE4uesG8aVdAGDGOCQQfq4iy9reuyCNminPWCbSGxyJo 0797SPG3tMJcPA143TTQ0KdM0Q3aHcp60VRwvX92H/aO1T1y2+id5mEL2VQKZNNorIdw IR1g4qzpAYxMWuobpex3JCYW5lWad9n0tFXzxQNlFoM5nkUz6dNZPFHqK1QrsZ2s7beo XQ/w== X-Gm-Message-State: ALKqPwczDSk+LxQLQV1tCAJ9pY9Q03zd94yTc21WOGSX8sVIf53dA512 SvfQz2ADfJA/Bv+OsXDMuMtQ380lQ1A= X-Google-Smtp-Source: AB8JxZpBocw746EKLzjgvOXuezvP7RR5vxLe5C+1dLm0pAGqyMSWjeO7P3YjB/+DPpJJucuUq3cYcQ== X-Received: by 2002:adf:b807:: with SMTP id h7-v6mr11997630wrf.113.1526804135123; Sun, 20 May 2018 01:15:35 -0700 (PDT) Received: from localhost.localdomain ([151.66.25.157]) by smtp.gmail.com with ESMTPSA id z7-v6sm13981716wrg.56.2018.05.20.01.15.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 01:15:34 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [RFC v2 02/18] mt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h Date: Sun, 20 May 2018 10:15:06 +0200 Message-Id: <20180520081522.10163-3-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.16.3 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 move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h in order to reuse them in mt76x2u mcu related code Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c | 17 ----------------- drivers/net/wireless/mediatek/mt76/mt76x2_mcu.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c index 3e2a7216ffdd..ba954e7bc426 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c @@ -23,23 +23,6 @@ #include "mt76x2_dma.h" #include "mt76x2_eeprom.h" -struct mt76x2_fw_header { - __le32 ilm_len; - __le32 dlm_len; - __le16 build_ver; - __le16 fw_ver; - u8 pad[4]; - char build_time[16]; -}; - -struct mt76x2_patch_header { - char build_time[16]; - char platform[4]; - char hw_version[4]; - char patch_version[4]; - u8 pad[2]; -}; - static struct sk_buff *mt76x2_mcu_msg_alloc(const void *data, int len) { struct sk_buff *skb; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.h index d7a7e83262ce..e40293f21417 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.h @@ -146,6 +146,23 @@ struct mt76x2_tssi_comp { u8 offset1; } __packed __aligned(4); +struct mt76x2_fw_header { + __le32 ilm_len; + __le32 dlm_len; + __le16 build_ver; + __le16 fw_ver; + u8 pad[4]; + char build_time[16]; +}; + +struct mt76x2_patch_header { + char build_time[16]; + char platform[4]; + char hw_version[4]; + char patch_version[4]; + u8 pad[2]; +}; + int mt76x2_mcu_calibrate(struct mt76x2_dev *dev, enum mcu_calibration type, u32 param); int mt76x2_mcu_tssi_comp(struct mt76x2_dev *dev, struct mt76x2_tssi_comp *tssi_data);