From patchwork Fri Sep 2 05:29:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashok Raj Nagarajan X-Patchwork-Id: 9310465 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 3E1ED607D2 for ; Fri, 2 Sep 2016 05:30:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E3FE2952E for ; Fri, 2 Sep 2016 05:30:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 223E029561; Fri, 2 Sep 2016 05:30:35 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 2A6B32952E for ; Fri, 2 Sep 2016 05:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbcIBFab (ORCPT ); Fri, 2 Sep 2016 01:30:31 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:17217 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbcIBFaa (ORCPT ); Fri, 2 Sep 2016 01:30:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1472794230; x=1504330230; h=from:to:cc:subject:date:message-id:mime-version; bh=Bn8+3nEKD6Wxi8McpjXk3YjoOwojjumbGpUJx0fLFDg=; b=RltNiVxZQPpPaoHDi7ZFKCbR9Ayc4gxm2BkfnzbQhW8vEyACByK56cXG 5BID+VYP/M/ANWQj8pqrjTP8eim5jwdA4kBYfbovbYzFgfwJPXyr6KFIW cR0NWaqYyAwJ9hJQI+Ee0fb6dxXJwVkqlLpsoq2f6Ens7erm+DRMDEe9z Q=; X-IronPort-AV: E=Sophos;i="5.30,270,1470726000"; d="scan'208";a="221381448" Received: from unknown (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by wolverine01.qualcomm.com with ESMTP; 01 Sep 2016 22:30:18 -0700 X-IronPort-AV: E=McAfee;i="5700,7163,8275"; a="1215288874" X-Amp-Result: CLEAN Received: from nasanexm02a.na.qualcomm.com ([10.85.0.41]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 01 Sep 2016 22:30:18 -0700 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by nasanexm02a.na.qualcomm.com (10.85.0.41) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Thu, 1 Sep 2016 22:30:17 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 2 Sep 2016 11:00:09 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 02 Sep 2016 10:59:55 +0530 From: Ashok Raj Nagarajan To: CC: , , "Ashok Raj Nagarajan" Subject: [PATCH] ath10k: fix reporting channel survey data Date: Fri, 2 Sep 2016 10:59:53 +0530 Message-ID: <1472794193-20774-1-git-send-email-arnagara@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01f.ap.qualcomm.com (10.252.127.15) 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 When user requests for survey dump data, driver is providing wrong survey information. This information we sent is the survey data that we have collected during previous user request. This issue occurs because we request survey dump for wrong channel. With this change, we correctly display the correct and current survey information to userspace. Fixes: fa7937e3d5c2 ("ath10k: update bss channel survey information") Signed-off-by: Ashok Raj Nagarajan --- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 0bbd0a0..1fa3c17 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6538,7 +6538,7 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, goto exit; } - ath10k_mac_update_bss_chan_survey(ar, survey->channel); + ath10k_mac_update_bss_chan_survey(ar, &sband->channels[idx]); spin_lock_bh(&ar->data_lock); memcpy(survey, ar_survey, sizeof(*survey));