From patchwork Thu Jun 1 19:10:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norik Dzhandzhapanyan X-Patchwork-Id: 9760885 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E298560360 for ; Thu, 1 Jun 2017 19:10:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9DBB284F1 for ; Thu, 1 Jun 2017 19:10:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCB8628501; Thu, 1 Jun 2017 19:10:56 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59C99284F1 for ; Thu, 1 Jun 2017 19:10:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751168AbdFATKy (ORCPT ); Thu, 1 Jun 2017 15:10:54 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32859 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbdFATKx (ORCPT ); Thu, 1 Jun 2017 15:10:53 -0400 Received: by mail-pf0-f196.google.com with SMTP id f27so8394235pfe.0 for ; Thu, 01 Jun 2017 12:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=JD2GRtCsgCHvSduXX4QwsvSErzU1oVnCQzFlxVCvgrc=; b=a1OTdjIzWmgh1tLcov0DuKBwkAK7RIejOaFyOvLPe2UBx70byJ2EHo7WdwR/eYtJCV Q96EHigBvzzkwLFiPPCFwqhgTbPW3BbieW5wiGUze2PFaZgjDQnNHDyF/mn9YwG0Zwyl oHJTyM2HPqw1g8cq/ReY860sTCqc50PxEPG9qcpXionQlaKfBZaDxm5d1XBv8B5De2Vz v0Fg7N6w0kje5ehdvHRhaLDaWRKYvba7GtyRkwp5cTmcs3cmcNIjL50e6GduWKx1AKmc rsGxoP8N6YthRb0LqbSmCVnsUQCNMVCvdSGxSzphenW3NWoeZ0+sZYvwOnSV7wK3VTe1 9fiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JD2GRtCsgCHvSduXX4QwsvSErzU1oVnCQzFlxVCvgrc=; b=MDZwUmAnIRymIvNu6ia5klJRRvn3G5pBx4o/1FIfHEG7gDpwU8SAyvVd+E92wZ+vmL a71UupqcE+3eBySprmSHbmUURYHJKmn5rl4/jGjnxHp+tdoqTgMmTswhvpMYZERebrj2 GXhxcl/UkHRHE6dmAs8Sn1umMcBD48DFCdNMCt8RDpgbMFzVvj6awllQy6j+Wxe3ZK4Z E9WSB2o1jtLRxl/jHXCwn7LwKTztHSz6U2d5kn1hx2mZqotR9g6XIutm5RhfKmnN7gaE pri3imziqGcdIASHgbzOf3XElCwAqN2EQYwe2z7I7wceU69VgOdEMrGkg0fXbkLBk/hf AEZA== X-Gm-Message-State: AODbwcClSNwqwxuj8Ht5ZmJxYKsBHZRAwCvtR7FJ1Kwf066HlQYdBd5d CikLZPTMgYlyducBqsNkYwG4dfVniA== X-Received: by 10.98.68.197 with SMTP id m66mr2528184pfi.80.1496344252975; Thu, 01 Jun 2017 12:10:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.142.130 with HTTP; Thu, 1 Jun 2017 12:10:52 -0700 (PDT) From: Norik Dzhandzhapanyan Date: Thu, 1 Jun 2017 12:10:52 -0700 Message-ID: Subject: [PATCH 1/1] Add per chain RSSI reporting. To: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Report per chain RSSI Signed-off-by: Norik Dzhandzhapanyan --- drivers/net/wireless/ath/ath10k/htt_rx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 6c0a821fe79d..110953e0bff9 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -829,6 +829,22 @@ static void ath10k_htt_rx_h_signal(struct ath10k *ar, struct ieee80211_rx_status *status, struct htt_rx_desc *rxd) { + int i; + + for(i=0;ichains &= ~BIT(i); + + if (rxd->ppdu_start.rssi_chains[i].pri20_mhz != 0x80) + { + status->chain_signal[i] = ATH10K_DEFAULT_NOISE_FLOOR + + rxd->ppdu_start.rssi_chains[i].pri20_mhz; + + status->chains |= BIT(i); + + } + } + /* FIXME: Get real NF */ status->signal = ATH10K_DEFAULT_NOISE_FLOOR + rxd->ppdu_start.rssi_comb;