Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp390940imu; Fri, 7 Dec 2018 02:51:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/XLaCzIz/itO+wMEWZwDv5n5C+tqqypWZ52erxqSQJZMmTpfixKchoTdGF1zwJGDiYnWcLK X-Received: by 2002:a62:1c96:: with SMTP id c144mr1722248pfc.129.1544179882523; Fri, 07 Dec 2018 02:51:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544179882; cv=none; d=google.com; s=arc-20160816; b=KNgm3jqD+FrSfrwUgoJ05r3LHkCw0YRL/sRyKkh04lbAJ/EbMxG2m8ZU98ywSn/9mD fjmNY66itw0xWwXqVwXGVJBTIudEzg+FR90Aykc/mpO6LAqcF0LCppw7qJYUbfIKgJ3Y MVaGFls4uw4aXlshocnFNbwR7f3kcVvX8WITApJYgXUU0NZkZ7B0Oo9eSIb14fBpQw7i fm9DGkfVVJNoh5IsbxK++2Q8tTlRzw5m4cB0X0b7Cnjbz3XnE7U4t96uROya6+TLNviR a6CynmgLOLzT6CX8yuOiGvYCyH2PKboe3jOws85zHe4YvcTeQwCkk47jqHzD4khxxfFN CD6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=W23krlxQog/+XYbZDN4GZUQi7hkMUw8h2W8xUwMQOI0=; b=Rrxd0XzjfKdqR722XgrLA78x2TeIpMCjZ1C7sZMhUCUTMC7hXnGN3hhjl8MmA8qnch PWu8dNJooYp1uvCwKJNFiB9jkWIXB3AQWviXjX3fl9VJOv+9dl9cD8QuRJER/qYnl4n3 GfY2m/MaEAop66L/LtBiKWfH+luOFB6WnogUenLSfrmmPH0oNlTQnVQ5nTuZl51pNgOD EZG8Lsfre5Qa99tjTVRox1LuawWy7y0CFkU5esuV1RR2E/65Q03+zdpYtXoREO2Sr990 pxSNtC4laaqb0sK82ZeCzWTThMzta8Lxa2jAHM7/xsw6LuWPyqKbRFr2KPhe9/jkR53P yJIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jScLPRqa; dkim=pass header.i=@codeaurora.org header.s=default header.b=Z3FhPpEC; 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 z13si2497018pgh.31.2018.12.07.02.51.07; Fri, 07 Dec 2018 02:51:22 -0800 (PST) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=jScLPRqa; dkim=pass header.i=@codeaurora.org header.s=default header.b=Z3FhPpEC; 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 S1726030AbeLGKub (ORCPT + 99 others); Fri, 7 Dec 2018 05:50:31 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:49108 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbeLGKub (ORCPT ); Fri, 7 Dec 2018 05:50:31 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 98C706028B; Fri, 7 Dec 2018 10:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544179830; bh=rMx44yr0SP+tYnnWgH/Gy6E6SRSRkoyL6ReIlTQSqdk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jScLPRqa4vFgtgfT+JLJaH1W40W3p5i1OC76Vi4N9/UywasK/L65hJo8VoHGBf8Ay oDDX5dG1+u1xutnr8mnX16EvEPLbasQDQFDAaZfcWj/1wqoD4mPNhYoBBTtVT5F1cW 8rF6F/HL00R0gIFbGtUXXmgWY8unHoWYVBlq1KYI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from x230.qca.qualcomm.com (37-33-92-201.bb.dnainternet.fi [37.33.92.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 235F6601B4; Fri, 7 Dec 2018 10:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544179829; bh=rMx44yr0SP+tYnnWgH/Gy6E6SRSRkoyL6ReIlTQSqdk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Z3FhPpECoh6ZlsiSfQ1oFQgl4+BiIz6+cgCWKxHa1u9TK2HgRnauqZC8/L4jo/J5v WxS1I1+D+oeG1wzw2hlyVWHcd5ddbA7jvsF+mbnpGUn1+c8j92/K8I4Lpc6eP2Y6PP hJmd/aQlJTfFfJySTLgQShphn97tdau2DQbpKkkQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 235F6601B4 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=kvalo@codeaurora.org From: Kalle Valo To: Brian Norris Cc: , Amitkumar Karwar , Nishant Sarmukadam , Ganapathi Bhat , Xinming Hu , linux-wireless@vger.kernel.org Subject: Re: [RFC PATCH v2 2/2] mwifiex: add NL80211_STA_INFO_RX_BITRATE support References: <20181207001249.165477-1-briannorris@chromium.org> <20181207001249.165477-2-briannorris@chromium.org> Date: Fri, 07 Dec 2018 12:50:25 +0200 In-Reply-To: <20181207001249.165477-2-briannorris@chromium.org> (Brian Norris's message of "Thu, 6 Dec 2018 16:12:49 -0800") Message-ID: <87ftv9ehla.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Brian Norris writes: > Comparing the existing TX_BITRATE parsing code (in > mwifiex_parse_htinfo()) with the RX bitrate histograms in debugfs.c, it > appears that the rxpd_rate and rxpd_htinfo fields have the same format. > At least, they give reasonable results when I parse them this way. > > So this patch adds support for RX_BITRATE to our station info dump. > > Along the way, I add legacy bitrate parsing into the same function, > using the debugfs code (mwifiex_histogram_read() and > mwifiex_adjust_data_rate()) as reference. > > Additionally, to satisfy the requirements of > NL80211_STA_INFO_RX_BITRATE, I skip logging the bitrate of multicast > packets. This shouldn't add a lot of overhead to the RX path, as there > are already several similar 802.3 header checks in this same codepath. > We can also bias the branch behavior to favor unicast, as that's the > common performance-sensitive case. > > I'd consider this support somewhat experimental, as I have zero > documentation from Marvell. But the existing driver code gives me good > reason to think this is correct. > > I've tested this on a few different 802.11{a,b,g,n,ac} networks, and the > reported bitrates look good to me. > > Signed-off-by: Brian Norris > --- > RFC: I'd appreciate it if someone from Marvell could double check my work > here. BTW, if we don't hear anything from Marvell I'm going to apply these anyway. -- Kalle Valo