From patchwork Fri Feb 24 05:35:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tahia Khan X-Patchwork-Id: 9589393 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 31851601AE for ; Fri, 24 Feb 2017 05:36:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 213512876F for ; Fri, 24 Feb 2017 05:36:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1475C28779; Fri, 24 Feb 2017 05:36:00 +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=unavailable 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 C32442876F for ; Fri, 24 Feb 2017 05:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbdBXFfl (ORCPT ); Fri, 24 Feb 2017 00:35:41 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:32944 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294AbdBXFfi (ORCPT ); Fri, 24 Feb 2017 00:35:38 -0500 Received: by mail-it0-f65.google.com with SMTP id e137so1757565itc.0; Thu, 23 Feb 2017 21:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fL6RBd79buMa3kRtyEgVUaWDUpW4y+Og1+VkrW9LQXM=; b=nxKv6ZL0ynJePo19s2ieb85MZfO6Ys9g7UW6FH4Fln3GshVFtNzaaG9bb1+3qc/NMd EsKRUpl07pe+tL4+OE8R4DDIEC3VGYK6k9ocYWf5irb1apz0GAxGK6mxbTuFQ9SY39Po zaIpaDhmvQlQBfZozVkKjk4G6VlgT1nfCUfQJEOpNZFrwqRz3T2YpZ4ha9SE8vcOOcmv lhUxkezybBgcFE22YXun8x7GNlZ9AL1Vxf+5jkchzKoqT9eYXfM+8WJQXakB6cvnBrES bqEs09PoHJjD9GqiUGS2pLRMuLprpdK1SNYAM1nz+BNn26FuO1K200xpiyUc0UH0ai9B kyZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fL6RBd79buMa3kRtyEgVUaWDUpW4y+Og1+VkrW9LQXM=; b=HHbKqExAGU1kG5qyX4zQKZ6g8N/ElPoEuqQApHMxeF+zKTGdMYtzkZXK9QYx6VjC3o 3fuUSMG3irkwrfT5bCiiHCL3PdPvY4/w6uGa7vliygf7L7alPwGj8xL3vD/cxHSWT1dK 0YQIGK0XszqQ54NpoS4kNAhbjxjGkk4e+xsAuFOWHPrPPxyGzRDEOJszvDe2hk83GQQm hMqXC+0Y7hmSEEkikytqxd9TrdbCgX8CgdAxy3KYPxJDDKE6GtTT4dYSPn4dXblmaOWI 2vlIV2IUxXdMV3/JaW883OUqWOQvg6DPbiVulplZpA/++tEnB8pHNu0ydcEKXOHBbLaw Yj2g== X-Gm-Message-State: AMke39lhpk0tdOOeod40g12F1x/yjCHCKcw7jNNY2yWYZx14LQMXx+e1CmazB1R+w70UBA== X-Received: by 10.36.81.142 with SMTP id s136mr1012510ita.119.1487914513682; Thu, 23 Feb 2017 21:35:13 -0800 (PST) Received: from coolbox (24-212-136-169.cable.teksavvy.com. [24.212.136.169]) by smtp.gmail.com with ESMTPSA id f187sm333303ita.28.2017.02.23.21.35.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Feb 2017 21:35:13 -0800 (PST) Date: Fri, 24 Feb 2017 00:35:12 -0500 From: Tahia Khan To: outreachy-kernel@googlegroups.com, aditya.shankar@microchip.com, ganesh.krishna@microchip.com, gregkh@linuxfoundation.org, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] staging: wilc1000: Rename network_info member str_rssi to rssi_history Message-ID: <6fd3f34baa31c00a77e2805d5d8a820b3ac7a43f.1487912400.git.tahia.khan@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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 Change name of str_rssi to rssi_history within the network_info struct for clarity. Signed-off-by: Tahia Khan Acked-by: Julia Lawall --- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 9712d89..10101f8 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -93,7 +93,7 @@ struct network_info { u8 *ies; u16 ies_len; void *join_params; - struct rssi_history_buffer str_rssi; + struct rssi_history_buffer rssi_history; u64 tsf_hi; }; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 9601ab8..4a6fe90 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -205,11 +205,11 @@ static u32 get_rssi_avg(struct network_info *network_info) { u8 i; int rssi_v = 0; - u8 num_rssi = (network_info->str_rssi.full) ? - NUM_RSSI : (network_info->str_rssi.index); + u8 num_rssi = (network_info->rssi_history.full) ? + NUM_RSSI : (network_info->rssi_history.index); for (i = 0; i < num_rssi; i++) - rssi_v += network_info->str_rssi.samples[i]; + rssi_v += network_info->rssi_history.samples[i]; rssi_v /= num_rssi; return rssi_v; @@ -346,13 +346,13 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo, } else { ap_index = ap_found; } - rssi_index = last_scanned_shadow[ap_index].str_rssi.index; - last_scanned_shadow[ap_index].str_rssi.samples[rssi_index++] = pstrNetworkInfo->rssi; + rssi_index = last_scanned_shadow[ap_index].rssi_history.index; + last_scanned_shadow[ap_index].rssi_history.samples[rssi_index++] = pstrNetworkInfo->rssi; if (rssi_index == NUM_RSSI) { rssi_index = 0; - last_scanned_shadow[ap_index].str_rssi.full = true; + last_scanned_shadow[ap_index].rssi_history.full = true; } - last_scanned_shadow[ap_index].str_rssi.index = rssi_index; + last_scanned_shadow[ap_index].rssi_history.index = rssi_index; last_scanned_shadow[ap_index].rssi = pstrNetworkInfo->rssi; last_scanned_shadow[ap_index].cap_info = pstrNetworkInfo->cap_info; last_scanned_shadow[ap_index].ssid_len = pstrNetworkInfo->ssid_len;