aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-10-12 14:51:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-14 14:48:18 -0400
commitc4e382d23969e97e9d07d1dc7a5b96d068170479 (patch)
treebf1b8a6551388331d7625aaa3c28e4d20305632a /drivers
parent40c8e95af02d29a488d6a6b127f562d9210e6005 (diff)
brcm80211: use endian annotations for assoc ie length request
The driver requests the device for number of ie's in assoc request and response. This needed to be endian annotated. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@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.c9
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h6
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 9e69cd725d59..8e207536e2e9 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -2767,7 +2767,7 @@ static void brcmf_clear_assoc_ies(struct brcmf_cfg80211_priv *cfg_priv)
2767static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_priv *cfg_priv) 2767static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_priv *cfg_priv)
2768{ 2768{
2769 struct net_device *ndev = cfg_to_ndev(cfg_priv); 2769 struct net_device *ndev = cfg_to_ndev(cfg_priv);
2770 struct brcmf_cfg80211_assoc_ielen *assoc_info; 2770 struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
2771 struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg_priv); 2771 struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg_priv);
2772 u32 req_len; 2772 u32 req_len;
2773 u32 resp_len; 2773 u32 resp_len;
@@ -2781,9 +2781,10 @@ static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_priv *cfg_priv)
2781 WL_ERR("could not get assoc info (%d)\n", err); 2781 WL_ERR("could not get assoc info (%d)\n", err);
2782 return err; 2782 return err;
2783 } 2783 }
2784 assoc_info = (struct brcmf_cfg80211_assoc_ielen *)cfg_priv->extra_buf; 2784 assoc_info =
2785 req_len = assoc_info->req_len; 2785 (struct brcmf_cfg80211_assoc_ielen_le *)cfg_priv->extra_buf;
2786 resp_len = assoc_info->resp_len; 2786 req_len = le32_to_cpu(assoc_info->req_len);
2787 resp_len = le32_to_cpu(assoc_info->resp_len);
2787 if (req_len) { 2788 if (req_len) {
2788 err = brcmf_dev_bufvar_get(ndev, "assoc_req_ies", 2789 err = brcmf_dev_bufvar_get(ndev, "assoc_req_ies",
2789 cfg_priv->extra_buf, 2790 cfg_priv->extra_buf,
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
index e69f4f6bf946..62dc46144ede 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
@@ -264,9 +264,9 @@ struct brcmf_cfg80211_connect_info {
264}; 264};
265 265
266/* assoc ie length */ 266/* assoc ie length */
267struct brcmf_cfg80211_assoc_ielen { 267struct brcmf_cfg80211_assoc_ielen_le {
268 u32 req_len; 268 __le32 req_len;
269 u32 resp_len; 269 __le32 resp_len;
270}; 270};
271 271
272/* wpa2 pmk list */ 272/* wpa2 pmk list */