]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'upstream-fixes'
authorJeff Garzik <jgarzik@pobox.com>
Thu, 1 Dec 2005 09:51:26 +0000 (04:51 -0500)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 1 Dec 2005 09:51:26 +0000 (04:51 -0500)
1  2 
drivers/net/wireless/airo.c

index 6c4aa7b6a21ba52fe9200f1c11d13c2028521632,7a92b1cbd6aadf80f8aaef65df9e930df82da984..ee866fd6957de2cf9ed0f3b75a9ca37971c4534b
@@@ -2755,8 -2755,8 +2755,8 @@@ static struct net_device *_init_airo_ca
        SET_NETDEV_DEV(dev, dmdev);
  
  
-       if (test_bit(FLAG_MPI,&ai->flags))
-               reset_card (dev, 1);
+       reset_card (dev, 1);
+       msleep(400);
  
        rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev );
        if (rc) {
@@@ -4037,7 -4037,7 +4037,7 @@@ static int PC4500_writerid(struct airo_
                Cmd cmd;
                Resp rsp;
  
 -              if (test_bit(FLAG_ENABLED, &ai->flags))
 +              if (test_bit(FLAG_ENABLED, &ai->flags) && (RID_WEP_TEMP != rid))
                        printk(KERN_ERR
                                "%s: MAC should be disabled (rid=%04x)\n",
                                __FUNCTION__, rid);
@@@ -5093,9 -5093,9 +5093,9 @@@ static int set_wep_key(struct airo_inf
                printk(KERN_INFO "Setting key %d\n", index);
        }
  
 -      disable_MAC(ai, lock);
 +      if (perm) disable_MAC(ai, lock);
        writeWepKeyRid(ai, &wkr, perm, lock);
 -      enable_MAC(ai, &rsp, lock);
 +      if (perm) enable_MAC(ai, &rsp, lock);
        return 0;
  }
  
@@@ -6170,8 -6170,6 +6170,8 @@@ static int airo_set_encode(struct net_d
  {
        struct airo_info *local = dev->priv;
        CapabilityRid cap_rid;          /* Card capability info */
 +      int perm = ( dwrq->flags & IW_ENCODE_TEMP ? 0 : 1 );
 +      u16 currentAuthType = local->config.authType;
  
        /* Is WEP supported ? */
        readCapabilityRid(local, &cap_rid, 1);
                        /* Copy the key in the driver */
                        memcpy(key.key, extra, dwrq->length);
                        /* Send the key to the card */
 -                      set_wep_key(local, index, key.key, key.len, 1, 1);
 +                      set_wep_key(local, index, key.key, key.len, perm, 1);
                }
                /* WE specify that if a valid key is set, encryption
                 * should be enabled (user may turn it off later)
                if((index == current_index) && (key.len > 0) &&
                   (local->config.authType == AUTH_OPEN)) {
                        local->config.authType = AUTH_ENCRYPT;
 -                      set_bit (FLAG_COMMIT, &local->flags);
                }
        } else {
                /* Do we want to just set the transmit key index ? */
                int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
                if ((index >= 0) && (index < ((cap_rid.softCap & 0x80)?4:1))) {
 -                      set_wep_key(local, index, NULL, 0, 1, 1);
 +                      set_wep_key(local, index, NULL, 0, perm, 1);
                } else
                        /* Don't complain if only change the mode */
                        if(!dwrq->flags & IW_ENCODE_MODE) {
        if(dwrq->flags & IW_ENCODE_OPEN)
                local->config.authType = AUTH_ENCRYPT;  // Only Wep
        /* Commit the changes to flags if needed */
 -      if(dwrq->flags & IW_ENCODE_MODE)
 +      if (local->config.authType != currentAuthType)
                set_bit (FLAG_COMMIT, &local->flags);
        return -EINPROGRESS;            /* Call commit handler */
  }