Skip to content

Commit

Permalink
ath6kl: Configure 0 as rsn cap when it is not there in rsn ie
Browse files Browse the repository at this point in the history
Currently rsn capability is not set when it is not available in
rsn IE. Set it to 0 in firmware when it is not there in the ie to
make sure host and target are consistent.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Apr 12, 2012
1 parent 798985c commit 9e8b16d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2582,28 +2582,34 @@ static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
/* skip element id and length */
rsn_ie += 2;

/* skip version, group cipher */
if (rsn_ie_len < 6)
/* skip version */
if (rsn_ie_len < 2)
return -EINVAL;
rsn_ie += 6;
rsn_ie_len -= 6;
rsn_ie += 2;
rsn_ie_len -= 2;

/* skip group cipher suite */
if (rsn_ie_len < 4)
return 0;
rsn_ie += 4;
rsn_ie_len -= 4;

/* skip pairwise cipher suite */
if (rsn_ie_len < 2)
return -EINVAL;
return 0;
cnt = get_unaligned_le16(rsn_ie);
rsn_ie += (2 + cnt * 4);
rsn_ie_len -= (2 + cnt * 4);

/* skip akm suite */
if (rsn_ie_len < 2)
return -EINVAL;
return 0;
cnt = get_unaligned_le16(rsn_ie);
rsn_ie += (2 + cnt * 4);
rsn_ie_len -= (2 + cnt * 4);

if (rsn_ie_len < 2)
return -EINVAL;
return 0;

memcpy(rsn_capab, rsn_ie, 2);

Expand Down

0 comments on commit 9e8b16d

Please sign in to comment.