]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/orinoco/wext.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[karo-tx-linux.git] / drivers / net / wireless / orinoco / wext.c
index cf7be1eb612495b699dc2e0cdc8fe17650c26736..e793679e2e190c9321d863512e0756fbaa17713b 100644 (file)
@@ -589,8 +589,15 @@ static int orinoco_ioctl_getrate(struct net_device *dev,
 
        /* If the interface is running we try to find more about the
           current mode */
-       if (netif_running(dev))
-               err = orinoco_hw_get_act_bitrate(priv, &bitrate);
+       if (netif_running(dev)) {
+               int act_bitrate;
+               int lerr;
+
+               /* Ignore errors if we can't get the actual bitrate */
+               lerr = orinoco_hw_get_act_bitrate(priv, &act_bitrate);
+               if (!lerr)
+                       bitrate = act_bitrate;
+       }
 
        orinoco_unlock(priv, &flags);
 
@@ -886,6 +893,14 @@ static int orinoco_ioctl_set_auth(struct net_device *dev,
                 */
                break;
 
+       case IW_AUTH_MFP:
+               /* Management Frame Protection not supported.
+                * Only fail if set to required.
+                */
+               if (param->value == IW_AUTH_MFP_REQUIRED)
+                       ret = -EINVAL;
+               break;
+
        case IW_AUTH_KEY_MGMT:
                /* wl_lkm implies value 2 == PSK for Hermes I
                 * which ties in with WEXT
@@ -904,10 +919,10 @@ static int orinoco_ioctl_set_auth(struct net_device *dev,
                 */
                if (param->value) {
                        priv->tkip_cm_active = 1;
-                       ret = hermes_enable_port(hw, 0);
+                       ret = hermes_disable_port(hw, 0);
                } else {
                        priv->tkip_cm_active = 0;
-                       ret = hermes_disable_port(hw, 0);
+                       ret = hermes_enable_port(hw, 0);
                }
                break;