[PATCH] ieee80211softmac: Fix setting of initial transmit rates
[powerpc.git] / net / ieee80211 / softmac / ieee80211softmac_wx.c
index 480d72c..89c83fa 100644 (file)
@@ -177,15 +177,10 @@ ieee80211softmac_wx_set_rate(struct net_device *net_dev,
        int err = -EINVAL;
 
        if (in_rate == -1) {
-               /* FIXME: We don't correctly handle backing down to lower
-                  rates, so 801.11g devices start off at 11M for now. People
-                  can manually change it if they really need to, but 11M is
-                  more reliable. Note similar logic in
-                  ieee80211softmac_wx_set_rate() */     
-               if (ieee->modulation & IEEE80211_CCK_MODULATION)
-                       in_rate = 11000000;
+               if (ieee->modulation & IEEE80211_OFDM_MODULATION)
+                       in_rate = 24000000;
                else
-                       in_rate = 54000000;
+                       in_rate = 11000000;
        }
 
        switch (in_rate) {
@@ -463,7 +458,7 @@ ieee80211softmac_wx_get_genie(struct net_device *dev,
                        err = -E2BIG;
        }
        spin_unlock_irqrestore(&mac->lock, flags);
-       mutex_lock(&mac->associnfo.mutex);
+       mutex_unlock(&mac->associnfo.mutex);
 
        return err;
 }