linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org,
	"Alwin Beukers" <alwin@broadcom.com>,
	"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 15/26] staging: brcm80211: decreased indentation level of brcms_c_wme_setparams function
Date: Tue, 4 Oct 2011 23:19:01 +0200	[thread overview]
Message-ID: <1317763152-17607-16-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1317763152-17607-1-git-send-email-arend@broadcom.com>

From: Alwin Beukers <alwin@broadcom.com>

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/main.c |   40 +++++++++++++----------------
 1 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/main.c b/drivers/staging/brcm80211/brcmsmac/main.c
index d75756d..3349716 100644
--- a/drivers/staging/brcm80211/brcmsmac/main.c
+++ b/drivers/staging/brcm80211/brcmsmac/main.c
@@ -4199,26 +4199,23 @@ void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
 		return;
 	}
 
-	do {
-		memset((char *)&acp_shm, 0, sizeof(struct shm_acparams));
-		/* fill in shm ac params struct */
-		acp_shm.txop = params->txop;
-		/* convert from units of 32us to us for ucode */
-		wlc->edcf_txop[aci & 0x3] = acp_shm.txop =
-		    EDCF_TXOP2USEC(acp_shm.txop);
-		acp_shm.aifs = (params->aifs & EDCF_AIFSN_MASK);
-
-		if (aci == AC_VI && acp_shm.txop == 0
-		    && acp_shm.aifs < EDCF_AIFSN_MAX)
-			acp_shm.aifs++;
-
-		if (acp_shm.aifs < EDCF_AIFSN_MIN
-		    || acp_shm.aifs > EDCF_AIFSN_MAX) {
-			wiphy_err(wlc->wiphy, "wl%d: edcf_setparams: bad "
-				  "aifs %d\n", wlc->pub->unit, acp_shm.aifs);
-			continue;
-		}
-
+	memset((char *)&acp_shm, 0, sizeof(struct shm_acparams));
+	/* fill in shm ac params struct */
+	acp_shm.txop = params->txop;
+	/* convert from units of 32us to us for ucode */
+	wlc->edcf_txop[aci & 0x3] = acp_shm.txop =
+	    EDCF_TXOP2USEC(acp_shm.txop);
+	acp_shm.aifs = (params->aifs & EDCF_AIFSN_MASK);
+
+	if (aci == AC_VI && acp_shm.txop == 0
+	    && acp_shm.aifs < EDCF_AIFSN_MAX)
+		acp_shm.aifs++;
+
+	if (acp_shm.aifs < EDCF_AIFSN_MIN
+	    || acp_shm.aifs > EDCF_AIFSN_MAX) {
+		wiphy_err(wlc->wiphy, "wl%d: edcf_setparams: bad "
+			  "aifs %d\n", wlc->pub->unit, acp_shm.aifs);
+	} else {
 		acp_shm.cwmin = params->cw_min;
 		acp_shm.cwmax = params->cw_max;
 		acp_shm.cwcur = acp_shm.cwmin;
@@ -4239,8 +4236,7 @@ void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
 					  M_EDCF_QINFO +
 					  wme_ac2fifo[aci] * M_EDCF_QLEN + i,
 					  *shm_entry++);
-
-	} while (0);
+	}
 
 	if (suspend)
 		brcms_c_suspend_mac_and_wait(wlc);
-- 
1.7.4.1



  parent reply	other threads:[~2011-10-04 21:19 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-04 21:18 [PATCH 00/26] various cleanup changes for brcmfmac and brcmsmac Arend van Spriel
2011-10-04 21:18 ` [PATCH 01/26] staging: brcm80211: cleaned up struct brcms_bss_cfg Arend van Spriel
2011-10-04 21:18 ` [PATCH 02/26] staging: brcm80211: remove setting ssn to zero upon AMPDU_TX_START Arend van Spriel
2011-10-04 21:18 ` [PATCH 03/26] staging: brcm80211: remove filtering of received frames Arend van Spriel
2011-10-04 21:18 ` [PATCH 04/26] staging: brcm80211: remove brcmu_bprintf and related functions Arend van Spriel
2011-10-04 21:18 ` [PATCH 05/26] staging: brcm80211: replace brcmu_bitcount with hweight8 Arend van Spriel
2011-10-04 21:18 ` [PATCH 06/26] staging: brcm80211: fullmac: fixed double #include Arend van Spriel
2011-10-04 21:18 ` [PATCH 07/26] staging: brcm80211: clean up rtnl_lock in fullmac Arend van Spriel
2011-10-04 21:18 ` [PATCH 08/26] staging: brcm80211: remove fullmac module_param for intr/poll mode Arend van Spriel
2011-10-04 21:18 ` [PATCH 09/26] staging: brcm80211: stop using assigned thread priority in fullmac Arend van Spriel
2011-10-04 21:18 ` [PATCH 10/26] staging: brcm80211: fixed checkpatch warnings Arend van Spriel
2011-10-04 21:18 ` [PATCH 11/26] staging: brcm80211: removed accessor functions for band type and etheraddress Arend van Spriel
2011-10-04 21:18 ` [PATCH 12/26] staging: brcm80211: fixed function returns Arend van Spriel
2011-10-04 21:18 ` [PATCH 13/26] staging: brcm80211: made NULL ethernet address const Arend van Spriel
2011-10-04 21:19 ` [PATCH 14/26] staging: brcm80211: removed empty brcms_c_reset_bmac_done callback function Arend van Spriel
2011-10-04 21:19 ` Arend van Spriel [this message]
2011-10-04 21:19 ` [PATCH 16/26] staging: brcm80211: removed redundant code from brcms_c_set_gmode Arend van Spriel
2011-10-04 21:19 ` [PATCH 17/26] staging: brcm80211: cleanup of shared memory related wrapper functions Arend van Spriel
2011-10-04 21:19 ` [PATCH 18/26] staging: brcm80211: cleanup of transmit buffer size related wrapper function Arend van Spriel
2011-10-04 21:19 ` [PATCH 19/26] staging: brcm80211: cleanup of several wrapper functions Arend van Spriel
2011-10-04 21:19 ` [PATCH 20/26] staging: brcm80211: removed unneeded call to brcms_b_tx_fifo_suspended Arend van Spriel
2011-10-04 21:19 ` [PATCH 21/26] staging: brcm80211: removed synchronisation of wlc->machwcap field Arend van Spriel
2011-10-04 21:19 ` [PATCH 22/26] staging: brcm80211: remove brcms_b_dotxstatus wrapper function Arend van Spriel
2011-10-04 21:19 ` [PATCH 23/26] staging: brcm80211: combined if statements Arend van Spriel
2011-10-04 21:19 ` [PATCH 24/26] staging: brcm80211: remove N mode validation function Arend van Spriel
2011-10-04 21:19 ` [PATCH 25/26] staging: brcm80211: softmac: added event tracing Arend van Spriel
2011-10-04 21:19 ` [PATCH 26/26] staging: brcm80211: smac: fix for 64 bit systems Arend van Spriel
2011-10-05 20:40 ` [PATCH 00/26] various cleanup changes for brcmfmac and brcmsmac Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317763152-17607-16-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=alwin@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).