]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
15 years agosfc: Implement adaptive IRQ moderation
Ben Hutchings [Fri, 20 Mar 2009 13:30:37 +0000 (13:30 +0000)]
sfc: Implement adaptive IRQ moderation

Calculate a score for each 1000 IRQs:
- TX completions are worth 1 point
- RX completions are worth 4 if merged using LRO or 2 otherwise

Reduce moderation if the score is less than 10000, down to a minimum
of 5 us.  Increase moderation if the score is more than 20000, up to
the specified maximum.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Optimise falcon_writel_page_locked() for page > 0
Ben Hutchings [Fri, 20 Mar 2009 13:27:13 +0000 (13:27 +0000)]
sfc: Optimise falcon_writel_page_locked() for page > 0

The bug this function works around only applies to the first set of
page-mapped registers; other pages can be written without locking.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Remove unused private PCI register definitions
Ben Hutchings [Fri, 20 Mar 2009 13:26:55 +0000 (13:26 +0000)]
sfc: Remove unused private PCI register definitions

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Work around unreliable legacy interrupt status
Ben Hutchings [Fri, 20 Mar 2009 13:26:41 +0000 (13:26 +0000)]
sfc: Work around unreliable legacy interrupt status

In rare cases, reading the legacy interrupt status register can
acknowledge an event queue whose attention flag has not yet been set
in the register.  Until we service this event queue it will not
generate any more interrupts.  Therefore, as a secondary check, poll
the next slot in each active event queue whose flag is not set.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Pad packets to 33 bytes to prevent TX packet parser lockup
Ben Hutchings [Fri, 20 Mar 2009 13:25:39 +0000 (13:25 +0000)]
sfc: Pad packets to 33 bytes to prevent TX packet parser lockup

The packet parser used in the TX data path for locating checksum
fields can lose synchronisation with the TX queue manager when
handling packets that look like IPv4 but are too short (17-32 bytes).
Work around this by padding to 33 bytes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodsa: add switch chip cascading support
Lennert Buytenhek [Fri, 20 Mar 2009 09:52:09 +0000 (09:52 +0000)]
dsa: add switch chip cascading support

The initial version of the DSA driver only supported a single switch
chip per network interface, while DSA-capable switch chips can be
interconnected to form a tree of switch chips.  This patch adds support
for multiple switch chips on a network interface.

An example topology for a 16-port device with an embedded CPU is as
follows:

+-----+          +--------+       +--------+
|     |eth0    10| switch |9    10| switch |
| CPU +----------+        +-------+        |
|     |          | chip 0 |       | chip 1 |
+-----+          +---++---+       +---++---+
                     ||               ||
                     ||               ||
                     ||1000baseT      ||1000baseT
                     ||ports 1-8      ||ports 9-16

This requires a couple of interdependent changes in the DSA layer:

- The dsa platform driver data needs to be extended: there is still
  only one netdevice per DSA driver instance (eth0 in the example
  above), but each of the switch chips in the tree needs its own
  mii_bus device pointer, MII management bus address, and port name
  array. (include/net/dsa.h)  The existing in-tree dsa users need
  some small changes to deal with this. (arch/arm)

- The DSA and Ethertype DSA tagging modules need to be extended to
  use the DSA device ID field on receive and demultiplex the packet
  accordingly, and fill in the DSA device ID field on transmit
  according to which switch chip the packet is heading to.
  (net/dsa/tag_{dsa,edsa}.c)

- The concept of "CPU port", which is the switch chip port that the
  CPU is connected to (port 10 on switch chip 0 in the example), needs
  to be extended with the concept of "upstream port", which is the
  port on the switch chip that will bring us one hop closer to the CPU
  (port 10 for both switch chips in the example above).

- The dsa platform data needs to specify which ports on which switch
  chips are links to other switch chips, so that we can enable DSA
  tagging mode on them.  (For inter-switch links, we always use
  non-EtherType DSA tagging, since it has lower overhead.  The CPU
  link uses dsa or edsa tagging depending on what the 'root' switch
  chip supports.)  This is done by specifying "dsa" for the given
  port in the port array.

- The dsa platform data needs to be extended with information on via
  which port to reach any given switch chip from any given switch chip.
  This info is specified via the per-switch chip data struct ->rtable[]
  array, which gives the nexthop ports for each of the other switches
  in the tree.

For the example topology above, the dsa platform data would look
something like this:

static struct dsa_chip_data sw[2] = {
{
.mii_bus = &foo,
.sw_addr = 1,
.port_names[0] = "p1",
.port_names[1] = "p2",
.port_names[2] = "p3",
.port_names[3] = "p4",
.port_names[4] = "p5",
.port_names[5] = "p6",
.port_names[6] = "p7",
.port_names[7] = "p8",
.port_names[9] = "dsa",
.port_names[10] = "cpu",
.rtable = (s8 []){ -1, 9, },
}, {
.mii_bus = &foo,
.sw_addr = 2,
.port_names[0] = "p9",
.port_names[1] = "p10",
.port_names[2] = "p11",
.port_names[3] = "p12",
.port_names[4] = "p13",
.port_names[5] = "p14",
.port_names[6] = "p15",
.port_names[7] = "p16",
.port_names[10] = "dsa",
.rtable = (s8 []){ 10, -1, },
},
},

static struct dsa_platform_data pd = {
.netdev = &foo,
.nr_switches = 2,
.sw = sw,
};

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodsa: add support for the Marvell 88E6095/6095F switch chips
Lennert Buytenhek [Fri, 20 Mar 2009 09:50:39 +0000 (09:50 +0000)]
dsa: add support for the Marvell 88E6095/6095F switch chips

