From patchwork Sun Jun 10 10:51:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10456631 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 A2233601F7 for ; Sun, 10 Jun 2018 10:52:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9391C2625B for ; Sun, 10 Jun 2018 10:52:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 887CB26861; Sun, 10 Jun 2018 10:52:18 +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 5249626490 for ; Sun, 10 Jun 2018 10:52:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932188AbeFJKvg (ORCPT ); Sun, 10 Jun 2018 06:51:36 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:42341 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbeFJKvf (ORCPT ); Sun, 10 Jun 2018 06:51:35 -0400 Received: by mail-wr0-f194.google.com with SMTP id w10-v6so17421480wrk.9 for ; Sun, 10 Jun 2018 03:51: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=YyXOcenJ7GYrgOJqgxV/u8qP+3A/xHiSf6cZxRn593E=; b=BMIGSehx9p6VZxSnKdyfUk5JU1Na61XhUGyh6UgLKtofhaKijLzkEfzTzzuvfhh87W lDRRqffTpdw0Le+TiN3u6BfjJWu5jHZa48RExvkoY6kAY7eWinpVL3N/k7EswZzKW7jj 9I54DRqibquRMNuKx22lCDOFwaco5fJxpExxwS7Ss0yRBb1+oP6UAXzUVj60c30JWqqe W4mCWlhC60o98WA6ZLxcJVItA6NRqTsEmWC7beg0rUXGwT55iUZmMV/xkIsYeK9HqmLi SNPghsELggry9k/Xa1GCY9sNVoOPPuf/OBOl08DSGqBdl+CdpJheZ80BWry77RRVuAFk LS4A== X-Gm-Message-State: APt69E3l5EVFTmD2rEGTjNzV9TkJpoy2l3oR1lBQJp6rvcnr4UPhx2ny RF91PZsphOW4Jn/y7hZuLUe1NQ== X-Google-Smtp-Source: ADUXVKLjaAK8s8ra174IiwZHGRH34qQeccmxI08rbfaW3vRlSMc3La2DrImNgWwe1/MjGYiARd1Hdw== X-Received: by 2002:adf:e94e:: with SMTP id m14-v6mr9996582wrn.126.1528627894712; Sun, 10 Jun 2018 03:51:34 -0700 (PDT) Received: from localhost.localdomain ([151.66.62.211]) by smtp.gmail.com with ESMTPSA id 194-v6sm8638793wml.20.2018.06.10.03.51.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jun 2018 03:51:34 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [RFC v3 02/19] mt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h Date: Sun, 10 Jun 2018 12:51:09 +0200 Message-Id: <20180610105126.28425-3-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.17.1 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);