mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 06:08:22 +00:00
wil6210: support WSC for STA mode
WSC connection is secure (privacy bit set in various frames) but authentication suite, keys etc. are absent. Support this mode in the connect WMI command. Detect WSC by having 'sme->privacy' and no RSN IE. Inform firmware about WSC session by setting dot11_auth_mode to WMI_AUTH11_WSC. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
230d8442f4
commit
27aa6b71d3
1 changed files with 14 additions and 12 deletions
|
@ -402,11 +402,8 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
|
|||
rsn_eid = sme->ie ?
|
||||
cfg80211_find_ie(WLAN_EID_RSN, sme->ie, sme->ie_len) :
|
||||
NULL;
|
||||
|
||||
if (sme->privacy && !rsn_eid) {
|
||||
wil_err(wil, "Missing RSN IE for secure connection\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (sme->privacy && !rsn_eid)
|
||||
wil_info(wil, "WSC connection\n");
|
||||
|
||||
bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid,
|
||||
sme->ssid, sme->ssid_len,
|
||||
|
@ -465,13 +462,18 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
|
|||
goto out;
|
||||
}
|
||||
if (wil->privacy) {
|
||||
conn.dot11_auth_mode = WMI_AUTH11_SHARED;
|
||||
conn.auth_mode = WMI_AUTH_WPA2_PSK;
|
||||
conn.pairwise_crypto_type = WMI_CRYPT_AES_GCMP;
|
||||
conn.pairwise_crypto_len = 16;
|
||||
conn.group_crypto_type = WMI_CRYPT_AES_GCMP;
|
||||
conn.group_crypto_len = 16;
|
||||
} else {
|
||||
if (rsn_eid) { /* regular secure connection */
|
||||
conn.dot11_auth_mode = WMI_AUTH11_SHARED;
|
||||
conn.auth_mode = WMI_AUTH_WPA2_PSK;
|
||||
conn.pairwise_crypto_type = WMI_CRYPT_AES_GCMP;
|
||||
conn.pairwise_crypto_len = 16;
|
||||
conn.group_crypto_type = WMI_CRYPT_AES_GCMP;
|
||||
conn.group_crypto_len = 16;
|
||||
} else { /* WSC */
|
||||
conn.dot11_auth_mode = WMI_AUTH11_WSC;
|
||||
conn.auth_mode = WMI_AUTH_NONE;
|
||||
}
|
||||
} else { /* insecure connection */
|
||||
conn.dot11_auth_mode = WMI_AUTH11_OPEN;
|
||||
conn.auth_mode = WMI_AUTH_NONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue