From patchwork Fri Feb 24 22:05:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tahia Khan X-Patchwork-Id: 9591295 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 49E9260471 for ; Fri, 24 Feb 2017 22:06:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 496692872E for ; Fri, 24 Feb 2017 22:06:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E7AC28759; Fri, 24 Feb 2017 22:06: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 AC2F62872E for ; Fri, 24 Feb 2017 22:05:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751461AbdBXWFd (ORCPT ); Fri, 24 Feb 2017 17:05:33 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:34206 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbdBXWFa (ORCPT ); Fri, 24 Feb 2017 17:05:30 -0500 Received: by mail-it0-f66.google.com with SMTP id r141so5684333ita.1; Fri, 24 Feb 2017 14:05:09 -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=n7RIqmlwDla1dls/fmwLSInZSqFA9VcnjlpZs03H+MI=; b=ELuGj1fBRnHSdwaJJXUy/LvItYOkl3QZ9fmT97uW+ilww8yKMi6Gc425ttzRNfEaXD NMdgnSbCqjv8PFEHftuTd9ebDBMoYpDi0TVsO8/dO7ER+3aRNIiIv9lGgOvaH+RDAkoz 9Ywrbs/t/NtBLM2Ao3XqFmHC9EEwIHuInQ6EICXa1zJchHAQHEYTiIr+ZxsATm3ZhQf1 jkqjs0HUuo8RvhQzTs4WTCIs5ARehcDDRYksOfHe3YXrv5YIekaIfiph41adYi6vPWZH ybUWjMPfgwubOd9geruM7Zvvjv3ZhY+UYnB8lInndf1a6ut7uVT8miosu7gtgVYttxE5 iR2A== 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=n7RIqmlwDla1dls/fmwLSInZSqFA9VcnjlpZs03H+MI=; b=eg1ilTfdGs1SU0vgrrBpyUqe/W6+THPvV2y+XsJsoSz3SDxDfsoqmJ4nVQYpsBkZ9O nM7pfUZD5g0Z0ocjEI30RyVUS3xAUN7d8dzUd4mJE9xy5S1kvPCq6vIH/jMg7JYTRxCr ojDooX5F0Qtp+7ob5SQ9qOMXQyVkpMduPgcYaa49UyfaDOyGP4zsWfc6w3hdPO4JjH4c XkYTa82aIWtO4aC4IigH9YYCnQ6t6Drxu6QcVUpR+tVNcVXvxVVQ2qKAzW+wXKmcw0Uz OpaEYLFcbVBPzJZT0YRAoOXmNKzIzxE/XHjRFjSXe23Mey2cefDB4Z43JFuOgur4KELS NWAA== X-Gm-Message-State: AMke39l/Buu3GC1+Vn7+jMjJAYdWJw7DZSK33q0Xlpzv80tIpIGRiJyvz0mEqoUnJGv+bQ== X-Received: by 10.36.219.3 with SMTP id c3mr4643136itg.52.1487973908743; Fri, 24 Feb 2017 14:05:08 -0800 (PST) Received: from coolbox (24-212-136-169.cable.teksavvy.com. [24.212.136.169]) by smtp.gmail.com with ESMTPSA id w77sm3620325ioi.20.2017.02.24.14.05.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Feb 2017 14:05:08 -0800 (PST) Date: Fri, 24 Feb 2017 17:05:07 -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 2/3] staging: wilc1000: Rename tstrRSSI members and change type of u8Full to bool Message-ID: 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 Remove Hungarian notation and camel casing from all tstrRSSI members' names. Additionally, change type of u8Full to bool since it only takes values 1 or 0. Signed-off-by: Tahia Khan Acked-by: Julia Lawall --- drivers/staging/wilc1000/coreconfigurator.h | 6 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 1c77529..9712d89 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -71,9 +71,9 @@ enum connect_status { }; struct rssi_history_buffer { - u8 u8Full; - u8 u8Index; - s8 as8RSSI[NUM_RSSI]; + bool full; + u8 index; + s8 samples[NUM_RSSI]; }; struct network_info { diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index f7ce47c..9601ab8 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.u8Full) ? - NUM_RSSI : (network_info->str_rssi.u8Index); + u8 num_rssi = (network_info->str_rssi.full) ? + NUM_RSSI : (network_info->str_rssi.index); for (i = 0; i < num_rssi; i++) - rssi_v += network_info->str_rssi.as8RSSI[i]; + rssi_v += network_info->str_rssi.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.u8Index; - last_scanned_shadow[ap_index].str_rssi.as8RSSI[rssi_index++] = pstrNetworkInfo->rssi; + rssi_index = last_scanned_shadow[ap_index].str_rssi.index; + last_scanned_shadow[ap_index].str_rssi.samples[rssi_index++] = pstrNetworkInfo->rssi; if (rssi_index == NUM_RSSI) { rssi_index = 0; - last_scanned_shadow[ap_index].str_rssi.u8Full = 1; + last_scanned_shadow[ap_index].str_rssi.full = true; } - last_scanned_shadow[ap_index].str_rssi.u8Index = rssi_index; + last_scanned_shadow[ap_index].str_rssi.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;