]> err.no Git - linux-2.6/blobdiff - net/mac80211/wext.c
Merge branch 'hotfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6] / net / mac80211 / wext.c
index 207971e9ad72d60e657216e21cb3967493816329..34fa8ed1e784b4ec727a5d7f651ec5b105b53bb1 100644 (file)
@@ -296,15 +296,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev,
                return -EINVAL;
        }
 
-       if (type == sdata->vif.type)
-               return 0;
-       if (netif_running(dev))
-               return -EBUSY;
-
-       ieee80211_if_reinit(dev);
-       ieee80211_if_set_type(dev, type);
-
-       return 0;
+       return ieee80211_if_change_type(sdata, type);
 }
 
 
@@ -452,7 +444,7 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev,
                memset(sdata->u.ap.ssid + len, 0,
                       IEEE80211_MAX_SSID_LEN - len);
                sdata->u.ap.ssid_len = len;
-               return ieee80211_if_config(dev);
+               return ieee80211_if_config(sdata, IEEE80211_IFCC_SSID);
        }
        return -EOPNOTSUPP;
 }
@@ -627,16 +619,14 @@ static int ieee80211_ioctl_siwrate(struct net_device *dev,
        struct ieee80211_supported_band *sband;
 
        sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-       if (!sdata->bss)
-               return -ENODEV;
 
        sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
 
        /* target_rate = -1, rate->fixed = 0 means auto only, so use all rates
         * target_rate = X, rate->fixed = 1 means only rate X
         * target_rate = X, rate->fixed = 0 means all rates <= X */
-       sdata->bss->max_ratectrl_rateidx = -1;
-       sdata->bss->force_unicast_rateidx = -1;
+       sdata->max_ratectrl_rateidx = -1;
+       sdata->force_unicast_rateidx = -1;
        if (rate->value < 0)
                return 0;
 
@@ -645,9 +635,9 @@ static int ieee80211_ioctl_siwrate(struct net_device *dev,
                int this_rate = brate->bitrate;
 
                if (target_rate == this_rate) {
-                       sdata->bss->max_ratectrl_rateidx = i;
+                       sdata->max_ratectrl_rateidx = i;
                        if (rate->fixed)
-                               sdata->bss->force_unicast_rateidx = i;
+                               sdata->force_unicast_rateidx = i;
                        err = 0;
                        break;
                }