Add support for the Marvell 88E6095/6095F switch chips.  These
chips are similar to the 88e6131, so we can add the support to
mv88e6131.c easily.

Thanks to Gary Thomas <gary@mlbassoc.com> and Jesper Dangaard
Brouer <hawk@diku.dk> for testing various patches.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodsa: set ->iflink on slave interfaces to the ifindex of the parent
Lennert Buytenhek [Fri, 20 Mar 2009 09:49:49 +0000 (09:49 +0000)]
dsa: set ->iflink on slave interfaces to the ifindex of the parent

..so that we can parse the DSA topology from 'ip link' output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
4: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
5: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
6: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
7: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoeql: fix non-constant printk warning
Stephen Hemminger [Fri, 20 Mar 2009 07:14:14 +0000 (07:14 +0000)]
eql: fix non-constant printk warning

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: fix non-const printk argument
Stephen Hemminger [Fri, 20 Mar 2009 06:44:02 +0000 (06:44 +0000)]
atm: fix non-const printk argument

Change printk() argument to fix compiler warning.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipx: use constant for strings and desciptor
Stephen Hemminger [Fri, 20 Mar 2009 05:45:39 +0000 (05:45 +0000)]
ipx: use constant for strings and desciptor

Fix compiler warning about non-const format string.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosnap: use const for descriptor
Stephen Hemminger [Fri, 20 Mar 2009 05:43:14 +0000 (05:43 +0000)]
snap: use const for descriptor

Protocols should be able to use constant value for the descriptor.
Minor whitespace cleanup as well

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: cleanup tx dma so map & unmap use matching calls
Alexander Duyck [Fri, 20 Mar 2009 00:17:43 +0000 (00:17 +0000)]
igb: cleanup tx dma so map & unmap use matching calls

The igb driver was using map_single to map the skbs and then unmap_page to
unmap them.  This update changes that so instead uses skb_dma_map and
skb_dma_unmap.

In addition the next_to_watch member of the buffer_info struct was being
set uneccesarily.  I removed the spots where it was set without being needed.

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>
15 years agoigb: rework igb_set_multi so that vfs are properly updated
Alexander Duyck [Fri, 20 Mar 2009 00:17:25 +0000 (00:17 +0000)]
igb: rework igb_set_multi so that vfs are properly updated

Currently if there are no multicast addresses programmed into the PF then
the VFs cannot have their multicast filters reset.  This change makes it so
the code path that updates vf multicast is always called along with the pf
updates.

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>
15 years agoigb: update driver to use setup_timer function
Alexander Duyck [Fri, 20 Mar 2009 00:17:08 +0000 (00:17 +0000)]
igb: update driver to use setup_timer function

igb was previously setting up all of the timer members itself.  It is
easier to just call setup_timer and reduce the calls to one line.

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>
15 years agoigb: remove IGB_DESC_UNUSED since it is better handled by a function call
Alexander Duyck [Fri, 20 Mar 2009 00:16:50 +0000 (00:16 +0000)]
igb: remove IGB_DESC_UNUSED since it is better handled by a function call

This patch removes IGB_DESC_UNUSED and replaces it with a function call
instead in order to cleanup some of the ugliness introduced by the macro.

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>
15 years agoigb: allow tx of pre-formatted vlan tagged packets
Arthur Jones [Sat, 21 Mar 2009 23:55:07 +0000 (16:55 -0700)]
igb: allow tx of pre-formatted vlan tagged packets

When the 82575 is fed 802.1q packets, it chokes with
an error of the form:

igb 0000:08:00.1 partial checksum but proto=81!

As the logic there was not smart enough to look into
the vlan header to pick out the encapsulated protocol.

There are times when we'd like to send these packets
out without having to configure a vlan on the interface.
Here we check for the vlan tag and allow the packet to
go out with the correct hardware checksum.

Thanks to Kand Ly <kand@riverbed.com> for discovering the
issue and the coming up with a solution.  This patch is
based upon his work.

Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agospider_net: Convert to net_device_ops.
Yang Hongyang [Sat, 21 Mar 2009 23:52:17 +0000 (16:52 -0700)]
spider_net: Convert to net_device_ops.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopowerpc 4xx EMAC driver: device name reported on timeout is not correct
Mikhail Zolotaryov [Thu, 19 Mar 2009 22:28:02 +0000 (22:28 +0000)]
powerpc 4xx EMAC driver: device name reported on timeout is not correct

Hi,

IBM EMAC driver performs device reset (drivers/net/ibm_newemac/core.c:
emac_probe() -> emac_init_phy() -> emac_reset()) before registering
appropriate net_device (emac_probe() -> register_netdev()), so
net_device name contains raw format string during EMAC reset ("eth%d").

If the case of reset timeout, emac_report_timeout_error() function is
called to report an error. The problem is this function uses net_device
name to report device related, which is not correct, as a result in the
kernel log buffer we see:

eth%d: reset timeout

The solution is to print device_node full_name instead. After applying
the patch proposed, error string is like the following:

/plb/opb/ethernet@ef600e00: reset timeout

Signed-off-by: Mikhail Zolotaryov <lebon@lebon.org.ua>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: remove useless prefetch() call
Eric Dumazet [Sat, 21 Mar 2009 20:42:55 +0000 (13:42 -0700)]
net: remove useless prefetch() call

There is no gain using prefetch() in dev_hard_start_xmit(), since
we already had to read ops->ndo_select_queue pointer in dev_pick_tx(),
and both pointers are probably located in the same cache line.

