From patchwork Mon Jan 5 10:03:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kwon, Oh-Keun (Owen)" X-Patchwork-Id: 5566241 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0CF47BF6C3 for ; Mon, 5 Jan 2015 10:04:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3230020145 for ; Mon, 5 Jan 2015 10:04:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 026752015A for ; Mon, 5 Jan 2015 10:04:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y84WC-00066o-VW; Mon, 05 Jan 2015 10:04:12 +0000 Received: from sabertooth02.qualcomm.com ([65.197.215.38]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y84WB-00060H-FC for ath10k@lists.infradead.org; Mon, 05 Jan 2015 10:04:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1420452251; x=1451988251; h=from:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=6uWEqmb5qUtbp2Wjz/YY6RMvSfuDWYeLfOemCInpTHE=; b=jCyr+413Ge3NlvNeQS3Apohxc5lgaAu0MxL+yxnjPBvFBCawqMVGCxP6 3uwHBE96InYONt6QP9byrC59q9rxvTqHgY5cI9LhRNrS0ojruY+7e+U1g soQThcxpHv65VR8KA5fhcrI55w1baC/erDPcewuIh6kLzxV8jjNTQfp43 4=; X-IronPort-AV: E=McAfee;i="5600,1067,7671"; a="81751945" Received: from ironmsg04-lv.qualcomm.com ([10.47.202.184]) by sabertooth02.qualcomm.com with ESMTP; 05 Jan 2015 02:03:49 -0800 X-IronPort-AV: E=Sophos;i="5.07,698,1413270000"; d="scan'208";a="26768447" Received: from nalasexr01c.na.qualcomm.com ([10.49.56.23]) by ironmsg04-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 05 Jan 2015 02:03:48 -0800 Received: from nalasexr01a.na.qualcomm.com (10.49.56.21) by NALASEXR01C.na.qualcomm.com (10.49.56.23) with Microsoft SMTP Server (TLS) id 15.0.995.29; Mon, 5 Jan 2015 02:03:48 -0800 Received: from nalasexr01a.na.qualcomm.com ([10.49.56.21]) by nalasexr01a.na.qualcomm.com ([10.49.56.21]) with mapi id 15.00.0995.032; Mon, 5 Jan 2015 02:03:48 -0800 From: "Kwon, Oh-Keun (Owen)" To: "ath10k@lists.infradead.org" Subject: patch to enable LDPC / STBC sniffing with ath10k Thread-Topic: patch to enable LDPC / STBC sniffing with ath10k Thread-Index: AdAozdOl7WPTgP3RQv2oqFrHc8Bxhw== Date: Mon, 5 Jan 2015 10:03:47 +0000 Message-ID: Accept-Language: ko-KR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.70.6] MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150105_020411_613703_72E9808F X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.1 (-----) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi ath10k-list, I am a CE for WiFi in Qualcomm-Atheros. I don't know this is appropriate to contact you using QCA email. I recently tried sniffer (monitoring mode) with ath10k driver. I found LDPC packets are not captured, and there is no flag for LDPC / STBC in Radiotap information. Could you please consider this kind of patch though this is draft form? 1. parse preamble information to set the LDPC / STBC flag in the Radiotap information. 2. indicate LDPC / STBC / SGI enable to the firmware on vdev-up Thanks, Owen diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index eebc860..ed97739 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -670,7 +670,7 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar, u8 info0, u32 info1, u32 info2, struct ieee80211_rx_status *status) { - u8 cck, rate, rate_idx, bw, sgi, mcs, nss; + u8 cck, rate, rate_idx, bw, sgi, mcs, nss, ldpc, stbc; u8 preamble = 0; /* Check if valid fields */ @@ -730,6 +730,8 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar, nss = ((info1 >> 10) & 0x07) + 1; bw = info1 & 3; sgi = info2 & 1; + stbc = info1 & 8; + ldpc = info2 & 4; status->rate_idx = mcs; status->vht_nss = nss; @@ -737,6 +739,13 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar, if (sgi) status->flag |= RX_FLAG_SHORT_GI; + /* for test */ + status->flag |= stbc << RX_FLAG_STBC_SHIFT; + + if (ldpc) + status->flag |= RX_FLAG_LDPC; + + switch (bw) { /* 20MHZ */ case 0: diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 4b7782a..df11f6d 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -487,6 +487,9 @@ static struct wmi_pdev_param_map wmi_10x_pdev_param_map = { .burst_enable = WMI_10X_PDEV_PARAM_BURST_ENABLE, }; +int ath10k_wmi_vdev_set_param(struct ath10k *ar, u32 vdev_id, + u32 param_id, u32 param_value); + int ath10k_wmi_wait_for_service_ready(struct ath10k *ar) { int ret; @@ -3143,6 +3146,11 @@ int ath10k_wmi_vdev_up(struct ath10k *ar, u32 vdev_id, u32 aid, const u8 *bssid) struct wmi_vdev_up_cmd *cmd; struct sk_buff *skb; + /* add for test */ + ath10k_wmi_vdev_set_param(ar, vdev_id, WMI_VDEV_PARAM_LDPC, 1); + ath10k_wmi_vdev_set_param(ar, vdev_id, WMI_VDEV_PARAM_RX_STBC, 1); + ath10k_wmi_vdev_set_param(ar, vdev_id, WMI_VDEV_PARAM_SGI, 1); + skb = ath10k_wmi_alloc_skb(sizeof(*cmd)); if (!skb) return -ENOMEM;