Kumar Gala [Tue, 28 Apr 2009 15:04:10 +0000 (08:04 -0700)]
gianfar: Use memset instead of cacheable_memzero
cacheable_memzero() is completely overkill for the clearing out the FCB
block which is only 8-bytes. The compiler should easily optimize this
with memset. Additionally, cacheable_memzero() only exists on ppc32 and
thus breaks builds of gianfar on ppc64.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Arnaldo Carvalho de Melo [Tue, 28 Apr 2009 15:03:26 +0000 (08:03 -0700)]
inet_diag: Remove dup assignments
These are later assigned to other values without being used meanwhile.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Tue, 28 Apr 2009 11:43:42 +0000 (04:43 -0700)]
net: netif_tx_queue_stopped too expensive
netif_tx_queue_stopped(txq) is most of the time false.
Yet its cost is very expensive on SMP.
static inline int netif_tx_queue_stopped(const struct netdev_queue *dev_queue)
{
return test_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
}
I saw this on oprofile hunting and bnx2 driver bnx2_tx_int().
We probably should split "struct netdev_queue" in two parts, one
being read mostly.
__netif_tx_lock() touches _xmit_lock & xmit_lock_owner, these
deserve a separate cache line.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Tue, 28 Apr 2009 09:11:53 +0000 (02:11 -0700)]
net: Fix ucc_geth.c handling of fixed-link w/o phy-connection-type property.
Previous rework to ucc_geth.c to add of_mdio support (net: Rework
ucc_geth driver to use of_mdio infrastructure) added a block of
code which broke older openfirmware device trees which this case.
This patch removes the offending blurb.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kumar Gala [Tue, 28 Apr 2009 09:05:21 +0000 (02:05 -0700)]
fs_enet: Remove dead code
CONFIG_DUET doesn't exist anymore, remove all the code that exists to
support it.
[ Simplify fs_init() even further -DaveM ]
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nelson, Shannon [Mon, 27 Apr 2009 22:43:12 +0000 (22:43 +0000)]
ixgbe: Clear out stray tx work on link down
Ayyappan at VMware noticed that we're missing this check from ixgbe which
is in our other drivers. The difference with this implementation from our
other drivers is that this checks all the tx queues rather than just tx[0].
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nelson, Shannon [Mon, 27 Apr 2009 22:42:54 +0000 (22:42 +0000)]
ixgbe: Interrupt management update for 82599
Update the interrupt management to correctly handle greater
than 16 queue vectors.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Mon, 27 Apr 2009 22:42:37 +0000 (22:42 +0000)]
ixgbe: enable HW RSC for 82599
This patch enables hardware receive side coalescing for 82599 hardware.
82599 can merge multiple frames from the same TCP/IP flow into a single
structure that can span one ore more descriptors. The accumulated data is
arranged similar to how jumbo frames are arranged with the exception that
other packets can be interlaced inbetween. To overcome this issue a next
pointer is included in the written back descriptor which indicates the next
descriptor in the writeback sequence.
This feature sets the NETIF_F_LRO flag and clearing it via the ethtool set
flags operation will also disable hardware RSC.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Brandeburg [Mon, 27 Apr 2009 22:36:35 +0000 (22:36 +0000)]
ixgbe: enable hardware offload for sctp
Inspired by: Vlad Yasevich <vladislav.yasevich@hp.com>
This is the code to enable ixgbe for hardware offload support
of CRC32c on both transmit and receive of SCTP traffic.
only 82599 supports this offload, not 82598.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Brandeburg [Mon, 27 Apr 2009 22:36:13 +0000 (22:36 +0000)]
igb: Enable SCTP checksum offloading
Originally from: Vlad Yasevich <vladislav.yasevich@hp.com>
This patch, both the driver portion and the sctp code was
modified by Jesse Brandeburg and is
Copyright(c) 2009 Intel Corporation.
Thanks go to Vlad for starting this work.
Intel 82576 chipset supports SCTP checksum offloading. This
patch enables this functionality in the driver. A new NETIF
feature is introduced for SCTP checksum offload. If the driver
supports CRC32c checksum, it can set this feature flag. The
hardware can offload both transmit and receive.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Brandeburg [Mon, 27 Apr 2009 22:35:52 +0000 (22:35 +0000)]
sctp: add feature bit for SCTP offload in hardware
this is the sctp code to enable hardware crc32c offload for
adapters that support it.
Originally by: Vlad Yasevich <vladislav.yasevich@hp.com>
modified by Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Mon, 27 Apr 2009 22:35:33 +0000 (22:35 +0000)]
igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY
Both of these drivers do a check to verify ip_summed is set to
CHECKSUM_UNNECESSARY prior to passing the packet to GRO. GRO itself
already does such a check so it is redundant and can be removed as this
will likely cause out of order issues when receiving a packet that didn't
pass checksum validation.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Mon, 27 Apr 2009 22:35:14 +0000 (22:35 +0000)]
igb: make rxcsum configuration seperate from multiqueue
The igb driver was being incorrectly setup to only allow disabling receive
checksum if multiqueue was disabled. This change corrects that so that
RXCSUM is configured regardless of queue configuration.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Mon, 27 Apr 2009 22:34:54 +0000 (22:34 +0000)]
igb: reconfigure mailbox timeout logic
This change updates the timeout logic so that it is not possible to have a
sucessful check for message and still return an error if countdown = 0.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Reported-by: Juha Leppanen <juha_motorsportscom@luukku.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Magnus Damm [Mon, 27 Apr 2009 21:32:16 +0000 (21:32 +0000)]
smsc911x: add fifo byteswap support V2
This is V2 of the smsc911x fifo byteswap patch.
The smsc911x hardware supports both big and little and endian
hardware configurations, and the linux smsc911x driver currently
detects word order.
For correct operation on big endian platforms lacking swapped
byte lanes the following patch is needed. Only fifo data is
swapped, register data does not require any swapping.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jie Yang [Mon, 27 Apr 2009 19:42:03 +0000 (19:42 +0000)]
atl1c: disable L1/L0s when link detected
Disable L1/L0s when link detected. We enable L1/L0s when link connected
before, but there is some hareware error on some platform. So just diable
this feature when link connected. This feature is about power saving.
Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 27 Apr 2009 12:44:45 +0000 (05:44 -0700)]
gro: Fix COMPLETE checksum handling
On a brand new GRO skb, we cannot call ip_hdr since the header
may lie in the non-linear area. This patch adds the helper
skb_gro_network_header to handle this.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 27 Apr 2009 12:44:29 +0000 (05:44 -0700)]
gro: Fix handling of headers that extend over the tail
The skb_gro_* code fails to handle the case where a header starts
in the linear area but ends in the frags area. Since the goal
of skb_gro_* is to optimise the case of completely non-linear
packets, we can simply bail out if we have anything in the linear
area.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Mon, 27 Apr 2009 10:28:25 +0000 (03:28 -0700)]
bnx2x: driver version 1.48.105-1
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Mon, 27 Apr 2009 10:28:03 +0000 (03:28 -0700)]
bnx2x: Removed blob file
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Mon, 27 Apr 2009 10:27:43 +0000 (03:27 -0700)]
bnx2x: Separated FW from the source.
>From now on FW will be downloaded from the binary file using request_firmware.
There will be different files for every supported chip. Currently 57710 (e1) and
57711 (e1h).
File names have the following format: bnx2x-<chip version>-<FW version>.fw.
ihex versions of current FW files are submitted in the next patch.
Each binary file has a header in the following format:
struct bnx2x_fw_file_section {
__be32 len;
__be32 offset;
}
struct bnx2x_fw_file_hdr {
struct bnx2x_fw_file_section init_ops;
struct bnx2x_fw_file_section init_ops_offsets;
struct bnx2x_fw_file_section init_data;
struct bnx2x_fw_file_section tsem_int_table_data;
struct bnx2x_fw_file_section tsem_pram_data;
struct bnx2x_fw_file_section usem_int_table_data;
struct bnx2x_fw_file_section usem_pram_data;
struct bnx2x_fw_file_section csem_int_table_data;
struct bnx2x_fw_file_section csem_pram_data;
struct bnx2x_fw_file_section xsem_int_table_data;
struct bnx2x_fw_file_section xsem_pram_data;
struct bnx2x_fw_file_section fw_version;
}
Each bnx2x_fw_file_section contains the length and the offset of the appropriate
section in the binary file. Values are stored in the big endian format.
Data types of arrays:
init_data __be32
init_ops_offsets __be16
XXsem_pram_data u8
XXsem_int_table_data u8
init_ops struct raw_op {
u8 op;
__be24 offset;
__be32 data;
}
fw_version u8
>From now boundaries of a specific initialization stage are stored in
init_ops_offsets array instead of being defined by separate macroes. The index
in init_ops_offsets is calculated by BLOCK_OPS_IDX macro:
#define BLOCK_OPS_IDX(block, stage, end) \
(2*(((block)*STAGE_IDX_MAX) + (stage)) + (end))
Security:
In addition to sanity check of array boundaries bnx2x will check a FW version.
Additional checks might be added in the future.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Mon, 27 Apr 2009 10:26:13 +0000 (03:26 -0700)]
bnx2x: FW 4.8.53.0
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Woodhouse [Mon, 27 Apr 2009 10:23:54 +0000 (03:23 -0700)]
tun: add IFF_TUN_EXCL flag to avoid opening a persistent device.
When creating a certain types of VPN, NetworkManager will first attempt
to find an available tun device by iterating through 'vpn%d' until it
finds one that isn't already busy. Then it'll set that to be persistent
and owned by the otherwise unprivileged user that the VPN dæmon itself
runs as.
There's a race condition here -- during the period where the vpn%d
device is created and we're waiting for the VPN dæmon to actually
connect and use it, if we try to create _another_ device we could end up
re-using the same one -- because trying to open it again doesn't get
-EBUSY as it would while it's _actually_ busy.
So solve this, we add an IFF_TUN_EXCL flag which causes tun_set_iff() to
fail if it would be opening an existing persistent tundevice -- so that
we can make sure we're getting an entirely _new_ device.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Arlott [Mon, 27 Apr 2009 10:22:15 +0000 (03:22 -0700)]
cxacru: Fix negative dB output
Values of dB between -0.99 and -0.01 will be output with the wrong
sign. This converts the negative value to positive and outputs it
with a "-" prefix.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
roel kluin [Thu, 23 Apr 2009 08:53:20 +0000 (08:53 +0000)]
pasemi_mac: mac_to_intf() error not noticed
mac_to_intf() can return -1 when no device or function is found, but when
mac->dma_if is unsigned. The error wasn't noticed.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Neil Horman [Mon, 27 Apr 2009 10:17:31 +0000 (03:17 -0700)]
drop_monitor: Update netlink protocol to include netlink attribute header in alert message
When I initially implemented this protocol, I disregarded the use of netlink
attribute headers, thinking for my purposes they weren't needed. I've come to
find out that, as I'm starting to work with sending down messages with
associated data (like config messages), the kernel code spits out warnings about
trailing data in a netlink skb that doesn't have an associated header on it. As
such, I'm going to start including attribute headers in my netlink transaction,
and so for completeness, I should likely include them on messages bound from the
kernel to user space. This patch adds that header to the kernel, and bumps the
protocol version accordingly
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Waskiewicz Jr, Peter P [Thu, 23 Apr 2009 11:31:37 +0000 (11:31 +0000)]
ixgbe: Disallow SFP 1G modules in the SFP+ cages for 82598 and 82599
82598 and 82599 do not support SFP 1G modules. Instead of allowing the
driver to load, but never get link, rejecting the module and displaying
a useful message is more preferrable. The framework for displaying the
failure message already exists, now we just need to detect and reject the
SFP modules.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 23 Apr 2009 11:20:29 +0000 (11:20 +0000)]
igb: always use adapter->itr as EITR value
The igb driver was switching between adapter->itr containing the EITR value
and the number of interrupts per second. This resulted in high latencies
being seen after brining the interface down and then back up. To resolve
the issue the itr value will now only contain the value that should be
programmed into EITR.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Beregalov [Thu, 23 Apr 2009 15:53:21 +0000 (15:53 +0000)]
vxge: use max() instead of VXGE_HW_SET_LEVEL
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Ram Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Beregalov [Thu, 23 Apr 2009 15:31:38 +0000 (15:31 +0000)]
vxge: fix possible NULL dereference in vxge-traffic.c
If vpath is NULL then hldev is NULL also.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Ram Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Fri, 24 Apr 2009 03:57:29 +0000 (03:57 +0000)]
bonding: ignore updelay param when there is no active slave
Pointed out by Sean E. Millichamp.
Quote from Documentation/networking/bonding.txt:
"Note that when a bonding interface has no active links, the
driver will immediately reuse the first link that goes up, even if the
updelay parameter has been specified (the updelay is ignored in this
case). If there are slave interfaces waiting for the updelay timeout
to expire, the interface that first went into that state will be
immediately reused. This reduces down time of the network if the
value of updelay has been overestimated, and since this occurs only in
cases with no connectivity, there is no additional penalty for
ignoring the updelay."
This patch actually changes the behaviour in this way.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
drivers/net/bonding/bond_main.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Fri, 24 Apr 2009 01:58:23 +0000 (01:58 +0000)]
bonding: use ethtool for link checking first
This patch only changes the order of interfaces to use for checking slave link
status in bond_check_dev_link() to priorize ethtool interface. Should safe some
troubles as ethtool seems to be more supported.
Jirka
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
drivers/net/bonding/bond_main.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:44 +0000 (12:53 +0000)]
net: fix fsl_pq_mdio driver to use module_init()
Modules are not supposed to use any of the *_initcall*() hooks as
the entry point. fsl_pq_mdio.c was using subsys_initcall_sync()
instead of module_init() to guarantee that the MDIO bus was initialized
before the Ethernet driver goes looking for the phy. However, the recent
OF helpers rework happens to also make sure PHY connection is deferred to
.open time, so using an initcall is no longer necessary.
This patch replaces the initcall with a more traditional an accepted
module_init() call.
Tested on Freescale MPC8349emitxgp eval board.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:39 +0000 (12:53 +0000)]
net: add Xilinx ll_temac device driver
This patch adds support for the Xilinx ll_temac 10/100/1000 Ethernet
device. The ll_temac ipcore is typically used on Xilinx Virtex and
Spartan designs attached to either a PowerPC 4xx or Microblaze
processor.
At the present moment, this driver only works with Virtex5 PowerPC
designs because it assumes DCR is used to access the DMA registers.
However, the low level access to DMA registers is abstracted and
it should be easy to adapt for the other implementations.
I'm posting this driver now as an RFC. There are still some things that
need to be tightened up, but it does appear to be stable.
Derived from driver code written by Yoshio Kashiwagi and David H. Lynch Jr.
Tested on Xilinx ML507 eval board with Base System Builder generated
FPGA design.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:33 +0000 (12:53 +0000)]
net: Rework fs_enet driver to use of_mdio infrastructure
This patch simplifies the driver by making use of more common code.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:28 +0000 (12:53 +0000)]
powerpc/82xx: Rework Embedded Planet ep8248e platform to use of_mdio
This patch modifies the bitbanged MDIO driver in the ep8248e platform
code to use the common of_mdio infrastructure.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:23 +0000 (12:53 +0000)]
net: Rework ucc_geth driver to use of_mdio infrastructure
This patch simplifies the driver by making use of more common code.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:17 +0000 (12:53 +0000)]
net: Rework pasemi_mac driver to use of_mdio infrastructure
This patch simplifies the driver by making use of more common code.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Olof Johansson <olof@lixom.net>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:12 +0000 (12:53 +0000)]
net: Rework gianfar driver to use of_mdio infrastructure.
This patch simplifies the driver by making use of more common code.
Tested on Freescale MPC8349emitxgp eval board
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:07 +0000 (12:53 +0000)]
net: rework fsl_pq_mdio driver to use of_mdio infrastructure
This patch simplifies the driver by making use of more common code.
Tested on Freescale MPC8349emitxgp eval board
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:53:02 +0000 (12:53 +0000)]
net: Rework mpc5200 fec driver to use of_mdio infrastructure.
The patch reworks the MPC5200 Fast Ethernet Controller (FEC) driver to
use the of_mdio infrastructure for registering PHY devices from data out
openfirmware device tree, and eliminates the assumption that the PHY
for the FEC is always attached to the FEC's own MDIO bus. With this
patch, the FEC can use a PHY attached to any MDIO bus if it is described
in the device tree.
Tested on Freescale Lite5200b eval board
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:52:56 +0000 (12:52 +0000)]
openfirmware: Add OF phylib support code
Add support for parsing the device tree for PHY devices on an MDIO bus.
Currently many of the PowerPC ethernet drivers are open coding a solution
for reading data out of the device tree to find the correct PHY device.
This patch implements a set of common routines to:
a) let MDIO bus drivers register phy_devices described in the tree, and
b) let MAC drivers find the correct phy_device via the tree.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:52:51 +0000 (12:52 +0000)]
phylib: add *_direct() variants of phy_connect and phy_attach functions
Add phy_connect_direct() and phy_attach_direct() functions so that
drivers can use a pointer to the phy_device instead of trying to determine
the phy's bus_id string.
This patch is useful for OF device tree descriptions of phy devices where
the driver doesn't need or know what the bus_id value in order to get a
phy_device pointer.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:52:46 +0000 (12:52 +0000)]
phylib: rework to prepare for OF registration of PHYs
This patch makes changes in preparation for supporting open firmware
device tree descriptions of MDIO busses. Changes include:
- Cleanup handling of phy_map[] entries; they are already NULLed when
registering and so don't need to be re-cleared, and it is good practice
to clear them out when unregistering.
- Split phy_device registration out into a new function so that the
OF helpers can do two stage registration (separate allocation and
registration steps).
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Grant Likely [Sat, 25 Apr 2009 12:52:40 +0000 (12:52 +0000)]
of: add of_parse_phandle() helper for parsing phandle properties
of_parse_phandle() is a helper function to read and parse a phandle
property and return a pointer to the resulting device_node.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Neil Horman [Mon, 27 Apr 2009 09:45:02 +0000 (02:45 -0700)]
snmp: add missing counters for RFC 4293
The IP MIB (RFC 4293) defines stats for InOctets, OutOctets, InMcastOctets and
OutMcastOctets:
http://tools.ietf.org/html/rfc4293
But it seems we don't track those in any way that easy to separate from other
protocols. This patch adds those missing counters to the stats file. Tested
successfully by me
With help from Eric Dumazet.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
John Dykstra [Mon, 27 Apr 2009 09:42:20 +0000 (02:42 -0700)]
pcnet32: Remove redundant set of skb->dev
Remove redundant set of skb->dev (now handled for ethernet
drivers by eth_type_trans()).
Signed-off-by: John Dykstra <john.dykstra1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rami Rosen [Mon, 27 Apr 2009 09:35:32 +0000 (02:35 -0700)]
ipv4: remove unused member in fib_table.
This patch removes an unused parameter (tb_stamp) from fib_table
structure in include/net/ip_fib.h.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 25 Apr 2009 23:36:46 +0000 (16:36 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6
Conflicts:
net/mac80211/pm.c
John W. Linville [Fri, 24 Apr 2009 19:35:42 +0000 (15:35 -0400)]
wireless: remove some (bogus?) 'may be used uninitialized' warnings
net/mac80211/tx.c: In function ‘ieee80211_tx_h_select_key’:
net/mac80211/tx.c:448: warning: ‘key’ may be used uninitialized in this function
drivers/net/wireless/ath/ath9k/rc.c: In function ‘ath_rc_rate_getidx’:
drivers/net/wireless/ath/ath9k/rc.c:815: warning: ‘nextindex’ may be used uninitialized in this function
drivers/net/wireless/hostap/hostap_plx.c: In function ‘prism2_plx_probe’:
drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_index’ may be used uninitialized in this function
drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_offset’ may be used uninitialized in this function
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Fri, 24 Apr 2009 19:30:28 +0000 (15:30 -0400)]
libertas: fix format warning
drivers/net/wireless/libertas/if_spi.c: In function ‘if_spi_c2h_data’:
drivers/net/wireless/libertas/if_spi.c:733: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘long unsigned int’
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alexander Beregalov [Fri, 24 Apr 2009 11:45:33 +0000 (04:45 -0700)]
8390p: fix build breakage
Fix this build error caused by
362b76edb789
"8390p: Get rid of init_module/cleanup_module"
drivers/net/8390p.c:94:19: error: invalid suffix "p_init_module" on integer constant
drivers/net/8390p.c:94: error: expected identifier or '(' before numeric constant
drivers/net/8390p.c:99:20: error: invalid suffix "p_cleanup_module" on integer constant
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ursula Braun [Thu, 23 Apr 2009 13:37:16 +0000 (06:37 -0700)]
af_iucv: Fix merge.
From: Ursula Braun <ubraun@linux.vnet.ibm.com>
net/iucv/af_iucv.c in net-next-2.6 is almost correct. 4 lines should
still be deleted. These are the remaining changes:
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 23 Apr 2009 11:08:24 +0000 (04:08 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
Conflicts:
net/iucv/af_iucv.c
Hendrik Brueckner [Tue, 21 Apr 2009 23:26:27 +0000 (23:26 +0000)]
af_iucv: New socket option for setting IUCV MSGLIMITs
The SO_MSGLIMIT socket option modifies the message limit for new
IUCV communication paths.
The message limit specifies the maximum number of outstanding messages
that are allowed for connections. This setting can be lowered by z/VM
when an IUCV connection is established.
Expects an integer value in the range of 1 to 65535.
The default value is 65535.
The message limit must be set before calling connect() or listen()
for sockets.
If sockets are already connected or in state listen, changing the message
limit is not supported.
For reading the message limit value, unconnected sockets return the limit
that has been set or the default limit. For connected sockets, the actual
message limit is returned. The actual message limit is assigned by z/VM
for each connection and it depends on IUCV MSGLIMIT authorizations
specified for the z/VM guest virtual machine.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hendrik Brueckner [Tue, 21 Apr 2009 23:26:26 +0000 (23:26 +0000)]
af_iucv: cleanup and refactor recvmsg() EFAULT handling
If the skb cannot be copied to user iovec, always return -EFAULT.
The skb is enqueued again, except MSG_PEEK flag is set, to allow user space
applications to correct its iovec pointer.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hendrik Brueckner [Tue, 21 Apr 2009 23:26:25 +0000 (23:26 +0000)]
af_iucv: Provide new socket type SOCK_SEQPACKET
This patch provides the socket type SOCK_SEQPACKET in addition to
SOCK_STREAM.
AF_IUCV sockets of type SOCK_SEQPACKET supports an 1:1 mapping of
socket read or write operations to complete IUCV messages.
Socket data or IUCV message data is not fragmented as this is the
case for SOCK_STREAM sockets.
The intention is to help application developers who write
applications or device drivers using native IUCV interfaces
(Linux kernel or z/VM IUCV interfaces).
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hendrik Brueckner [Tue, 21 Apr 2009 23:26:24 +0000 (23:26 +0000)]
af_iucv: Modify iucv msg target class using control msghdr
Allow 'classification' of socket data that is sent or received over
an af_iucv socket. For classification of data, the target class of an
(native) iucv message is used.
This patch provides the cmsg interface for iucv_sock_recvmsg() and
iucv_sock_sendmsg(). Applications can use the msg_control field of
struct msghdr to set or get the target class as a
"socket control message" (SCM/CMSG).
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hendrik Brueckner [Tue, 21 Apr 2009 23:26:23 +0000 (23:26 +0000)]
af_iucv: Support data in IUCV msg parameter lists (IPRMDATA)
The patch allows to send and receive data in the parameter list of an
iucv message.
The parameter list is an arry of 8 bytes that are used by af_iucv as
follows:
0..6 7 bytes for socket data and
7 1 byte to store the data length.
Instead of storing the data length directly, the difference
between 0xFF and the data length is used.
This convention does not interfere with the existing use of PRM
messages for shutting down the send direction of an AF_IUCV socket
(shutdown() operation). Data lenghts greater than 7 (or PRM message
byte 8 is less than 0xF8) denotes to special messages.
Currently, the special SEND_SHUTDOWN message is supported only.
To use IPRM messages, both communicators must set the IUCV_IPRMDATA
flag during path negotiation, i.e. in iucv_connect() and
path_pending().
To be compatible to older af_iucv implementations, sending PRM
messages is controlled by the socket option SO_IPRMDATA_MSG.
Receiving PRM messages does not depend on the socket option (but
requires the IUCV_IPRMDATA path flag to be set).
Sending/Receiving data in the parameter list improves performance for
small amounts of data by reducing message_completion() interrupts and
memory copy operations.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hendrik Brueckner [Tue, 21 Apr 2009 23:26:22 +0000 (23:26 +0000)]
af_iucv: add sockopt() to enable/disable use of IPRM_DATA msgs
Provide the socket operations getsocktopt() and setsockopt() to enable/disable
sending of data in the parameter list of IUCV messages.
The patch sets respective flag only.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hendrik Brueckner [Tue, 21 Apr 2009 23:26:21 +0000 (23:26 +0000)]
af_iucv: sync sk shutdown flag if iucv path is quiesced
If the af_iucv communication partner quiesces the path to shutdown its
receive direction, provide a quiesce callback implementation to shutdown
the (local) send direction. This ensures that both sides are synchronized.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ursula Braun [Tue, 21 Apr 2009 23:26:20 +0000 (23:26 +0000)]
iucv: provide second per-cpu IUCV command parameter block
Some of the IUCV commands can be invoked in interrupt context.
Those commands need a different per-cpu IUCV command parameter block,
otherwise they might overwrite an IUCV command parameter of a not yet
finished IUCV command invocation in process context.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jouni Malinen [Wed, 22 Apr 2009 18:38:25 +0000 (21:38 +0300)]
nl80211: Add event for authentication/association timeout
SME needs to be notified when the authentication or association
attempt times out and MLME has stopped processing in order to allow
the SME to decide what to do next.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 22 Apr 2009 17:27:08 +0000 (13:27 -0400)]
rndis_wlan: select CFG80211 in Kconfig
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 22 Apr 2009 16:44:37 +0000 (18:44 +0200)]
mac80211: calculate maximum sleep interval
The maximum sleep interval, for powersave purposes, is
determined by the DTIM period (it may not be larger)
and the required networking latency (it must be small
enough to fulfil those constraints).
This makes mac80211 calculate the maximum sleep interval
based on those constraints, and pass it to the driver.
Then the driver should instruct the device to sleep at
most that long.
Note that the device is responsible for aligning the
maximum sleep interval between DTIMs, we make sure it's
not longer but it needs to make sure it's between them.
Also, group some powersave documentation together and
make it more explicit that we support managed mode only,
and no IBSS powersaving (yet).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 22 Apr 2009 15:45:38 +0000 (17:45 +0200)]
nl80211: allow configuring IBSS beacon interval
Make the JOIN_IBSS command look at the beacon interval
attribute to see if the user requested a specific beacon
interval, if not default to 100 TU (wext too).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 22 Apr 2009 10:40:07 +0000 (12:40 +0200)]
mac80211: remove IEEE80211_CONF_CHANGE_DYNPS_TIMEOUT
Just setting IEEE80211_CONF_CHANGE_PS should be sufficient
for changes in the power saving things. The driver already
tells us whether it wants notification of dynps via the
"have dynps support" hw flag.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 22 Apr 2009 09:25:43 +0000 (11:25 +0200)]
mac80211: fix variable truncation on 32-bit
Stephen Rothwell reported these warnings from a 32-bit build:
net/mac80211/mlme.c:1771: warning: left shift count >= width of type
net/mac80211/mlme.c:1772: warning: left shift count >= width of type
net/mac80211/mlme.c:1773: warning: left shift count >= width of type
net/mac80211/mlme.c:1774: warning: left shift count >= width of type
net/mac80211/mlme.c:1775: warning: left shift count >= width of type
This shows a bug in my code -- BIT(X) uses just "1 << X" which means
a 32-bit integer on 32-bit platforms, but the code here needs a u64
on all platforms. Fix this by using "1ULL << X" instead of BIT(X).
Thanks Stephen!
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Tue, 21 Apr 2009 16:48:15 +0000 (19:48 +0300)]
rndis_wlan: free priv correctly when rndis_wext_bind fails
Private structure is allocated by wiphy_new now, so use
wiphy_free instead of kfree.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Tue, 21 Apr 2009 16:48:07 +0000 (19:48 +0300)]
rndis_wlan: fix initialization order for workqueue&workers
rndis_wext_link_change() might be called from rndis_command() at
initialization stage and priv->workqueue/priv->work have not been
initialized yet. This causes invalid opcode at rndis_wext_bind on
some brands of bcm4320.
Fix by initializing workqueue/workers in rndis_wext_bind() before
rndis_command is used.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 21 Apr 2009 08:55:10 +0000 (10:55 +0200)]
rndis_wlan: make some symbols static
sparse complains, correctly, about these:
drivers/net/wireless/rndis_wlan.c:418:21: warning: symbol 'rndis_config_ops' was not declared. Should it be static?
drivers/net/wireless/rndis_wlan.c:423:6: warning: symbol 'rndis_wiphy_privid' was not declared. Should it be static?
Fix that.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 22:30:49 +0000 (00:30 +0200)]
mac80211: fix IBSS code to not sleep while atomic
With the RCU locking here we sleep while in an atomic context,
since we can sleep just use mutex locking for the interface
list instead of RCU. Sorry, seems I didn't get that in my UML
test.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohamed Abbas [Mon, 20 Apr 2009 21:37:04 +0000 (14:37 -0700)]
iwlwifi: allow config if device not ready
Allow user to config the device all the time but only allow commiting
these changes to card if the card is up and running.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Mon, 20 Apr 2009 21:37:03 +0000 (14:37 -0700)]
iwlwifi: remove radio disable parameter.
Patch removes the "manual radio disable" parameter
as there is no usage scenario of disabling radio using this module parameter.
User can use iwconfig's txpower to enable and disable radio.
This module parameter also does not work as expected. During module load
the status of radio is set, the radio is not actually disabled. Even so,
the moment mac80211 requests the interface to be up the radio will be
enabled again.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohamed Abbas [Mon, 20 Apr 2009 21:37:02 +0000 (14:37 -0700)]
iwlcore: Fix stay in table function.
Function rs_stay_in_table was flushing the rate scale table way to early. time_after
macro in expecting long value and was failing because we passing u32 value.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Mon, 20 Apr 2009 21:37:00 +0000 (14:37 -0700)]
iwlwifi: clean up unused NL80211_IFTYPE_MONITOR for Monitor mode
This patch clean up the code for NL80211_IFTYPE_MONITOR mode,
priv->iw_mode is set in add_interface, but add_interface is never called
for monitor mode.
The only way mac80211 informs us about monitor mode is through
configuring filter; since iw_mode will never set to
NL80211_IFTYPE_MONITOR, modify and remove all the code refer to
NL80211_IFTYPE_MONITOR and replace with iwl_is_monitor_mode() function
call.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Mon, 20 Apr 2009 21:36:59 +0000 (14:36 -0700)]
iwl3945: calculate debugfs isr statistics
This patch calculates interrupt statistics for debugfs.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Mon, 20 Apr 2009 21:36:58 +0000 (14:36 -0700)]
iwl3945: add debugfs to 3945
Patch adds debugfs to 3945. Also fix debugfs registration in iwlagn
to return error code if it fails.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 21:36:57 +0000 (14:36 -0700)]
iwlwifi: support truly passive scanning
If passive scanning is requested we should not ask the
microcode to do active scanning after detecting traffic
on a channel -- that should only be used when an active
scan is requested but some channels are marked passive.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 21:36:56 +0000 (14:36 -0700)]
iwlwifi: improve scan support
This modifies iwlwifi to
* no longer build its own probe request, but use mac80211's
* therefore, support arbitrary scan IEs (up to the max len)
* support multiple scan SSIDs
* support passive scanning
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 21:36:55 +0000 (14:36 -0700)]
iwlwifi: rename PROBE_OPTION_MAX_API1 to PROBE_OPTION_MAX_3945
This limit applies to current (APIv1 and APIv2) 3945 firmware only, not
supported firmware of any of the other cards.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 18 Apr 2009 23:28:12 +0000 (01:28 +0200)]
ar9170: rework rxstream code
With this patch ar9170 is capable of receiving aggregated 802.11n frames
and sniffing on most networks without having a "debug message overhead".
(Includes phy initialization requested by
Johannes Berg <johannes@sipsolutions.net> -- JWL)
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 18 Apr 2009 15:33:24 +0000 (17:33 +0200)]
mac80211: validate TIM IE length (redux)
The TIM IE must not be shorter than 4 bytes, so verify that
when parsing it and use the proper type. To ease that adjust
struct ieee80211_tim_ie to have a virtual bitmap of size
at least 1.
Also check that the TIM IE is actually present before trying
to parse it!
Because other people may need the function, make it a static
inline in ieee80211.h.
(The original "mac80211: validate TIM IE length" was a minimal fix for
2.6.30. This purports to be the full, correct fix. -- JWL)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 16:49:39 +0000 (18:49 +0200)]
cfg80211: mark all WEXT handlers _GPL
The fact that these are exported is a technical detail
of the conversion period -- we don't want anybody to
start relying on these. Ultimately we want things to
use cfg80211 only, and once everything that is in wext
is converted to cfg80211 drivers will not need to touch
wext _at all_.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 16:43:46 +0000 (18:43 +0200)]
cfg80211: clear WEXT SSID when clearing IBSS
When we leave an IBSS, we should clear the SSID and not just the
BSSID, but since WEXT allows configuring while the interface is
down we must not clear it when leaving due to taking the iface
down, so some complications are needed.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Mon, 20 Apr 2009 16:39:05 +0000 (18:39 +0200)]
nl80211: Add set/get for frag/rts threshold and retry limits
Add new nl80211 attributes that can be used with NL80211_CMD_SET_WIPHY
and NL80211_CMD_GET_WIPHY to manage fragmentation/RTS threshold and
retry limits.
Since these values are stored in struct wiphy, remove the local copy
from mac80211 where feasible (frag & rts threshold). The retry limits
are currently needed in struct ieee80211_conf, but these could be
eventually removed since the driver should have access to the values
in struct wiphy.
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 16:27:04 +0000 (18:27 +0200)]
ar9170: support HT receive and channel config
This patch adds support for configuring HT40 channels
and receiving HT40 to ar9170. Receiving aggregation
doesn't seem to work right now, so it's not enabled.
Same goes for TX aggregation, but that probably needs
even more work.
With this, I can receive roughly 33 Mbits/sec.
The HT capabilities are a little odd, I tried following
otus here -- in particular having SGI_40 but not SGI_20
is a little weird but afaict that's what otus does.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 13:17:01 +0000 (15:17 +0200)]
rndis_wlan: remove nickname support
Supporting wireless extension nickname is pointless
and no other modern driver supports this, so remove
it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 20 Apr 2009 12:31:42 +0000 (14:31 +0200)]
cfg80211: clean up includes
Trying to separate header files into net/wireless.h and
net/cfg80211.h has been a source of confusion. Remove
net/wireless.h (because there also is the linux/wireless.h)
and subsume everything into net/cfg80211.h -- except the
definitions for regulatory structures which get moved to
a new header net/regulatory.h.
The "new" net/cfg80211.h is now divided into sections.
There are no real changes in this patch but code shuffling
and some very minor documentation fixes.
I have also, to make things reflect reality, put in a
copyright line for Luis to net/regulatory.h since that
is probably exclusively written by him but was formerly
in a file that only had my copyright line.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 19 Apr 2009 19:25:43 +0000 (21:25 +0200)]
mac80211: convert to cfg80211 IBSS API
This converts mac80211 to the new cfg80211 IBSS API, the
wext handling functions are called where appropriate.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 19 Apr 2009 19:24:32 +0000 (21:24 +0200)]
cfg80211/nl80211: add IBSS API
This adds IBSS API along with (preliminary) wext handlers.
The wext handlers can only do IBSS so you need to call them
from your own wext handlers if the mode is IBSS.
The nl80211 API requires
* an SSID
* a channel (frequency) for the case that a new IBSS
has to be created
It optionally supports
* a flag to fix the channel
* a fixed BSSID
The cfg80211 code also takes care to leave the IBSS before
the netdev is set down. If wireless extensions are used, it
also caches values when the interface is down and instructs
the driver to join when the interface is set up.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 19 Apr 2009 17:57:45 +0000 (19:57 +0200)]
cfg80211/mac80211: move wext SIWMLME into cfg80211
Since we have ->deauth and ->disassoc we can support the
wext SIWMLME call directly without driver wext handlers.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 19 Apr 2009 14:23:20 +0000 (16:23 +0200)]
nl80211: send wiphy along with netdev
When listing all wireless netdevs in the system this
is useful to print which wiphy they belong to. Just
add the attribute, any program that doesn't care will
just ignore it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 18 Apr 2009 17:39:15 +0000 (19:39 +0200)]
mac80211: set CLEAR_PS for pspolled frames
This patch sets IEEE80211_TX_CTL_CLEAR_PS_FILT for outgoing
frames for a half-wake station.
this is necessary if one wants to get ps-poll working properly with a p54 ap.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 18 Apr 2009 16:30:13 +0000 (18:30 +0200)]
p54: fix ps-poll delivery in ap mode
PS-Polled frames must be sent with OUT_NOCANCEL flag set,
or the firmware will reject all of them, at the station is still blacklisted.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 17 Apr 2009 00:56:38 +0000 (19:56 -0500)]
rtl8187: Implement TX/RX blink for LED
The following patch implements some control over the LED on RTL8187B and
RTL8187L devices. Triggers are registered for TX and RX. Whenever the
trigger event occurs, the LED is turned off for 1/20 second, then turned
back on.
Note: For those RTL8187X devices that are built into the computer and have
a LED that is expected to be controlled with a radio switch, this patch will
not operate that LED. That will take a separate patch to be prepared later.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Thu, 16 Apr 2009 15:44:53 +0000 (18:44 +0300)]
mac80211: Allow scan to be requested in AP mode
We can allow scan requests in AP mode as long as the interface has not
yet been configured to send out Beacon frames (or if beaconing has
been disabled prior to the scan request). This makes it easier to scan
for neighboring BSSes during AP initialization and makes it possible
to run a scan without setting the interface down, if needed. Without
this change, the only available option would be to set the interface
down, move into station mode, and set the interface up, prior to
requesting the scan.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 16 Apr 2009 15:04:25 +0000 (17:04 +0200)]
mac80211: document powersaving/beacon filter future
Document what mac80211 will do in the future to help save power.
We're not quite there yet, but a plan helps. Also, while at it,
fix the docs wrt. multicast traffic.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 16 Apr 2009 11:27:42 +0000 (13:27 +0200)]
mac80211: enable PS by default
Enable PS by default (depending on Kconfig) -- rely on drivers
to control the level using pm_qos. Due to the previous patch
we turn off PS when necessary due to latency requirements.
This has a Kconfig symbol so people can, if they really want,
configure the default in their kernels. We may want to keep it
at "default y" only in wireless-testing for a while.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 16 Apr 2009 11:17:26 +0000 (13:17 +0200)]
mac80211: implement beacon filtering in software
Regardless of whether the hardware implements beacon filtering,
there's no need to process all beacons in software all the time
throughout the stack (mac80211 does a lot, then cfg80211, then
in the future possibly userspace).
This patch implements the "best possible" beacon filtering in
mac80211. "Best possible" means that it can look for changes in
all requested information elements, and distinguish vendor IEs
by their OUI.
In the future, we will add nl80211 API for userspace to request
information elements and vendor IE OUIs to watch -- drivers can
then implement the best they can do while software implements
it fully.
It is unclear whether or not this actually saves CPU time, but
the data is all in the cache already so it should be fairly
cheap. The additional _testing_, however, has great benefit;
Without this, and on hardware that doesn't implement beacon
filtering, wrong assumptions about, for example, scan result
updates could quickly creep into code.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>