staging: rtl8723au: rtw_check_bcn_info23a(): Use cfg80211 to find WPA info
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c37618360e
commit
f88ca60404
|
@ -867,14 +867,12 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
|
||||||
u16 wpa_len = 0, rsn_len = 0;
|
u16 wpa_len = 0, rsn_len = 0;
|
||||||
u8 encryp_protocol;
|
u8 encryp_protocol;
|
||||||
int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0, r;
|
int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0, r;
|
||||||
u32 wpa_ielen = 0;
|
|
||||||
u32 bcn_channel;
|
u32 bcn_channel;
|
||||||
unsigned short ht_cap_info;
|
unsigned short ht_cap_info;
|
||||||
unsigned char ht_info_infos_0;
|
unsigned char ht_info_infos_0;
|
||||||
int len, pie_len, ie_offset;
|
int len, pie_len, ie_offset;
|
||||||
const u8 *p;
|
const u8 *p;
|
||||||
u8 *pie;
|
u8 *pie;
|
||||||
unsigned char *pbuf;
|
|
||||||
|
|
||||||
if (is_client_associated_to_ap23a(Adapter) == false)
|
if (is_client_associated_to_ap23a(Adapter) == false)
|
||||||
return true;
|
return true;
|
||||||
|
@ -1044,10 +1042,11 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
|
||||||
|
|
||||||
if (encryp_protocol == ENCRYP_PROTOCOL_WPA ||
|
if (encryp_protocol == ENCRYP_PROTOCOL_WPA ||
|
||||||
encryp_protocol == ENCRYP_PROTOCOL_WPA2) {
|
encryp_protocol == ENCRYP_PROTOCOL_WPA2) {
|
||||||
pbuf = rtw_get_wpa_ie23a(&bssid->IEs[12], &wpa_ielen, bssid->IELength-12);
|
p = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
||||||
if (pbuf && (wpa_ielen>0)) {
|
WLAN_OUI_TYPE_MICROSOFT_WPA,
|
||||||
r = rtw_parse_wpa_ie23a(pbuf, wpa_ielen+2,
|
pie, pie_len);
|
||||||
&group_cipher,
|
if (p && p[1] > 0) {
|
||||||
|
r = rtw_parse_wpa_ie23a(p, p[1] + 2, &group_cipher,
|
||||||
&pairwise_cipher, &is_8021x);
|
&pairwise_cipher, &is_8021x);
|
||||||
if (r == _SUCCESS)
|
if (r == _SUCCESS)
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||||
|
@ -1056,10 +1055,10 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
|
||||||
"%d\n", __func__, pairwise_cipher,
|
"%d\n", __func__, pairwise_cipher,
|
||||||
group_cipher, is_8021x));
|
group_cipher, is_8021x));
|
||||||
} else {
|
} else {
|
||||||
pbuf = rtw_get_wpa2_ie23a(&bssid->IEs[12], &wpa_ielen, bssid->IELength-12);
|
p = cfg80211_find_ie(WLAN_EID_RSN, pie, pie_len);
|
||||||
|
|
||||||
if (pbuf && wpa_ielen > 0) {
|
if (p && p[1] > 0) {
|
||||||
r = rtw_parse_wpa2_ie23a(pbuf, wpa_ielen + 2,
|
r = rtw_parse_wpa2_ie23a(p, p[1] + 2,
|
||||||
&group_cipher,
|
&group_cipher,
|
||||||
&pairwise_cipher,
|
&pairwise_cipher,
|
||||||
&is_8021x);
|
&is_8021x);
|
||||||
|
|
Loading…
Reference in a new issue