]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/wireless/wext-sme.c
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[karo-tx-linux.git] / net / wireless / wext-sme.c
index 7decbd357d516161c0c659a093d9066926daac4b..1f773f668d1a557ae2712195ed510c3b9a2405b3 100644 (file)
@@ -111,9 +111,15 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
 
        wdev->wext.connect.channel = chan;
 
-       /* SSID is not set, we just want to switch channel */
+       /*
+        * SSID is not set, we just want to switch monitor channel,
+        * this is really just backward compatibility, if the SSID
+        * is set then we use the channel to select the BSS to use
+        * to connect to instead. If we were connected on another
+        * channel we disconnected above and reconnect below.
+        */
        if (chan && !wdev->wext.connect.ssid_len) {
-               err = cfg80211_set_freq(rdev, wdev, freq, NL80211_CHAN_NO_HT);
+               err = cfg80211_set_monitor_channel(rdev, freq, NL80211_CHAN_NO_HT);
                goto out;
        }