From patchwork Sun Jul 1 14:12:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10498683 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 DFB8960545 for ; Sun, 1 Jul 2018 14:13:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFC37288A2 for ; Sun, 1 Jul 2018 14:13:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4A5B28956; Sun, 1 Jul 2018 14:13:15 +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 07484289D5 for ; Sun, 1 Jul 2018 14:13:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391AbeGAONI (ORCPT ); Sun, 1 Jul 2018 10:13:08 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35797 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbeGAONF (ORCPT ); Sun, 1 Jul 2018 10:13:05 -0400 Received: by mail-wm0-f66.google.com with SMTP id z137-v6so6241886wmc.0 for ; Sun, 01 Jul 2018 07:13:05 -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=cD+AjTBlk/DYHIyCB3nVcGhQtTzjxYSEhHpp9T3s03s=; b=bVxS6GuU2b2K7iwCaZCRjBSTQGVj2+Q+8OobOoah+zWE7h/Yj/33DZ3fK+NT691bNc 6uulywX4TtenBtBv7XeRSt0Fa/ZYZRTKbuSlyqpze3iJLM+JdnH6JUsxoBYu2/6qMwz6 RDzEEP+ufvOn8sUBdZBBPZiXP6TsAkhuAIIneIGuPvSgTYjZ14ykNgisZygGDuyrBkeK eZyHgq4+KRbIHFma2iHjQaRQ11sqvYHCn4YQXlnNnOKTczcbcyd0B/Zvob66/vRb5Sfy DQJwvlTvgU21HbfVN9M5niRwheSRSKG3vw9Hp2eJCNUz84B5M4BOpjMpqoePc19U43HI cwgw== X-Gm-Message-State: APt69E2YtJOpA9YIDag5CQwI2HEgJ/Yh/7agH/4YrcipGrf9/5On8Bf6 px9mlLSaAhZTyP/GCMv2KJkbqQ== X-Google-Smtp-Source: AAOMgpdycdrXgWwsoFaZf/r4DPbK43Icd7L0MuGmwvvKY+7URnZRs0LKh6f6jsrXv/opaA1ukOFHoA== X-Received: by 2002:a1c:3448:: with SMTP id b69-v6mr6661814wma.0.1530454384757; Sun, 01 Jul 2018 07:13:04 -0700 (PDT) Received: from localhost.localdomain ([151.66.11.238]) by smtp.gmail.com with ESMTPSA id 72-v6sm6363957wmo.26.2018.07.01.07.13.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jul 2018 07:13:04 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [PATCH 02/19] mt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h Date: Sun, 1 Jul 2018 16:12:14 +0200 Message-Id: <20180701141231.25323-3-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.18.0 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 dfd36d736b06..743da57760dc 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);