diff options
author | Roland Vossen | 2011-10-18 14:03:02 +0200 |
---|---|---|
committer | John W. Linville | 2011-11-08 21:54:04 +0100 |
commit | 6f09be0ad534160a1931f0c0f92e18a48bd888f9 (patch) | |
tree | 51a9b930b4e63871426f0605c2b89f0ae9d6a5ce /drivers | |
parent | brcm80211: fmac: annotated little endian struct with _le (diff) | |
download | kernel-qcow2-linux-6f09be0ad534160a1931f0c0f92e18a48bd888f9.tar.gz kernel-qcow2-linux-6f09be0ad534160a1931f0c0f92e18a48bd888f9.tar.xz kernel-qcow2-linux-6f09be0ad534160a1931f0c0f92e18a48bd888f9.zip |
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')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 11 | ||||
-rw-r--r-- | drivers/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 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, 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 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) 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); |