From patchwork Fri Feb 24 22:05:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tahia Khan X-Patchwork-Id: 9591299 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 54A3360471 for ; Fri, 24 Feb 2017 22:06:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5467C28745 for ; Fri, 24 Feb 2017 22:06:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 492B728776; Fri, 24 Feb 2017 22:06:38 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 EBD6628745 for ; Fri, 24 Feb 2017 22:06:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751516AbdBXWGN (ORCPT ); Fri, 24 Feb 2017 17:06:13 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:35770 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdBXWFa (ORCPT ); Fri, 24 Feb 2017 17:05:30 -0500 Received: by mail-io0-f194.google.com with SMTP id v13so368024iov.2; Fri, 24 Feb 2017 14:05:12 -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=nF2svKOxujJjEx0m2xWcazZbhPl+84B/Dv6JFcP02Io=; b=YuENBn7PXN2V066QYq6hsAYZc6xgR1FpuodmNo0SmgCDk22OnIKj89jVNF8iQ0jzvF WxEmUs57+3DGmCQfMlCddmi+a2CUZez7Oi9oI3Qmt0DYzBKE1fQn0g9bLWDLMfT+XO8C KUozwfeCWaYqNDKooTYp+2HaQx0JRRukpg1s2ZRGvK98jzM+NXUOfwHDxgL0C7r9UdAb UcImmTPMNOsOIIUVAAyKOBBChWhQjxpUqson4gu3SD+pnEdj1aC26dGRNwpZ/WPLBHfX faU18due4+/HrNXJVSazDlX2BYt33m21ZpGetayWJfpslwjwFlAzb5RHW/6tccemoek+ 44sg== 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=nF2svKOxujJjEx0m2xWcazZbhPl+84B/Dv6JFcP02Io=; b=Zt+szReqA7RQebafP8HMB13S9DPEYBOUM3h33FMy9IrOMa87QI0vADyCnRt/GZXooA UIX3MqpZSsn/uUGlXRkqnGSyKgoWw21FThc/j3HTuQScn5Edj2JM9BUO5lVXKB/abNpi IidgPiZvTzdJd9LkBRtNpZ0dEAbyv6cGZmEM5iE2auyE434o5e8dWm/w5NALEqMlY7BH Cq4aZCzOSsjEQE+DyZp/gowbwBxTqUYA/Dw09SfgF3BP/S9SEaSyrecT+3VQkbHuKCMO n2YNQ8DeWWE1ok1v4ncNyNkxS+PtJgA5Slng6YOOeQANTWAuGFiAfGJ5F/z2SK4EbbQz GDTQ== X-Gm-Message-State: AMke39kbYRalLp08b+Un36DlUMKxKcPHQ8LZUVK3rwNKAFGmT25LiGFYRcF1+qm1uhW5qQ== X-Received: by 10.107.159.14 with SMTP id i14mr4355604ioe.143.1487973911521; Fri, 24 Feb 2017 14:05:11 -0800 (PST) Received: from coolbox (24-212-136-169.cable.teksavvy.com. [24.212.136.169]) by smtp.gmail.com with ESMTPSA id c100sm1222683itd.20.2017.02.24.14.05.10 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Feb 2017 14:05:11 -0800 (PST) Date: Fri, 24 Feb 2017 17:05:10 -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 v4 3/3] staging: wilc1000: Rename network_info member str_rssi to rssi_history Message-ID: <6fd3f34baa31c00a77e2805d5d8a820b3ac7a43f.1487947616.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;