aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-03-26[IPSEC]: Fix BEET outputHerbert Xu
The IPv6 BEET output function is incorrectly including the inner header in the payload to be protected. This causes a crash as the packet doesn't actually have that many bytes for a second header. The IPv4 BEET output on the other hand is broken when it comes to handling an inner IPv6 header since it always assumes an inner IPv4 header. This patch fixes both by making sure that neither BEET output function touches the inner header at all. All access is now done through the protocol-independent cb structure. Two new attributes are added to make this work, the IP header length and the IPv4 option length. They're filled in by the inner mode's output function. Thanks to Joakim Koskela for finding this problem. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[IPV6]: Fix potential net leak and oops in ipv6 routing code.Pavel Emelyanov
The commits f3db4851 ([NETNS][IPV6] ip6_fib - fib6_clean_all handle several network namespaces) and 69ddb805 ([NETNS][IPV6] route6 - Make proc entry /proc/net/rt6_stats per namespace) made some proc files per net. Both of them introduced potential OOPS - get_proc_net can return NULL, but this check is lost - and a struct net leak - in case single_open() fails the previously got net is not put. Kill all these bugs with one patch. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[TIPC]: Cosmetic cleanup of TIPC polling logicAllan Stephens
This patch eliminates an unnecessary poll-related routine by merging it into TIPC's main polling routine, and updates the comments associated with this code. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[VLAN]: Reduce memory consumed by vlan_groupsPavel Emelyanov
Currently each vlan_groupd contains 8 pointers on arrays with 512 pointers on struct net_device each :) Such a construction "in many cases ... wastes memory". My proposal is to allow for some of these arrays pointers be NULL, meaning that there are no devices in it. When a new device is added to the vlan_group, the appropriate array is allocated. The check in vlan_group_get_device's is safe, since the pointer vg->vlan_devices_arrays[x] can only switch from NULL to not-NULL. The vlan_group_prealloc_vid() is guarded with rtnl lock and is also safe. I've checked (I hope that) all the places, that use these arrays and found, that the register_vlan_dev is the only place, that can put a vlan device on an empty vlan_group. Rough calculations shows, that after the patch a setup with a single vlan dev (or up to 512 vlans with sequential vids) will occupy approximately 8 times less memory. The question I have is - does this patch makes sense, or a totally new structures are required to store the vlan_devs? Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-03-26Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2008-03-26[ICMP]: Dst entry leak in icmp_send host re-lookup code (v2).Pavel Emelyanov
Commit 8b7817f3a959ed99d7443afc12f78a7e1fcc2063 ([IPSEC]: Add ICMP host relookup support) introduced some dst leaks on error paths: the rt pointer can be forgotten to be put. Fix it bu going to a proper label. Found after net namespace's lo refused to unregister :) Many thanks to Den for valuable help during debugging. Herbert pointed out, that xfrm_lookup() will put the rtable in case of error itself, so the first goto fix is redundant. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NETNS][ICMP]: Build fix for NET_NS=n case (dev->nd_net is omitted).Pavel Emelyanov
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[AX25]: Remove obsolete references to BKL from TODO file.Robert P. J. Day
Given that there are no apparent calls to lock_kernel() or unlock_kernel() under net/ax25, delete the TODO reference related to that. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NET]: Fix multicast device ioctl checksPatrick McHardy
SIOCADDMULTI/SIOCDELMULTI check whether the driver has a set_multicast_list method to determine whether it supports multicast. Drivers implementing secondary unicast support use set_rx_mode however. Check for both dev->set_multicast_mode and dev->set_rx_mode to determine multicast capabilities. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NETNS][ICMP]: Use per-net sysctls in ipv4/icmp.c.Pavel Emelyanov
This mostly re-uses the net, used in icmp netnsization patches from Denis. After this ICMP sysctls are completely virtualized. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NETNS][ICMP]: Make ctl tables for ICMP sysctls per-net.Pavel Emelyanov
Add some flesh to ipv4_sysctl_init_net and ipv4_sysctl_exit_net, i.e. copy the table, alter .data pointers and register it per-net. Other ipv4_table's sysctls are now global, but this is going to change once sysctl permissions patches migrate from -mm tree to mainline in 2.6.26 merge window :) Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NETNS][ICMP]: Move ICMP sysctls on struct net.Pavel Emelyanov
Initialization is moved to icmp_sk_init, all the places, that refer to them use init_net for now. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NETNS][ICMP]: Register pernet subsys to make ICMP sysctls per-net.Pavel Emelyanov
This includes adding pernet_operations, empty init and exit hooks and a bit of changes in sysctl_ipv4_init just not to have this part in next patches. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[IRDA]: Store irnet_socket termios properly.David S. Miller
It should be a "struct ktermios" not a "struct termios". Based upon a build warning reported by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NETNS]: Compilation warnings under CONFIG_NET_NS.Denis V. Lunev
Recent commits from YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> have been introduced a several compilation warnings 'assignment discards qualifiers from pointer target type' due to extra const modifier in the inline call parameters of {dev|sock|twsk}_net_set. Drop it. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[NETNS]: Compilation fix for include/linux/netdevice.h.Denis V. Lunev
Commit commit c346dca10840a874240c78efe3f39acf4312a1f2 ([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS) breaks compilation with CONFIG_NET_NS set. Fix the typo. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_listPatrick McHardy
IFF_ALLMULTI is an indication from the network stack to the driver to disable multicast filters, drivers should never set it directly. Since the UML networking device doesn't have any filtering capabilites, it doesn't the set_multicast_list function at all, it is kept so userspace can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying devicePatrick McHardy
Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity or dev_change_flags. Setting it directly causes two unwanted effects: - the next dev_change_flags call will notice a difference between dev->gflags and the actual flags, enable promisc/allmulti mode and incorrectly update dev->gflags - this keeps the underlying device in promisc/allmulti mode until the VLAN device is deleted Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-25Merge branch 'upstream-net26' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2008-03-26gianfar: Fix Rx/Tx HW interrupt coalescing counter reset procedure.Andy Fleming
- Fix Rx/Tx HW interrupt coalescing counter reset logic. Disabling is required before resetting the counter. - Update the Default both Rx and Tx coalescing timer threshold. Formerly 4 is set which is equal to 1.5 frame at the line rate of 1GbE interface, and it doesn't match to the coalescing frame count which is set to 16. Threashold 21 is matched to frame count 16. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26gianfar: Only process completed framesAndy Fleming
If the LAST bit is not set in the RxBD, it's possible we're processing an incomplete frame, which is bad. While we're at it, add a constant for the error bitmask, so the whole if-clause fits on one line, and is more legible. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26gianfar: Fix frame size calculation when hardware VLAN acceleration is onDai Haruki
In gfar_change_mtu(), the frame size needs to be increased to account for the extra 4 bytes VLAN adds to the ethernet header. However, it was being increased by the length of the whole header (18 bytes), which is wrong. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26gianfar: Fix the data buffer stashing amountDai Haruki
- Buffer stashing parameter change to 96 from 64 in order to cover the Layer 4 header. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26Use single_open instead of manual manipulations.Pavel Emelyanov
The code opening proc entry for each device makes the same thing, as the single_open does, so remove the unneeded code. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26phy/broadcom: add support for BCM5481 PHYAnton Vorontsov
This patch adds support for BCM5481 PHY. Unfortunately it's hard to get specifications for this PHY, so its special register 0x18 isn't annotated properly (but we know it's used to set up the delays). I've kept the magic numbers, so we'll not forget to fix it at the first opportunity, and will name that register and its bits correctly. p.s. also fixed the line with broken indention, introduced by commit 03157ac31eb4a8883382a212b161d2e6c5059fbf PHYLIB: Add BCM5482 PHY support Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26qla3xxx: convert byte order of constant instead of variableMarcin Slusarz
Convert byte order of constant instead of variable which can be done at compile time (vs run time) Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26drivers/net/mv643xx_eth.c: Use FIELD_SIZEOFJulia Lawall
Robert P.J. Day proposed to use the macro FIELD_SIZEOF in replace of code that matches its definition. The modification was made using the following semantic patch (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ #include <linux/kernel.h> @depends on haskernel@ type t; identifier f; @@ - (sizeof(((t*)0)->f)) + FIELD_SIZEOF(t, f) @depends on haskernel@ type t; identifier f; @@ - sizeof(((t*)0)->f) + FIELD_SIZEOF(t, f) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26Add support the Korina (IDT RC32434) Ethernet MACFlorian Fainelli
This patch adds support for the IDT rc32434 Ethernet MAC we can find in the IDT boards and the Mikrotik RB500. Driver references some code from the linux-mips RB500 support. Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Philip Rischel <rischelp@idt.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26forcedeth: Use round_jiffies for stats timerDaniel Drake
This timer doesn't need to run at precise times, so round it to a whole second to decrease wakeups. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26s2io annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26endianness annotations: rndisAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26annotate cxgb3 (ab)uses of skb->priority/skb->csumAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26skfp annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26misc drivers/net annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52: more unbreakingAl Viro
missed read*/write* plus a bunch of wrong-sized ones... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52: switch to ioremap()Al Viro
isa_bus_to_virt() is the wrong thing to do here; it happens to work on i386, but only by accident. What we want is normal ioremap/readb/etc. set - it's all in iomem. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52: clean up check586()Al Viro
take iscp-based testing into helper, kill the loop, stop wanking with reassignments of priv->iscp Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52: clean up initialization of privAl Viro
* initialize spinlock once * check586() used to be done before we'd allocated ->priv; these days it's there from the very beginning, so we don't have to play with private copy. Consequently, we don't need to mess with reinitializing ->base, etc. afterwards. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52: make ->base char __iomem *Al Viro
... and store the virt address where we map the ->mem_addr, while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52: kill the second argument of check586(), get rid of bogus pointerAl Viro
Passing ISA bus address explicitly cast to char * only to cast it back to unsigned long is dumb; so's passing it at all when it's always dev->mem_start... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52: unbreak scp_structAl Viro
unsigned short != u8, it's u16... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ni52 trivial iomem annotationsAl Viro
Driver is still broken, though; partially from Alan's checkpatch-induced fun, partially from layers of ancient mess ;-) By the end of the series... hell, might be even worth trying to stick such card into old alpha or ppc with an ISA slot and see if it work - would be for the first time ever in case of alpha and for the first time since at least 2.5.3 in case of ppc... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ixgb: remove irq_semJesse Brandeburg
ixgb can remove irq_sem by auditing all the call sites to make sure that each of them makes sure the adapter is in the correct state before re-enabling interrupts. after doing this to all of our other drivers it is becoming easier. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26e1000: remove irq_semJesse Brandeburg
irq_sem was just a hack to prevent interrupts from being enabled unexpectedly in deep call paths. Simply finding those call paths and fixing them by hand results in a driver that behaves as we expect and doesn't need the atomic at all. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26e1000e: remove irq_semJesse Brandeburg
irq_sem can safely be removed by auditing all irq.*able sites to make sure that interrupts don't get enabled unexpectedly when the interface is down. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26e1000e: remove no longer used e1000e_read_nvm_spiAuke Kok
This function is no longer used now that 82573 uses the eerd read method as well. Thanks to Adrian Bunk for pointing this out. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ixgb: move externs out of .c filesAuke Kok
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ixgb: convert boolean_t to boolJoe Perches
> send me a patch for e1000 and for ixgb and I'll happily apply those :) boolean_t to bool TRUE to true FALSE to false Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26ixgb: add explicit state checkingJesse Brandeburg
In order to remove the irq_sem code we need to implement strict adapter state checking to prevent accidental double up or downs or resets. This code is largely copied from e1000/e1000e. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26e1000: Convert boolean_t to boolJoe Perches
On Thu, 2008-03-06 at 10:07 -0800, Kok, Auke wrote: > send me a patch for e1000 and for ixgb and I'll happily apply those :) boolean_t to bool TRUE to true FALSE to false comment typo ahread to ahead Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>