提交 9e8b16db 编写于 作者: V Vasanthakumar Thiagarajan 提交者: Kalle Valo

ath6kl: Configure 0 as rsn cap when it is not there in rsn ie

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: NVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 798985c6
...@@ -2582,28 +2582,34 @@ static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon, ...@@ -2582,28 +2582,34 @@ static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
/* skip element id and length */ /* skip element id and length */
rsn_ie += 2; rsn_ie += 2;
/* skip version, group cipher */ /* skip version */
if (rsn_ie_len < 6) if (rsn_ie_len < 2)
return -EINVAL; return -EINVAL;
rsn_ie += 6; rsn_ie += 2;
rsn_ie_len -= 6; 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 */ /* skip pairwise cipher suite */
if (rsn_ie_len < 2) if (rsn_ie_len < 2)
return -EINVAL; return 0;
cnt = get_unaligned_le16(rsn_ie); cnt = get_unaligned_le16(rsn_ie);
rsn_ie += (2 + cnt * 4); rsn_ie += (2 + cnt * 4);
rsn_ie_len -= (2 + cnt * 4); rsn_ie_len -= (2 + cnt * 4);
/* skip akm suite */ /* skip akm suite */
if (rsn_ie_len < 2) if (rsn_ie_len < 2)
return -EINVAL; return 0;
cnt = get_unaligned_le16(rsn_ie); cnt = get_unaligned_le16(rsn_ie);
rsn_ie += (2 + cnt * 4); rsn_ie += (2 + cnt * 4);
rsn_ie_len -= (2 + cnt * 4); rsn_ie_len -= (2 + cnt * 4);
if (rsn_ie_len < 2) if (rsn_ie_len < 2)
return -EINVAL; return 0;
memcpy(rsn_capab, rsn_ie, 2); memcpy(rsn_capab, rsn_ie, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册