Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp9917yba; Mon, 1 Apr 2019 00:17:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqybLqa+IeUwet0Zxzjy5NFSB2pjSnbENluxo0wnhOexyOWD2IXgNIexzyfaAYhhTEuT+BXs X-Received: by 2002:a17:902:b40a:: with SMTP id x10mr22513385plr.231.1554103066513; Mon, 01 Apr 2019 00:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554103066; cv=none; d=google.com; s=arc-20160816; b=t5k4DZnZXj35OeIoCYz/uuYgQe7JIwRkjfyBMCNExmPbDfyYRMyK5l7GvAo9OUPxpm QwWUz7YwLpedtG9d1FSjCJTxzVWWjFvAJB9sUQpCgTQictuho485LijbdZUENCsiYJHy zSFH9TxZpzYvKgDCNutO80yf7466iaB3/pIsCmDAZzrko8kegt+uOg+cNIDkLS04ZgNH CEUYn3l0sLDWZFCjiaAQXaBjk75ZXLhHZtfIsaJHVAMlD6q8BRNMzvIacLd2vh+MQIIP Mk6YuYjl/jfLQVs+HlftsfNVAGBNoqpiLsOTz3shBHrVVwqrBiselrLDrFEljEI9Zp2H qD9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=J/4r65a09nnUR36Zvu+pQl+VdBgeZRTrd+U5yUko6dU=; b=lFQj7cK8KDmYffUo+WKKupYMGH2p/XfjPgucxovlGSpixFFTYa7XtAic1IJzTE70J6 QIxRmm9pVcgmQe+6Stnawu08xaMn3fJNCteAbgmhbpNlVIYP9GUD/71xJkKWBSu0LYzq wSFJHc2eAvxBr1IV3GCtkXCyAA1cmAmULIX8grsQIQnPh8k0QMY1Ww3O59Ojmj/yKRxy AKNfDx+nsjF7J4M2Sf3U1H3kcWMyaZgD8MyTdU9iGMbcsbbI78Z2P4H+PdX0rHlikeQA qdwI7/on1yT8eWoOaUUbEHN6ixbaWF+GSW+omINCMK3hSoJyHymUyj1GgXNV2WSBcH3n wTsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si8192515pgl.264.2019.04.01.00.17.29; Mon, 01 Apr 2019 00:17:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731889AbfDAHQv (ORCPT + 99 others); Mon, 1 Apr 2019 03:16:51 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:38466 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731160AbfDAHQv (ORCPT ); Mon, 1 Apr 2019 03:16:51 -0400 X-UUID: 1b39b71c2e2b4a9585e82c9916420132-20190401 X-UUID: 1b39b71c2e2b4a9585e82c9916420132-20190401 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 491221066; Mon, 01 Apr 2019 15:16:46 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 1 Apr 2019 15:16:44 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 1 Apr 2019 15:16:44 +0800 From: Ryder Lee To: Lorenzo Bianconi , Felix Fietkau CC: Roy Luo , Sean Wang , Nelson Chang , YF Luo , Kai Lin , Rorscha Yang , Kyle Lee , Miller Shen , Haipin Liang , KL Huang , YH chen , , , , Ryder Lee Subject: [PATCH v3 0/4] Add support for MediaTek MT7615 wireless chipsets Date: Mon, 1 Apr 2019 15:16:40 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="y" Content-Transfer-Encoding: 8bit X-TM-SNTS-SMTP: E8A4CF50DA19F1976EEEE6E6FA662AA7F053BB7732B1E5C15D66795DCEDAE7C72000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds support for MediaTek MT7615E 4x4 802.11ac PCIe-based chipsets. The series is based on the Lorenzo's patches: https://patchwork.kernel.org/project/linux-wireless/list/?series=95969 In the legacy tx arch, we move and store the whole skb content to the on-device memory when we send packets via high speed interface. (e.g. PCIe) However, MT7615 and the following generation use a new tx arch called “cut-through”, which only passes the physical address to the hardware, and the packet engine will fetch the packets before transmission. It saves on-chip memory for high throughput devices, and the token mechanism is used to manage the release of skb under this arch. And there might be other (existing or future) chips that use the same driver (e.g. mt7622/mt7663...), this is a starting point to unify MTK wireless chipsets. Detailed hardware information for this chip could be found on https://wikidevi.com/wiki/MediaTek_MT7615 Ryder Lee (4): mt76: add mac80211 driver for MT7615 PCIe-based chipsets mt76: add unlikely() for dma_mapping_error() check mt76: use macro for sn and seq_ctrl conversion MAINTAINERS : update entry for mt76 wireless driver MAINTAINERS | 2 + drivers/net/wireless/mediatek/mt76/Kconfig | 1 + drivers/net/wireless/mediatek/mt76/Makefile | 1 + drivers/net/wireless/mediatek/mt76/agg-rx.c | 2 +- drivers/net/wireless/mediatek/mt76/dma.c | 8 +- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/Kconfig | 7 + drivers/net/wireless/mediatek/mt76/mt7615/Makefile | 5 + drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 205 +++ drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 98 ++ drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h | 18 + drivers/net/wireless/mediatek/mt76/mt7615/init.c | 229 +++ drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 775 +++++++++ drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 300 ++++ drivers/net/wireless/mediatek/mt76/mt7615/main.c | 499 ++++++ drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 1656 ++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 520 ++++++ drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 195 +++ drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 150 ++ drivers/net/wireless/mediatek/mt76/mt7615/regs.h | 203 +++ drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 2 +- 22 files changed, 4872 insertions(+), 8 deletions(-) create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/Kconfig create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/Makefile create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/dma.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/init.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mac.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mac.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/main.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mcu.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/pci.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/regs.h -- 1.9.1