From patchwork Tue Jul 31 08:09:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10550375 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-2.web.codeaurora.org (Postfix) with ESMTP id 40446139A for ; Tue, 31 Jul 2018 08:09:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3401C2A20E for ; Tue, 31 Jul 2018 08:09:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2896D2A399; Tue, 31 Jul 2018 08:09:31 +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 9A3972A20E for ; Tue, 31 Jul 2018 08:09:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729875AbeGaJsg (ORCPT ); Tue, 31 Jul 2018 05:48:36 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45980 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729224AbeGaJsf (ORCPT ); Tue, 31 Jul 2018 05:48:35 -0400 Received: by mail-wr1-f67.google.com with SMTP id f12-v6so5693024wrv.12 for ; Tue, 31 Jul 2018 01:09:27 -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=rWDNL6h//1fzLnkc46CnpCyGgq7q7sgjjgfx10eOg9w=; b=T4GiOfEDgBEdteTy8g9fh4tB7q3ybGioeEsHtDKs9ea3TaPHRopl23BW4CJgxAzlaF Q5f4Za7a6tGifqE476bo8itOSQmBKvtiDP3QyhirrHe+N4C3W322OXyifF/nZC1P45sr 0md22UV86wGv6St2QmcyeBCVuSI7lOqGYG/rv+m2Wz4jkz1lUHaPk2bvxJnvDH6zK0R2 MWNIgd5J4UAuiZ9qrfCT9j4XQRvl13c5kEdsM87HCK+QpwmqTzQI5EWJtFkpsumYOx+k 74LbnP7Ni9W9Z7F+QjOUy7UUZfTQfKkJ4Zss3KsECR9OWT3OplimazCmXuh0t0XlePtp OI2Q== X-Gm-Message-State: AOUpUlGxx77H0Z3Dyh/+VS3ss93bO3bBukouSS6nyLREZd1HsZVusle8 SZd98pEctAstER31epLSAyLU6edPQbI= X-Google-Smtp-Source: AAOMgpeiiqUI2ID1pzw8y1KU8cCL/hkbMmNdHEAcEizQq+3HO+19ZhSri5dGeVmxnieXN+hSvDUpMA== X-Received: by 2002:a5d:56d0:: with SMTP id m16-v6mr1554870wrw.58.1533024566516; Tue, 31 Jul 2018 01:09:26 -0700 (PDT) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id o4-v6sm1501051wmo.20.2018.07.31.01.09.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 01:09:25 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [PATCH v2 02/19] mt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h Date: Tue, 31 Jul 2018 10:09:03 +0200 Message-Id: <5e23603a8af63f2c1ad1abd8419af0b115cb938d.1533023328.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.17.1 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 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);