Merge tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[cascardo/linux.git] / net / wireless / wext-sme.c
index 7decbd3..1f773f6 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;
        }