From patchwork Mon May 6 14:54:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miles Hu X-Patchwork-Id: 10931183 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 D5E0E92A for ; Mon, 6 May 2019 14:55:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2D88287C8 for ; Mon, 6 May 2019 14:55:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6D4B287DE; Mon, 6 May 2019 14:55:04 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F7BF287C8 for ; Mon, 6 May 2019 14:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=nbz9dZVopeWiZF+wMlcFqdBMlKQ+NdXx6F96ZaDF3W8=; b=JBU s9KHNnuQWzFBy6qBFTQgKulDJS3naYdowezAFebyC7rP+Z+K6kDkaodzwEI7WYQNMgtImQmcySq22 VyVWdyNniH9Cc5tTJRbeqvxzp0xBRXRgJxmOBJvoZn76QtD9UV4n8PxIt29hKNjTa7JZIcKr1lxLQ 7/x1Majeuj2Lr3Rqe5Nm2XyTNsXeFwlZSRwmD23R4NJzLCRR6fRXzsTjL1FU2vIRCrcpgeN+NY5kj LfHSDfvI3Dt2GRCY89t4Uhm/G3YliiBbEjy3GiMtoWi3l6x4Wiy+38UKZAab81jfoJQ8xmjqySrng aYJlt5CvdToodW/2iUNT4Ts8kTahGgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hNf1D-0001k5-Bd; Mon, 06 May 2019 14:55:03 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hNf1A-0001YA-Qt for ath11k@lists.infradead.org; Mon, 06 May 2019 14:55:02 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4999F60590; Mon, 6 May 2019 14:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557154500; bh=RK4NmYKMBxiIxl87Cp7oFhiuW7WPR0prfGFBtn+6BVc=; h=From:To:Cc:Subject:Date:From; b=HXcLttAPKyVlbRCauvupK1yleDK3fmIFxFYkNuqMf9T+nGIWE5VGWmCkiXK9hogw0 8YSSmDIIyuMz/nwcqZBtyodaVrAh76Jbd3DNt854Y0y+gk/i04ZrTBm+o+q8OBvWKj QGPcu/RNKXI5Hr8coM3x3A/PJSBcaWj9odJJIaNI= Received: from smtp.codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: milehu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C082A60590; Mon, 6 May 2019 14:54:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557154499; bh=RK4NmYKMBxiIxl87Cp7oFhiuW7WPR0prfGFBtn+6BVc=; h=From:To:Cc:Subject:Date:From; b=MmaniANWrz4o4HVEPjVW2ytjPSH2b7FaJo/TyKHXDJ1TxX6N6pdMHtH2FkQC8vGfG 8mePM+f3trcxznjtxH99SEzb7lPI6y3nxyAI2cPu4Txt0w+1MylUjq3N9uItRO/DIJ WEuex40f9uEqWhbbRrzvetUbyPqrsoHsitpqQloo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C082A60590 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=milehu@codeaurora.org Received: by smtp.codeaurora.org (sSMTP sendmail emulation); Mon, 06 May 2019 07:54:58 -0700 From: Miles Hu To: ath11k@lists.infradead.org Subject: [PATCH v3 0/6] ath11k: add monitor mode support Date: Mon, 6 May 2019 07:54:50 -0700 Message-Id: <1557154496-12059-1-git-send-email-milehu@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190506_075500_906581_659B2EAA X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miles Hu MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Adding monitor mode in ath11k. It can be enabled by commands below: ifconfig wlan0 down iw wlan0 set type monitor ifconfig wlan0 up change channel: iw wlan0 set freq 5805 80 5775 Change summary: 1. create monitor status/destination/buffer/link descriptor rings. 2. enable these rings and push ring filters to buffer/status rings. 3. add napi entry point for monitor status and destination rings process. 4. implement monitor status/buffer rings replenish. 5. process entries from the status ring to get ppdu id and tlv status. 6. process entries from the destination ring by comparing ppdu id to build msdu list. 7. merge msdu list to mpdu and copy rx status to cb. 8. deliver mpdu to upper layer. Known issues: - Coexist with other interface type (AP/STA) not fully supported. - higher data rates (11ax) not supported. radiotap needs proper info. - signal strength and rate idx not accurate in some packets. -Miles Hu Miles Hu (6): ath11k: init/deinit monitor rings ath11k: monitor filter set function ath11k: htt setup monitor rings ath11k: monitor mode attach/detach ath11k: enable/disable monitor mode and destination ring entry process ath11k: merge msdu tlv process and status/destination ring process V2: - Move to ath11k-bringup branch V3: - Fix compile error on x86 drivers/net/wireless/ath/ath11k/core.h | 8 +- drivers/net/wireless/ath/ath11k/dp.c | 111 ++-- drivers/net/wireless/ath/ath11k/dp.h | 189 ++++++- drivers/net/wireless/ath/ath11k/dp_rx.c | 864 ++++++++++++++++++++++++++++- drivers/net/wireless/ath/ath11k/dp_rx.h | 61 +- drivers/net/wireless/ath/ath11k/dp_tx.c | 179 +++--- drivers/net/wireless/ath/ath11k/dp_tx.h | 1 + drivers/net/wireless/ath/ath11k/hal.c | 2 +- drivers/net/wireless/ath/ath11k/hal_desc.h | 3 + drivers/net/wireless/ath/ath11k/hal_rx.c | 28 + drivers/net/wireless/ath/ath11k/hal_rx.h | 17 + drivers/net/wireless/ath/ath11k/mac.c | 40 +- drivers/net/wireless/ath/ath11k/rx_desc.h | 1 + 13 files changed, 1341 insertions(+), 163 deletions(-)