cfg80211: fix channel error on mesh join
authorMarco Porsch <marco.porsch@etit.tu-chemnitz.de>
Mon, 3 Dec 2012 10:23:37 +0000 (11:23 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 3 Dec 2012 10:24:49 +0000 (11:24 +0100)
Fix an error on mesh join when no channel has been
explicitly set beforehand.

Also remove a double semicolon.

Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/mesh.c

index 3ee5a72822839fc945dcad821a24af0defcb5854..f9d6ce5cfabbaebfc202f2d0290d8b1f0fbbc314 100644 (file)
@@ -146,7 +146,8 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
                if (!setup->chandef.chan)
                        return -EINVAL;
 
-               setup->chandef.width = NL80211_CHAN_WIDTH_20_NOHT;;
+               setup->chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
+               setup->chandef.center_freq1 = setup->chandef.chan->center_freq;
        }
 
        if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef))