From: Johannes Berg Date: Thu, 22 Jul 2010 11:59:15 +0000 (+0200) Subject: cfg80211: fix IBSS default management key X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3be61a3851c458fb4ce394645e26e8e9670c796a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git cfg80211: fix IBSS default management key When wireless extensions are used to control an encrypted IBSS, we erroneously can try to set the default management key. Fix this. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index adcabba02e2..27a8ce9343c 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c @@ -247,8 +247,10 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, if (!netif_running(wdev->netdev)) return 0; - if (wdev->wext.keys) + if (wdev->wext.keys) { wdev->wext.keys->def = wdev->wext.default_key; + wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key; + } wdev->wext.ibss.privacy = wdev->wext.default_key != -1;