Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1683768ybl; Thu, 19 Dec 2019 00:59:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwwrlH7XzZYPto5HGBQOAix3bH3ld8X6jXyqKXDkvaEImq4Hzc8MxauqPdIfWcfzE1rEiCO X-Received: by 2002:a9d:6654:: with SMTP id q20mr7487126otm.284.1576745948781; Thu, 19 Dec 2019 00:59:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576745948; cv=none; d=google.com; s=arc-20160816; b=RuJQbLRoJv1fcWELqvbWtCQsqv8WWE7yvq4wyKfoPfSp0zzH6SCkbSiUsTNF/oqdZ8 g4ZQ+kQUN6talE/FjKZZ3hyO7QSzYKqwLPo13EEGjlGqPP0oj3qDCqo/APHs2PtuQixy g8drpCXXaUx0Er8XCoPC5AIwnSBlGbbnTGqTipB6cvZSJX2HPG6bSlOUhkE1JHg7A1la 3DMCiYwWFLXfoWx0P0+0Nei+i4Cm+kWW1c+QyGrYhXfncgYws7dwhTurBYTbsG2kviva TEgC5cVD21qhOPIJBGbNTFDbrG55Mqo3gsThPcmuDtrkad3i5xYB6YmSa/juqmBi0prI WLZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:authenticated-by; bh=I6wo560I3RMnzt1AmGz6grkdeuFQ0VmGFn2uQVf+vjQ=; b=a1sFsPFkloY2J1waaYLvGNu2IXNmNEJZSqS1aobEPgv8d/7NAuV12nmRnL5IDep/6R nrwErqj2oNUf/ZawmroUplp0AclCO4FZTNupERtQCKcqiCc0Y87WyzxBtSMzbw0uJGtB ar9WwvvHltDtjEubk+GaVj89jv8KtBgUIkEJ2vbAFnbf1eVgr0SB0WfJS87dHGNGhC3S 3STv4nKZ/9MOno36r5ndp4v4DCN99vaSbFxOiE2fJI/1FI+gJnvFbiio7Lip1Lfq7WeA 1LUU986T50KpHDKEOIkQ6qG9S9aNLPDS6OTw6s5vunaNoymPNuOE3Gzp0lqF+lZzy6hD xp/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 g10si2704701oia.98.2019.12.19.00.58.46; Thu, 19 Dec 2019 00:59:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbfLSI6l (ORCPT + 99 others); Thu, 19 Dec 2019 03:58:41 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:59555 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbfLSI6l (ORCPT ); Thu, 19 Dec 2019 03:58:41 -0500 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID xBJ8wV5T024844, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id xBJ8wV5T024844 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 19 Dec 2019 16:58:31 +0800 Received: from localhost.localdomain (172.21.68.126) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.468.0; Thu, 19 Dec 2019 16:58:30 +0800 From: To: CC: , , Subject: [PATCH v4 0/7] rtw88: add wowlan support for 8822c Date: Thu, 19 Dec 2019 16:58:09 +0800 Message-ID: <20191219085816.20709-1-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.126] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yan-Hsuan Chuang Add wake on wireless LAN support for 8822c. When system enters suspend, wifi driver can enable wowlan mode, and waits for waking host up by receiving wireless LAN events. Events could be AP lost, deauthed, magic packets, rekey, or patterns. Also most of the functions can be shutdown to reduce power consumption. To enter wowlan mode, Realtek's devices need to swap to another firmware called wowlan firmware. It can monitor special events and generate wake up signals if necessary. To swap the firmware, driver needs to re-configure the HCI link, to make sure that the link is idle, reset the link for sending H2C commands to wowlan firmware, and then stop the link. After wake up signals generated and sent to host, driver needs to swap back to normal firmware to get to the original state before suspend. So it should setup the link again and send H2C commands to firmware to restore the information. v1 -> v2 * remove duplicated rtw_pci_dma_reset() v2 -> v3 * include new patch "rtw88: add interface config for 8822c" v3 -> v4 * mark some functions static * remove some unnecessary double-underscores Chin-Yen Lee (6): rtw88: pci: reset ring index when release skbs in tx ring rtw88: pci: reset dma when reset pci trx ring rtw88: load wowlan firmware if wowlan is supported rtw88: support wowlan feature for 8822c rtw88: Add wowlan pattern match support rtw88: Add wowlan net-detect support Yan-Hsuan Chuang (1): rtw88: add interface config for 8822c drivers/net/wireless/realtek/rtw88/Makefile | 1 + drivers/net/wireless/realtek/rtw88/debug.h | 1 + drivers/net/wireless/realtek/rtw88/fw.c | 384 +++++++- drivers/net/wireless/realtek/rtw88/fw.h | 186 ++++ drivers/net/wireless/realtek/rtw88/hci.h | 6 + drivers/net/wireless/realtek/rtw88/mac.c | 2 + drivers/net/wireless/realtek/rtw88/mac80211.c | 44 + drivers/net/wireless/realtek/rtw88/main.c | 76 +- drivers/net/wireless/realtek/rtw88/main.h | 67 ++ drivers/net/wireless/realtek/rtw88/pci.c | 55 +- drivers/net/wireless/realtek/rtw88/reg.h | 29 + drivers/net/wireless/realtek/rtw88/rtw8822c.c | 18 + drivers/net/wireless/realtek/rtw88/util.h | 2 + drivers/net/wireless/realtek/rtw88/wow.c | 890 ++++++++++++++++++ drivers/net/wireless/realtek/rtw88/wow.h | 58 ++ 15 files changed, 1786 insertions(+), 33 deletions(-) create mode 100644 drivers/net/wireless/realtek/rtw88/wow.c create mode 100644 drivers/net/wireless/realtek/rtw88/wow.h -- 2.17.1