brcmfmac: fix parsing rsn ie for ap mode.
authorHante Meuleman <meuleman@broadcom.com>
Wed, 2 Jan 2013 14:12:39 +0000 (15:12 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jan 2013 19:38:38 +0000 (14:38 -0500)
RSN IEs got incorrectly parsed and therefore ap mode using WPA2
security was not working.

Cc: stable@vger.kernel.org
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index 1261a9b84e04aaf348df15e8bb2ad0e00a213255..75464ad4fbd188ce1fb135302539dfa02caa3fbb 100644 (file)
@@ -3091,10 +3091,11 @@ brcmf_configure_wpaie(struct net_device *ndev, struct brcmf_vs_tlv *wpa_ie,
 
        len = wpa_ie->len + TLV_HDR_LEN;
        data = (u8 *)wpa_ie;
-       offset = 0;
+       offset = TLV_HDR_LEN;
        if (!is_rsn_ie)
                offset += VS_IE_FIXED_HDR_LEN;
-       offset += WPA_IE_VERSION_LEN;
+       else
+               offset += WPA_IE_VERSION_LEN;
 
        /* check for multicast cipher suite */
        if (offset + WPA_IE_MIN_OUI_LEN > len) {