07 Nov, 2009
13 commits
-
Making the BKL usage explicit in ipx makes it more
obvious where it is used, reduces code size and helps
getting rid of the BKL in common code.I did not analyse how to kill lock_kernel from ipx
entirely, this will involve either proving that it's not
needed, or replacing with a proper mutex or spinlock,
after finding out which data structures are protected
by the lock.Cc: Arnaldo Carvalho de Melo
Cc: David S. Miller
Cc: Stephen Hemminger
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
Making the BKL usage explicit in appletalk makes it more
obvious where it is used, reduces code size and helps
getting rid of the BKL in common code.I did not analyse how to kill lock_kernel from appletalk
entirely, this will involve either proving that it's not
needed, or replacing with a proper mutex or spinlock,
after finding out which data structures are protected
by the lock.Cc: Arnaldo Carvalho de Melo
Cc: David S. Miller
Cc: Stephen Hemminger
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
change atl1c_buffer struct, use "u16 flags" instead of "u16 state"
to store more infomation for atl1c_buffer, and restructure clean
atl1c_buffer procedure, add common api atl1c_clean_buffer.Signed-off-by: Jie Yang
Signed-off-by: David S. Miller -
SPIN_LOCK_UNLOCKED is deprecated. Use DEFINE_SPINLOCK instead.
Signed-off-by: Thomas Gleixner
Signed-off-by: David S. Miller -
It's defined colloqually in linux/if.h and linux/compat.h
includes that.Signed-off-by: David S. Miller
-
The MII ioctls and SIOCSIFNAME need to go through ifsioc conversion,
which they never did so far. Some others are not implemented in the
native path, so we can just return -EINVAL directly.Add IFSLAVE ioctls to the EINVAL list and move it to the end to
optimize the code path for the common case.Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
This removes the original socket compat_ioctl code
from fs/compat_ioctl.c and converts the code from the copy
in net/socket.c into a single function. We add a few cycles
of runtime to compat_sock_ioctl() with the long switch()
statement, but gain some cycles in return by simplifying
the call chain to get there.Due to better inlining, save 1.5kb of object size in the
process, and enable further savings:before:
text data bss dec hex filename
13540 18008 2080 33628 835c obj/fs/compat_ioctl.o
14565 636 40 15241 3b89 obj/net/socket.oafter:
text data bss dec hex filename
8916 15176 2080 26172 663c obj/fs/compat_ioctl.o
20725 636 40 21401 5399 obj/net/socket.oSigned-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
We must not have a compat ioctl handler for SIOCATALKDIFADDR
in common code, because the same number is used in other protocols
with different data structures.Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
This makes an identical copy of the socket compat_ioctl code
from fs/compat_ioctl.c to net/socket.c, as a preparation
for moving the functionality in a way that can be easily
reviewed.The code is hidden inside of #if 0 and gets activated in the
patch that will make it work.Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
Slip and a few other drivers use the same ioctl numbers on
tty devices that are normally meant for sockets. This causes
problems with our compat_ioctl handling that tries to convert
the data structures in a different format.Fortunately, these five drivers all use 32 bit compatible
data structures in the ioctl numbers, so we can just add
a trivial compat_ioctl conversion function to each of them.SIOCSIFENCAP and SIOCGIFENCAP do not need to live in
fs/compat_ioctl.c after this any more, and they are not
used on any sockets.Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
The tun driver is the only code in the kernel that operates
on a character device with struct ifreq. Change the driver
to handle the conversion itself so we can contain the
remaining ifreq handling in the socket layer.This also fixes a bug in the handling of invalid ioctl
numbers on an unbound tun device. The driver treats this
as a TUNSETIFF in native mode, but there is no way for
the generic compat_ioctl() function to emulate this
behaviour. Possibly the driver was only doing this
accidentally anyway, but if any code relies on this
misfeature, it now also works in compat mode.Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller -
In order to move socket ioctl conversion code into multiple
places in the socket code, we need a common defintion of
the data structures it uses.Also change the name from ifreq32 to compat_ifreq to
follow the naming convention for compat.hSigned-off-by: Arnd Bergmann
Signed-off-by: David S. Miller
06 Nov, 2009
27 commits
-
Add support for two more NL802154 commands: ADD_IFACE and DEL_IFACE,
thus allowing creation and removal of logic WPAN interfaces on the top
of wpan-phy.Signed-off-by: Dmitry Eremin-Solenikov
-
Signed-off-by: Dmitry Eremin-Solenikov
-
Add two nl802154 helpers: one for starting a reply message, one for sending.
Signed-off-by: Dmitry Eremin-Solenikov
-
Signed-off-by: Dmitry Eremin-Solenikov
-
ops->get_phy should increment reference to wpan-phy. As we return
the external structure, we should do refcounting correctly.Signed-off-by: Dmitry Eremin-Solenikov
-
Make fakehard device claim all 2.4 Ghz channels from 802.15.4-2006,
802.15.4a-2007 as supported by the hw.Signed-off-by: Dmitry Eremin-Solenikov
-
Signed-off-by: Dmitry Eremin-Solenikov
-
Add nl802154 command to get information about PHY's present in
the system.Signed-off-by: Dmitry Eremin-Solenikov
-
Move all mac-related stuff to separate file so that ieee802154/netlink.c
contains only generic code.Signed-off-by: Dmitry Eremin-Solenikov
-
There is no real need to have ieee802154 interfaces separate
into several small modules, as neither of them has it's own use.Signed-off-by: Dmitry Eremin-Solenikov
-
Some of ieee802154 operations really shouldn't change passed net_device.
Constify passed argument.Signed-off-by: Dmitry Eremin-Solenikov
-
Follow the usual pattern of devices registration by adding new function
(wpan_phy_set_dev) that sets child->parent relationship and removing
parent argument from wpan_phy_register call.Signed-off-by: Dmitry Eremin-Solenikov
-
IEEE 802.15.4-2006 defines channel pages that hold channels (max 32 pages,
27 channels per page). Allow the driver to specify supported channels
on pages, other than the first one.Signed-off-by: Dmitry Eremin-Solenikov
-
Use snprintf to limit the amount of chars put in the buffer for attr -> show.
Signed-off-by: Dmitry Eremin-Solenikov
-
Set page to zero (for compatibility w/ devices supporting only first page).
Also init channel by default to -1 to disallow transfers for non-initialised
devices.Signed-off-by: Dmitry Eremin-Solenikov
-
Add API to iterate over the wpan-phy instances.
Signed-off-by: Dmitry Eremin-Solenikov
-
Signed-off-by: Dmitry Eremin-Solenikov
-
Conflicts:
drivers/net/usb/cdc_ether.cAll CDC ethernet devices of type USB_CLASS_COMM need to use
'&mbm_info'.Signed-off-by: David S. Miller
-
While working on device refcount stuff, I found a device refcount leak
through DECNET.
This nasty bug can be used to hold refcounts on any !DECNET netdevice.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Vitezslav Samel discovered that since 2.6.30.4+ active FTP can not work
over NAT. The "cause" of the problem was a fix of unacknowledged data
detection with NAT (commit a3a9f79e361e864f0e9d75ebe2a0cb43d17c4272).
However, actually, that fix uncovered a long standing bug in TCP conntrack:
when NAT was enabled, we simply updated the max of the right edge of
the segments we have seen (td_end), by the offset NAT produced with
changing IP/port in the data. However, we did not update the other parameter
(td_maxend) which is affected by the NAT offset. Thus that could drift
away from the correct value and thus resulted breaking active FTP.The patch below fixes the issue by *not* updating the conntrack parameters
from NAT, but instead taking into account the NAT offsets in conntrack in a
consistent way. (Updating from NAT would be more harder and expensive because
it'd need to re-calculate parameters we already calculated in conntrack.)Signed-off-by: Jozsef Kadlecsik
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
net/core/sock.c: In function 'sock_setsockopt':
net/core/sock.c:396: warning: 'index' may be used uninitialized in this function
net/core/sock.c:396: note: 'index' was declared hereGCC can't see that all paths initialize index, so just
set it to the default (0) and eliminate the specific
code block that handles the null device name string.Signed-off-by: David S. Miller
-
cur_pkt_size can be changed in proc fs while pktgen is running,
we better use a private field to get precise tx-bytes counter.Signed-off-by: Ben Greear
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Avoid dev_hold()/dev_put() in sock_bindtodevice()
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
When sending fragmentation expiration ICMP V4/V6 messages,
we can avoid touching device refcount, thanks to RCUSigned-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
We hold RTNL in tc_dump_tfilter(), we can avoid dev_hold()/dev_put()
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller