From patchwork Sat Sep 30 17:37:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: silexcommon@gmail.com X-Patchwork-Id: 9979573 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 3995D6034B for ; Sat, 30 Sep 2017 17:39:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2339228F09 for ; Sat, 30 Sep 2017 17:39:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17B2728F0D; Sat, 30 Sep 2017 17:39:32 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 9C9F328F09 for ; Sat, 30 Sep 2017 17:39:31 +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:References: In-Reply-To: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:List-Owner; bh=vbMX/wnhwAVjP8QBD8wNTX+3R0vayNa/lHio+PUAzV0=; b=INnOU/Da1J8N5jY5Fzhg06XnpM KBsYdrxjfaiANzqr8xJxMOUbjtswYB4QM6+wvoCNCS8zYGP9ju5dai1s1VTpm/b//0uwYbmtFvesU sTTjH2WjYoC74Nwk/qVtEvA3ykwk/I3Me2dxxMyyPDDqx34kARopzsdZGulsKZd9pLQ/C07xk+lmZ zI9M84trx2JDZOnKIFW5MKUIiqk/cy9audtCPmOQni9+g1HeEVQh3ENYxsLzZRwzy4eRemzAD0r+L lWHHMkmU72CM7uGvHXU7YJOynybdSBlD7UJSN9m6Sm6tPqIjNB7Ml+QuE3gYSlMI3eW+FeJIHhaiJ t3HogCpw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dyLja-0001yH-Py; Sat, 30 Sep 2017 17:39:26 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dyLj7-0001Q0-HA for ath10k@lists.infradead.org; Sat, 30 Sep 2017 17:39:06 +0000 Received: by mail-pg0-x244.google.com with SMTP id u27so1697730pgn.1 for ; Sat, 30 Sep 2017 10:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oAxW20hKQtbntl4cXwQDTRYsG/FdZLqRQO8FAci/OpM=; b=FbBCxBKlAN/zHxhq/MB2Q5Dk3POnEw0zebIb+OpSpWw9vHsaNV5OrTQ58hlwMfd3Z5 nwydbp9kX5ukvpnbXQqgXGnXBfvyu1+4QybR/7fk2p+RL+bUdO+yMp0s10OR8/7UC+Vk TrcW3FgoDnNOPWpIblFPB9QyUpcREz4i85u3WCnXPw2PNnRogIcxxmK/rJzYbaVppZZD QU4CTor3b24UvXDXDIF5lAGdM62Idna4f2ywGOsNmhPXp5DAdhgHg8ZpDFL2oXPYKF0x zaWTSk62P+K1Wehw2/v71qBSn7hieoHRSRV1b5KfCMeChqmIFjrmHyLYnQQd6Zhio6pQ bs4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oAxW20hKQtbntl4cXwQDTRYsG/FdZLqRQO8FAci/OpM=; b=G0CiwGDMzwBSFJaVq4ZLjJJIK7Vi/gk6O4mf5R4xbaW4KIHrMOkjFN37iaK+3awEsP 9DFjY4pXzfT/6Q9wH+mlDqglUPmIa7FitV8ER1FUgxCMo4Xjj+DJV8KPTIHOL+JndWDj 2qYtW8SfltX6cu7ugoAzhsSFHFmIQsqQwyXijt2gav7wBIPCJNj/PzJwLAS2hUPXA15R UQaB0GZBsXRHI643/JNfqEr1pn2YYEvHAakzwLXKxuosficG1qwh/9TK0Wx3kJY5vN0h q7oRI33Is6FM96jTlr5O5LAXIhMWt73xPhZMlQeVeaiFteRUvPKSgREhVO4KwMiMzxv4 WGuQ== X-Gm-Message-State: AMCzsaU4ZfGb3f3+XRT2FQ20SuhCFXTp425lIabrPlvQcNoyV3mqsSkP h9IGu5B59wCIVCIYXPsEtdqKj2S/fDg= X-Google-Smtp-Source: AOwi7QAnW/dZuz6PpXni2HC8cfdri8bV359o+q0Q3asOCjW8934q0MY9yGaqI0/GXOBG+S8qE3Nm5A== X-Received: by 10.99.95.19 with SMTP id t19mr1742526pgb.391.1506793120631; Sat, 30 Sep 2017 10:38:40 -0700 (PDT) Received: from localhost.localdomain ([171.60.245.167]) by smtp.gmail.com with ESMTPSA id q15sm11197640pgc.64.2017.09.30.10.38.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 30 Sep 2017 10:38:40 -0700 (PDT) From: silexcommon@gmail.com X-Google-Original-From: alagusankar@silex-india.com To: ath10k@lists.infradead.org Subject: [PATCH 07/11] ath10k_sdio: fix rssi indication Date: Sat, 30 Sep 2017 23:07:44 +0530 Message-Id: <1506793068-27445-8-git-send-email-alagusankar@silex-india.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> References: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170930_103858_179136_C0C45B2C X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alagu Sankar , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alagu Sankar Receive descriptor of sdio device does not include the rssi. notify mac80211 accordingly. Without the fix, the rssi value indicated by iw changes between the actual value and -95. Signed-off-by: Alagu Sankar --- drivers/net/wireless/ath/ath10k/htt_rx.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index f025363..21adcad 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -1646,9 +1646,16 @@ static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt, hdr = (struct ieee80211_hdr *)skb->data; rx_status = IEEE80211_SKB_RXCB(skb); rx_status->chains |= BIT(0); - rx_status->signal = ATH10K_DEFAULT_NOISE_FLOOR + - rx->ppdu.combined_rssi; - rx_status->flag &= ~RX_FLAG_NO_SIGNAL_VAL; + + if (ar->hif.bus == ATH10K_BUS_SDIO) { + /* SDIO firmware does not provide signal */ + rx_status->signal = 0; + rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL; + } else { + rx_status->signal = ATH10K_DEFAULT_NOISE_FLOOR + + rx->ppdu.combined_rssi; + rx_status->flag &= ~RX_FLAG_NO_SIGNAL_VAL; + } spin_lock_bh(&ar->data_lock); ch = ar->scan_channel;