Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1144732yba; Sun, 31 Mar 2019 23:59:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqybgAT3Mkw2CxKkiQ4ZiwqT2eY1O71AHLZnSxuDBv/0yZJ3GCmCyuI0EXM+svC9b3ozVHNJ X-Received: by 2002:a62:ab13:: with SMTP id p19mr60058043pff.131.1554101952783; Sun, 31 Mar 2019 23:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554101952; cv=none; d=google.com; s=arc-20160816; b=MghWfnW41DdP0rUpl1O+DdSBonyEGA9jBjSAR0feMP9PeTkXwbkElf3qPYgEdtEAWv 5Emo9WysP3raWS489iXsROLweUt8QQEjEx6Lbd4rKBSjywRtz61TLE93dNgb49CPhH1i wNGomKauohx4RGWBXvtcOnXnrlxtgaBWSJE19whf8CjsqEbRwCBbd6YHRhIwA70jfbMm JK4m7hBF9TxYZ0GCB/NZf+X4LvY2REYCVSdYPEaiIUCbAz2iM586gTzaTMl2eSz/KFib +CbwhUeJZ/9wx9lUFYHf8H72XlQukiawdjITU0/gGr3ElLFA9vcVyVawF3ZFbqA/oa+Y xs8Q== 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=9FJ0aGH1PPxH9aJ9bx6jv+VYBiIJLnFitfWX5uw4QmY=; b=IV9V6D3rIt1c/AV1mrtA4aolGXhODMdSJN4XG8WIU5NSeYm/JDQBUBH1Ik7a5Rsqs7 X69OZdjSU/4kfCYMtMItcLztuWKTdiSWfy6mJTcW59qdXJqTMirimXMVVvcv5KMTtVcX 9N1/zH7GsGcf/cDPLeNaNaMYUyKw2VofqXuV3lbRKVg5qtmd/HNWuJMwW1w/xGDuEPY2 U+JsmJZpQdxQc/0WYFG2hBpUlofsvHKaFQZLfwwBH3U4Ga5CNPFe4jn2w93738oWah/C 2KGjFvjP/lgu52+vri/RF9J1vCMSXjiN7WtgzNe5c7UQI+dPhopWGjFo8WmXpf6SWbGt gAhQ== 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 y2si8120214pgl.527.2019.03.31.23.58.57; Sun, 31 Mar 2019 23:59:12 -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 S1731891AbfDAG4m (ORCPT + 99 others); Mon, 1 Apr 2019 02:56:42 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:58966 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725867AbfDAG4l (ORCPT ); Mon, 1 Apr 2019 02:56:41 -0400 X-UUID: 35783000b4d3496cb1de9309533c8d53-20190401 X-UUID: 35783000b4d3496cb1de9309533c8d53-20190401 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 658212782; Mon, 01 Apr 2019 14:56:28 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 1 Apr 2019 14:56:26 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 1 Apr 2019 14:56:26 +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 v2 0/4] Add support for MediaTek MT7615 wireless chipsets Date: Mon, 1 Apr 2019 14:56:21 +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: A7CC6BE350C29360A0D56837C46B865FCD93FA37EF4D3E10CDA23FDC8CB260902000: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. 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 | 774 +++++++++ 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, 4871 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