Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 06/15] brmc80211: fmac: reworked next_bss()
Date: Tue, 18 Oct 2011 14:03:02 +0200	[thread overview]
Message-ID: <1318939391-19495-7-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1318939391-19495-1-git-send-email-arend@broadcom.com>

From: Roland Vossen <rvossen@broadcom.com>

Moved function to where it is called and made it more readable.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |   11 ++++++++++-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.h  |    9 ---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 7f89bad..73be2c8 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -2057,6 +2057,15 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_priv *cfg_priv,
 	return err;
 }
 
+static struct brcmf_bss_info_le *
+next_bss_le(struct brcmf_scan_results *list, struct brcmf_bss_info_le *bss)
+{
+	if (bss == NULL)
+		return list->bss_info_le;
+	return (struct brcmf_bss_info_le *)((unsigned long)bss +
+					    le32_to_cpu(bss->length));
+}
+
 static s32 brcmf_inform_bss(struct brcmf_cfg80211_priv *cfg_priv)
 {
 	struct brcmf_scan_results *bss_list;
@@ -2072,7 +2081,7 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_priv *cfg_priv)
 	}
 	WL_SCAN("scanned AP count (%d)\n", bss_list->count);
 	for (i = 0; i < bss_list->count && i < WL_AP_MAX; i++) {
-		bi = next_bss(bss_list, bi);
+		bi = next_bss_le(bss_list, bi);
 		err = brcmf_inform_single_bss(cfg_priv, bi);
 		if (err)
 			break;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
index bec30e3..a613b49 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
@@ -352,15 +352,6 @@ brcmf_cfg80211_connect_info *cfg_to_conn(struct brcmf_cfg80211_priv *cfg)
 	return &cfg->conn_info;
 }
 
-static inline struct brcmf_bss_info_le *
-next_bss(struct brcmf_scan_results *list, struct brcmf_bss_info_le *bss)
-{
-	return bss = bss ?
-		(struct brcmf_bss_info_le *)((unsigned long)bss +
-				       le32_to_cpu(bss->length)) :
-		list->bss_info_le;
-}
-
 extern struct brcmf_cfg80211_dev *brcmf_cfg80211_attach(struct net_device *ndev,
 							struct device *busdev,
 							void *data);
-- 
1.7.4.1



  parent reply	other threads:[~2011-10-18 12:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18 12:02 [PATCH 00/15] brcm80211: cleanup work on community feedback Arend van Spriel
2011-10-18 12:02 ` [PATCH 01/15] brcm80211: cleanup defines in main.c Arend van Spriel
2011-10-18 12:02 ` [PATCH 02/15] brcm80211: removed duplicate defines Arend van Spriel
2011-10-18 12:02 ` [PATCH 03/15] brcm80211: smac: drop "40MHz intolerant" flag from HT capability info Arend van Spriel
2011-10-18 12:03 ` [PATCH 04/15] brcm80211: smac: removed support for SROM rev < 8 Arend van Spriel
2011-10-18 12:03 ` [PATCH 05/15] brcm80211: fmac: annotated little endian struct with _le Arend van Spriel
2011-10-18 12:03 ` Arend van Spriel [this message]
2011-10-18 12:03 ` [PATCH 07/15] brcm80211: fmac: changed two scan related structures Arend van Spriel
2011-10-18 12:03 ` [PATCH 08/15] brcm80211: smac: indicate severe problems to Mac80211 Arend van Spriel
2011-10-18 12:03 ` [PATCH 09/15] brcm80211: smac: remove obsolete srom variables from n-phy Arend van Spriel
2011-10-18 12:03 ` [PATCH 10/15] brcm80211: smac: avoid sprom endianess conversions for crc8 check Arend van Spriel
2011-10-18 12:03 ` [PATCH 11/15] brcm80211: smac: some local function made static in main.c Arend van Spriel
2011-10-18 12:03 ` [PATCH 12/15] brcm80211: smac: remove phy api bypass in rate.h Arend van Spriel
2011-10-18 12:03 ` [PATCH 13/15] brcm80211: util: move brcmu_pktfrombuf() function to brcmfmac Arend van Spriel
2011-10-18 12:03 ` [PATCH 14/15] brcm80211: util: remove function brcmu_format_hex() from brcmutil Arend van Spriel
2011-10-18 12:03 ` [PATCH 15/15] brcm80211: fmac: use sk_buff list for handling frames in receive path Arend van Spriel

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=1318939391-19495-7-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rvossen@broadcom.com \
    /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