aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_main.c32
-rw-r--r--drivers/net/bonding/bonding.h7
-rw-r--r--drivers/net/e100.c6
-rw-r--r--drivers/net/ns83820.c13
-rw-r--r--drivers/net/s2io.c43
-rw-r--r--drivers/net/wireless/airo.c36
-rw-r--r--drivers/net/wireless/airo_cs.c6
-rw-r--r--drivers/net/wireless/atmel.c2
-rw-r--r--drivers/net/wireless/atmel_cs.c6
-rw-r--r--drivers/net/wireless/ipw2100.c4
-rw-r--r--drivers/net/wireless/prism54/isl_38xx.c12
-rw-r--r--drivers/net/wireless/prism54/islpci_eth.c10
-rw-r--r--drivers/net/wireless/wavelan_cs.c3
-rw-r--r--drivers/net/wireless/wl3501_cs.c3
-rw-r--r--include/linux/eeprom.h136
-rw-r--r--net/ieee80211/ieee80211_rx.c2
16 files changed, 72 insertions, 249 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 8032126fd589..94cec3cf2a13 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1604,35 +1604,27 @@ static int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_
1604 (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) 1604 (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM)
1605 1605
1606/* 1606/*
1607 * Compute the features available to the bonding device by 1607 * Compute the common dev->feature set available to all slaves. Some
1608 * intersection of all of the slave devices' BOND_INTERSECT_FEATURES. 1608 * feature bits are managed elsewhere, so preserve feature bits set on
1609 * Call this after attaching or detaching a slave to update the 1609 * master device that are not part of the examined set.
1610 * bond's features.
1611 */ 1610 */
1612static int bond_compute_features(struct bonding *bond) 1611static int bond_compute_features(struct bonding *bond)
1613{ 1612{
1614 int i; 1613 unsigned long features = BOND_INTERSECT_FEATURES;
1615 struct slave *slave; 1614 struct slave *slave;
1616 struct net_device *bond_dev = bond->dev; 1615 struct net_device *bond_dev = bond->dev;
1617 int features = bond->bond_features; 1616 int i;
1618 1617
1619 bond_for_each_slave(bond, slave, i) { 1618 bond_for_each_slave(bond, slave, i)
1620 struct net_device * slave_dev = slave->dev; 1619 features &= (slave->dev->features & BOND_INTERSECT_FEATURES);
1621 if (i == 0) {
1622 features |= BOND_INTERSECT_FEATURES;
1623 }
1624 features &=
1625 ~(~slave_dev->features & BOND_INTERSECT_FEATURES);
1626 }
1627 1620
1628 /* turn off NETIF_F_SG if we need a csum and h/w can't do it */
1629 if ((features & NETIF_F_SG) && 1621 if ((features & NETIF_F_SG) &&
1630 !(features & (NETIF_F_IP_CSUM | 1622 !(features & (NETIF_F_IP_CSUM |
1631 NETIF_F_NO_CSUM | 1623 NETIF_F_NO_CSUM |
1632 NETIF_F_HW_CSUM))) { 1624 NETIF_F_HW_CSUM)))
1633 features &= ~NETIF_F_SG; 1625 features &= ~NETIF_F_SG;
1634 }
1635 1626
1627 features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES);
1636 bond_dev->features = features; 1628 bond_dev->features = features;
1637 1629
1638 return 0; 1630 return 0;
@@ -4561,8 +4553,6 @@ static int __init bond_init(struct net_device *bond_dev, struct bond_params *par
4561 NETIF_F_HW_VLAN_RX | 4553 NETIF_F_HW_VLAN_RX |
4562 NETIF_F_HW_VLAN_FILTER); 4554 NETIF_F_HW_VLAN_FILTER);
4563 4555
4564 bond->bond_features = bond_dev->features;
4565
4566#ifdef CONFIG_PROC_FS 4556#ifdef CONFIG_PROC_FS
4567 bond_create_proc_entry(bond); 4557 bond_create_proc_entry(bond);
4568#endif 4558#endif
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index bbf9da8af624..1433e91db0f7 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -40,8 +40,8 @@
40#include "bond_3ad.h" 40#include "bond_3ad.h"
41#include "bond_alb.h" 41#include "bond_alb.h"
42 42
43#define DRV_VERSION "2.6.4" 43#define DRV_VERSION "2.6.5"
44#define DRV_RELDATE "September 26, 2005" 44#define DRV_RELDATE "November 4, 2005"
45#define DRV_NAME "bonding" 45#define DRV_NAME "bonding"
46#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" 46#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
47 47
@@ -211,9 +211,6 @@ struct bonding {
211 struct bond_params params; 211 struct bond_params params;
212 struct list_head vlan_list; 212 struct list_head vlan_list;
213 struct vlan_group *vlgrp; 213 struct vlan_group *vlgrp;
214 /* the features the bonding device supports, independently
215 * of any slaves */
216 int bond_features;
217}; 214};
218 215
219/** 216/**
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index eb169a8e8773..7a6aeae2c9fa 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1478,7 +1478,7 @@ static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
1478 1478
1479 if(pci_dma_mapping_error(rx->dma_addr)) { 1479 if(pci_dma_mapping_error(rx->dma_addr)) {
1480 dev_kfree_skb_any(rx->skb); 1480 dev_kfree_skb_any(rx->skb);
1481 rx->skb = 0; 1481 rx->skb = NULL;
1482 rx->dma_addr = 0; 1482 rx->dma_addr = 0;
1483 return -ENOMEM; 1483 return -ENOMEM;
1484 } 1484 }
@@ -1764,7 +1764,7 @@ static int e100_up(struct nic *nic)
1764 if((err = e100_hw_init(nic))) 1764 if((err = e100_hw_init(nic)))
1765 goto err_clean_cbs; 1765 goto err_clean_cbs;
1766 e100_set_multicast_list(nic->netdev); 1766 e100_set_multicast_list(nic->netdev);
1767 e100_start_receiver(nic, 0); 1767 e100_start_receiver(nic, NULL);
1768 mod_timer(&nic->watchdog, jiffies); 1768 mod_timer(&nic->watchdog, jiffies);
1769 if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, 1769 if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ,
1770 nic->netdev->name, nic->netdev))) 1770 nic->netdev->name, nic->netdev)))
@@ -1844,7 +1844,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
1844 mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 1844 mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR,
1845 BMCR_LOOPBACK); 1845 BMCR_LOOPBACK);
1846 1846
1847 e100_start_receiver(nic, 0); 1847 e100_start_receiver(nic, NULL);
1848 1848
1849 if(!(skb = dev_alloc_skb(ETH_DATA_LEN))) { 1849 if(!(skb = dev_alloc_skb(ETH_DATA_LEN))) {
1850 err = -ENOMEM; 1850 err = -ENOMEM;
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index a3c3fc9c0d8a..f857ae94d261 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -110,7 +110,6 @@
110#include <linux/init.h> 110#include <linux/init.h>
111#include <linux/ip.h> /* for iph */ 111#include <linux/ip.h> /* for iph */
112#include <linux/in.h> /* for IPPROTO_... */ 112#include <linux/in.h> /* for IPPROTO_... */
113#include <linux/eeprom.h>
114#include <linux/compiler.h> 113#include <linux/compiler.h>
115#include <linux/prefetch.h> 114#include <linux/prefetch.h>
116#include <linux/ethtool.h> 115#include <linux/ethtool.h>
@@ -445,7 +444,6 @@ struct ns83820 {
445 444
446 u32 MEAR_cache; 445 u32 MEAR_cache;
447 u32 IMR_cache; 446 u32 IMR_cache;
448 struct eeprom ee;
449 447
450 unsigned linkstate; 448 unsigned linkstate;
451 449
@@ -1558,15 +1556,13 @@ static void ns83820_getmac(struct ns83820 *dev, u8 *mac)
1558 unsigned i; 1556 unsigned i;
1559 for (i=0; i<3; i++) { 1557 for (i=0; i<3; i++) {
1560 u32 data; 1558 u32 data;
1561#if 0 /* I've left this in as an example of how to use eeprom.h */ 1559
1562 data = eeprom_readw(&dev->ee, 0xa + 2 - i);
1563#else
1564 /* Read from the perfect match memory: this is loaded by 1560 /* Read from the perfect match memory: this is loaded by
1565 * the chip from the EEPROM via the EELOAD self test. 1561 * the chip from the EEPROM via the EELOAD self test.
1566 */ 1562 */
1567 writel(i*2, dev->base + RFCR); 1563 writel(i*2, dev->base + RFCR);
1568 data = readl(dev->base + RFDR); 1564 data = readl(dev->base + RFDR);
1569#endif 1565
1570 *mac++ = data; 1566 *mac++ = data;
1571 *mac++ = data >> 8; 1567 *mac++ = data >> 8;
1572 } 1568 }
@@ -1851,8 +1847,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1851 spin_lock_init(&dev->misc_lock); 1847 spin_lock_init(&dev->misc_lock);
1852 dev->pci_dev = pci_dev; 1848 dev->pci_dev = pci_dev;
1853 1849
1854 dev->ee.cache = &dev->MEAR_cache;
1855 dev->ee.lock = &dev->misc_lock;
1856 SET_MODULE_OWNER(ndev); 1850 SET_MODULE_OWNER(ndev);
1857 SET_NETDEV_DEV(ndev, &pci_dev->dev); 1851 SET_NETDEV_DEV(ndev, &pci_dev->dev);
1858 1852
@@ -1887,9 +1881,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1887 1881
1888 dev->IMR_cache = 0; 1882 dev->IMR_cache = 0;
1889 1883
1890 setup_ee_mem_bitbanger(&dev->ee, dev->base + MEAR, 3, 2, 1, 0,
1891 0);
1892
1893 err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, 1884 err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ,
1894 DRV_NAME, ndev); 1885 DRV_NAME, ndev);
1895 if (err) { 1886 if (err) {
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 0745dd9d01f3..24b7233a803c 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -1532,7 +1532,7 @@ static int init_nic(struct s2io_nic *nic)
1532#define LINK_UP_DOWN_INTERRUPT 1 1532#define LINK_UP_DOWN_INTERRUPT 1
1533#define MAC_RMAC_ERR_TIMER 2 1533#define MAC_RMAC_ERR_TIMER 2
1534 1534
1535int s2io_link_fault_indication(nic_t *nic) 1535static int s2io_link_fault_indication(nic_t *nic)
1536{ 1536{
1537 if (nic->intr_type != INTA) 1537 if (nic->intr_type != INTA)
1538 return MAC_RMAC_ERR_TIMER; 1538 return MAC_RMAC_ERR_TIMER;
@@ -1864,7 +1864,7 @@ static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag)
1864 * 1864 *
1865 */ 1865 */
1866 1866
1867void fix_mac_address(nic_t * sp) 1867static void fix_mac_address(nic_t * sp)
1868{ 1868{
1869 XENA_dev_config_t __iomem *bar0 = sp->bar0; 1869 XENA_dev_config_t __iomem *bar0 = sp->bar0;
1870 u64 val64; 1870 u64 val64;
@@ -2160,7 +2160,7 @@ int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
2160 * SUCCESS on success or an appropriate -ve value on failure. 2160 * SUCCESS on success or an appropriate -ve value on failure.
2161 */ 2161 */
2162 2162
2163int fill_rx_buffers(struct s2io_nic *nic, int ring_no) 2163static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
2164{ 2164{
2165 struct net_device *dev = nic->dev; 2165 struct net_device *dev = nic->dev;
2166 struct sk_buff *skb; 2166 struct sk_buff *skb;
@@ -2831,7 +2831,7 @@ static void alarm_intr_handler(struct s2io_nic *nic)
2831 * SUCCESS on success and FAILURE on failure. 2831 * SUCCESS on success and FAILURE on failure.
2832 */ 2832 */
2833 2833
2834int wait_for_cmd_complete(nic_t * sp) 2834static int wait_for_cmd_complete(nic_t * sp)
2835{ 2835{
2836 XENA_dev_config_t __iomem *bar0 = sp->bar0; 2836 XENA_dev_config_t __iomem *bar0 = sp->bar0;
2837 int ret = FAILURE, cnt = 0; 2837 int ret = FAILURE, cnt = 0;
@@ -3077,7 +3077,7 @@ int s2io_set_swapper(nic_t * sp)
3077 return SUCCESS; 3077 return SUCCESS;
3078} 3078}
3079 3079
3080int wait_for_msix_trans(nic_t *nic, int i) 3080static int wait_for_msix_trans(nic_t *nic, int i)
3081{ 3081{
3082 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3082 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
3083 u64 val64; 3083 u64 val64;
@@ -3116,7 +3116,7 @@ void restore_xmsi_data(nic_t *nic)
3116 } 3116 }
3117} 3117}
3118 3118
3119void store_xmsi_data(nic_t *nic) 3119static void store_xmsi_data(nic_t *nic)
3120{ 3120{
3121 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; 3121 XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
3122 u64 val64, addr, data; 3122 u64 val64, addr, data;
@@ -3288,7 +3288,7 @@ int s2io_enable_msi_x(nic_t *nic)
3288 * file on failure. 3288 * file on failure.
3289 */ 3289 */
3290 3290
3291int s2io_open(struct net_device *dev) 3291static int s2io_open(struct net_device *dev)
3292{ 3292{
3293 nic_t *sp = dev->priv; 3293 nic_t *sp = dev->priv;
3294 int err = 0; 3294 int err = 0;
@@ -3418,7 +3418,7 @@ hw_init_failed:
3418 * file on failure. 3418 * file on failure.
3419 */ 3419 */
3420 3420
3421int s2io_close(struct net_device *dev) 3421static int s2io_close(struct net_device *dev)
3422{ 3422{
3423 nic_t *sp = dev->priv; 3423 nic_t *sp = dev->priv;
3424 int i; 3424 int i;
@@ -3467,7 +3467,7 @@ int s2io_close(struct net_device *dev)
3467 * 0 on success & 1 on failure. 3467 * 0 on success & 1 on failure.
3468 */ 3468 */
3469 3469
3470int s2io_xmit(struct sk_buff *skb, struct net_device *dev) 3470static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3471{ 3471{
3472 nic_t *sp = dev->priv; 3472 nic_t *sp = dev->priv;
3473 u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off; 3473 u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off;
@@ -3913,7 +3913,7 @@ static void s2io_updt_stats(nic_t *sp)
3913 * pointer to the updated net_device_stats structure. 3913 * pointer to the updated net_device_stats structure.
3914 */ 3914 */
3915 3915
3916struct net_device_stats *s2io_get_stats(struct net_device *dev) 3916static struct net_device_stats *s2io_get_stats(struct net_device *dev)
3917{ 3917{
3918 nic_t *sp = dev->priv; 3918 nic_t *sp = dev->priv;
3919 mac_info_t *mac_control; 3919 mac_info_t *mac_control;
@@ -5106,19 +5106,20 @@ static void s2io_get_ethtool_stats(struct net_device *dev,
5106 tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs; 5106 tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs;
5107} 5107}
5108 5108
5109int s2io_ethtool_get_regs_len(struct net_device *dev) 5109static int s2io_ethtool_get_regs_len(struct net_device *dev)
5110{ 5110{
5111 return (XENA_REG_SPACE); 5111 return (XENA_REG_SPACE);
5112} 5112}
5113 5113
5114 5114
5115u32 s2io_ethtool_get_rx_csum(struct net_device * dev) 5115static u32 s2io_ethtool_get_rx_csum(struct net_device * dev)
5116{ 5116{
5117 nic_t *sp = dev->priv; 5117 nic_t *sp = dev->priv;
5118 5118
5119 return (sp->rx_csum); 5119 return (sp->rx_csum);
5120} 5120}
5121int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) 5121
5122static int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)
5122{ 5123{
5123 nic_t *sp = dev->priv; 5124 nic_t *sp = dev->priv;
5124 5125
@@ -5129,17 +5130,19 @@ int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)
5129 5130
5130 return 0; 5131 return 0;
5131} 5132}
5132int s2io_get_eeprom_len(struct net_device *dev) 5133
5134static int s2io_get_eeprom_len(struct net_device *dev)
5133{ 5135{
5134 return (XENA_EEPROM_SPACE); 5136 return (XENA_EEPROM_SPACE);
5135} 5137}
5136 5138
5137int s2io_ethtool_self_test_count(struct net_device *dev) 5139static int s2io_ethtool_self_test_count(struct net_device *dev)
5138{ 5140{
5139 return (S2IO_TEST_LEN); 5141 return (S2IO_TEST_LEN);
5140} 5142}
5141void s2io_ethtool_get_strings(struct net_device *dev, 5143
5142 u32 stringset, u8 * data) 5144static void s2io_ethtool_get_strings(struct net_device *dev,
5145 u32 stringset, u8 * data)
5143{ 5146{
5144 switch (stringset) { 5147 switch (stringset) {
5145 case ETH_SS_TEST: 5148 case ETH_SS_TEST:
@@ -5155,7 +5158,7 @@ static int s2io_ethtool_get_stats_count(struct net_device *dev)
5155 return (S2IO_STAT_LEN); 5158 return (S2IO_STAT_LEN);
5156} 5159}
5157 5160
5158int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) 5161static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
5159{ 5162{
5160 if (data) 5163 if (data)
5161 dev->features |= NETIF_F_IP_CSUM; 5164 dev->features |= NETIF_F_IP_CSUM;
@@ -5208,7 +5211,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
5208 * function always return EOPNOTSUPPORTED 5211 * function always return EOPNOTSUPPORTED
5209 */ 5212 */
5210 5213
5211int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 5214static int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5212{ 5215{
5213 return -EOPNOTSUPP; 5216 return -EOPNOTSUPP;
5214} 5217}
@@ -5224,7 +5227,7 @@ int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5224 * file on failure. 5227 * file on failure.
5225 */ 5228 */
5226 5229
5227int s2io_change_mtu(struct net_device *dev, int new_mtu) 5230static int s2io_change_mtu(struct net_device *dev, int new_mtu)
5228{ 5231{
5229 nic_t *sp = dev->priv; 5232 nic_t *sp = dev->priv;
5230 5233
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 6afc6e5dee9b..340ab4ee4b67 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4535,9 +4535,8 @@ static int proc_status_open( struct inode *inode, struct file *file ) {
4535 StatusRid status_rid; 4535 StatusRid status_rid;
4536 int i; 4536 int i;
4537 4537
4538 if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 4538 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
4539 return -ENOMEM; 4539 return -ENOMEM;
4540 memset(file->private_data, 0, sizeof(struct proc_data));
4541 data = (struct proc_data *)file->private_data; 4540 data = (struct proc_data *)file->private_data;
4542 if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { 4541 if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) {
4543 kfree (file->private_data); 4542 kfree (file->private_data);
@@ -4615,9 +4614,8 @@ static int proc_stats_rid_open( struct inode *inode,
4615 int i, j; 4614 int i, j;
4616 u32 *vals = stats.vals; 4615 u32 *vals = stats.vals;
4617 4616
4618 if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 4617 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
4619 return -ENOMEM; 4618 return -ENOMEM;
4620 memset(file->private_data, 0, sizeof(struct proc_data));
4621 data = (struct proc_data *)file->private_data; 4619 data = (struct proc_data *)file->private_data;
4622 if ((data->rbuffer = kmalloc( 4096, GFP_KERNEL )) == NULL) { 4620 if ((data->rbuffer = kmalloc( 4096, GFP_KERNEL )) == NULL) {
4623 kfree (file->private_data); 4621 kfree (file->private_data);
@@ -4881,20 +4879,18 @@ static int proc_config_open( struct inode *inode, struct file *file ) {
4881 struct airo_info *ai = dev->priv; 4879 struct airo_info *ai = dev->priv;
4882 int i; 4880 int i;
4883 4881
4884 if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 4882 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
4885 return -ENOMEM; 4883 return -ENOMEM;
4886 memset(file->private_data, 0, sizeof(struct proc_data));
4887 data = (struct proc_data *)file->private_data; 4884 data = (struct proc_data *)file->private_data;
4888 if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { 4885 if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) {
4889 kfree (file->private_data); 4886 kfree (file->private_data);
4890 return -ENOMEM; 4887 return -ENOMEM;
4891 } 4888 }
4892 if ((data->wbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { 4889 if ((data->wbuffer = kzalloc( 2048, GFP_KERNEL )) == NULL) {
4893 kfree (data->rbuffer); 4890 kfree (data->rbuffer);
4894 kfree (file->private_data); 4891 kfree (file->private_data);
4895 return -ENOMEM; 4892 return -ENOMEM;
4896 } 4893 }
4897 memset( data->wbuffer, 0, 2048 );
4898 data->maxwritelen = 2048; 4894 data->maxwritelen = 2048;
4899 data->on_close = proc_config_on_close; 4895 data->on_close = proc_config_on_close;
4900 4896
@@ -5155,24 +5151,21 @@ static int proc_wepkey_open( struct inode *inode, struct file *file ) {
5155 int j=0; 5151 int j=0;
5156 int rc; 5152 int rc;
5157 5153
5158 if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5154 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5159 return -ENOMEM; 5155 return -ENOMEM;
5160 memset(file->private_data, 0, sizeof(struct proc_data));
5161 memset(&wkr, 0, sizeof(wkr)); 5156 memset(&wkr, 0, sizeof(wkr));
5162 data = (struct proc_data *)file->private_data; 5157 data = (struct proc_data *)file->private_data;
5163 if ((data->rbuffer = kmalloc( 180, GFP_KERNEL )) == NULL) { 5158 if ((data->rbuffer = kzalloc( 180, GFP_KERNEL )) == NULL) {
5164 kfree (file->private_data); 5159 kfree (file->private_data);
5165 return -ENOMEM; 5160 return -ENOMEM;
5166 } 5161 }
5167 memset(data->rbuffer, 0, 180);
5168 data->writelen = 0; 5162 data->writelen = 0;
5169 data->maxwritelen = 80; 5163 data->maxwritelen = 80;
5170 if ((data->wbuffer = kmalloc( 80, GFP_KERNEL )) == NULL) { 5164 if ((data->wbuffer = kzalloc( 80, GFP_KERNEL )) == NULL) {
5171 kfree (data->rbuffer); 5165 kfree (data->rbuffer);
5172 kfree (file->private_data); 5166 kfree (file->private_data);
5173 return -ENOMEM; 5167 return -ENOMEM;
5174 } 5168 }
5175 memset( data->wbuffer, 0, 80 );
5176 data->on_close = proc_wepkey_on_close; 5169 data->on_close = proc_wepkey_on_close;
5177 5170
5178 ptr = data->rbuffer; 5171 ptr = data->rbuffer;
@@ -5203,9 +5196,8 @@ static int proc_SSID_open( struct inode *inode, struct file *file ) {
5203 char *ptr; 5196 char *ptr;
5204 SsidRid SSID_rid; 5197 SsidRid SSID_rid;
5205 5198
5206 if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5199 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5207 return -ENOMEM; 5200 return -ENOMEM;
5208 memset(file->private_data, 0, sizeof(struct proc_data));
5209 data = (struct proc_data *)file->private_data; 5201 data = (struct proc_data *)file->private_data;
5210 if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { 5202 if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) {
5211 kfree (file->private_data); 5203 kfree (file->private_data);
@@ -5213,12 +5205,11 @@ static int proc_SSID_open( struct inode *inode, struct file *file ) {
5213 } 5205 }
5214 data->writelen = 0; 5206 data->writelen = 0;
5215 data->maxwritelen = 33*3; 5207 data->maxwritelen = 33*3;
5216 if ((data->wbuffer = kmalloc( 33*3, GFP_KERNEL )) == NULL) { 5208 if ((data->wbuffer = kzalloc( 33*3, GFP_KERNEL )) == NULL) {
5217 kfree (data->rbuffer); 5209 kfree (data->rbuffer);
5218 kfree (file->private_data); 5210 kfree (file->private_data);
5219 return -ENOMEM; 5211 return -ENOMEM;
5220 } 5212 }
5221 memset( data->wbuffer, 0, 33*3 );
5222 data->on_close = proc_SSID_on_close; 5213 data->on_close = proc_SSID_on_close;
5223 5214
5224 readSsidRid(ai, &SSID_rid); 5215 readSsidRid(ai, &SSID_rid);
@@ -5247,9 +5238,8 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5247 char *ptr; 5238 char *ptr;
5248 APListRid APList_rid; 5239 APListRid APList_rid;
5249 5240
5250 if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5241 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5251 return -ENOMEM; 5242 return -ENOMEM;
5252 memset(file->private_data, 0, sizeof(struct proc_data));
5253 data = (struct proc_data *)file->private_data; 5243 data = (struct proc_data *)file->private_data;
5254 if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { 5244 if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) {
5255 kfree (file->private_data); 5245 kfree (file->private_data);
@@ -5257,12 +5247,11 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5257 } 5247 }
5258 data->writelen = 0; 5248 data->writelen = 0;
5259 data->maxwritelen = 4*6*3; 5249 data->maxwritelen = 4*6*3;
5260 if ((data->wbuffer = kmalloc( data->maxwritelen, GFP_KERNEL )) == NULL) { 5250 if ((data->wbuffer = kzalloc( data->maxwritelen, GFP_KERNEL )) == NULL) {
5261 kfree (data->rbuffer); 5251 kfree (data->rbuffer);
5262 kfree (file->private_data); 5252 kfree (file->private_data);
5263 return -ENOMEM; 5253 return -ENOMEM;
5264 } 5254 }
5265 memset( data->wbuffer, 0, data->maxwritelen );
5266 data->on_close = proc_APList_on_close; 5255 data->on_close = proc_APList_on_close;
5267 5256
5268 readAPListRid(ai, &APList_rid); 5257 readAPListRid(ai, &APList_rid);
@@ -5297,9 +5286,8 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
5297 /* If doLoseSync is not 1, we won't do a Lose Sync */ 5286 /* If doLoseSync is not 1, we won't do a Lose Sync */
5298 int doLoseSync = -1; 5287 int doLoseSync = -1;
5299 5288
5300 if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5289 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5301 return -ENOMEM; 5290 return -ENOMEM;
5302 memset(file->private_data, 0, sizeof(struct proc_data));
5303 data = (struct proc_data *)file->private_data; 5291 data = (struct proc_data *)file->private_data;
5304 if ((data->rbuffer = kmalloc( 1024, GFP_KERNEL )) == NULL) { 5292 if ((data->rbuffer = kmalloc( 1024, GFP_KERNEL )) == NULL) {
5305 kfree (file->private_data); 5293 kfree (file->private_data);
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 96ed8da8661d..e328547599dc 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -170,12 +170,11 @@ static dev_link_t *airo_attach(void)
170 DEBUG(0, "airo_attach()\n"); 170 DEBUG(0, "airo_attach()\n");
171 171
172 /* Initialize the dev_link_t structure */ 172 /* Initialize the dev_link_t structure */
173 link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); 173 link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL);
174 if (!link) { 174 if (!link) {
175 printk(KERN_ERR "airo_cs: no memory for new device\n"); 175 printk(KERN_ERR "airo_cs: no memory for new device\n");
176 return NULL; 176 return NULL;
177 } 177 }
178 memset(link, 0, sizeof(struct dev_link_t));
179 178
180 /* Interrupt setup */ 179 /* Interrupt setup */
181 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; 180 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
@@ -194,13 +193,12 @@ static dev_link_t *airo_attach(void)
194 link->conf.IntType = INT_MEMORY_AND_IO; 193 link->conf.IntType = INT_MEMORY_AND_IO;
195 194
196 /* Allocate space for private device-specific data */ 195 /* Allocate space for private device-specific data */
197 local = kmalloc(sizeof(local_info_t), GFP_KERNEL); 196 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
198 if (!local) { 197 if (!local) {
199 printk(KERN_ERR "airo_cs: no memory for new device\n"); 198 printk(KERN_ERR "airo_cs: no memory for new device\n");
200 kfree (link); 199 kfree (link);
201 return NULL; 200 return NULL;
202 } 201 }
203 memset(local, 0, sizeof(local_info_t));
204 link->priv = local; 202 link->priv = local;
205 203
206 /* Register with Card Services */ 204 /* Register with Card Services */
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 1fbe027d26b6..a3e23527fe7f 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -2217,7 +2217,7 @@ static int atmel_get_range(struct net_device *dev,
2217 int k,i,j; 2217 int k,i,j;
2218 2218
2219 dwrq->length = sizeof(struct iw_range); 2219 dwrq->length = sizeof(struct iw_range);
2220 memset(range, 0, sizeof(range)); 2220 memset(range, 0, sizeof(struct iw_range));
2221 range->min_nwid = 0x0000; 2221 range->min_nwid = 0x0000;
2222 range->max_nwid = 0x0000; 2222 range->max_nwid = 0x0000;
2223 range->num_channels = 0; 2223 range->num_channels = 0;
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 195cb36619e8..1bd13146c644 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -180,12 +180,11 @@ static dev_link_t *atmel_attach(void)
180 DEBUG(0, "atmel_attach()\n"); 180 DEBUG(0, "atmel_attach()\n");
181 181
182 /* Initialize the dev_link_t structure */ 182 /* Initialize the dev_link_t structure */
183 link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); 183 link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL);
184 if (!link) { 184 if (!link) {
185 printk(KERN_ERR "atmel_cs: no memory for new device\n"); 185 printk(KERN_ERR "atmel_cs: no memory for new device\n");
186 return NULL; 186 return NULL;
187 } 187 }
188 memset(link, 0, sizeof(struct dev_link_t));
189 188
190 /* Interrupt setup */ 189 /* Interrupt setup */
191 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; 190 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
@@ -204,13 +203,12 @@ static dev_link_t *atmel_attach(void)
204 link->conf.IntType = INT_MEMORY_AND_IO; 203 link->conf.IntType = INT_MEMORY_AND_IO;
205 204
206 /* Allocate space for private device-specific data */ 205 /* Allocate space for private device-specific data */
207 local = kmalloc(sizeof(local_info_t), GFP_KERNEL); 206 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
208 if (!local) { 207 if (!local) {
209 printk(KERN_ERR "atmel_cs: no memory for new device\n"); 208 printk(KERN_ERR "atmel_cs: no memory for new device\n");
210 kfree (link); 209 kfree (link);
211 return NULL; 210 return NULL;
212 } 211 }
213 memset(local, 0, sizeof(local_info_t));
214 link->priv = local; 212 link->priv = local;
215 213
216 /* Register with Card Services */ 214 /* Register with Card Services */
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index ad7f8cd76db9..4f19ac7d63a8 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -6065,13 +6065,11 @@ static int ipw2100_wpa_set_encryption(struct net_device *dev,
6065 6065
6066 ieee80211_crypt_delayed_deinit(ieee, crypt); 6066 ieee80211_crypt_delayed_deinit(ieee, crypt);
6067 6067
6068 new_crypt = (struct ieee80211_crypt_data *) 6068 new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data), GFP_KERNEL);
6069 kmalloc(sizeof(struct ieee80211_crypt_data), GFP_KERNEL);
6070 if (new_crypt == NULL) { 6069 if (new_crypt == NULL) {
6071 ret = -ENOMEM; 6070 ret = -ENOMEM;
6072 goto done; 6071 goto done;
6073 } 6072 }
6074 memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
6075 new_crypt->ops = ops; 6073 new_crypt->ops = ops;
6076 if (new_crypt->ops && try_module_get(new_crypt->ops->owner)) 6074 if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
6077 new_crypt->priv = new_crypt->ops->init(param->u.crypt.idx); 6075 new_crypt->priv = new_crypt->ops->init(param->u.crypt.idx);
diff --git a/drivers/net/wireless/prism54/isl_38xx.c b/drivers/net/wireless/prism54/isl_38xx.c
index adc7499136dc..866c476933c3 100644
--- a/drivers/net/wireless/prism54/isl_38xx.c
+++ b/drivers/net/wireless/prism54/isl_38xx.c
@@ -112,9 +112,10 @@ isl38xx_handle_wakeup(isl38xx_control_block *control_block,
112void 112void
113isl38xx_trigger_device(int asleep, void __iomem *device_base) 113isl38xx_trigger_device(int asleep, void __iomem *device_base)
114{ 114{
115 u32 reg, counter = 0; 115 u32 reg;
116 116
117#if VERBOSE > SHOW_ERROR_MESSAGES 117#if VERBOSE > SHOW_ERROR_MESSAGES
118 u32 counter = 0;
118 struct timeval current_time; 119 struct timeval current_time;
119 DEBUG(SHOW_FUNCTION_CALLS, "isl38xx trigger device\n"); 120 DEBUG(SHOW_FUNCTION_CALLS, "isl38xx trigger device\n");
120#endif 121#endif
@@ -131,7 +132,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
131 current_time.tv_sec, (long)current_time.tv_usec, 132 current_time.tv_sec, (long)current_time.tv_usec,
132 readl(device_base + ISL38XX_CTRL_STAT_REG)); 133 readl(device_base + ISL38XX_CTRL_STAT_REG));
133#endif 134#endif
134 udelay(ISL38XX_WRITEIO_DELAY);
135 135
136 reg = readl(device_base + ISL38XX_INT_IDENT_REG); 136 reg = readl(device_base + ISL38XX_INT_IDENT_REG);
137 if (reg == 0xabadface) { 137 if (reg == 0xabadface) {
@@ -145,7 +145,9 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
145 while (reg = readl(device_base + ISL38XX_CTRL_STAT_REG), 145 while (reg = readl(device_base + ISL38XX_CTRL_STAT_REG),
146 (reg & ISL38XX_CTRL_STAT_SLEEPMODE) == 0) { 146 (reg & ISL38XX_CTRL_STAT_SLEEPMODE) == 0) {
147 udelay(ISL38XX_WRITEIO_DELAY); 147 udelay(ISL38XX_WRITEIO_DELAY);
148#if VERBOSE > SHOW_ERROR_MESSAGES
148 counter++; 149 counter++;
150#endif
149 } 151 }
150 152
151#if VERBOSE > SHOW_ERROR_MESSAGES 153#if VERBOSE > SHOW_ERROR_MESSAGES
@@ -153,10 +155,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
153 "%08li.%08li Device register read %08x\n", 155 "%08li.%08li Device register read %08x\n",
154 current_time.tv_sec, (long)current_time.tv_usec, 156 current_time.tv_sec, (long)current_time.tv_usec,
155 readl(device_base + ISL38XX_CTRL_STAT_REG)); 157 readl(device_base + ISL38XX_CTRL_STAT_REG));
156#endif
157 udelay(ISL38XX_WRITEIO_DELAY);
158
159#if VERBOSE > SHOW_ERROR_MESSAGES
160 do_gettimeofday(&current_time); 158 do_gettimeofday(&current_time);
161 DEBUG(SHOW_TRACING, 159 DEBUG(SHOW_TRACING,
162 "%08li.%08li Device asleep counter %i\n", 160 "%08li.%08li Device asleep counter %i\n",
@@ -171,7 +169,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
171 169
172 /* perform another read on the Device Status Register */ 170 /* perform another read on the Device Status Register */
173 reg = readl(device_base + ISL38XX_CTRL_STAT_REG); 171 reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
174 udelay(ISL38XX_WRITEIO_DELAY);
175 172
176#if VERBOSE > SHOW_ERROR_MESSAGES 173#if VERBOSE > SHOW_ERROR_MESSAGES
177 do_gettimeofday(&current_time); 174 do_gettimeofday(&current_time);
@@ -187,7 +184,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
187 184
188 isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_UPDATE, 185 isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_UPDATE,
189 ISL38XX_DEV_INT_REG); 186 ISL38XX_DEV_INT_REG);
190 udelay(ISL38XX_WRITEIO_DELAY);
191 } 187 }
192} 188}
193 189
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c
index fc1eb3564832..a92ce3af3fa9 100644
--- a/drivers/net/wireless/prism54/islpci_eth.c
+++ b/drivers/net/wireless/prism54/islpci_eth.c
@@ -227,17 +227,17 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
227 priv->data_low_tx_full = 1; 227 priv->data_low_tx_full = 1;
228 } 228 }
229 229
230 /* set the transmission time */
231 ndev->trans_start = jiffies;
232 priv->statistics.tx_packets++;
233 priv->statistics.tx_bytes += skb->len;
234
230 /* trigger the device */ 235 /* trigger the device */
231 islpci_trigger(priv); 236 islpci_trigger(priv);
232 237
233 /* unlock the driver code */ 238 /* unlock the driver code */
234 spin_unlock_irqrestore(&priv->slock, flags); 239 spin_unlock_irqrestore(&priv->slock, flags);
235 240
236 /* set the transmission time */
237 ndev->trans_start = jiffies;
238 priv->statistics.tx_packets++;
239 priv->statistics.tx_bytes += skb->len;
240
241 return 0; 241 return 0;
242 242
243 drop_free: 243 drop_free:
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 4b3c98f5c564..c822cad3333f 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -4608,9 +4608,8 @@ wavelan_attach(void)
4608#endif 4608#endif
4609 4609
4610 /* Initialize the dev_link_t structure */ 4610 /* Initialize the dev_link_t structure */
4611 link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); 4611 link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL);
4612 if (!link) return NULL; 4612 if (!link) return NULL;
4613 memset(link, 0, sizeof(struct dev_link_t));
4614 4613
4615 /* The io structure describes IO port mapping */ 4614 /* The io structure describes IO port mapping */
4616 link->io.NumPorts1 = 8; 4615 link->io.NumPorts1 = 8;
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 3f8c27f0871b..978fdc606781 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1965,10 +1965,9 @@ static dev_link_t *wl3501_attach(void)
1965 int ret; 1965 int ret;
1966 1966
1967 /* Initialize the dev_link_t structure */ 1967 /* Initialize the dev_link_t structure */
1968 link = kmalloc(sizeof(*link), GFP_KERNEL); 1968 link = kzalloc(sizeof(*link), GFP_KERNEL);
1969 if (!link) 1969 if (!link)
1970 goto out; 1970 goto out;
1971 memset(link, 0, sizeof(struct dev_link_t));
1972 1971
1973 /* The io structure describes IO port mapping */ 1972 /* The io structure describes IO port mapping */
1974 link->io.NumPorts1 = 16; 1973 link->io.NumPorts1 = 16;
diff --git a/include/linux/eeprom.h b/include/linux/eeprom.h
deleted file mode 100644
index 38afd9da1dfe..000000000000
--- a/include/linux/eeprom.h
+++ /dev/null
@@ -1,136 +0,0 @@
1/* credit winbond-840.c
2 */
3#include <asm/io.h>
4struct eeprom_ops {
5 void (*set_cs)(void *ee);
6 void (*clear_cs)(void *ee);
7};
8
9#define EEPOL_EEDI 0x01
10#define EEPOL_EEDO 0x02
11#define EEPOL_EECLK 0x04
12#define EEPOL_EESEL 0x08
13
14struct eeprom {
15 void *dev;
16 struct eeprom_ops *ops;
17
18 void __iomem * addr;
19
20 unsigned ee_addr_bits;
21
22 unsigned eesel;
23 unsigned eeclk;
24 unsigned eedo;
25 unsigned eedi;
26 unsigned polarity;
27 unsigned ee_state;
28
29 spinlock_t *lock;
30 u32 *cache;
31};
32
33
34u8 eeprom_readb(struct eeprom *ee, unsigned address);
35void eeprom_read(struct eeprom *ee, unsigned address, u8 *bytes,
36 unsigned count);
37void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data);
38void eeprom_write(struct eeprom *ee, unsigned address, u8 *bytes,
39 unsigned count);
40
41/* The EEPROM commands include the alway-set leading bit. */
42enum EEPROM_Cmds {
43 EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6),
44};
45
46void setup_ee_mem_bitbanger(struct eeprom *ee, void __iomem *memaddr, int eesel_bit, int eeclk_bit, int eedo_bit, int eedi_bit, unsigned polarity)
47{
48 ee->addr = memaddr;
49 ee->eesel = 1 << eesel_bit;
50 ee->eeclk = 1 << eeclk_bit;
51 ee->eedo = 1 << eedo_bit;
52 ee->eedi = 1 << eedi_bit;
53
54 ee->polarity = polarity;
55
56 *ee->cache = readl(ee->addr);
57}
58
59/* foo. put this in a .c file */
60static inline void eeprom_update(struct eeprom *ee, u32 mask, int pol)
61{
62 unsigned long flags;
63 u32 data;
64
65 spin_lock_irqsave(ee->lock, flags);
66 data = *ee->cache;
67
68 data &= ~mask;
69 if (pol)
70 data |= mask;
71
72 *ee->cache = data;
73//printk("update: %08x\n", data);
74 writel(data, ee->addr);
75 spin_unlock_irqrestore(ee->lock, flags);
76}
77
78void eeprom_clk_lo(struct eeprom *ee)
79{
80 int pol = !!(ee->polarity & EEPOL_EECLK);
81
82 eeprom_update(ee, ee->eeclk, pol);
83 udelay(2);
84}
85
86void eeprom_clk_hi(struct eeprom *ee)
87{
88 int pol = !!(ee->polarity & EEPOL_EECLK);
89
90 eeprom_update(ee, ee->eeclk, !pol);
91 udelay(2);
92}
93
94void eeprom_send_addr(struct eeprom *ee, unsigned address)
95{
96 int pol = !!(ee->polarity & EEPOL_EEDI);
97 unsigned i;
98 address |= 6 << 6;
99
100 /* Shift the read command bits out. */
101 for (i=0; i<11; i++) {
102 eeprom_update(ee, ee->eedi, ((address >> 10) & 1) ^ pol);
103 address <<= 1;
104 eeprom_clk_hi(ee);
105 eeprom_clk_lo(ee);
106 }
107 eeprom_update(ee, ee->eedi, pol);
108}
109
110u16 eeprom_readw(struct eeprom *ee, unsigned address)
111{
112 unsigned i;
113 u16 res = 0;
114
115 eeprom_clk_lo(ee);
116 eeprom_update(ee, ee->eesel, 1 ^ !!(ee->polarity & EEPOL_EESEL));
117 eeprom_send_addr(ee, address);
118
119 for (i=0; i<16; i++) {
120 u32 data;
121 eeprom_clk_hi(ee);
122 res <<= 1;
123 data = readl(ee->addr);
124//printk("eeprom_readw: %08x\n", data);
125 res |= !!(data & ee->eedo) ^ !!(ee->polarity & EEPOL_EEDO);
126 eeprom_clk_lo(ee);
127 }
128 eeprom_update(ee, ee->eesel, 0 ^ !!(ee->polarity & EEPOL_EESEL));
129
130 return res;
131}
132
133
134void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data)
135{
136}
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 6ad88218f573..03efaacbdb73 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -369,6 +369,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
369 /* Put this code here so that we avoid duplicating it in all 369 /* Put this code here so that we avoid duplicating it in all
370 * Rx paths. - Jean II */ 370 * Rx paths. - Jean II */
371#ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */ 371#ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */
372#ifdef CONFIG_NET_RADIO
372 /* If spy monitoring on */ 373 /* If spy monitoring on */
373 if (ieee->spy_data.spy_number > 0) { 374 if (ieee->spy_data.spy_number > 0) {
374 struct iw_quality wstats; 375 struct iw_quality wstats;
@@ -395,6 +396,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
395 /* Update spy records */ 396 /* Update spy records */
396 wireless_spy_update(ieee->dev, hdr->addr2, &wstats); 397 wireless_spy_update(ieee->dev, hdr->addr2, &wstats);
397 } 398 }
399#endif /* CONFIG_NET_RADIO */
398#endif /* IW_WIRELESS_SPY */ 400#endif /* IW_WIRELESS_SPY */
399 401
400#ifdef NOT_YET 402#ifdef NOT_YET