cfg80211: fix IBSS default management key
authorJohannes Berg <johannes.berg@intel.com>
Thu, 22 Jul 2010 11:59:15 +0000 (13:59 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Jul 2010 19:32:41 +0000 (15:32 -0400)
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 <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/ibss.c

index adcabba02e20c78199d3913a626fe74f209e002d..27a8ce9343c3e6d7a3bfdd6f801a7e852504a9c3 100644 (file)
@@ -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;