nl80211: set_key failed; err=-22 (was IEEE 802.11w support in wpa_supplicant ("Management frame protection required, but client did not enable it" error))

Michael Zintakis michael.zintakis
Fri Jun 1 19:41:01 PDT 2012

> Thank you both Jouni and Kalle for your answers.
> I guess I have two choices: 1) either abandon the idea of 11w
> (provided neither compat-wireless nor the TI-supplied WiLink driver
> support that standard, not to mention the actual TI hardware chip) and
> don't waste my time any further with this; or 2) upgrade my smartphone
> and endure the pain associated with such exercise (I have a lot of
> custom-made software on that phone)...
OK, I am resurrecting this...Having changed my entire setup, during
negotiation using "ieee80211w=2"/ "wpa_key_mgmt=WPA-EAP-SHA256" on
hostapd and "ieee80211w=2"/"key_mgmt=WPA-EAP-SHA256" on the supplicant,
all is well, I am connected and authenticated, the 4way handshake
completes and then immediately I get the following error on the
supplicant side after which I get disconnected straight away:

wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
EAPOL: External notification - portValid=1
wlan0: WPA: IGTK keyid 4 pn 000000000000
WPA: IGTK - hexdump(len=16): [REMOVED]
wpa_driver_nl80211_set_key: ifindex=5 alg=4 addr=0x49be68 key_idx=4
set_tx=0 seq_len=6 key_len=16
   broadcast key
nl80211: set_key failed; err=-22 Invalid argument)
wlan0: WPA: Failed to configure IGTK to the driver
wlan0: RSN: Failed to configure IGTK

The above happens after the whole authentication and 4way handshake is
completed. Any idea what might be the cause of this? I am using the
latest wpa_supplicant (v1.0)...

More information about the Hostap mailing list