aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpas_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-04-27 13:47:07 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-27 13:47:07 (GMT)
commita250722f38e3e15d692903cc7a913baaa08f379b (patch)
tree6bd3f4273df9b2289bfb55c6b60db49b37509326 /wpa_supplicant/wpas_glue.c
parent798c7951cf982f361a782b454110c46764d58940 (diff)
downloadhostap-a250722f38e3e15d692903cc7a913baaa08f379b.zip
hostap-a250722f38e3e15d692903cc7a913baaa08f379b.tar.gz
hostap-a250722f38e3e15d692903cc7a913baaa08f379b.tar.bz2
Try to set PMK only with key mgmt offload support in the driver
Previously, it was possible for the set_key() handler to be used with WPA_ALG_PMK even if the driver did not indicate support for key management offload. While this is not really supposed to result in any difference, it makes the debug logs somewhat confusing. Avoid that by using driver capability flag for key management offload as an additional condition for setting the PMK. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpas_glue.c')
-rw-r--r--wpa_supplicant/wpas_glue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index 48a5d69..29c22ba 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -1021,7 +1021,8 @@ static int wpa_supplicant_key_mgmt_set_pmk(void *ctx, const u8 *pmk,
{
struct wpa_supplicant *wpa_s = ctx;
- if (wpa_s->conf->key_mgmt_offload)
+ if (wpa_s->conf->key_mgmt_offload &&
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD))
return wpa_drv_set_key(wpa_s, WPA_ALG_PMK, NULL, 0, 0,
NULL, 0, pmk, pmk_len);
else