Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6721298ybc; Thu, 28 Nov 2019 04:22:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxHKrP5TwVvE94pwX24LqO9SZ+VvOWmzHjaiaZEYeJZulx4eAW+tXZCP/C0JLXyqAtLTyyS X-Received: by 2002:a50:fb0b:: with SMTP id d11mr14718266edq.252.1574943775207; Thu, 28 Nov 2019 04:22:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574943775; cv=none; d=google.com; s=arc-20160816; b=IayPg/dPC7ZBS05pHO+POieyKBeVoC8DuTpO/F9RumsY9svfCbmnT0Z9bf94wvyzj1 sir1LYtVcIDZJcyf35a9ZxsGJaAjwL5NKvww52LM3QQS42eefloWZP2dVHiqDlY8WaO6 tZiWWOVEXV/ZIHfP2Yi+l5Ym0HjNox94pXicDr/kYmRSFzgJSCvEETCyLnnO8UtwiY6C 3Bv2rlhOmprXYAWgJ8qTjThHlGXzRV4Y7EAvhpkPf2ee7AWBmWp4ArxqZqrNgeViqov8 TA+uQrkWZQEUgiCTVZCYm2X6WViD35qutE2d3foCC7n/C1XjXGArVIENrl0c0RdfeOtz 05Lg== 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=ixwXAefN2HJXwGqymcMpDhq1KpGcw0snXbHs2b4BZbI=; b=ud7n78lOGkeuOzRUMvbBf2TQagL6ZvtcEYCFoKm5HfNEmY25DhvGLIGtGX24CCzCQI 5ZO/Au/XUVIjMwxWgOvMJs/fahz4sLdHc5gGq/Ji2AXEvok4vI+up1oSeIcmmXQvDjWR KzSQi+Hd68Y60QQYcVn1YdjsgGr6F3V3HtonBm5uJ63fys74dmOUoyDA1p9e5V4ZBq4G rSlkeXAkfx6EMD1o93t5Gm+kymAZOsjHbZkEAWWW87Bg3YlaIfRyVzV6sMeUDv7cyB96 Nacv+EuqT1hjglJ5ozNvjWCNfPOldmYLMp9nNXipi/EOu5DBeZXzCsN0Mzz70NjItnoO gbAg== 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 s19si13693945edw.235.2019.11.28.04.22.30; Thu, 28 Nov 2019 04:22:55 -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 S1726881AbfK1MTW (ORCPT + 99 others); Thu, 28 Nov 2019 07:19:22 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:59536 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbfK1MTV (ORCPT ); Thu, 28 Nov 2019 07:19:21 -0500 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID xASCJC7h004439, 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 xASCJC7h004439 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 28 Nov 2019 20:19:12 +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, 28 Nov 2019 20:19:11 +0800 From: To: CC: , Subject: [PATCH 0/6] rtw88: add wowlan support for 8822c Date: Thu, 28 Nov 2019 20:19:01 +0800 Message-ID: <20191128121907.6178-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. 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 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/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 | 36 +- drivers/net/wireless/realtek/rtw88/reg.h | 27 + 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 ++ 13 files changed, 1759 insertions(+), 31 deletions(-) create mode 100644 drivers/net/wireless/realtek/rtw88/wow.c create mode 100644 drivers/net/wireless/realtek/rtw88/wow.h -- 2.17.1