vserver 1.9.5.x5
[linux-2.6.git] / drivers / net / wireless / atmel.c
index 67cbbb7..6460113 100644 (file)
@@ -1267,7 +1267,7 @@ static irqreturn_t service_interrupt(int irq, void *dev_id, struct pt_regs *regs
                                build_wpa_mib(priv);
                        break;
                case ISR_GENERIC_IRQ:
-                       printk(KERN_INFO "%s: Generic_irq recieved.\n", dev->name);
+                       printk(KERN_INFO "%s: Generic_irq received.\n", dev->name);
                        break;
                }
        }       
@@ -1599,7 +1599,7 @@ struct net_device *init_atmel_card( unsigned short irq, int port, char *firmware
        
        netif_carrier_off(dev);
        
-       create_proc_read_entry ("driver/atmel", 0, 0, atmel_read_proc, priv);   
+       create_proc_read_entry ("driver/atmel", 0, NULL, atmel_read_proc, priv);        
        
        printk(KERN_INFO "%s: Atmel at76c50x wireless. Version %d.%d simon@thekelleys.org.uk\n",
               dev->name, DRIVER_MAJOR, DRIVER_MINOR);
@@ -2360,7 +2360,7 @@ static const iw_handler           atmel_private_handler[] =
 
 typedef struct atmel_priv_ioctl {
        char id[32];
-       unsigned char *data;            
+       unsigned char __user *data;             
        unsigned short len;             
 } atmel_priv_ioctl;
 
@@ -2430,12 +2430,13 @@ static int atmel_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                        rc = -ENOMEM;
                        break;
                }
-               
+
                if (copy_from_user(new_firmware, com.data, com.len)) {
+                       kfree(new_firmware);
                        rc = -EFAULT;
                        break;
                }
-               
+
                if (priv->firmware)
                        kfree(priv->firmware);
                
@@ -2566,7 +2567,7 @@ static void join(struct atmel_private *priv, int type)
        struct {
                u8 BSSID[6];
                u8 SSID[MAX_SSID_LENGTH];
-               u8 BSS_type; /* this is a short in a scan command - wierd */                                
+               u8 BSS_type; /* this is a short in a scan command - weird */
                u8 channel;
                u16 timeout;
                u8 SSID_size;
@@ -2647,12 +2648,12 @@ static void send_authentication_request(struct atmel_private *priv, u8 *challeng
        memcpy(header.addr3, priv->CurrentBSSID, 6);
        
        if (priv->wep_is_on) {
-               auth.alg = C80211_MGMT_AAN_SHAREDKEY
+               auth.alg = cpu_to_le16(C80211_MGMT_AAN_SHAREDKEY)
                /* no WEP for authentication frames with TrSeqNo 1 */
                if (priv->CurrentAuthentTransactionSeqNum != 1)
                        header.frame_ctl |=  cpu_to_le16(IEEE802_11_FCTL_WEP); 
        } else {
-               auth.alg = C80211_MGMT_AAN_OPENSYSTEM;
+               auth.alg = cpu_to_le16(C80211_MGMT_AAN_OPENSYSTEM);
        }
 
        auth.status = 0;