diff options
Diffstat (limited to 'drivers/net/wireless/atmel.c')
| -rw-r--r-- | drivers/net/wireless/atmel.c | 199 | 
1 files changed, 94 insertions, 105 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 46e382ed46a..1fe41af81a5 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c @@ -28,8 +28,8 @@      GNU General Public License for more details.      You should have received a copy of the GNU General Public License -    along with Atmel wireless lan drivers; if not, write to the Free Software -    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA +    along with Atmel wireless lan drivers; if not, see +    <http://www.gnu.org/licenses/>.      For all queries about this code, please contact the current author,      Simon Kelley <simon@thekelleys.org.uk> and not Atmel Corporation. @@ -39,7 +39,7 @@  ******************************************************************************/ -#include <linux/init.h> +#include <linux/interrupt.h>  #include <linux/kernel.h>  #include <linux/ptrace.h> @@ -49,7 +49,6 @@  #include <linux/timer.h>  #include <asm/byteorder.h>  #include <asm/io.h> -#include <asm/system.h>  #include <asm/uaccess.h>  #include <linux/module.h>  #include <linux/netdevice.h> @@ -63,11 +62,12 @@  #include <net/iw_handler.h>  #include <linux/crc32.h>  #include <linux/proc_fs.h> +#include <linux/seq_file.h>  #include <linux/device.h>  #include <linux/moduleparam.h>  #include <linux/firmware.h>  #include <linux/jiffies.h> -#include <linux/ieee80211.h> +#include <net/cfg80211.h>  #include "atmel.h"  #define DRIVER_MAJOR 0 @@ -439,7 +439,7 @@ static u8 mac_reader[] = {  };  struct atmel_private { -	void *card; /* Bus dependent stucture varies for PCcard */ +	void *card; /* Bus dependent structure varies for PCcard */  	int (*present_callback)(void *); /* And callback which uses it */  	char firmware_id[32];  	AtmelFWType firmware_type; @@ -843,18 +843,18 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)  	if (priv->wep_is_on)  		frame_ctl |= IEEE80211_FCTL_PROTECTED;  	if (priv->operating_mode == IW_MODE_ADHOC) { -		skb_copy_from_linear_data(skb, &header.addr1, 6); -		memcpy(&header.addr2, dev->dev_addr, 6); -		memcpy(&header.addr3, priv->BSSID, 6); +		skb_copy_from_linear_data(skb, &header.addr1, ETH_ALEN); +		memcpy(&header.addr2, dev->dev_addr, ETH_ALEN); +		memcpy(&header.addr3, priv->BSSID, ETH_ALEN);  	} else {  		frame_ctl |= IEEE80211_FCTL_TODS; -		memcpy(&header.addr1, priv->CurrentBSSID, 6); -		memcpy(&header.addr2, dev->dev_addr, 6); -		skb_copy_from_linear_data(skb, &header.addr3, 6); +		memcpy(&header.addr1, priv->CurrentBSSID, ETH_ALEN); +		memcpy(&header.addr2, dev->dev_addr, ETH_ALEN); +		skb_copy_from_linear_data(skb, &header.addr3, ETH_ALEN);  	}  	if (priv->use_wpa) -		memcpy(&header.addr4, SNAP_RFC1024, 6); +		memcpy(&header.addr4, SNAP_RFC1024, ETH_ALEN);  	header.frame_control = cpu_to_le16(frame_ctl);  	/* Copy the wireless header into the card */ @@ -928,11 +928,11 @@ static void fast_rx_path(struct atmel_private *priv,  		}  	} -	memcpy(skbp, header->addr1, 6); /* destination address */ +	memcpy(skbp, header->addr1, ETH_ALEN); /* destination address */  	if (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FROMDS) -		memcpy(&skbp[6], header->addr3, 6); +		memcpy(&skbp[ETH_ALEN], header->addr3, ETH_ALEN);  	else -		memcpy(&skbp[6], header->addr2, 6); /* source address */ +		memcpy(&skbp[ETH_ALEN], header->addr2, ETH_ALEN); /* source address */  	skb->protocol = eth_type_trans(skb, priv->dev);  	skb->ip_summed = CHECKSUM_NONE; @@ -968,14 +968,14 @@ static void frag_rx_path(struct atmel_private *priv,  			 u16 msdu_size, u16 rx_packet_loc, u32 crc, u16 seq_no,  			 u8 frag_no, int more_frags)  { -	u8 mac4[6]; -	u8 source[6]; +	u8 mac4[ETH_ALEN]; +	u8 source[ETH_ALEN];  	struct sk_buff *skb;  	if (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FROMDS) -		memcpy(source, header->addr3, 6); +		memcpy(source, header->addr3, ETH_ALEN);  	else -		memcpy(source, header->addr2, 6); +		memcpy(source, header->addr2, ETH_ALEN);  	rx_packet_loc += 24; /* skip header */ @@ -983,9 +983,9 @@ static void frag_rx_path(struct atmel_private *priv,  		msdu_size -= 4;  	if (frag_no == 0) { /* first fragment */ -		atmel_copy_to_host(priv->dev, mac4, rx_packet_loc, 6); -		msdu_size -= 6; -		rx_packet_loc += 6; +		atmel_copy_to_host(priv->dev, mac4, rx_packet_loc, ETH_ALEN); +		msdu_size -= ETH_ALEN; +		rx_packet_loc += ETH_ALEN;  		if (priv->do_rx_crc)  			crc = crc32_le(crc, mac4, 6); @@ -993,9 +993,9 @@ static void frag_rx_path(struct atmel_private *priv,  		priv->frag_seq = seq_no;  		priv->frag_no = 1;  		priv->frag_len = msdu_size; -		memcpy(priv->frag_source, source, 6); -		memcpy(&priv->rx_buf[6], source, 6); -		memcpy(priv->rx_buf, header->addr1, 6); +		memcpy(priv->frag_source, source, ETH_ALEN); +		memcpy(&priv->rx_buf[ETH_ALEN], source, ETH_ALEN); +		memcpy(priv->rx_buf, header->addr1, ETH_ALEN);  		atmel_copy_to_host(priv->dev, &priv->rx_buf[12], rx_packet_loc, msdu_size); @@ -1005,13 +1005,13 @@ static void frag_rx_path(struct atmel_private *priv,  			atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4);  			if ((crc ^ 0xffffffff) != netcrc) {  				priv->dev->stats.rx_crc_errors++; -				memset(priv->frag_source, 0xff, 6); +				memset(priv->frag_source, 0xff, ETH_ALEN);  			}  		}  	} else if (priv->frag_no == frag_no &&  		   priv->frag_seq == seq_no && -		   memcmp(priv->frag_source, source, 6) == 0) { +		   memcmp(priv->frag_source, source, ETH_ALEN) == 0) {  		atmel_copy_to_host(priv->dev, &priv->rx_buf[12 + priv->frag_len],  				   rx_packet_loc, msdu_size); @@ -1023,7 +1023,7 @@ static void frag_rx_path(struct atmel_private *priv,  			atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4);  			if ((crc ^ 0xffffffff) != netcrc) {  				priv->dev->stats.rx_crc_errors++; -				memset(priv->frag_source, 0xff, 6); +				memset(priv->frag_source, 0xff, ETH_ALEN);  				more_frags = 1; /* don't send broken assembly */  			}  		} @@ -1032,7 +1032,7 @@ static void frag_rx_path(struct atmel_private *priv,  		priv->frag_no++;  		if (!more_frags) { /* last one */ -			memset(priv->frag_source, 0xff, 6); +			memset(priv->frag_source, 0xff, ETH_ALEN);  			if (!(skb = dev_alloc_skb(priv->frag_len + 14))) {  				priv->dev->stats.rx_dropped++;  			} else { @@ -1128,7 +1128,7 @@ static void rx_done_irq(struct atmel_private *priv)  			atmel_copy_to_host(priv->dev, (unsigned char *)&priv->rx_buf, rx_packet_loc + 24, msdu_size);  			/* we use the same buffer for frag reassembly and control packets */ -			memset(priv->frag_source, 0xff, 6); +			memset(priv->frag_source, 0xff, ETH_ALEN);  			if (priv->do_rx_crc) {  				/* last 4 octets is crc */ @@ -1409,30 +1409,28 @@ static int atmel_validate_channel(struct atmel_private *priv, int channel)  	return 0;  } -static int atmel_proc_output (char *buf, struct atmel_private *priv) +static int atmel_proc_show(struct seq_file *m, void *v)  { +	struct atmel_private *priv = m->private;  	int i; -	char *p = buf;  	char *s, *r, *c; -	p += sprintf(p, "Driver version:\t\t%d.%d\n", -		     DRIVER_MAJOR, DRIVER_MINOR); +	seq_printf(m, "Driver version:\t\t%d.%d\n", DRIVER_MAJOR, DRIVER_MINOR);  	if (priv->station_state != STATION_STATE_DOWN) { -		p += sprintf(p, "Firmware version:\t%d.%d build %d\n" -				"Firmware location:\t", -			     priv->host_info.major_version, -			     priv->host_info.minor_version, -			     priv->host_info.build_version); +		seq_printf(m, +			   "Firmware version:\t%d.%d build %d\n" +			   "Firmware location:\t", +			   priv->host_info.major_version, +			   priv->host_info.minor_version, +			   priv->host_info.build_version);  		if (priv->card_type != CARD_TYPE_EEPROM) -			p += sprintf(p, "on card\n"); +			seq_puts(m, "on card\n");  		else if (priv->firmware) -			p += sprintf(p, "%s loaded by host\n", -				     priv->firmware_id); +			seq_printf(m, "%s loaded by host\n", priv->firmware_id);  		else -			p += sprintf(p, "%s loaded by hotplug\n", -				     priv->firmware_id); +			seq_printf(m, "%s loaded by hotplug\n", priv->firmware_id);  		switch (priv->card_type) {  		case CARD_TYPE_PARALLEL_FLASH: @@ -1453,12 +1451,12 @@ static int atmel_proc_output (char *buf, struct atmel_private *priv)  			if (priv->reg_domain == channel_table[i].reg_domain)  				r = channel_table[i].name; -		p += sprintf(p, "MAC memory type:\t%s\n", c); -		p += sprintf(p, "Regulatory domain:\t%s\n", r); -		p += sprintf(p, "Host CRC checking:\t%s\n", -			     priv->do_rx_crc ? "On" : "Off"); -		p += sprintf(p, "WPA-capable firmware:\t%s\n", -			     priv->use_wpa ? "Yes" : "No"); +		seq_printf(m, "MAC memory type:\t%s\n", c); +		seq_printf(m, "Regulatory domain:\t%s\n", r); +		seq_printf(m, "Host CRC checking:\t%s\n", +			 priv->do_rx_crc ? "On" : "Off"); +		seq_printf(m, "WPA-capable firmware:\t%s\n", +			 priv->use_wpa ? "Yes" : "No");  	}  	switch (priv->station_state) { @@ -1490,26 +1488,22 @@ static int atmel_proc_output (char *buf, struct atmel_private *priv)  		s = "<unknown>";  	} -	p += sprintf(p, "Current state:\t\t%s\n", s); -	return p - buf; +	seq_printf(m, "Current state:\t\t%s\n", s); +	return 0;  } -static int atmel_read_proc(char *page, char **start, off_t off, -			   int count, int *eof, void *data) +static int atmel_proc_open(struct inode *inode, struct file *file)  { -	struct atmel_private *priv = data; -	int len = atmel_proc_output (page, priv); -	if (len <= off+count) -		*eof = 1; -	*start = page + off; -	len -= off; -	if (len > count) -		len = count; -	if (len < 0) -		len = 0; -	return len; +	return single_open(file, atmel_proc_show, PDE_DATA(inode));  } +static const struct file_operations atmel_proc_fops = { +	.open		= atmel_proc_open, +	.read		= seq_read, +	.llseek		= seq_lseek, +	.release	= single_release, +}; +  static const struct net_device_ops atmel_netdev_ops = {  	.ndo_open 		= atmel_open,  	.ndo_stop		= atmel_close, @@ -1525,17 +1519,15 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,  				   struct device *sys_dev,  				   int (*card_present)(void *), void *card)  { -	struct proc_dir_entry *ent;  	struct net_device *dev;  	struct atmel_private *priv;  	int rc;  	/* Create the network device object. */  	dev = alloc_etherdev(sizeof(*priv)); -	if (!dev) { -		printk(KERN_ERR "atmel: Couldn't alloc_etherdev\n"); +	if (!dev)  		return NULL; -	} +  	if (dev_alloc_name(dev, dev->name) < 0) {  		printk(KERN_ERR "atmel: Couldn't get name!\n");  		goto err_out_free; @@ -1564,7 +1556,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,  	priv->last_qual = jiffies;  	priv->last_beacon_timestamp = 0;  	memset(priv->frag_source, 0xff, sizeof(priv->frag_source)); -	memset(priv->BSSID, 0, 6); +	memset(priv->BSSID, 0, ETH_ALEN);  	priv->CurrentBSSID[0] = 0xFF; /* Initialize to something invalid.... */  	priv->station_was_associated = 0; @@ -1631,8 +1623,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,  	netif_carrier_off(dev); -	ent = create_proc_read_entry ("driver/atmel", 0, NULL, atmel_read_proc, priv); -	if (!ent) +	if (!proc_create_data("driver/atmel", 0, NULL, &atmel_proc_fops, priv))  		printk(KERN_WARNING "atmel: unable to create /proc entry.\n");  	printk(KERN_INFO "%s: Atmel at76c50x. Version %d.%d. MAC %pM\n", @@ -1726,7 +1717,7 @@ static int atmel_get_wap(struct net_device *dev,  			 char *extra)  {  	struct atmel_private *priv = netdev_priv(dev); -	memcpy(awrq->sa_data, priv->CurrentBSSID, 6); +	memcpy(awrq->sa_data, priv->CurrentBSSID, ETH_ALEN);  	awrq->sa_family = ARPHRD_ETHER;  	return 0; @@ -2282,7 +2273,7 @@ static int atmel_set_freq(struct net_device *dev,  		/* Hack to fall through... */  		fwrq->e = 0; -		fwrq->m = ieee80211_freq_to_dsss_chan(f); +		fwrq->m = ieee80211_frequency_to_channel(f);  	}  	/* Setting by channel number */  	if ((fwrq->m > 1000) || (fwrq->e > 0)) @@ -2364,7 +2355,7 @@ static int atmel_get_scan(struct net_device *dev,  	for (i = 0; i < priv->BSS_list_entries; i++) {  		iwe.cmd = SIOCGIWAP;  		iwe.u.ap_addr.sa_family = ARPHRD_ETHER; -		memcpy(iwe.u.ap_addr.sa_data, priv->BSSinfo[i].BSSID, 6); +		memcpy(iwe.u.ap_addr.sa_data, priv->BSSinfo[i].BSSID, ETH_ALEN);  		current_ev = iwe_stream_add_event(info, current_ev,  						  extra + IW_SCAN_MAX_DATA,  						  &iwe, IW_EV_ADDR_LEN); @@ -2443,8 +2434,8 @@ static int atmel_get_range(struct net_device *dev,  			range->freq[k].i = i; /* List index */  			/* Values in MHz -> * 10^5 * 10 */ -			range->freq[k].m = (ieee80211_dsss_chan_to_freq(i) * -					    100000); +			range->freq[k].m = 100000 * +			 ieee80211_channel_to_frequency(i, IEEE80211_BAND_2GHZ);  			range->freq[k++].e = 1;  		}  		range->num_frequency = k; @@ -2768,7 +2759,7 @@ static void atmel_enter_state(struct atmel_private *priv, int new_state)  static void atmel_scan(struct atmel_private *priv, int specific_ssid)  {  	struct { -		u8 BSSID[6]; +		u8 BSSID[ETH_ALEN];  		u8 SSID[MAX_SSID_LENGTH];  		u8 scan_type;  		u8 channel; @@ -2779,7 +2770,7 @@ static void atmel_scan(struct atmel_private *priv, int specific_ssid)  		u8 SSID_size;  	} cmd; -	memset(cmd.BSSID, 0xff, 6); +	memset(cmd.BSSID, 0xff, ETH_ALEN);  	if (priv->fast_scan) {  		cmd.SSID_size = priv->SSID_size; @@ -2824,7 +2815,7 @@ static void join(struct atmel_private *priv, int type)  	cmd.SSID_size = priv->SSID_size;  	memcpy(cmd.SSID, priv->SSID, priv->SSID_size); -	memcpy(cmd.BSSID, priv->CurrentBSSID, 6); +	memcpy(cmd.BSSID, priv->CurrentBSSID, ETH_ALEN);  	cmd.channel = (priv->channel & 0x7f);  	cmd.BSS_type = type;  	cmd.timeout = cpu_to_le16(2000); @@ -2845,7 +2836,7 @@ static void start(struct atmel_private *priv, int type)  	cmd.SSID_size = priv->SSID_size;  	memcpy(cmd.SSID, priv->SSID, priv->SSID_size); -	memcpy(cmd.BSSID, priv->BSSID, 6); +	memcpy(cmd.BSSID, priv->BSSID, ETH_ALEN);  	cmd.BSS_type = type;  	cmd.channel = (priv->channel & 0x7f); @@ -2891,9 +2882,9 @@ static void send_authentication_request(struct atmel_private *priv, u16 system,  	header.frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH);  	header.duration_id = cpu_to_le16(0x8000);  	header.seq_ctrl = 0; -	memcpy(header.addr1, priv->CurrentBSSID, 6); -	memcpy(header.addr2, priv->dev->dev_addr, 6); -	memcpy(header.addr3, priv->CurrentBSSID, 6); +	memcpy(header.addr1, priv->CurrentBSSID, ETH_ALEN); +	memcpy(header.addr2, priv->dev->dev_addr, ETH_ALEN); +	memcpy(header.addr3, priv->CurrentBSSID, ETH_ALEN);  	if (priv->wep_is_on && priv->CurrentAuthentTransactionSeqNum != 1)  		/* no WEP for authentication frames with TrSeqNo 1 */ @@ -2924,7 +2915,7 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc)  	struct ass_req_format {  		__le16 capability;  		__le16 listen_interval; -		u8 ap[6]; /* nothing after here directly accessible */ +		u8 ap[ETH_ALEN]; /* nothing after here directly accessible */  		u8 ssid_el_id;  		u8 ssid_len;  		u8 ssid[MAX_SSID_LENGTH]; @@ -2938,9 +2929,9 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc)  	header.duration_id = cpu_to_le16(0x8000);  	header.seq_ctrl = 0; -	memcpy(header.addr1, priv->CurrentBSSID, 6); -	memcpy(header.addr2, priv->dev->dev_addr, 6); -	memcpy(header.addr3, priv->CurrentBSSID, 6); +	memcpy(header.addr1, priv->CurrentBSSID, ETH_ALEN); +	memcpy(header.addr2, priv->dev->dev_addr, ETH_ALEN); +	memcpy(header.addr3, priv->CurrentBSSID, ETH_ALEN);  	body.capability = cpu_to_le16(WLAN_CAPABILITY_ESS);  	if (priv->wep_is_on) @@ -2952,11 +2943,11 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc)  	/* current AP address - only in reassoc frame */  	if (is_reassoc) { -		memcpy(body.ap, priv->CurrentBSSID, 6); -		ssid_el_p = (u8 *)&body.ssid_el_id; +		memcpy(body.ap, priv->CurrentBSSID, ETH_ALEN); +		ssid_el_p = &body.ssid_el_id;  		bodysize = 18 + priv->SSID_size;  	} else { -		ssid_el_p = (u8 *)&body.ap[0]; +		ssid_el_p = &body.ap[0];  		bodysize = 12 + priv->SSID_size;  	} @@ -2964,7 +2955,7 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc)  	ssid_el_p[1] = priv->SSID_size;  	memcpy(ssid_el_p + 2, priv->SSID, priv->SSID_size);  	ssid_el_p[2 + priv->SSID_size] = WLAN_EID_SUPP_RATES; -	ssid_el_p[3 + priv->SSID_size] = 4; /* len of suported rates */ +	ssid_el_p[3 + priv->SSID_size] = 4; /* len of supported rates */  	memcpy(ssid_el_p + 4 + priv->SSID_size, atmel_basic_rates, 4);  	atmel_transmit_management_frame(priv, &header, (void *)&body, bodysize); @@ -3029,7 +3020,7 @@ static void store_bss_info(struct atmel_private *priv,  	int i, index;  	for (index = -1, i = 0; i < priv->BSS_list_entries; i++) -		if (memcmp(bss, priv->BSSinfo[i].BSSID, 6) == 0) +		if (memcmp(bss, priv->BSSinfo[i].BSSID, ETH_ALEN) == 0)  			index = i;  	/* If we process a probe and an entry from this BSS exists @@ -3040,7 +3031,7 @@ static void store_bss_info(struct atmel_private *priv,  		if (priv->BSS_list_entries == MAX_BSS_ENTRIES)  			return;  		index = priv->BSS_list_entries++; -		memcpy(priv->BSSinfo[index].BSSID, bss, 6); +		memcpy(priv->BSSinfo[index].BSSID, bss, ETH_ALEN);  		priv->BSSinfo[index].RSSI = rssi;  	} else {  		if (rssi > priv->BSSinfo[index].RSSI) @@ -3220,7 +3211,7 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)  	if (subtype == IEEE80211_STYPE_REASSOC_RESP &&  	    status != WLAN_STATUS_ASSOC_DENIED_RATES &&  	    status != WLAN_STATUS_CAPS_UNSUPPORTED && -	    priv->AssociationRequestRetryCnt < MAX_ASSOCIATION_RETRIES) { +	    priv->ReAssociationRequestRetryCnt < MAX_ASSOCIATION_RETRIES) {  		mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);  		priv->ReAssociationRequestRetryCnt++;  		send_association_request(priv, 1); @@ -3243,7 +3234,7 @@ static void atmel_join_bss(struct atmel_private *priv, int bss_index)  {  	struct bss_info *bss =  &priv->BSSinfo[bss_index]; -	memcpy(priv->CurrentBSSID, bss->BSSID, 6); +	memcpy(priv->CurrentBSSID, bss->BSSID, ETH_ALEN);  	memcpy(priv->SSID, bss->SSID, priv->SSID_size = bss->SSIDsize);  	/* The WPA stuff cares about the current AP address */ @@ -3775,7 +3766,7 @@ static int probe_atmel_card(struct net_device *dev)  				0x00, 0x04, 0x25, 0x00, 0x00, 0x00  			};  			printk(KERN_ALERT "%s: *** Invalid MAC address. UPGRADE Firmware ****\n", dev->name); -			memcpy(dev->dev_addr, default_mac, 6); +			memcpy(dev->dev_addr, default_mac, ETH_ALEN);  		}  	} @@ -3827,7 +3818,7 @@ static void build_wpa_mib(struct atmel_private *priv)  	struct { /* NB this is matched to the hardware, don't change. */  		u8 cipher_default_key_value[MAX_ENCRYPTION_KEYS][MAX_ENCRYPTION_KEY_SIZE]; -		u8 receiver_address[6]; +		u8 receiver_address[ETH_ALEN];  		u8 wep_is_on;  		u8 default_key; /* 0..3 */  		u8 group_key; @@ -3845,7 +3836,7 @@ static void build_wpa_mib(struct atmel_private *priv)  	mib.wep_is_on = priv->wep_is_on;  	mib.exclude_unencrypted = priv->exclude_unencrypted; -	memcpy(mib.receiver_address, priv->CurrentBSSID, 6); +	memcpy(mib.receiver_address, priv->CurrentBSSID, ETH_ALEN);  	/* zero all the keys before adding in valid ones. */  	memset(mib.cipher_default_key_value, 0, sizeof(mib.cipher_default_key_value)); @@ -3895,7 +3886,7 @@ static int reset_atmel_card(struct net_device *dev)  	   This routine is also responsible for initialising some  	   hardware-specific fields in the atmel_private structure, -	   including a copy of the firmware's hostinfo stucture +	   including a copy of the firmware's hostinfo structure  	   which is the route into the rest of the firmware datastructures. */  	struct atmel_private *priv = netdev_priv(dev); @@ -3990,8 +3981,7 @@ static int reset_atmel_card(struct net_device *dev)  			atmel_copy_to_card(priv->dev, 0x8000, &fw[0x6000], len - 0x6000);  		} -		if (fw_entry) -			release_firmware(fw_entry); +		release_firmware(fw_entry);  	}  	err = atmel_wakeup_firmware(priv); @@ -4287,8 +4277,7 @@ static void atmel_wmem32(struct atmel_private *priv, u16 pos, u32 data)      GNU General Public License for more details.      You should have received a copy of the GNU General Public License -    along with AtmelMACFW; if not, write to the Free Software -    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA +    along with AtmelMACFW; if not, see <http://www.gnu.org/licenses/>.  ****************************************************************************/  /* This firmware should work on the 76C502 RFMD, RFMD_D, and RFMD_E        */  | 
