14 Jun, 2012
5 commits
-
EMSGSIZE - ran out of space while constructing message
EOPNOTSUPP - driver/hardware does not support operation
ENODEV - network device not found
EINVAL - invalid messageSigned-off-by: Thomas Graf
Signed-off-by: David S. Miller -
Signed-off-by: Thomas Graf
Signed-off-by: David S. Miller -
Signed-off-by: Thomas Graf
Signed-off-by: David S. Miller -
Allocating and sending the skb in dcb_doit() allows for much
shorter and cleaner command handling functions.The huge switch statement is replaced with an array based definition
of the handling function and reply message type.Signed-off-by: Thomas Graf
Signed-off-by: David S. Miller -
There is no need to allocate and send the reply message in each
handling function separately. Instead, the reply skb can be allocated
and sent in dcb_doit() directly.Signed-off-by: Thomas Graf
Signed-off-by: David S. Miller
13 Jun, 2012
15 commits
-
Conflicts:
MAINTAINERS
drivers/net/wireless/iwlwifi/pcie/trans.cThe iwlwifi conflict was resolved by keeping the code added
in 'net' that turns off the buggy chip feature.The MAINTAINERS conflict was merely overlapping changes, one
change updated all the wireless web site URLs and the other
changed some GIT trees to be Johannes's instead of John's.Signed-off-by: David S. Miller
-
'Get' commands should generally not require CAP_NET_ADMIN, with
the exception of those that expose internal state.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
Add dev_loopback_xmit() in order to deduplicate functions
ip_dev_loopback_xmit() (in net/ipv4/ip_output.c) and
ip6_dev_loopback_xmit() (in net/ipv6/ip6_output.c).I was about to reinvent the wheel when I noticed that
ip_dev_loopback_xmit() and ip6_dev_loopback_xmit() do exactly what I
need and are not IP-only functions, but they were not available to reuse
elsewhere.ip6_dev_loopback_xmit() does not have line "skb_dst_force(skb);", but I
understand that this is harmless, and should be in dev_loopback_xmit().Signed-off-by: Michel Machado
CC: "David S. Miller"
CC: Alexey Kuznetsov
CC: James Morris
CC: Hideaki YOSHIFUJI
CC: Patrick McHardy
CC: Eric Dumazet
CC: Jiri Pirko
CC: "Michał Mirosław"
CC: Ben Hutchings
Signed-off-by: David S. Miller -
Cloning all packets in input path have a significant cost.
Use skb_header_pointer()/skb_copy_bits() instead of pskb_may_pull() so
that recv_probe handlers (bond_3ad_lacpdu_recv / bond_arp_rcv /
rlb_arp_recv ) dont touch input skb.bond_handle_frame() can avoid the skb_clone()/dev_kfree_skb()
Signed-off-by: Eric Dumazet
Cc: Jay Vosburgh
Cc: Andy Gospodarek
Cc: Jiri Bohac
Cc: Nicolas de Pesloüan
Cc: Maciej Żenczykowski
Signed-off-by: Jay Vosburgh
Signed-off-by: David S. Miller -
The line below in intr_complete isn't needed,
memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
so just remove it.
Signed-off-by: Ming Lei
Signed-off-by: David S. Miller -
Remove declaration for intr_complete so that ctags may be happy to
decrease duplicated symbols, also decrease one line code.Signed-off-by: Ming Lei
Signed-off-by: David S. Miller -
The flag of EVENT_DEV_WAKING is not used any more, so just remove it.
Signed-off-by: Ming Lei
Signed-off-by: David S. Miller -
usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.This patch just removes the unnecessay usb_get/put_dev.
Signed-off-by: Ming Lei
Signed-off-by: David S. Miller -
usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.This patch just removes the unnecessay usb_get/put_dev.
Signed-off-by: Ming Lei
Signed-off-by: David S. Miller -
usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.This patch just removes the unnecessay usb_get/put_dev.
Signed-off-by: Ming Lei
Signed-off-by: David S. Miller -
In the transmit path of the bonding driver, skb->cb is used to
stash the skb->queue_mapping so that the bonding device can set its
own queue mapping. This value becomes corrupted since the skb->cb is
also used in __dev_xmit_skb.When transmitting through bonding driver, bond_select_queue is
called from dev_queue_xmit. In bond_select_queue the original
skb->queue_mapping is copied into skb->cb (via bond_queue_mapping)
and skb->queue_mapping is overwritten with the bond driver queue.Subsequently in dev_queue_xmit, __dev_xmit_skb is called which writes
the packet length into skb->cb, thereby overwriting the stashed
queue mappping. In bond_dev_queue_xmit (called from hard_start_xmit),
the queue mapping for the skb is set to the stashed value which is now
the skb length and hence is an invalid queue for the slave device.If we want to save skb->queue_mapping into skb->cb[], best place is to
add a field in struct qdisc_skb_cb, to make sure it wont conflict with
other layers (eg : Qdiscc, Infiniband...)This patchs also makes sure (struct qdisc_skb_cb)->data is aligned on 8
bytes :netem qdisc for example assumes it can store an u64 in it, without
misalignment penalty.Note : we only have 20 bytes left in (struct qdisc_skb_cb)->data[].
The largest user is CHOKe and it fills it.Based on a previous patch from Tom Herbert.
Signed-off-by: Eric Dumazet
Reported-by: Tom Herbert
Cc: John Fastabend
Cc: Roland Dreier
Acked-by: Neil Horman
Signed-off-by: David S. Miller -
Routing of 127/8 is tradtionally forbidden, we consider
packets from that address block martian when routing and do
not process corresponding ARP requests.This is a sane default but renders a huge address space
practically unuseable.The RFC states that no address within the 127/8 block should
ever appear on any network anywhere but it does not forbid
the use of such addresses outside of the loopback device in
particular. For example to address a pool of virtual guests
behind a load balancer.This patch adds a new interface option 'route_localnet'
enabling routing of the 127/8 address block and processing
of ARP requests on a specific interface.Note that for the feature to work, the default local route
covering 127/8 dev lo needs to be removed.Example:
$ sysctl -w net.ipv4.conf.eth0.route_localnet=1
$ ip route del 127.0.0.0/8 dev lo table local
$ ip addr add 127.1.0.1/16 dev eth0
$ ip route flush cacheV2: Fix invalid check to auto flush cache (thanks davem)
Signed-off-by: Thomas Graf
Acked-by: Neil Horman
Signed-off-by: David S. Miller -
If we modify primary via sysfs and it is not a valid slave,
we should record it for future use, and this behavior is the same with
bond_check_params().Signed-off-by: Weiping Pan
Acked-by: Nicolas de Pesloüan
Signed-off-by: Jay Vosburgh
Signed-off-by: David S. Miller -
…wireless-next into for-davem
12 Jun, 2012
19 commits
-
This change adds support for the tilegx network driver based on the
GXIO IORPC support in the tilegx software stack, using the on-chip
mPIPE packet processing engine.Signed-off-by: Chris Metcalf
Signed-off-by: David S. Miller -
Use a more current logging style.
Add pr_fmt and missing newlines.
Remove embedded prefixes.
Neaten phy_print_status to avoid using KERN_CONT.Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
5906 devices also need the short DMA fragment workaround. This patch
makes the necessary change.Signed-off-by: Matt Carlson
Tested-by: Christian Kujau
Signed-off-by: David S. Miller -
This small patch removes access to the last element of the spkt_device
array through a constant. Instead, it is accessed by sizeof() to respect
possible changes in if_packet.h.Signed-off-by: Daniel Borkmann
Signed-off-by: David S. Miller -
clk_{un}prepare is mandatory for platforms using common clock framework.
Since these drivers are used by SPEAr platform, which supports common
clock framework, add clk_{un}prepare() support for them. Otherwise
the clocks are not correctly en-/disabled and ethernet support doesn't
work.Signed-off-by: Stefan Roese
Cc: Viresh Kumar
Cc: Giuseppe Cavallaro
Signed-off-by: David S. Miller -
If no peer actually gets attached (either because create is zero or
the peer allocation fails) we'll trigger a BUG because we
unconditionally do an rt{,6}_peer_ptr() afterwards.Fix this by guarding it with the proper check.
Signed-off-by: David S. Miller
-
This patch fixes the compilation of the TCP and UDP trackers with sysctl
compilation disabled:net/netfilter/nf_conntrack_proto_udp.c: In function ‘udp_init_net_data’:
net/netfilter/nf_conntrack_proto_udp.c:279:13: error: ‘struct nf_proto_net’ has no member named
‘user’
net/netfilter/nf_conntrack_proto_tcp.c:1606:9: error: ‘struct nf_proto_net’ has no member named
‘user’
net/netfilter/nf_conntrack_proto_tcp.c:1643:9: error: ‘struct nf_proto_net’ has no member named
‘user’Reported-by: Fengguang Wu
Signed-off-by: Pablo Neira Ayuso
Signed-off-by: David S. Miller -
__lpc_handle_xmit() has two bugs :
1) It can leak skbs in case TXSTATUS_ERROR is set
2) It can wake up txqueue while no slot was freed.
Signed-off-by: Eric Dumazet
Reported-by: Roland Stigge
Tested-by: Roland Stigge
Cc: Kevin Wells
Signed-off-by: David S. Miller -
lpc_eth does a copy of transmitted skbs to DMA area, without checking
skb lengths, so can trigger buffer overflows :memcpy(pldat->tx_buff_v + txidx * ENET_MAXF_SIZE, skb->data, len);
One way to get bigger skbs is to allow MTU changes above the 1500 limit.
Calling eth_change_mtu() in ndo_change_mtu() makes sure this cannot
happen.Signed-off-by: Eric Dumazet
Cc: Roland Stigge
Cc: Kevin Wells
Acked-by: Roland Stigge
Signed-off-by: David S. Miller -
__dev_get_by_name() is slow because pm_qos_req has been inserted between
name[] and name_hlist, adding cache misses.pm_qos_req has nothing to do at the beginning of struct net_device
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
14e4:432c is found on some bcm63xx devices. The device is working fine
with b43.Reported-by: Álvaro Fernández Rojas
Signed-off-by: Jonas Gorski
Signed-off-by: John W. Linville -
MSI is enabled by default for most of the 4th generation
chips. Add this for AR9462 - this fixes PowerSave operation,
the chip was not entering Network-Sleep mode earlier.
With proper powering down of the MAC now, power consumption
in associated state is reduced considerably.Signed-off-by: Sujith Manoharan
Signed-off-by: John W. Linville -
Currently 4 channels are scanned per scan command. if scan request
is issued by user during Tx traffic, radio will be out of channel
for "4 * per_chan_scan_time" for each scan command and will not be
able to receive Rx packets. This adds delay in data traffic. We can
minimize it by reducing number of channels scanned per scan command
in this scenario.We can not always scan 1 channel per scan command due to limitation
of number of command buffers. So we add code to decide number of
channels scanned per scan command in associated state.Signed-off-by: Amitkumar Karwar
Signed-off-by: Bing Zhao
Signed-off-by: John W. Linville -
If scan operation is started when Tx traffic is already running,
driver locks Tx queue until it gets completed. With this logic
there is a delay for Tx packets.This patch implements new approach to give Tx path higher priority
in this case. Driver internally sends multiple synchronous scan
commands to firmware when scan is requested by user. Now we will
make sure that Tx queue is empty everytime before sending next scan
command. If Tx queue isn't empty scan command will be postponsed by
20msec. This rule will be followed until Tx queue becomes empty or
timeout of 1 second happens. In case of timeout scan operation will
be aborted.Signed-off-by: Amitkumar Karwar
Signed-off-by: Bing Zhao
Signed-off-by: John W. Linville -
Currently the scan time per channel for active scanning is set to
200ms. It takes quite a while to finsh scanning on all channels,
especially with a dual band configuration.Change the per channel scan time settings to the following values:
passive scan: 110ms
active scan: 30ms
specific scan: 30msAbove settings have been tested on x86 and arm platforms.
Signed-off-by: Bing Zhao
Signed-off-by: Amitkumar Karwar
Signed-off-by: John W. Linville -
Conflicts:
drivers/net/wireless/iwlwifi/iwl-eeprom.c -
…wireless into for-davem
11 Jun, 2012
1 commit
-
We handle NULL in rt{,6}_set_peer but then our caller will try to pass
that NULL pointer into inet_putpeer() which isn't ready for it.Fix this by moving the NULL check one level up, and then remove the
now unnecessary NULL check from inetpeer_ptr_set_peer().Reported-by: Eric Dumazet
Signed-off-by: David S. Miller