int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw) 
static int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw) 
int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw){	/* firmware is constructed of N contiguous entries, each entry is	 * structured as:	 *	 * offset    sie         desc	 * 0         4           address to write to	 * 4         2           length of data run         * 6         length      data	 */	unsigned int addr;	unsigned short len;	const unsigned char *firmware_data = fw->fw.data;	unsigned int firmware_data_left = fw->fw.size;	while (firmware_data_left > 0) {	   	addr = *(u32 *)(firmware_data);		firmware_data      += 4;		firmware_data_left -= 4;	   	len = *(u16 *)(firmware_data);		firmware_data      += 2;		firmware_data_left -= 2;		if (len > 32) {			printk(KERN_ERR DRV_NAME ": "			       "Invalid firmware run-length of %d bytes\n",			       len);			return -EINVAL;		}		write_nic_memory(priv->net_dev, addr, len, firmware_data);		firmware_data      += len;		firmware_data_left -= len;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c4aee8c21ff5d8d6f9a27112468f5e840d5ced1b/ipw2100.c/buggy/drivers/net/wireless/ipw2100.c