From patchwork Mon Oct 1 16:58:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10622423 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 1A25C112B for ; Mon, 1 Oct 2018 16:58:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06990201CB for ; Mon, 1 Oct 2018 16:58:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEDFD2022B; Mon, 1 Oct 2018 16:58:27 +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 9C9D9201CB for ; Mon, 1 Oct 2018 16:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726256AbeJAXhI (ORCPT ); Mon, 1 Oct 2018 19:37:08 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36609 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbeJAXhI (ORCPT ); Mon, 1 Oct 2018 19:37:08 -0400 Received: by mail-wm1-f65.google.com with SMTP id n23-v6so9500071wmc.1 for ; Mon, 01 Oct 2018 09:58:25 -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=wQdeBFTgUY8+AnbMaTtA7GeDqasGiXiIffOKPzBoyTc=; b=AOxlIINNwNN1mTk537AuqgjYAtesX6IU9vsHi1R+0cSkG1rVgdogdApfuL+QXTOeDU 5LPIOG8aFhQlnvsczVw2SeekR/QeQ29SlZW2uZALjijjDEZpK1BH7D8nvCXNhw0Ycoe2 pWvePyK7XitB2mdg6c+dlyc4C+rmOOEzflYBLCVTAqyT6UC4UFmVyBE/wsygL9oQQF2X dFyG6PfhRQOcOfuKmjTELgn7k9Jx6rJrvmBHtJUq2D/zAbc57uu/On4GS7DT1yNhK69f nelce4Phl0/4aNLWS2kLvl51zyF4qTA0d3oxHUhGHO/ozmPXWl8JxKEcTLPBAqgpPcjb PlLA== X-Gm-Message-State: ABuFfohqqp35rBl5JHuPHpfa0nrWvH2iWzgVRGRV8aRxuemCuXgFUkG/ rdbAdrEjdc2ibukkkAE1iN4m0g== X-Google-Smtp-Source: ACcGV63B2nu1oCP67c7cTgt57ejbktS05BHQjgVE+9YxtoF325aiIQTwM92qkTTk794niarg8X/yeQ== X-Received: by 2002:a1c:f313:: with SMTP id q19-v6mr4077915wmq.87.1538413104334; Mon, 01 Oct 2018 09:58:24 -0700 (PDT) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id b2-v6sm5057600wru.51.2018.10.01.09.58.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 09:58:23 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: sgruszka@redhat.com, linux-wireless@vger.kernel.org Subject: [PATCH 0/4] unify txwi parsing between mt76x0 and mt76x2 drivers Date: Mon, 1 Oct 2018 18:58:16 +0200 Message-Id: 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 mt76x02_mac_write_txwi routine in mt76x02-lib module in order to unify txwi parsing between mt76x0 and mt76x2 drivers. For rxwi unification we need to merge mt76x2_dev and mt76x0_dev in mt76x02_dev and remove duplicated code Changes since RFC: - drop patch 1/5 ("mt76: introduce is_mt76x2 routine") - use chainmask in mt76x02_mac_write_txwi instead of is_mt76x2 routine Lorenzo Bianconi (4): mt76: move mt76x02_tx_get_max_txpwr_adj in mt76x02_util.c mt76: add get_tx_txpwr_adj function pointer to mt76_driver_ops mt76: move mt76x02_mac_write_txwi in mt76x02-lib module mt76: usb: use mt76x02u_tx_prepare_skb to fill txwi drivers/net/wireless/mediatek/mt76/mt76.h | 4 +- .../wireless/mediatek/mt76/mt76x0/mt76x0.h | 5 -- .../net/wireless/mediatek/mt76/mt76x0/tx.c | 38 ---------- .../net/wireless/mediatek/mt76/mt76x0/usb.c | 17 +---- .../net/wireless/mediatek/mt76/mt76x02_mac.c | 72 +++++++++++++++++-- .../net/wireless/mediatek/mt76/mt76x02_mac.h | 8 +-- .../net/wireless/mediatek/mt76/mt76x02_usb.h | 5 +- .../wireless/mediatek/mt76/mt76x02_usb_core.c | 38 +++++++++- .../net/wireless/mediatek/mt76/mt76x02_util.c | 45 +++++++++++- .../net/wireless/mediatek/mt76/mt76x02_util.h | 2 + .../wireless/mediatek/mt76/mt76x2/Makefile | 2 +- .../net/wireless/mediatek/mt76/mt76x2/mac.c | 60 ---------------- .../net/wireless/mediatek/mt76/mt76x2/mac.h | 3 - .../wireless/mediatek/mt76/mt76x2/mt76x2.h | 4 +- .../wireless/mediatek/mt76/mt76x2/mt76x2u.h | 4 -- .../wireless/mediatek/mt76/mt76x2/pci_init.c | 2 +- .../wireless/mediatek/mt76/mt76x2/pci_mac.c | 2 +- .../wireless/mediatek/mt76/mt76x2/pci_tx.c | 2 +- .../net/wireless/mediatek/mt76/mt76x2/tx.c | 46 +----------- .../wireless/mediatek/mt76/mt76x2/usb_core.c | 53 -------------- .../wireless/mediatek/mt76/mt76x2/usb_init.c | 3 +- 21 files changed, 167 insertions(+), 248 deletions(-) delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/usb_core.c