diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-30 11:41:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-30 11:41:36 -0500 |
commit | dbeb17016e4d0affccfa07f4e8f61feac75c5a18 (patch) | |
tree | 0cbda9fb039cb96d7c76cce19e1f792d46cd2a3c /drivers | |
parent | 0461ec5bc7745b89a8ab67ba0ea497abd58a6301 (diff) | |
parent | f99ec0649accb581cf3e8fcfeea796e82d05f4ea (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
tulip: fix 21142 with 10Mbps without negotiation
drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic
gianfar: Fix Wake-on-LAN support
smsc911x: timeout reaches -1
smsc9420: fix interrupt signalling test failures
ucc_geth: Change uec phy id to the same format as gianfar's
wimax: fix build issue when debugfs is disabled
netxen: fix memory leak in drivers/net/netxen_nic_init.c
tun: Add some missing TUN compat ioctl translations.
ipv4: fix infinite retry loop in IP-Config
net: update documentation ip aliases
net: Fix OOPS in skb_seq_read().
net: Fix frag_list handling in skb_seq_read
netxen: revert jumbo ringsize
ath5k: fix locking in ath5k_config
cfg80211: print correct intersected regulatory domain
cfg80211: Fix sanity check on 5 GHz when processing country IE
iwlwifi: fix kernel oops when ucode DMA memory allocation failure
rtl8187: Fix error in setting OFDM power settings for RTL8187L
mac80211: remove Michael Wu as maintainer
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 4 | ||||
-rw-r--r-- | drivers/net/gianfar_mii.c | 2 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 2 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 4 | ||||
-rw-r--r-- | drivers/net/r6040.c | 1 | ||||
-rw-r--r-- | drivers/net/skfp/skfddi.c | 4 | ||||
-rw-r--r-- | drivers/net/smsc911x.c | 2 | ||||
-rw-r--r-- | drivers/net/smsc9420.c | 3 | ||||
-rw-r--r-- | drivers/net/tulip/21142.c | 23 | ||||
-rw-r--r-- | drivers/net/ucc_geth.c | 20 | ||||
-rw-r--r-- | drivers/net/ucc_geth.h | 2 | ||||
-rw-r--r-- | drivers/net/ucc_geth_mii.c | 12 | ||||
-rw-r--r-- | drivers/net/ucc_geth_mii.h | 1 | ||||
-rw-r--r-- | drivers/net/virtio_net.c | 6 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/debugfs.c | 14 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/driver.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | 10 |
19 files changed, 103 insertions, 37 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 26474c92193f..c986978ce761 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | char e1000_driver_name[] = "e1000"; | 32 | char e1000_driver_name[] = "e1000"; |
33 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; | 33 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; |
34 | #define DRV_VERSION "7.3.20-k3-NAPI" | 34 | #define DRV_VERSION "7.3.21-k3-NAPI" |
35 | const char e1000_driver_version[] = DRV_VERSION; | 35 | const char e1000_driver_version[] = DRV_VERSION; |
36 | static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 36 | static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
37 | 37 | ||
@@ -3712,7 +3712,7 @@ static irqreturn_t e1000_intr(int irq, void *data) | |||
3712 | struct e1000_hw *hw = &adapter->hw; | 3712 | struct e1000_hw *hw = &adapter->hw; |
3713 | u32 rctl, icr = er32(ICR); | 3713 | u32 rctl, icr = er32(ICR); |
3714 | 3714 | ||
3715 | if (unlikely(!icr)) | 3715 | if (unlikely((!icr) || test_bit(__E1000_RESETTING, &adapter->flags))) |
3716 | return IRQ_NONE; /* Not our interrupt */ | 3716 | return IRQ_NONE; /* Not our interrupt */ |
3717 | 3717 | ||
3718 | /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is | 3718 | /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is |
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index f3706e415b45..f49a426ad681 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -234,6 +234,8 @@ static int gfar_mdio_probe(struct of_device *ofdev, | |||
234 | if (NULL == new_bus) | 234 | if (NULL == new_bus) |
235 | return -ENOMEM; | 235 | return -ENOMEM; |
236 | 236 | ||
237 | device_init_wakeup(&ofdev->dev, 1); | ||
238 | |||
237 | new_bus->name = "Gianfar MII Bus", | 239 | new_bus->name = "Gianfar MII Bus", |
238 | new_bus->read = &gfar_mdio_read, | 240 | new_bus->read = &gfar_mdio_read, |
239 | new_bus->write = &gfar_mdio_write, | 241 | new_bus->write = &gfar_mdio_write, |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index a75a31005fd3..9c78c963b721 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -210,7 +210,7 @@ | |||
210 | #define MAX_CMD_DESCRIPTORS_HOST 1024 | 210 | #define MAX_CMD_DESCRIPTORS_HOST 1024 |
211 | #define MAX_RCV_DESCRIPTORS_1G 2048 | 211 | #define MAX_RCV_DESCRIPTORS_1G 2048 |
212 | #define MAX_RCV_DESCRIPTORS_10G 4096 | 212 | #define MAX_RCV_DESCRIPTORS_10G 4096 |
213 | #define MAX_JUMBO_RCV_DESCRIPTORS 512 | 213 | #define MAX_JUMBO_RCV_DESCRIPTORS 1024 |
214 | #define MAX_LRO_RCV_DESCRIPTORS 8 | 214 | #define MAX_LRO_RCV_DESCRIPTORS 8 |
215 | #define MAX_RCVSTATUS_DESCRIPTORS MAX_RCV_DESCRIPTORS | 215 | #define MAX_RCVSTATUS_DESCRIPTORS MAX_RCV_DESCRIPTORS |
216 | #define MAX_JUMBO_RCV_DESC MAX_JUMBO_RCV_DESCRIPTORS | 216 | #define MAX_JUMBO_RCV_DESC MAX_JUMBO_RCV_DESCRIPTORS |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index ca7c8d8050c9..ffd37bea1628 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -947,8 +947,10 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) | |||
947 | } | 947 | } |
948 | for (i = 0; i < n; i++) { | 948 | for (i = 0; i < n; i++) { |
949 | if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || | 949 | if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || |
950 | netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0) | 950 | netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0) { |
951 | kfree(buf); | ||
951 | return -EIO; | 952 | return -EIO; |
953 | } | ||
952 | 954 | ||
953 | buf[i].addr = addr; | 955 | buf[i].addr = addr; |
954 | buf[i].data = val; | 956 | buf[i].data = val; |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 72fd9e97c190..b2dcdb5ed8bd 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -438,7 +438,6 @@ static void r6040_down(struct net_device *dev) | |||
438 | { | 438 | { |
439 | struct r6040_private *lp = netdev_priv(dev); | 439 | struct r6040_private *lp = netdev_priv(dev); |
440 | void __iomem *ioaddr = lp->base; | 440 | void __iomem *ioaddr = lp->base; |
441 | struct pci_dev *pdev = lp->pdev; | ||
442 | int limit = 2048; | 441 | int limit = 2048; |
443 | u16 *adrp; | 442 | u16 *adrp; |
444 | u16 cmd; | 443 | u16 cmd; |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 607efeaf0bc5..9a00e5566af7 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -1003,9 +1003,9 @@ static int skfp_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1003 | break; | 1003 | break; |
1004 | case SKFP_CLR_STATS: /* Zero out the driver statistics */ | 1004 | case SKFP_CLR_STATS: /* Zero out the driver statistics */ |
1005 | if (!capable(CAP_NET_ADMIN)) { | 1005 | if (!capable(CAP_NET_ADMIN)) { |
1006 | memset(&lp->MacStat, 0, sizeof(lp->MacStat)); | ||
1007 | } else { | ||
1008 | status = -EPERM; | 1006 | status = -EPERM; |
1007 | } else { | ||
1008 | memset(&lp->MacStat, 0, sizeof(lp->MacStat)); | ||
1009 | } | 1009 | } |
1010 | break; | 1010 | break; |
1011 | default: | 1011 | default: |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index f513bdf1c887..783c1a7b869e 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -953,7 +953,7 @@ smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktbytes) | |||
953 | do { | 953 | do { |
954 | udelay(1); | 954 | udelay(1); |
955 | val = smsc911x_reg_read(pdata, RX_DP_CTRL); | 955 | val = smsc911x_reg_read(pdata, RX_DP_CTRL); |
956 | } while (timeout-- && (val & RX_DP_CTRL_RX_FFWD_)); | 956 | } while (--timeout && (val & RX_DP_CTRL_RX_FFWD_)); |
957 | 957 | ||
958 | if (unlikely(timeout == 0)) | 958 | if (unlikely(timeout == 0)) |
959 | SMSC_WARNING(HW, "Timed out waiting for " | 959 | SMSC_WARNING(HW, "Timed out waiting for " |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index c14a4c6452c7..d801900a5036 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
@@ -1378,6 +1378,7 @@ static int smsc9420_open(struct net_device *dev) | |||
1378 | 1378 | ||
1379 | /* test the IRQ connection to the ISR */ | 1379 | /* test the IRQ connection to the ISR */ |
1380 | smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq); | 1380 | smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq); |
1381 | pd->software_irq_signal = false; | ||
1381 | 1382 | ||
1382 | spin_lock_irqsave(&pd->int_lock, flags); | 1383 | spin_lock_irqsave(&pd->int_lock, flags); |
1383 | /* configure interrupt deassertion timer and enable interrupts */ | 1384 | /* configure interrupt deassertion timer and enable interrupts */ |
@@ -1393,8 +1394,6 @@ static int smsc9420_open(struct net_device *dev) | |||
1393 | smsc9420_pci_flush_write(pd); | 1394 | smsc9420_pci_flush_write(pd); |
1394 | 1395 | ||
1395 | timeout = 1000; | 1396 | timeout = 1000; |
1396 | pd->software_irq_signal = false; | ||
1397 | smp_wmb(); | ||
1398 | while (timeout--) { | 1397 | while (timeout--) { |
1399 | if (pd->software_irq_signal) | 1398 | if (pd->software_irq_signal) |
1400 | break; | 1399 | break; |
diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c index 1210fb3748a7..db7d5e11855d 100644 --- a/drivers/net/tulip/21142.c +++ b/drivers/net/tulip/21142.c | |||
@@ -9,6 +9,11 @@ | |||
9 | 9 | ||
10 | Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} | 10 | Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} |
11 | for more information on this driver. | 11 | for more information on this driver. |
12 | |||
13 | DC21143 manual "21143 PCI/CardBus 10/100Mb/s Ethernet LAN Controller | ||
14 | Hardware Reference Manual" is currently available at : | ||
15 | http://developer.intel.com/design/network/manuals/278074.htm | ||
16 | |||
12 | Please submit bugs to http://bugzilla.kernel.org/ . | 17 | Please submit bugs to http://bugzilla.kernel.org/ . |
13 | */ | 18 | */ |
14 | 19 | ||
@@ -32,7 +37,11 @@ void t21142_media_task(struct work_struct *work) | |||
32 | int csr12 = ioread32(ioaddr + CSR12); | 37 | int csr12 = ioread32(ioaddr + CSR12); |
33 | int next_tick = 60*HZ; | 38 | int next_tick = 60*HZ; |
34 | int new_csr6 = 0; | 39 | int new_csr6 = 0; |
40 | int csr14 = ioread32(ioaddr + CSR14); | ||
35 | 41 | ||
42 | /* CSR12[LS10,LS100] are not reliable during autonegotiation */ | ||
43 | if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) | ||
44 | csr12 |= 6; | ||
36 | if (tulip_debug > 2) | 45 | if (tulip_debug > 2) |
37 | printk(KERN_INFO"%s: 21143 negotiation status %8.8x, %s.\n", | 46 | printk(KERN_INFO"%s: 21143 negotiation status %8.8x, %s.\n", |
38 | dev->name, csr12, medianame[dev->if_port]); | 47 | dev->name, csr12, medianame[dev->if_port]); |
@@ -76,7 +85,7 @@ void t21142_media_task(struct work_struct *work) | |||
76 | new_csr6 = 0x83860000; | 85 | new_csr6 = 0x83860000; |
77 | dev->if_port = 3; | 86 | dev->if_port = 3; |
78 | iowrite32(0, ioaddr + CSR13); | 87 | iowrite32(0, ioaddr + CSR13); |
79 | iowrite32(0x0003FF7F, ioaddr + CSR14); | 88 | iowrite32(0x0003FFFF, ioaddr + CSR14); |
80 | iowrite16(8, ioaddr + CSR15); | 89 | iowrite16(8, ioaddr + CSR15); |
81 | iowrite32(1, ioaddr + CSR13); | 90 | iowrite32(1, ioaddr + CSR13); |
82 | } | 91 | } |
@@ -132,10 +141,14 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
132 | struct tulip_private *tp = netdev_priv(dev); | 141 | struct tulip_private *tp = netdev_priv(dev); |
133 | void __iomem *ioaddr = tp->base_addr; | 142 | void __iomem *ioaddr = tp->base_addr; |
134 | int csr12 = ioread32(ioaddr + CSR12); | 143 | int csr12 = ioread32(ioaddr + CSR12); |
144 | int csr14 = ioread32(ioaddr + CSR14); | ||
135 | 145 | ||
146 | /* CSR12[LS10,LS100] are not reliable during autonegotiation */ | ||
147 | if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) | ||
148 | csr12 |= 6; | ||
136 | if (tulip_debug > 1) | 149 | if (tulip_debug > 1) |
137 | printk(KERN_INFO"%s: 21143 link status interrupt %8.8x, CSR5 %x, " | 150 | printk(KERN_INFO"%s: 21143 link status interrupt %8.8x, CSR5 %x, " |
138 | "%8.8x.\n", dev->name, csr12, csr5, ioread32(ioaddr + CSR14)); | 151 | "%8.8x.\n", dev->name, csr12, csr5, csr14); |
139 | 152 | ||
140 | /* If NWay finished and we have a negotiated partner capability. */ | 153 | /* If NWay finished and we have a negotiated partner capability. */ |
141 | if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { | 154 | if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { |
@@ -143,7 +156,9 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
143 | int negotiated = tp->sym_advertise & (csr12 >> 16); | 156 | int negotiated = tp->sym_advertise & (csr12 >> 16); |
144 | tp->lpar = csr12 >> 16; | 157 | tp->lpar = csr12 >> 16; |
145 | tp->nwayset = 1; | 158 | tp->nwayset = 1; |
146 | if (negotiated & 0x0100) dev->if_port = 5; | 159 | /* If partner cannot negotiate, it is 10Mbps Half Duplex */ |
160 | if (!(csr12 & 0x8000)) dev->if_port = 0; | ||
161 | else if (negotiated & 0x0100) dev->if_port = 5; | ||
147 | else if (negotiated & 0x0080) dev->if_port = 3; | 162 | else if (negotiated & 0x0080) dev->if_port = 3; |
148 | else if (negotiated & 0x0040) dev->if_port = 4; | 163 | else if (negotiated & 0x0040) dev->if_port = 4; |
149 | else if (negotiated & 0x0020) dev->if_port = 0; | 164 | else if (negotiated & 0x0020) dev->if_port = 0; |
@@ -214,7 +229,7 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
214 | tp->timer.expires = RUN_AT(3*HZ); | 229 | tp->timer.expires = RUN_AT(3*HZ); |
215 | add_timer(&tp->timer); | 230 | add_timer(&tp->timer); |
216 | } else if (dev->if_port == 5) | 231 | } else if (dev->if_port == 5) |
217 | iowrite32(ioread32(ioaddr + CSR14) & ~0x080, ioaddr + CSR14); | 232 | iowrite32(csr14 & ~0x080, ioaddr + CSR14); |
218 | } else if (dev->if_port == 0 || dev->if_port == 4) { | 233 | } else if (dev->if_port == 0 || dev->if_port == 4) { |
219 | if ((csr12 & 4) == 0) | 234 | if ((csr12 & 4) == 0) |
220 | printk(KERN_INFO"%s: 21143 10baseT link beat good.\n", | 235 | printk(KERN_INFO"%s: 21143 10baseT link beat good.\n", |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 11441225bf41..e87986867ba5 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -1536,6 +1536,11 @@ static void adjust_link(struct net_device *dev) | |||
1536 | static int init_phy(struct net_device *dev) | 1536 | static int init_phy(struct net_device *dev) |
1537 | { | 1537 | { |
1538 | struct ucc_geth_private *priv = netdev_priv(dev); | 1538 | struct ucc_geth_private *priv = netdev_priv(dev); |
1539 | struct device_node *np = priv->node; | ||
1540 | struct device_node *phy, *mdio; | ||
1541 | const phandle *ph; | ||
1542 | char bus_name[MII_BUS_ID_SIZE]; | ||
1543 | const unsigned int *id; | ||
1539 | struct phy_device *phydev; | 1544 | struct phy_device *phydev; |
1540 | char phy_id[BUS_ID_SIZE]; | 1545 | char phy_id[BUS_ID_SIZE]; |
1541 | 1546 | ||
@@ -1543,8 +1548,18 @@ static int init_phy(struct net_device *dev) | |||
1543 | priv->oldspeed = 0; | 1548 | priv->oldspeed = 0; |
1544 | priv->oldduplex = -1; | 1549 | priv->oldduplex = -1; |
1545 | 1550 | ||
1546 | snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, priv->ug_info->mdio_bus, | 1551 | ph = of_get_property(np, "phy-handle", NULL); |
1547 | priv->ug_info->phy_address); | 1552 | phy = of_find_node_by_phandle(*ph); |
1553 | mdio = of_get_parent(phy); | ||
1554 | |||
1555 | id = of_get_property(phy, "reg", NULL); | ||
1556 | |||
1557 | of_node_put(phy); | ||
1558 | of_node_put(mdio); | ||
1559 | |||
1560 | uec_mdio_bus_name(bus_name, mdio); | ||
1561 | snprintf(phy_id, sizeof(phy_id), "%s:%02x", | ||
1562 | bus_name, *id); | ||
1548 | 1563 | ||
1549 | phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface); | 1564 | phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface); |
1550 | 1565 | ||
@@ -3748,6 +3763,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3748 | 3763 | ||
3749 | ugeth->ug_info = ug_info; | 3764 | ugeth->ug_info = ug_info; |
3750 | ugeth->dev = dev; | 3765 | ugeth->dev = dev; |
3766 | ugeth->node = np; | ||
3751 | 3767 | ||
3752 | return 0; | 3768 | return 0; |
3753 | } | 3769 | } |
diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h index 8f699cb773ee..16cbe42ba43c 100644 --- a/drivers/net/ucc_geth.h +++ b/drivers/net/ucc_geth.h | |||
@@ -1186,6 +1186,8 @@ struct ucc_geth_private { | |||
1186 | int oldspeed; | 1186 | int oldspeed; |
1187 | int oldduplex; | 1187 | int oldduplex; |
1188 | int oldlink; | 1188 | int oldlink; |
1189 | |||
1190 | struct device_node *node; | ||
1189 | }; | 1191 | }; |
1190 | 1192 | ||
1191 | void uec_set_ethtool_ops(struct net_device *netdev); | 1193 | void uec_set_ethtool_ops(struct net_device *netdev); |
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index c001d261366b..54635911305c 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c | |||
@@ -156,7 +156,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma | |||
156 | if (err) | 156 | if (err) |
157 | goto reg_map_fail; | 157 | goto reg_map_fail; |
158 | 158 | ||
159 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start); | 159 | uec_mdio_bus_name(new_bus->id, np); |
160 | 160 | ||
161 | new_bus->irq = kmalloc(32 * sizeof(int), GFP_KERNEL); | 161 | new_bus->irq = kmalloc(32 * sizeof(int), GFP_KERNEL); |
162 | 162 | ||
@@ -283,3 +283,13 @@ void uec_mdio_exit(void) | |||
283 | { | 283 | { |
284 | of_unregister_platform_driver(&uec_mdio_driver); | 284 | of_unregister_platform_driver(&uec_mdio_driver); |
285 | } | 285 | } |
286 | |||
287 | void uec_mdio_bus_name(char *name, struct device_node *np) | ||
288 | { | ||
289 | const u32 *reg; | ||
290 | |||
291 | reg = of_get_property(np, "reg", NULL); | ||
292 | |||
293 | snprintf(name, MII_BUS_ID_SIZE, "%s@%x", np->name, reg ? *reg : 0); | ||
294 | } | ||
295 | |||
diff --git a/drivers/net/ucc_geth_mii.h b/drivers/net/ucc_geth_mii.h index 1e45b2028a50..840cf80235b7 100644 --- a/drivers/net/ucc_geth_mii.h +++ b/drivers/net/ucc_geth_mii.h | |||
@@ -97,4 +97,5 @@ int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum); | |||
97 | int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); | 97 | int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); |
98 | int __init uec_mdio_init(void); | 98 | int __init uec_mdio_init(void); |
99 | void uec_mdio_exit(void); | 99 | void uec_mdio_exit(void); |
100 | void uec_mdio_bus_name(char *name, struct device_node *np); | ||
100 | #endif /* __UEC_MII_H */ | 101 | #endif /* __UEC_MII_H */ |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 63ef2a8905fb..c68808336c8c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -287,7 +287,7 @@ static void try_fill_recv_maxbufs(struct virtnet_info *vi) | |||
287 | skb_put(skb, MAX_PACKET_LEN); | 287 | skb_put(skb, MAX_PACKET_LEN); |
288 | 288 | ||
289 | hdr = skb_vnet_hdr(skb); | 289 | hdr = skb_vnet_hdr(skb); |
290 | sg_init_one(sg, hdr, sizeof(*hdr)); | 290 | sg_set_buf(sg, hdr, sizeof(*hdr)); |
291 | 291 | ||
292 | if (vi->big_packets) { | 292 | if (vi->big_packets) { |
293 | for (i = 0; i < MAX_SKB_FRAGS; i++) { | 293 | for (i = 0; i < MAX_SKB_FRAGS; i++) { |
@@ -488,9 +488,9 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) | |||
488 | 488 | ||
489 | /* Encode metadata header at front. */ | 489 | /* Encode metadata header at front. */ |
490 | if (vi->mergeable_rx_bufs) | 490 | if (vi->mergeable_rx_bufs) |
491 | sg_init_one(sg, mhdr, sizeof(*mhdr)); | 491 | sg_set_buf(sg, mhdr, sizeof(*mhdr)); |
492 | else | 492 | else |
493 | sg_init_one(sg, hdr, sizeof(*hdr)); | 493 | sg_set_buf(sg, hdr, sizeof(*hdr)); |
494 | 494 | ||
495 | num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; | 495 | num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; |
496 | 496 | ||
diff --git a/drivers/net/wimax/i2400m/debugfs.c b/drivers/net/wimax/i2400m/debugfs.c index 626632985977..9b81af3f80a9 100644 --- a/drivers/net/wimax/i2400m/debugfs.c +++ b/drivers/net/wimax/i2400m/debugfs.c | |||
@@ -234,20 +234,6 @@ struct dentry *debugfs_create_i2400m_reset( | |||
234 | &fops_i2400m_reset); | 234 | &fops_i2400m_reset); |
235 | } | 235 | } |
236 | 236 | ||
237 | /* | ||
238 | * Debug levels control; see debug.h | ||
239 | */ | ||
240 | struct d_level D_LEVEL[] = { | ||
241 | D_SUBMODULE_DEFINE(control), | ||
242 | D_SUBMODULE_DEFINE(driver), | ||
243 | D_SUBMODULE_DEFINE(debugfs), | ||
244 | D_SUBMODULE_DEFINE(fw), | ||
245 | D_SUBMODULE_DEFINE(netdev), | ||
246 | D_SUBMODULE_DEFINE(rfkill), | ||
247 | D_SUBMODULE_DEFINE(rx), | ||
248 | D_SUBMODULE_DEFINE(tx), | ||
249 | }; | ||
250 | size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); | ||
251 | 237 | ||
252 | #define __debugfs_register(prefix, name, parent) \ | 238 | #define __debugfs_register(prefix, name, parent) \ |
253 | do { \ | 239 | do { \ |
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c index 5f98047e18cf..e80a0b65a754 100644 --- a/drivers/net/wimax/i2400m/driver.c +++ b/drivers/net/wimax/i2400m/driver.c | |||
@@ -707,6 +707,22 @@ void i2400m_release(struct i2400m *i2400m) | |||
707 | EXPORT_SYMBOL_GPL(i2400m_release); | 707 | EXPORT_SYMBOL_GPL(i2400m_release); |
708 | 708 | ||
709 | 709 | ||
710 | /* | ||
711 | * Debug levels control; see debug.h | ||
712 | */ | ||
713 | struct d_level D_LEVEL[] = { | ||
714 | D_SUBMODULE_DEFINE(control), | ||
715 | D_SUBMODULE_DEFINE(driver), | ||
716 | D_SUBMODULE_DEFINE(debugfs), | ||
717 | D_SUBMODULE_DEFINE(fw), | ||
718 | D_SUBMODULE_DEFINE(netdev), | ||
719 | D_SUBMODULE_DEFINE(rfkill), | ||
720 | D_SUBMODULE_DEFINE(rx), | ||
721 | D_SUBMODULE_DEFINE(tx), | ||
722 | }; | ||
723 | size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); | ||
724 | |||
725 | |||
710 | static | 726 | static |
711 | int __init i2400m_driver_init(void) | 727 | int __init i2400m_driver_init(void) |
712 | { | 728 | { |
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 8ef87356e083..a533ed60bb4d 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -1028,6 +1028,8 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
1028 | * it's done by reseting the chip. To accomplish this we must | 1028 | * it's done by reseting the chip. To accomplish this we must |
1029 | * first cleanup any pending DMA, then restart stuff after a la | 1029 | * first cleanup any pending DMA, then restart stuff after a la |
1030 | * ath5k_init. | 1030 | * ath5k_init. |
1031 | * | ||
1032 | * Called with sc->lock. | ||
1031 | */ | 1033 | */ |
1032 | static int | 1034 | static int |
1033 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) | 1035 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) |
@@ -2814,11 +2816,17 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed) | |||
2814 | { | 2816 | { |
2815 | struct ath5k_softc *sc = hw->priv; | 2817 | struct ath5k_softc *sc = hw->priv; |
2816 | struct ieee80211_conf *conf = &hw->conf; | 2818 | struct ieee80211_conf *conf = &hw->conf; |
2819 | int ret; | ||
2820 | |||
2821 | mutex_lock(&sc->lock); | ||
2817 | 2822 | ||
2818 | sc->bintval = conf->beacon_int; | 2823 | sc->bintval = conf->beacon_int; |
2819 | sc->power_level = conf->power_level; | 2824 | sc->power_level = conf->power_level; |
2820 | 2825 | ||
2821 | return ath5k_chan_set(sc, conf->channel); | 2826 | ret = ath5k_chan_set(sc, conf->channel); |
2827 | |||
2828 | mutex_unlock(&sc->lock); | ||
2829 | return ret; | ||
2822 | } | 2830 | } |
2823 | 2831 | ||
2824 | static int | 2832 | static int |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 0dc8eed16404..b35c8813bef4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1719,6 +1719,10 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1719 | priv->ucode_data_backup.len = data_size; | 1719 | priv->ucode_data_backup.len = data_size; |
1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | 1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); |
1721 | 1721 | ||
1722 | if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr || | ||
1723 | !priv->ucode_data_backup.v_addr) | ||
1724 | goto err_pci_alloc; | ||
1725 | |||
1722 | /* Initialization instructions and data */ | 1726 | /* Initialization instructions and data */ |
1723 | if (init_size && init_data_size) { | 1727 | if (init_size && init_data_size) { |
1724 | priv->ucode_init.len = init_size; | 1728 | priv->ucode_init.len = init_size; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c index 4e75e8e7fa90..78df281b297a 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c +++ b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | |||
@@ -285,7 +285,10 @@ static void rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel) | |||
285 | ofdm_power = priv->channels[channel - 1].hw_value >> 4; | 285 | ofdm_power = priv->channels[channel - 1].hw_value >> 4; |
286 | 286 | ||
287 | cck_power = min(cck_power, (u8)11); | 287 | cck_power = min(cck_power, (u8)11); |
288 | ofdm_power = min(ofdm_power, (u8)35); | 288 | if (ofdm_power > (u8)15) |
289 | ofdm_power = 25; | ||
290 | else | ||
291 | ofdm_power += 10; | ||
289 | 292 | ||
290 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, | 293 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, |
291 | rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); | 294 | rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); |
@@ -536,7 +539,10 @@ static void rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel) | |||
536 | cck_power += priv->txpwr_base & 0xF; | 539 | cck_power += priv->txpwr_base & 0xF; |
537 | cck_power = min(cck_power, (u8)35); | 540 | cck_power = min(cck_power, (u8)35); |
538 | 541 | ||
539 | ofdm_power = min(ofdm_power, (u8)15); | 542 | if (ofdm_power > (u8)15) |
543 | ofdm_power = 25; | ||
544 | else | ||
545 | ofdm_power += 10; | ||
540 | ofdm_power += priv->txpwr_base >> 4; | 546 | ofdm_power += priv->txpwr_base >> 4; |
541 | ofdm_power = min(ofdm_power, (u8)35); | 547 | ofdm_power = min(ofdm_power, (u8)35); |
542 | 548 | ||