From patchwork Mon Apr 30 14:12:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10371847 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 E05526053E for ; Mon, 30 Apr 2018 14:12:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D11FD200E7 for ; Mon, 30 Apr 2018 14:12:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5F1F27D0E; Mon, 30 Apr 2018 14:12:57 +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 6532D200E7 for ; Mon, 30 Apr 2018 14:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754069AbeD3OMz (ORCPT ); Mon, 30 Apr 2018 10:12:55 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:55810 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753172AbeD3OMy (ORCPT ); Mon, 30 Apr 2018 10:12:54 -0400 Received: by mail-wm0-f68.google.com with SMTP id a8so13434083wmg.5 for ; Mon, 30 Apr 2018 07:12:53 -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:in-reply-to :references; bh=AcTnspVLJMHQ7ssayIKg4lHDd5mG/PMtrExPFBmgf6U=; b=KI9DDIC50rTOwEQMtaGr+OCqTIgIt7I6bK28gXu1VVb07m1mVkgym5vtnW9/S5BDPg 2IwZq0rIl87iQVrMZUVW6f0uzi0IPhhjNnG0KUF8woQSTspcSvK0Dg5zLAlfz/w4o0km ThQYBx9ChfUHeW+2uTVfTHFs53syDCooVCup5VB7wQpWdrC4SmPdTxNjGJTf373Znghc 8ZkMh+YLfehMyiOdxNnYOLD0iVpNWelHbaYdplCO2pileYWngKeH7ljLFjD0gLg5884i 87x5aGgmLsozqYkXj34QpeNf67ULKWQJUy7VYlYOyCaOU52RH7mBa4Lr/lxr3jewvEeW phBw== X-Gm-Message-State: ALQs6tB6xnuOFHQpAQFDlo+pM/owGBy0itogBZikWzUZxUrdq9IMufZg 1FwuJ2Now8rLB14Ch4gk5+B9DJqiHBw= X-Google-Smtp-Source: AB8JxZoLBoatpeO/0M/DP84FxBQsJKNnzcxdveZ4pg5blIc/cMPYjxV5TaEhEAmsVDC7mDCL14T4Ww== X-Received: by 10.28.249.13 with SMTP id x13mr8176112wmh.123.1525097573046; Mon, 30 Apr 2018 07:12:53 -0700 (PDT) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id f83sm10207105wmh.32.2018.04.30.07.12.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:12:52 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [RFC 02/18] mt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h Date: Mon, 30 Apr 2018 16:12:17 +0200 Message-Id: <41e2b10a374b529afe6ebc4e015c53812f23b125.1525096206.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 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);