This prefetch call slows down fast path because of a stall in address
computation.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Clean up TEST_FRAME hacks.
Vlad Yasevich [Sat, 21 Mar 2009 20:41:09 +0000 (13:41 -0700)]
sctp: Clean up TEST_FRAME hacks.

Remove 2 TEST_FRAME hacks that are no longer needed.  These allowed
sctp regression tests to compile before, but are no longer needed.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: fix select_queue management
Stephen Hemminger [Sat, 21 Mar 2009 20:40:01 +0000 (13:40 -0700)]
ixgbe: fix select_queue management

Convert ixgbe to use net_device_ops properly.
Rather than changing the select_queue function pointer
just check the flag.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoskb: expose and constify hash primitives
Stephen Hemminger [Sat, 21 Mar 2009 20:39:26 +0000 (13:39 -0700)]
skb: expose and constify hash primitives

Some minor changes to queue hashing:
 1. Use const on accessor functions
 2. Export skb_tx_hash for use in drivers (see ixgbe)

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: lec use dev_change_mtu
Stephen Hemminger [Sat, 21 Mar 2009 20:37:28 +0000 (13:37 -0700)]
atm: lec use dev_change_mtu

Rather than calling device pointer directly (which is incorrect with
net_device_ops), use the standard dev_change_mtu. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/*: use linux/kernel.h swap()
Ilpo Järvinen [Sat, 21 Mar 2009 20:36:17 +0000 (13:36 -0700)]
net/*: use linux/kernel.h swap()

tcp_sack_swap seems unnecessary so I pushed swap to the caller.
Also removed comment that seemed then pointless, and added include
when not already there. Compile tested.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetrom: zero length frame filtering in NetRom
Bernard Pidoux [Sat, 21 Mar 2009 20:34:20 +0000 (13:34 -0700)]
netrom: zero length frame filtering in NetRom

A zero length frame filter was recently introduced in ROSE protocole.
Previous commit makes the same at AX25 protocole level.
This patch has the same purpose for NetRom  protocole.
The reason is that empty frames have no meaning in NetRom protocole.

Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoax25: zero length frame filtering in AX25
Bernard Pidoux [Sat, 21 Mar 2009 20:33:55 +0000 (13:33 -0700)]
ax25: zero length frame filtering in AX25

In previous commit 244f46ae6e9e18f6fc0be7d1f49febde4762c34b
was introduced a zero length frame filter for ROSE protocole.
This patch has the same purpose at AX25 frame level for the same
reason. Empty frames have no meaning in AX25 protocole.

Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoax25: SOCK_DEBUG message simplification
Bernard Pidoux [Sat, 21 Mar 2009 20:33:18 +0000 (13:33 -0700)]
ax25: SOCK_DEBUG message simplification

This patch condenses two debug messages in one.

Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofsl_pq_mdio: Revive Gianfar TBI PHY support
Anton Vorontsov [Sat, 21 Mar 2009 20:30:05 +0000 (13:30 -0700)]
fsl_pq_mdio: Revive Gianfar TBI PHY support

commit 1577ecef766650a57fceb171acee2b13cbfaf1d3 ("netdev: Merge UCC
and gianfar MDIO bus drivers") broke the TSEC TBI PHY support: the
driver now refuses to probe TBI MDIO buses as it doesn't know about
"fsl,gianfar-tbi" compatible entry, and thus _probe() fails with
-ENODEV status.

Fix this by adding "fsl,gianfar-tbi" to the list of known Gianfar
MDIO buses.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: reorder struct inet6_ifaddr to remove padding on 64 bit builds
Richard Kennedy [Sat, 21 Mar 2009 20:29:05 +0000 (13:29 -0700)]
ipv6: reorder struct inet6_ifaddr to remove padding on 64 bit builds

reorder struct inet6_ifaddr to remove padding on 64 bit builds

remove 8 bytes of padding so inet6_ifaddr becomes 192 bytes & fits into
a smaller slab.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: Fix build with CONFIG_PM enabled
Anton Vorontsov [Sat, 21 Mar 2009 20:27:55 +0000 (13:27 -0700)]
gianfar: Fix build with CONFIG_PM enabled

commit 4826857f1bf07f9c0f1495e9b05d125552c88a85 ("gianfar: pass the
proper dev to DMA ops") introduced this build breakage:

  CC      drivers/net/gianfar.o
drivers/net/gianfar.c: In function 'gfar_suspend':
drivers/net/gianfar.c:552: error: 'struct gfar_private' has no member named 'dev'
drivers/net/gianfar.c: In function 'gfar_resume':
drivers/net/gianfar.c:601: error: 'struct gfar_private' has no member named 'dev'
make[2]: *** [drivers/net/gianfar.o] Error 1

Fix this by converting suspend and resume routines to use
gfar_private->ndev.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe100: add support for 82552 10/100 adapter
Bruce Allan [Sat, 21 Mar 2009 20:25:25 +0000 (13:25 -0700)]
e100: add support for 82552 10/100 adapter

This patch enables support for the new Intel 82552 adapter (new PHY paired
with the existing MAC in the ICH7 chipset).  No new features are added to
the driver, however there are minor changes due to updated registers and a
few workarounds for hardware errata.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.infradead.org/~dwmw2/solos-2.6
David S. Miller [Sat, 21 Mar 2009 20:23:01 +0000 (13:23 -0700)]
Merge branch 'master' of git://git.infradead.org/~dwmw2/solos-2.6

15 years agoe1000e: fixup merge error
Arthur Jones [Fri, 20 Mar 2009 22:56:35 +0000 (15:56 -0700)]
e1000e: fixup merge error

When merging into Jeff's tree:

commit 5f66f208064f083aab5e55935d0575892e033b59
Author: Arthur Jones <ajones@riverbed.com>
Date:   Thu Mar 19 01:13:08 2009 +0000

    e1000e: allow tx of pre-formatted vlan tagged packets

We lost one line, this fixes that missing
piece...

Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Fri, 20 Mar 2009 09:27:41 +0000 (02:27 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/virtio_net.c

15 years agonet: reorder struct Qdisc for better SMP performance
Eric Dumazet [Fri, 20 Mar 2009 08:33:32 +0000 (01:33 -0700)]
net: reorder struct Qdisc for better SMP performance

dev_queue_xmit() needs to dirty fields "state", "q", "bstats" and "qstats"

On x86_64 arch, they currently span three cache lines, involving more
cache line ping pongs than necessary, making longer holding of queue spinlock.

We can reduce this to one cache line, by grouping all read-mostly fields
at the beginning of structure. (Or should I say, all highly modified fields
at the end :) )

Before patch :

offsetof(struct Qdisc, state)=0x38
offsetof(struct Qdisc, q)=0x48
offsetof(struct Qdisc, bstats)=0x80
offsetof(struct Qdisc, qstats)=0x90
sizeof(struct Qdisc)=0xc8

After patch :

offsetof(struct Qdisc, state)=0x80
offsetof(struct Qdisc, q)=0x88
offsetof(struct Qdisc, bstats)=0xa0
offsetof(struct Qdisc, qstats)=0xac
sizeof(struct Qdisc)=0xc0

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodnet: remove duplicated #include
Huang Weiyi [Fri, 20 Mar 2009 08:32:58 +0000 (01:32 -0700)]
dnet: remove duplicated #include

Removed duplicated #include in drivers/net/dnet.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Fixup the watchdog interrupt scheduling on 82599
Jesse Brandeburg [Thu, 19 Mar 2009 01:24:04 +0000 (01:24 +0000)]
ixgbe: Fixup the watchdog interrupt scheduling on 82599

The watchdog will schedule an interrupt to help make sure queues are
cleaned in the case when an interrupt is missed, most likely due to very
high load.  On 82599, there are extra interrupt registers to account for
the larger number of MSI-X vectors (64 total for 82599 vs. 18 total for
82598).  These must be taken into account when performing this operation in
the watchdog.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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>
15 years agoixgbe: Correctly report Wake On LAN for 82599 KX4 devices
PJ Waskiewicz [Thu, 19 Mar 2009 01:23:46 +0000 (01:23 +0000)]
ixgbe: Correctly report Wake On LAN for 82599 KX4 devices

ethtool isn't reporting the support level of WoL for 82599 KX4 devices.
While the device does support WoL, ethtool was never updated to properly
report the level of support, nor will it allow ethtool to modify the type
of packets to listen for.

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>
15 years agoixgbe: Fix PCI bus reporting on driver load for 82598 after 82599 merge
PJ Waskiewicz [Thu, 19 Mar 2009 01:23:29 +0000 (01:23 +0000)]
ixgbe: Fix PCI bus reporting on driver load for 82598 after 82599 merge

82598's PCI bus reporting on driver load was broken after 82599 merged.
This results in incorrect reporting, and an erroneous warning message
that the 82598 is in a PCIe slot that isn't fast enough to run 10GbE.

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>
15 years agoixgb: refactor tx path to use skb_dma_map/unmap
Alexander Duyck [Thu, 19 Mar 2009 01:15:21 +0000 (01:15 +0000)]
ixgb: refactor tx path to use skb_dma_map/unmap

This code updates ixgb so that it can use the skb_dma_map/unmap functions
to map the buffers.  In addition it also updates the tx hang logic to use
time_stamp instead of dma to determine if it has detected a tx hang.

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>
15 years agoe1000e: allow tx of pre-formatted vlan tagged packets
Arthur Jones [Thu, 19 Mar 2009 01:13:08 +0000 (01:13 +0000)]
e1000e: allow tx of pre-formatted vlan tagged packets

As with igb, when the e1000e driver is fed 802.1q
packets with hardware checksum on, it chokes with an
error of the form:

checksum_partial proto=81!

As the logic there was not smart enough to look into
the vlan header to pick out the encapsulated protocol.

There are times when we'd like to send these packets
out without having to configure a vlan on the interface.
Here we check for the vlan tag and allow the packet to
go out wiht the correct hardware checksum.

Thanks to Kand Ly <kand@riverbed.com> for discovering the
issue and the coming up with a solution.  This patch is
based upon his work.

Fixups from Stephen Hemminger <shemminger@vyatta.com> and
Alexander Duyck <alexander.h.duyck@intel.com>

Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Stephen Hemminger <shemminger@vyatta.com>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: fix dma error handling issues
Alexander Duyck [Thu, 19 Mar 2009 01:12:50 +0000 (01:12 +0000)]
e1000e: fix dma error handling issues

There were a few issues I noticed in e1000e. These include a double free
of the skb if mapping fails, and the fact that context descriptors appear
to be left in the descriptor ring after the failure.

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>
15 years agoe1000e: add support for 82583 device id
Alexander Duyck [Thu, 19 Mar 2009 01:12:27 +0000 (01:12 +0000)]
e1000e: add support for 82583 device id

Add device ID and related support for 82583 mac.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Radheka Godse <radheka.godse@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc9420: fix big endian rx checksum offload
Steve Glendinning [Fri, 20 Mar 2009 08:14:53 +0000 (01:14 -0700)]
smsc9420: fix big endian rx checksum offload

The cpu_to_le16 here looks suspicious to me, I don't think we need it
because put_unaligned_le16 also does this.

I don't currently have any big endian hardware with a PCI bus available
to test on, so I haven't been able to verify this.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosunvnet: Convert to net_device_ops.
David S. Miller [Fri, 20 Mar 2009 07:51:22 +0000 (00:51 -0700)]
sunvnet: Convert to net_device_ops.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc911x: allow setting of mac address
Steve Glendinning [Thu, 19 Mar 2009 00:24:46 +0000 (00:24 +0000)]
smsc911x: allow setting of mac address

This patch replaces the generic eth_mac_addr function with one that
also updates the hardware mac address registers.  It also renames the
existing smsc911x_set_mac_address function to
smsc911x_hw_set_mac_address for clarity.

Newer LAN911x and all LAN921x devices also support changing the mac
address while the device is running, which is useful for some bonding
modes.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc911x: replace print_mac with %pM
Steve Glendinning [Thu, 19 Mar 2009 00:24:45 +0000 (00:24 +0000)]
smsc911x: replace print_mac with %pM

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc911x: define status word positions as constants
Steve Glendinning [Thu, 19 Mar 2009 00:24:44 +0000 (00:24 +0000)]
smsc911x: define status word positions as constants

The vast majority of bit constants in this driver are defined in the
header file, but TX and RX status word bits are not.  This patch (which
should make no functional change) defines these, to make the driver
slightly more readable.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortnetlink: add new value for DHCP added routes
Stephen Hemminger [Fri, 20 Mar 2009 06:49:41 +0000 (23:49 -0700)]
rtnetlink: add new value for DHCP added routes

To improve manageability, it would be good to be able to disambiguate routes
added by administrator from those added by DHCP client.  The only necessary
kernel change is to add value to rtnetlink include file so iproute2 utility
can use it.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobas_gigaset: correctly allocate USB interrupt transfer buffer
Tilman Schmidt [Thu, 19 Mar 2009 06:44:23 +0000 (23:44 -0700)]
bas_gigaset: correctly allocate USB interrupt transfer buffer

Every USB transfer buffer has to be allocated individually by kmalloc.

Impact: bugfix, no functional change

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Tested-by: Kolja Waschk <kawk@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc911x: reset last known duplex and carrier on open
Steve Glendinning [Thu, 19 Mar 2009 06:37:18 +0000 (23:37 -0700)]
smsc911x: reset last known duplex and carrier on open

smsc911x_phy_adjust_link is called periodically by the phy layer (as
it's run in polling mode), and it only updates the hardware when it sees
a change in duplex or carrier.  This patch clears the last known values
every time the interface is brought up, instead of only when the module
is loaded.

Without this patch the adjust_link function never updates the hardware
after an ifconfig down; ifconfig up.  On a full duplex link this causes
the tx error counter to increment, even though packets are correctly
transmitted, as the default MAC_CR register setting is for half duplex.

The tx errors are "no carrier" errors, which should be ignored in
full-duplex mode.  When MAC_CR is set to "full duplex" mode they are
correctly ignored by the hardware.

Note that even with this patch the tx error counter can increment if
packets are transmitted between "ifconfig up" and the first phy poll
interval.  An improved solution would use the phy interrupt with phylib,
but I haven't managed to make this work 100% robustly yet.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosh_eth: Fix mistake of the address of SH7763
Nobuhiro Iwamatsu [Mon, 16 Mar 2009 19:52:23 +0000 (19:52 +0000)]
sh_eth: Fix mistake of the address of SH7763

Address of SH_TSU_ADDR and ARSTR of SH7763 was wrong.
This revise it.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosh_eth: Change handling of IRQ
Nobuhiro Iwamatsu [Mon, 16 Mar 2009 19:50:57 +0000 (19:50 +0000)]
sh_eth: Change handling of IRQ

Handling of IRQ of the SH7763/SH7764 CPU which sh_eth supported was
changed.
This revises it for this change.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: pass the proper dev to DMA ops
Kumar Gala [Thu, 19 Mar 2009 06:28:22 +0000 (23:28 -0700)]
gianfar: pass the proper dev to DMA ops

We need to be passing the of_platform device struct into the DMA ops as
its the one that has the archdata setup to know which low-level DMA ops we
should be using (not the net_device one).  This isn't an issue until we
expect the archdata to be setup correctly.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetns: oops in ip[6]_frag_reasm incrementing stats
Jorge Boncompte [DTI2] [Thu, 19 Mar 2009 06:26:11 +0000 (23:26 -0700)]
netns: oops in ip[6]_frag_reasm incrementing stats

dev can be NULL in ip[6]_frag_reasm for skb's coming from RAW sockets.

Quagga's OSPFD sends fragmented packets on a RAW socket, when netfilter
conntrack reassembles them on the OUTPUT path you hit this code path.

You can test it with something like "hping2 -0 -d 2000 -f AA.BB.CC.DD"

With help from Jarek Poplawski.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: kfree(napi->skb) => kfree_skb
Roel Kluin [Thu, 19 Mar 2009 06:12:13 +0000 (23:12 -0700)]
net: kfree(napi->skb) => kfree_skb

struct sk_buff pointers should be freed with kfree_skb.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: fix sctp breakage
Al Viro [Thu, 19 Mar 2009 02:12:42 +0000 (19:12 -0700)]
net: fix sctp breakage

broken by commit 5e739d1752aca4e8f3e794d431503bfca3162df4; AFAICS should
be -stable fodder as well...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Aced-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotipc: fix non-const printf format arguments
Stephen Hemminger [Thu, 19 Mar 2009 02:11:29 +0000 (19:11 -0700)]
tipc: fix non-const printf format arguments

Fix warnings from current gcc about using non-const strings as printf
args in TIPC. Compile tested only (not a TIPC user).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: fix display of local and remote sit endpoints
Bjørn Mork [Thu, 19 Mar 2009 01:56:54 +0000 (18:56 -0700)]
ipv6: fix display of local and remote sit endpoints

This fixes the regressions cause by
commit 1326c3d5a4b792a2b15877feb7fb691f8945d203
(v2.6.28-rc6-461-g23a12b1) broke the display of local and remote
addresses of an SIT tunnel in iproute2.

nt->parms is used by ipip6_tunnel_init() and therefore need to be
initialized first.

Tracked as http://bugzilla.kernel.org/show_bug.cgi?id=12868

Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Document /proc/sys/net/core/netdev_budget
Stanislaw Gruszka [Thu, 19 Mar 2009 01:51:06 +0000 (18:51 -0700)]
net: Document /proc/sys/net/core/netdev_budget

The NAPI poll parameter netdev_budget is not documented in
kernel-docs. Since it may have a substantial effect on at least some
network loads, it should be.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: remove parameter from tcp_recv_urg().
Rami Rosen [Thu, 19 Mar 2009 01:50:09 +0000 (18:50 -0700)]
tcp: remove parameter from tcp_recv_urg().

This patch removes an unused parameter (addr_len) from tcp_recv_urg()
method in net/ipv4/tcp.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotulip: fix crash on iface up with shirq debug
Kyle McMartin [Thu, 19 Mar 2009 01:49:01 +0000 (18:49 -0700)]
tulip: fix crash on iface up with shirq debug

Tulip is currently doing request_irq before it has done its
initialization. This is usually not a problem because it hasn't
enable interrupts yet, but with DEBUG_SHIRQ on, we call the irq handler
when registering the interrupt as a sanity check.

This can result in a NULL ptr dereference, so call tulip_init_ring
before request_irq, and add a free_ring function to do the freeing
now shared with tulip_close.

Tested with a shell loop running ifup, ifdown in a loop a few hundred
times with DEBUG_SHIRQ on.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovirtio_net: Make virtio_net support carrier detection
Pantelis Koukousoulas [Thu, 19 Mar 2009 01:40:02 +0000 (18:40 -0700)]
virtio_net: Make virtio_net support carrier detection

Impact: Make NetworkManager work with virtio_net

For now the semantics are simple: There is always carrier.

This allows a seamless experience with e.g., qemu/kvm
where NetworkManager just configures and sets up
everything automagically.

If/when a generally agreed-upon way to control
carrier on/off in the emulator/hypervisor level
emerges, it will be trivial to extend the driver
to support that too, but for now even this 2-liner
makes user experience that much better.

Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobonding: Fix updating of speed/duplex changes
Jay Vosburgh [Thu, 19 Mar 2009 01:38:25 +0000 (18:38 -0700)]
bonding: Fix updating of speed/duplex changes

This patch corrects an omission from the following commit:

commit f0c76d61779b153dbfb955db3f144c62d02173c2
Author: Jay Vosburgh <fubar@us.ibm.com>
Date:   Wed Jul 2 18:21:58 2008 -0700

    bonding: refactor mii monitor

The un-refactored code checked the link speed and duplex of
every slave on every pass; the refactored code did not do so.

The 802.3ad and balance-alb/tlb modes utilize the speed and
duplex information, and require it to be kept up to date.  This patch
adds a notifier check to perform the appropriate updating when the slave
device speed changes.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Fix incorrect disable_ipv6 behavior
Brian Haley [Thu, 19 Mar 2009 01:22:48 +0000 (18:22 -0700)]
ipv6: Fix incorrect disable_ipv6 behavior

Fix the behavior of allowing both sysctl and addrconf_dad_failure()
to set the disable_ipv6 parameter without any bad side-effects.
If DAD fails and accept_dad > 1, we will still set disable_ipv6=1,
but then instead of allowing an RA to add an address then
immediately fail DAD, we simply don't allow the address to be
added in the first place.  This also lets the user set this flag
and disable all IPv6 addresses on the interface, or on the entire
system.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoa2065: skb_padto cleanups
Dave Jones [Thu, 19 Mar 2009 01:17:48 +0000 (18:17 -0700)]
a2065: skb_padto cleanups

Remove unnecessary check (skb_padto does the same check)
Remove unnecessary duplicate variable
Remove unnecessary clearing of padded part of skb.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Fix problem of using wrong IRQ handler.
Michael Chan [Thu, 19 Mar 2009 01:11:51 +0000 (18:11 -0700)]
bnx2: Fix problem of using wrong IRQ handler.

The MSI-X handler was chosen before the call to pci_enable_msix().
If MSI-X was not available, the wrong MSI-X handler would be used in
INTA mode.  This would cause a screaming interrupt problem because
INTA would not be cleared by the MSI-X handler.

Fixed by assigning MSI-X handler after pci_enable_msix() returns
successfully.  Also update version to 1.9.3.

Thomas Chenault <thomas_chenault@dell.com> helped us find this problem.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 17 Mar 2009 22:04:31 +0000 (15:04 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 17 Mar 2009 22:01:30 +0000 (15:01 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/igb/igb_main.c
drivers/net/qlge/qlge_main.c
drivers/net/wireless/ath9k/ath9k.h
drivers/net/wireless/ath9k/core.h
drivers/net/wireless/ath9k/hw.c

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 17 Mar 2009 21:29:22 +0000 (14:29 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agonetxen: fix firmware download warnings
Dhananjay Phadke [Tue, 17 Mar 2009 20:14:22 +0000 (13:14 -0700)]
netxen: fix firmware download warnings

Fix following warnings, by using integer firmware types.

drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_load_firmware':
drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Tue, 17 Mar 2009 20:12:47 +0000 (13:12 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6

15 years agogro: Fix legacy path napi_complete crash
Herbert Xu [Tue, 17 Mar 2009 20:11:29 +0000 (13:11 -0700)]
gro: Fix legacy path napi_complete crash

On the legacy netif_rx path, I incorrectly tried to optimise
the napi_complete call by using __napi_complete before we reenable
IRQs.  This simply doesn't work since we need to flush the held
GRO packets first.

This patch fixes it by doing the obvious thing of reenabling
IRQs first and then calling napi_complete.

Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Fix vlan/netpoll check again
Herbert Xu [Tue, 17 Mar 2009 20:10:52 +0000 (13:10 -0700)]
gro: Fix vlan/netpoll check again

Jarek Poplawski pointed out that my previous fix is broken for
VLAN+netpoll as if netpoll is enabled we'd end up in the normal
receive path instead of the VLAN receive path.

This patch fixes it by calling the VLAN receive hook.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosolos: Disable DMA until we have an FPGA update with it actually implemented.
David Woodhouse [Tue, 17 Mar 2009 15:10:51 +0000 (15:10 +0000)]
solos: Disable DMA until we have an FPGA update with it actually implemented.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agosolos: Automatically determine number of ports
Nathan Williams [Fri, 6 Feb 2009 23:19:13 +0000 (10:19 +1100)]
solos: Automatically determine number of ports

Signed-off-by: Nathan Williams <nathan@traverse.com.au>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agosolos: Reset device on unload, free pending skbs
David Woodhouse [Tue, 17 Mar 2009 14:59:34 +0000 (14:59 +0000)]
solos: Reset device on unload, free pending skbs

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoiwlwifi: correct log level when error occurs
Reinette Chatre [Wed, 11 Mar 2009 18:18:01 +0000 (11:18 -0700)]
iwlwifi: correct log level when error occurs

user needs to see this message even if debugging disabled

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: print contents of control register when error occurs
Reinette Chatre [Wed, 11 Mar 2009 18:18:00 +0000 (11:18 -0700)]
iwlwifi: print contents of control register when error occurs

hopefully the register contents will guide us to why this failure occured

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: fix warning when set WEP key
Mohamed Abbas [Wed, 11 Mar 2009 18:17:59 +0000 (11:17 -0700)]
iwlagn: fix warning when set WEP key

iwl_clear_station_table will be called every time rxon called.
In this function ucode_key_table is set to 0 even though a static
WEP security is set. This will cause in many warning and might be
an issue if dynamic WEP is set. This patch make sure we keep track
of all existing static WEP when this function is called.

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>
15 years agoiwl3945: unmap previously mapped memory
Reinette Chatre [Wed, 11 Mar 2009 18:17:58 +0000 (11:17 -0700)]
iwl3945: unmap previously mapped memory

During preparation of TX we create DMA mapping to TX command as part of
preparing the TFD. This mapping needs to be cleared at the time TFD is
freed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl_tx_cmd_complete
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:57 +0000 (11:17 -0700)]
iwl3945: use iwl_tx_cmd_complete

iwl3945 uses iwl_tx_cmd_complete to reclaim the unused buffers of the queue.
iwl_tx_cmd_complete in turn call the iwl_hcmd_queue_reclaim which will
unmap the dma mapping to tx_cmd and frees the memory.

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>
15 years agoiwl3945 : fix rate scaling
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:56 +0000 (11:17 -0700)]
iwl3945 : fix rate scaling

Patch fixes the bug 1900 at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900

Issues:
Throughput and success ratio calculations were not done properly.
Number of retries were exceeding 16.

Fix:
Patch fixes above issues by doing window calculations inline with iwlwifi
Patch adds sanity check to limit number of retries to 16.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-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>
15 years agoiwl3945: use iwl_led structure
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:55 +0000 (11:17 -0700)]
iwl3945: use iwl_led structure

3945 can now use iwl_led's structure from iwlwifi.
Patch also removes CONFIG_IWL3945_LEDS flag from Kconfig as 3945's led
support will now be enabled if user selects CONFIG_IWLWIFI_LEDS.

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>
15 years agoiwl3945: fix sparse error
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:54 +0000 (11:17 -0700)]
iwl3945: fix sparse error

error is:
iwl3945-base.c:545:5: warning: symbol 'iwl3945_set_dynamic_key' was not
declared. Should it be static?

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>
15 years agoiwlwifi: verify the antenna selection when receive fixed rate debugfs
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:12 +0000 (14:35 -0700)]
iwlwifi: verify the antenna selection when receive fixed rate debugfs

When iwlwifi driver receive fixed rate debugfs command, validate the
antenna selection, if the selection is invalid, report the valid antenna
choice and do not set the rate scale table to fixed rate. Otherwise, set
the entire rate scale table to the fixed rate request by the user. this
validation can prevent sysassert happen in uCode

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>
15 years agoiwlwifi: check IEEE80211_TX_STAT_AMPDU for agg pkt
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:11 +0000 (14:35 -0700)]
iwlwifi: check IEEE80211_TX_STAT_AMPDU for agg pkt

when perform rate scaling, in tx status function, checking for
IEEE80211_TX_STAT_AMPDU flag instead of IEEE_TX_CTL_AMPDU flag to perform
AMPDU rate scaling operation.

IEEE80211_TX_CTL_AMPDU was set by mac80211 for aggregation pkt. But when
iwlwifi receive the tx status reply, it reset the flag to following
info->flags = IEEE80211_TX_STAT_ACK;
info->flags |= IEEE80211_TX_STAT_AMPDU;
it causes the rate-scaling to not work for aggregation pkt if we checking
for IEEE80211_TX_CTL_AMPDU flag.

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>
15 years agoiwlwifi: HT performance improvement changes
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:10 +0000 (14:35 -0700)]
iwlwifi: HT performance improvement changes

During rate scaling, checking for 0 retry count before decrement
the count by 1, this can avoid the retry count to become 255 (0xff),
which will cause the rate to drop faster than what we expect during good
condition (receive 0 retry packet). also change the algorithm to make
the rate not drop faster than what we like.

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>
15 years agoiwlwifi: remove un-necessary rs_tl_turn_on_agg() after agg enabled
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:09 +0000 (14:35 -0700)]
iwlwifi: remove un-necessary rs_tl_turn_on_agg() after agg enabled

After the MLME handshaking complete and tx aggregation started for the
tid. Do not send unnecessary turn on aggregation request to mac80211.

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>
15 years agoiwlwifi: add rf information in rate_scale debugfs command
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:08 +0000 (14:35 -0700)]
iwlwifi: add rf information in rate_scale debugfs command

Adding more Radio information when displaying
rate_scale_table. This can help to understand how many antenna and the
current RF condition such as SISO, MIMO2, MIMO3.

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>
15 years agoiwlwifi: add valid tx antenna information in rate_scale_table debugfs
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:07 +0000 (14:35 -0700)]
iwlwifi: add valid tx antenna information in rate_scale_table debugfs

when display rate_scale_table debugfs information, also display valid tx
antenna information, this will help user to select correct antenna when
issue fixed rate debugfs command

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoray_cs: checkpatch.pl and Lindent cleanups
John Daiker [Tue, 10 Mar 2009 13:59:54 +0000 (06:59 -0700)]
ray_cs: checkpatch.pl and Lindent cleanups

Before: 1099 errors, 93 warnings, 2854 lines checked
After:  19 errors, 47 warnings, 2976 lines checked

The big bulk of this is code indent and over 80 character lines
(Lindent did this part) Other changes are foo * bar spacing, and
trailing whitespace.

v2: Cleans up ill-indented comments.  Subsequently, this reduces the
number of warnings, too.  Thanks to Joe Perches for pointing this out!

v3: Ran the whole file through Lindent first... which does most of
the work for me. :) Again, thanks to Joe Perches for this.

This is my final answer!

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: Marvell TOPDOG wireless driver
Lennert Buytenhek [Tue, 10 Mar 2009 09:13:33 +0000 (10:13 +0100)]
mwl8k: Marvell TOPDOG wireless driver

Add a driver for Marvell 88w8xxx TOPDOG PCI/PCIe wireless parts.
This initial version supports the 88w8687 802.11b/g PCIe part on
channels 1-11, and only STA mode is currently implemented.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix FIF_PROMISC_IN_BSS processing in station mode
Jouni Malinen [Tue, 10 Mar 2009 08:55:50 +0000 (10:55 +0200)]
ath9k: Fix FIF_PROMISC_IN_BSS processing in station mode

We must not disable ACK sending in this case since it would break
normal station operations. In addition, clarify the comment about AP
mode to make more sense.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Add spectrum management to HW capabilities
Sujith [Tue, 10 Mar 2009 05:09:53 +0000 (10:39 +0530)]
ath9k: Add spectrum management to HW capabilities

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: make few eeprom and calib items static
Luis R. Rodriguez [Tue, 10 Mar 2009 02:09:42 +0000 (22:09 -0400)]
ath9k: make few eeprom and calib items static

This fixes the sparse complaints:

drivers/net/wireless/ath9k/eeprom.c:1407:5: warning: symbol
'ath9k_hw_4k_get_spur_channel' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:1436:19: warning: symbol
'eep_4k_ops' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2808:5: warning: symbol
'ath9k_hw_def_get_spur_channel' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2837:19: warning: symbol
'eep_def_ops' was not declared. Should it be static?
  CC [M]  drivers/net/wireless/ath9k/eeprom.o
  CHECK   drivers/net/wireless/ath9k/mac.c
  CC [M]  drivers/net/wireless/ath9k/mac.o
  CHECK   drivers/net/wireless/ath9k/calib.c
drivers/net/wireless/ath9k/calib.c:883:6: warning: symbol 'ar9285_clc'
was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: downgrade xmit queue full message to xmit debug
Luis R. Rodriguez [Tue, 10 Mar 2009 02:09:41 +0000 (22:09 -0400)]
ath9k: downgrade xmit queue full message to xmit debug

This is not a fatal message, hitting it simply means we're
going to tell the upper layers to slow their horses down but
as we make more descriptors available we let the show continue
by waking up the queues in ath_wake_mac80211_queue().

We downgrade this as otherwise we fill up your kernel log with
messages which can be common under heavy traffic.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: add regulatory testing options
Luis R. Rodriguez [Tue, 10 Mar 2009 02:08:27 +0000 (22:08 -0400)]
mac80211_hwsim: add regulatory testing options

This adds a module parameter for mac80211_hwsim regulatory testing.
This module parameter is designed specifically to help test the
different possible types of driver specific regulatory requests
and also helps to test world roaming, all without any hardware.

If you want to just simply test different alpha2s just use the userspace
regulatory request as this won't buy you anything new.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: add regulatory netlink multicast group
Luis R. Rodriguez [Tue, 10 Mar 2009 02:07:42 +0000 (22:07 -0400)]
cfg80211: add regulatory netlink multicast group

This allows us to send to userspace "regulatory" events.
For now we just send an event when we change regulatory domains.
We also notify userspace when devices are using their own custom
world roaming regulatory domains.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>