Skip to content

Commit

Permalink
AirportItlwm: Disable MFP capability flag for airport which avoids ad…
Browse files Browse the repository at this point in the history
…ding MFP capable flag on association routine, but we don't really support MFP in the drivers. This patch fix the performance issue on connecting WPA2/WPA3 mixed network(11w optional).
  • Loading branch information
zxystd committed Dec 31, 2021
1 parent 7a0c3fd commit 2156b3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AirportItlwm/AirportItlwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ void AirportItlwm::associateSSID(uint8_t *ssid, uint32_t ssid_len, const struct
wpa.i_protos = IEEE80211_WPA_PROTO_WPA1 | IEEE80211_WPA_PROTO_WPA2;
}

if (authtype_upper & (APPLE80211_AUTHTYPE_WPA_PSK | APPLE80211_AUTHTYPE_WPA2_PSK)) {
if (authtype_upper & (APPLE80211_AUTHTYPE_WPA_PSK | APPLE80211_AUTHTYPE_WPA2_PSK | APPLE80211_AUTHTYPE_SHA256_PSK)) {
XYLog("%s %d\n", __FUNCTION__, __LINE__);
wpa.i_akms |= IEEE80211_WPA_AKM_PSK | IEEE80211_WPA_AKM_SHA256_PSK;
wpa.i_enabled = 1;
memcpy(ic->ic_psk, key, sizeof(ic->ic_psk));
ic->ic_flags |= IEEE80211_F_PSK;
ieee80211_ioctl_setwpaparms(ic, &wpa);
}
if (authtype_upper & (APPLE80211_AUTHTYPE_WPA | APPLE80211_AUTHTYPE_WPA2)) {
if (authtype_upper & (APPLE80211_AUTHTYPE_WPA | APPLE80211_AUTHTYPE_WPA2 | APPLE80211_AUTHTYPE_SHA256_8021X)) {
XYLog("%s %d\n", __FUNCTION__, __LINE__);
wpa.i_akms |= IEEE80211_WPA_AKM_8021X | IEEE80211_WPA_AKM_SHA256_8021X;
wpa.i_enabled = 1;
Expand Down
7 changes: 6 additions & 1 deletion AirportItlwm/AirportSTAIOCTL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,12 @@ getCARD_CAPABILITIES(OSObject *object,
cd->capabilities[4] = 0xAD;
cd->capabilities[5] = 0x80;//isCntryDefaultSupported
cd->capabilities[5] |= 0x0C;
cd->capabilities[6] = 0x8D;
cd->capabilities[6] = (
// 1 | //MFP capable
0x8 |
0x4 |
0x80
);
cd->capabilities[7] = 0x84; // This byte contains Apple Watch unlock
//cd->capabilities[8] = 0x40;
//cd->capabilities[8] |= 8;//dfs white list
Expand Down

0 comments on commit 2156b3d

Please sign in to comment.