aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-10-18 08:03:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-08 15:54:04 -0500
commit6f09be0ad534160a1931f0c0f92e18a48bd888f9 (patch)
tree51a9b930b4e63871426f0605c2b89f0ae9d6a5ce /drivers/net/wireless/brcm80211
parentd34bf64fd32abfe8141c7206ca6da92832b4fe94 (diff)
brmc80211: fmac: reworked next_bss()
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c11
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h9
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 7f89bad56768..73be2c8d4cee 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,
2057 return err; 2057 return err;
2058} 2058}
2059 2059
2060static struct brcmf_bss_info_le *
2061next_bss_le(struct brcmf_scan_results *list, struct brcmf_bss_info_le *bss)
2062{
2063 if (bss == NULL)
2064 return list->bss_info_le;
2065 return (struct brcmf_bss_info_le *)((unsigned long)bss +
2066 le32_to_cpu(bss->length));
2067}
2068
2060static s32 brcmf_inform_bss(struct brcmf_cfg80211_priv *cfg_priv) 2069static s32 brcmf_inform_bss(struct brcmf_cfg80211_priv *cfg_priv)
2061{ 2070{
2062 struct brcmf_scan_results *bss_list; 2071 struct brcmf_scan_results *bss_list;
@@ -2072,7 +2081,7 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_priv *cfg_priv)
2072 } 2081 }
2073 WL_SCAN("scanned AP count (%d)\n", bss_list->count); 2082 WL_SCAN("scanned AP count (%d)\n", bss_list->count);
2074 for (i = 0; i < bss_list->count && i < WL_AP_MAX; i++) { 2083 for (i = 0; i < bss_list->count && i < WL_AP_MAX; i++) {
2075 bi = next_bss(bss_list, bi); 2084 bi = next_bss_le(bss_list, bi);
2076 err = brcmf_inform_single_bss(cfg_priv, bi); 2085 err = brcmf_inform_single_bss(cfg_priv, bi);
2077 if (err) 2086 if (err)
2078 break; 2087 break;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
index bec30e333b0b..a613b49cb13f 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)
352 return &cfg->conn_info; 352 return &cfg->conn_info;
353} 353}
354 354
355static inline struct brcmf_bss_info_le *
356next_bss(struct brcmf_scan_results *list, struct brcmf_bss_info_le *bss)
357{
358 return bss = bss ?
359 (struct brcmf_bss_info_le *)((unsigned long)bss +
360 le32_to_cpu(bss->length)) :
361 list->bss_info_le;
362}
363
364extern struct brcmf_cfg80211_dev *brcmf_cfg80211_attach(struct net_device *ndev, 355extern struct brcmf_cfg80211_dev *brcmf_cfg80211_attach(struct net_device *ndev,
365 struct device *busdev, 356 struct device *busdev,
366 void *data); 357 void *data);