From patchwork Sun Oct 26 15:10:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mcquade X-Patchwork-Id: 5154731 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 286FDC11AC for ; Sun, 26 Oct 2014 15:10:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D1532034A for ; Sun, 26 Oct 2014 15:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E18552017E for ; Sun, 26 Oct 2014 15:10:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751523AbaJZPK3 (ORCPT ); Sun, 26 Oct 2014 11:10:29 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:43008 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbaJZPK2 (ORCPT ); Sun, 26 Oct 2014 11:10:28 -0400 Received: by mail-wi0-f175.google.com with SMTP id h11so2463514wiw.2 for ; Sun, 26 Oct 2014 08:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=AcUXn248Tc2lKNEodbV2jijJaX95Pron+af8NByrjSU=; b=IRh7B6x2zMFH2Y55gil+I/zM97A9UoMx9wvnLCaW6qb71iqQJZ9KS6S18HGD8icqvW fQugQSGjmLNV3TntcUaKnGtNSH54ThdOIrdFgck7Zn7hHFIie2v2oMVySU4IM3YexSPw SeHVfHG1dW2WbiITKHKkHWIXaAySbYAfw8Nkxck3PUlvTq8rVjKQf+ISsuIjR2zQm2FV PWhuFwQESHdQK9WcMdAEUjl36mzWJfvU6pN10AUI+/Ry85oCqy+o6ZW6JcPgqQWGgO1D 0amvksm1v4Zy4xeac3NqZ9PHBLDIixevJOQXUOI8Q4MjZLj9fogcNoqqPvTPjqfKWuzE OgHw== X-Received: by 10.180.109.99 with SMTP id hr3mr15829093wib.82.1414336226807; Sun, 26 Oct 2014 08:10:26 -0700 (PDT) Received: from paul87-SATELLITE-L850D-12P.Home ([78.18.70.101]) by mx.google.com with ESMTPSA id p2sm8616694wiy.1.2014.10.26.08.10.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Oct 2014 08:10:26 -0700 (PDT) From: Paul McQuade To: paulmcquad@gmail.com Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, gregkh@linuxfoundation.org, Jes.Sorensen@redhat.com, Larry.Finger@lwfinger.net Subject: [PATCH][V2] Staging:rtl8723au: open/closed brace issue Date: Sun, 26 Oct 2014 15:10:22 +0000 Message-Id: <1414336222-2885-1-git-send-email-paulmcquad@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ERROR: that open brace { should be on the previous line Signed-off-by: Paul McQuade --- drivers/staging/rtl8723au/core/rtw_ap.c | 130 ++++++++++---------------------- 1 file changed, 40 insertions(+), 90 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index 6b4092f..6b69bfe 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -231,12 +231,10 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter) psta->expire_to--; } - if (psta->expire_to <= 0) - { + if (psta->expire_to <= 0) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - if (padapter->registrypriv.wifi_spec == 1) - { + if (padapter->registrypriv.wifi_spec == 1) { psta->expire_to = pstapriv->expire_to; continue; } @@ -308,15 +306,13 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter) ret = issue_nulldata23a(padapter, psta->hwaddr, 0, 3, 50); psta->keep_alive_trycnt++; - if (ret == _SUCCESS) - { + if (ret == _SUCCESS) { DBG_8723A("asoc check, sta(" MAC_FMT ") is alive\n", MAC_ARG(psta->hwaddr)); psta->expire_to = pstapriv->expire_to; psta->keep_alive_trycnt = 0; continue; - } - else if (psta->keep_alive_trycnt <= 3) - { + + } else if (psta->keep_alive_trycnt <= 3) { DBG_8723A("ack check for asoc expire, keep_alive_trycnt =%d\n", psta->keep_alive_trycnt); psta->expire_to = 1; continue; @@ -363,8 +359,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l return; /* b/g mode ra_bitmap */ - for (i = 0; i < sizeof(psta->bssrateset); i++) - { + for (i = 0; i < sizeof(psta->bssrateset); i++) { if (psta->bssrateset[i]) tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta->bssrateset[i]&0x7f); } @@ -406,8 +401,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l raid = networktype_to_raid23a(sta_band); init_rate = get_highest_rate_idx23a(tx_ra_bitmap&0x0fffffff)&0x3f; - if (psta->aid < NUM_STA) - { + if (psta->aid < NUM_STA) { u8 arg = 0; arg = psta->mac_id&0x1f; @@ -436,9 +430,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l psta->raid = raid; psta->init_rate = init_rate; - } - else - { + } else { DBG_8723A("station aid %d exceed the max number\n", psta->aid); } } @@ -522,9 +513,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter) psta->state = _FW_LINKED; spin_unlock_bh(&psta->lock); - } - else - { + } else { DBG_8723A("add_RATid23a_bmc_sta error!\n"); } } @@ -561,8 +550,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info /* ERP */ VCS_update23a(padapter, psta); /* HT related cap */ - if (phtpriv_sta->ht_option) - { + if (phtpriv_sta->ht_option) { /* check if sta supports rx ampdu */ phtpriv_sta->ampdu_enable = phtpriv_ap->ampdu_enable; @@ -580,9 +568,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info psta->qos_option = true; - } - else - { + } else { phtpriv_sta->ampdu_enable = false; phtpriv_sta->sgi = false; @@ -1261,8 +1247,7 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx) spin_lock_bh(&pmlmepriv->bcn_update_lock); - switch (ie_id) - { + switch (ie_id) { case 0xFF: /* 8: TimeStamp, 2: Beacon Interval 2:Capability */ update_bcn_fixed_ie(padapter); @@ -1416,110 +1401,85 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - if (!(psta->flags & WLAN_STA_SHORT_PREAMBLE)) - { - if (!psta->no_short_preamble_set) - { + if (!(psta->flags & WLAN_STA_SHORT_PREAMBLE)) { + if (!psta->no_short_preamble_set) { psta->no_short_preamble_set = 1; pmlmepriv->num_sta_no_short_preamble++; if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && - (pmlmepriv->num_sta_no_short_preamble == 1)) - { + (pmlmepriv->num_sta_no_short_preamble == 1)) { beacon_updated = true; update_beacon23a(padapter, 0xFF, NULL, true); } } - } - else - { - if (psta->no_short_preamble_set) - { + } else { + if (psta->no_short_preamble_set) { psta->no_short_preamble_set = 0; pmlmepriv->num_sta_no_short_preamble--; if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && - (pmlmepriv->num_sta_no_short_preamble == 0)) - { + (pmlmepriv->num_sta_no_short_preamble == 0)) { beacon_updated = true; update_beacon23a(padapter, 0xFF, NULL, true); } - } } - if (psta->flags & WLAN_STA_NONERP) - { - if (!psta->nonerp_set) - { + if (psta->flags & WLAN_STA_NONERP) { + if (!psta->nonerp_set) { psta->nonerp_set = 1; pmlmepriv->num_sta_non_erp++; - if (pmlmepriv->num_sta_non_erp == 1) - { + if (pmlmepriv->num_sta_non_erp == 1) { beacon_updated = true; update_beacon23a(padapter, WLAN_EID_ERP_INFO, NULL, true); } } - } - else - { - if (psta->nonerp_set) - { + } else { + if (psta->nonerp_set) { psta->nonerp_set = 0; pmlmepriv->num_sta_non_erp--; - if (pmlmepriv->num_sta_non_erp == 0) - { + if (pmlmepriv->num_sta_non_erp == 0) { beacon_updated = true; update_beacon23a(padapter, WLAN_EID_ERP_INFO, NULL, true); } } - } - if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)) - { - if (!psta->no_short_slot_time_set) - { + if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)) { + if (!psta->no_short_slot_time_set) { psta->no_short_slot_time_set = 1; pmlmepriv->num_sta_no_short_slot_time++; if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && - (pmlmepriv->num_sta_no_short_slot_time == 1)) - { + (pmlmepriv->num_sta_no_short_slot_time == 1)) { beacon_updated = true; update_beacon23a(padapter, 0xFF, NULL, true); } - } - } - else - { - if (psta->no_short_slot_time_set) - { + } else { + if (psta->no_short_slot_time_set) { psta->no_short_slot_time_set = 0; pmlmepriv->num_sta_no_short_slot_time--; if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && - (pmlmepriv->num_sta_no_short_slot_time == 0)) - { + (pmlmepriv->num_sta_no_short_slot_time == 0)) { beacon_updated = true; update_beacon23a(padapter, 0xFF, NULL, true); } } } - if (psta->flags & WLAN_STA_HT) - { + if (psta->flags & WLAN_STA_HT) { u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info); DBG_8723A("HT: STA " MAC_FMT " HT Capabilities " @@ -1552,9 +1512,7 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info pmlmepriv->num_sta_ht_20mhz); } - } - else - { + } else { if (!psta->no_ht_set) { psta->no_ht_set = 1; pmlmepriv->num_sta_no_ht++; @@ -1567,8 +1525,7 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info } } - if (rtw_ht_operation_update(padapter) > 0) - { + if (rtw_ht_operation_update(padapter) > 0) { update_beacon23a(padapter, WLAN_EID_HT_CAPABILITY, NULL, false); update_beacon23a(padapter, WLAN_EID_HT_OPERATION, NULL, true); } @@ -1602,8 +1558,7 @@ u8 bss_cap_update_on_sta_leave23a(struct rtw_adapter *padapter, struct sta_info if (psta->nonerp_set) { psta->nonerp_set = 0; pmlmepriv->num_sta_non_erp--; - if (pmlmepriv->num_sta_non_erp == 0) - { + if (pmlmepriv->num_sta_non_erp == 0) { beacon_updated = true; update_beacon23a(padapter, WLAN_EID_ERP_INFO, NULL, true); @@ -1788,13 +1742,10 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta) psta->qos_option = 0; /* update 802.11n ht cap. */ - if (WLAN_STA_HT&flags) - { + if (WLAN_STA_HT&flags) { psta->htpriv.ht_option = true; psta->qos_option = 1; - } - else - { + } else { psta->htpriv.ht_option = false; } @@ -1807,8 +1758,7 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta) /* called >= TSR LEVEL for USB or SDIO Interface*/ void ap_sta_info_defer_update23a(struct rtw_adapter *padapter, struct sta_info *psta) { - if (psta->state & _FW_LINKED) - { + if (psta->state & _FW_LINKED) { /* add ratid */ add_RATid23a(padapter, psta, 0);/* DM_RATR_STA_INIT */ }