From patchwork Fri Feb 24 05:35:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tahia Khan X-Patchwork-Id: 9589389 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 A1E94601AE for ; Fri, 24 Feb 2017 05:35:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 942252876F for ; Fri, 24 Feb 2017 05:35:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8917E28779; Fri, 24 Feb 2017 05:35:39 +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 437A02876F for ; Fri, 24 Feb 2017 05:35:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751334AbdBXFfW (ORCPT ); Fri, 24 Feb 2017 00:35:22 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:36145 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294AbdBXFfM (ORCPT ); Fri, 24 Feb 2017 00:35:12 -0500 Received: by mail-it0-f68.google.com with SMTP id w185so1737996ita.3; Thu, 23 Feb 2017 21:35: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=A7nzdixwdt+HJaDPd9/9iqiy/LbJbDnB9jXRJJqydU4=; b=QxWy3LuCPdCFbXc14m+W8jPOa4rfjzFJVtJp9ZJtD3Fiw9AeiPwpiqMXndqDGecxdV TS+tvCUjycmPIBPDdvOZiiNkzGzbiAnhUP7zGgkHGRB9IyAQC89ApJj6lYJx0OkqwW1m oXNU4Qimvb1omM0e/vdpMLJdO8fDSa326XUG379o847WTf1BpXPGM5w/Wu9vvfZ4vN7M 7op2REZoH2u8okXdYtdBlbfg/QFG2VaHM0Q0iXRFvaDEmaOjwasBb/dhQaTGalGHZa1y 1RzpHD+JwMn+Fm1HnIHf+F6QTgiQUzjboB0VzyNUBIBlBE3IKIK2Wikp0UniiFXKdq8a /R5A== 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=A7nzdixwdt+HJaDPd9/9iqiy/LbJbDnB9jXRJJqydU4=; b=Co6jMveM12EbpOgxwA011kG/eDqk1PhaPnWhDS6h9478ONmZdp2ms22Pd/TNFqBsrM +yzTXtbje5FfIzT51jvF5DhgnOFY6/xXTepz8cOhneG8BU+cEhvUxpTdHXuMdoiyttaE vKjj2oDtWRCXUgTdOjMUc+WiU/GRMOo6UNKMUQNXEY96fFWx82U4jIs4GKFwc9pwXFCD eijmp5k+5YiexpYfP8SbCD8BXW9AJU57v6waLyFpdWohe+8yQwd8Z5gTol2lBOO0Boix lTWa3uiayBDAemRzi2LFu7lKRoxXBGnp3PLCfn0f8F1r5G4Zvbp00hBshaf6mtLfRRK7 AhWw== X-Gm-Message-State: AMke39n/NPEwx3DKLHaV08lLDu7qnB5mYvHTlCyj7TkSOA9D//iICNn125MDJBgseTIIDw== X-Received: by 10.107.168.74 with SMTP id r71mr1070373ioe.133.1487914506665; Thu, 23 Feb 2017 21:35:06 -0800 (PST) Received: from coolbox (24-212-136-169.cable.teksavvy.com. [24.212.136.169]) by smtp.gmail.com with ESMTPSA id i203sm2747142ioi.45.2017.02.23.21.35.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Feb 2017 21:35:06 -0800 (PST) Date: Fri, 24 Feb 2017 00:35:05 -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 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;