firefly-linux-kernel-4.4.55.git
14 years agoiwlwifi: make iwlwifi send beacons
Daniel C Halperin [Fri, 13 Nov 2009 19:56:34 +0000 (11:56 -0800)]
iwlwifi: make iwlwifi send beacons

Handle BSS_CHANGED_BEACON_ENABLED to enable the sending
of beacons. Also set the correct HT RXON and QoS config.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
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>
14 years agoiwlwifi: fix bugs in beacon configuration
Daniel C Halperin [Fri, 13 Nov 2009 19:56:33 +0000 (11:56 -0800)]
iwlwifi: fix bugs in beacon configuration

When sending beacon commands to the uCode, we must
inform it of the offset in the beacon frame of the
TIM Element so it can transmit packets from the
correct queue. This functionality is implemented
in iwl_set_beacon_tim().

Fix a bug setting the rate_n_flags for the beacon
packet. First, it should not use the station table's
rate (it's a management frame), and second it needs
to properly configure the TX antennas.

Finally, also, clean up and comment relevant functions.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
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>
14 years agoiwlagn: power up device before initializing EEPROM
Reinette Chatre [Fri, 13 Nov 2009 19:56:32 +0000 (11:56 -0800)]
iwlagn: power up device before initializing EEPROM

A recent change optimized the power usage by the device by only powering it
up during EEPROM load if it is required (for OTP devices). This change causes
an error on the 1000 series devices during module load.

The error looks as follows:
[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2

Adding a dump_stack() to where that error is printed shows the following:

[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
[ 1624.081263] Pid: 3073, comm: work_for_cpu Tainted: G        W 2.6.31.5 #4
[ 1624.081263] Call Trace:
[ 1624.081263]  [<ffffffffa02395db>] T.726+0x22b/0x420 [iwlcore]
[ 1624.081263]  [<ffffffffa023985a>] iwlcore_eeprom_acquire_semaphore+0x8a/0x190 [iwlcore]
[ 1624.081263]  [<ffffffff81110c94>] ? __kmalloc+0x194/0x1c0
[ 1624.081263]  [<ffffffffa02391f5>] ?  iwlcore_eeprom_verify_signature+0x25/0xf0 [iwlcore]
[ 1624.081263]  [<ffffffffa0239c67>] iwl_eeprom_init+0x107/0xf40 [iwlcore]
[ 1624.081263]  [<ffffffffa026ab9c>] ?  iwl_prepare_card_hw+0x11c/0x470 [iwlagn]
[ 1624.081263]  [<ffffffff8127e2a4>] ?  pci_bus_write_config_byte+0x64/0x80
[ 1624.081263]  [<ffffffffa026b1f8>] iwl_pci_probe+0x308/0xac0 [iwlagn]
[ 1624.081263]  [<ffffffff810710a0>] ? do_work_for_cpu+0x0/0x30
[ 1624.081263]  [<ffffffff81284912>] local_pci_probe+0x12/0x20
[ 1624.081263]  [<ffffffff810710b3>] do_work_for_cpu+0x13/0x30
[ 1624.081263]  [<ffffffff81075826>] kthread+0xa6/0xb0
[ 1624.081263]  [<ffffffff81012fea>] child_rip+0xa/0x20
[ 1624.081263]  [<ffffffff81075780>] ? kthread+0x0/0xb0
[ 1624.081263]  [<ffffffff81012fe0>] ? child_rip+0x0/0x20
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2

We know that the routines in this trace, iwlcore_eeprom_acquire_semaphore
and iwlcore_eeprom_verify_signature, only access CSR registers and thus do
not need the device to be awake if it is EEPROM. But for OTP it is required
for the device to be awake to read these registers. Ensure device is awake
before accessing these registers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: align tx/rx statistics debugfs format
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:31 +0000 (11:56 -0800)]
iwlwifi: align tx/rx statistics debugfs format

Align the format for tx_statistics and rx_statistics debugfs output for
better readability

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>
14 years agoiwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:30 +0000 (11:56 -0800)]
iwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series

In both 6x00 and 6x50 series, the enhanced/extended tx power table in
EEPROM is used to set the max. tx power limit.
This new tx power table is in 1/2 dBm format, which creates an issue of
possibility of 1/2 dBm loss when driver set the tx power limit; because
of driver keep track and report the tx power in dBm format.

In order to prevent the 1/2 dBm loss, keep track of the true max tx
power in 1/2 dBm format in driver; do the comparison and adjust the tx
power if needed when send tx power command to 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>
14 years agoiwl3945: Reset saved POWER_TABLE_CMD in "up"
Ben Cahill [Fri, 13 Nov 2009 19:56:29 +0000 (11:56 -0800)]
iwl3945: Reset saved POWER_TABLE_CMD in "up"

Power-saving logic will not re-issue a POWER_TABLE_CMD if a new command
matches the prior one.  This can be bad if we re-start the device due to
e.g. uCode error; the new POWER_TABLE_CMD (required to invoke power-saving)
may match the prior POWER_TABLE_CMD issued before the uCode error.

Ensure the POWER_TABLE_CMD is sent to device when uCode is up.

Signed-off-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>
14 years agoiwlwifi: update reply_statistics_cmd with 'clear' parameter
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:28 +0000 (11:56 -0800)]
iwlwifi: update reply_statistics_cmd with 'clear' parameter

When issue REPLY_STATISTICS_CMD to uCode, two possible flag
can be set in the configuration flags

bit 0: Clear statistics
       0: Do not clear Statistics counters
       1: Clear to zero Statistics counters

Allow "clear" parameter to be set from the caller.

Add debugfs file to clear the statistics counters to help monitor and
debug the uCode behavior.

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>
14 years agoiwlwifi: remove external reference for non-exist data structure
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:27 +0000 (11:56 -0800)]
iwlwifi: remove external reference for non-exist data structure

Number of data structure for 6000 series no longer in production, the
data structure already being removed; also need to remove the external
reference define in iwl-dev.h

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>
14 years agoiwlwifi: drop non-production PCI-IDs for 6x50 series
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:26 +0000 (11:56 -0800)]
iwlwifi: drop non-production PCI-IDs for 6x50 series

drop the non-production PCI-IDs for 6x50 series

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>
14 years agoiwlwifi: remove unused parameter from iwl_channel_info
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:25 +0000 (11:56 -0800)]
iwlwifi: remove unused parameter from iwl_channel_info

Number of HT40 power parameters are not used; remove those from
iwl_channel_info data structure

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>
14 years agoiwlwifi: disable coex until implementation ready for 6x50
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:24 +0000 (11:56 -0800)]
iwlwifi: disable coex until implementation ready for 6x50

Temporary disable the coex function for wifi/wimax for 6x50
series until the full implementation ready.

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>
14 years agoiwlwifi: validate enhanced tx power entry
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:23 +0000 (11:56 -0800)]
iwlwifi: validate enhanced tx power entry

Validate enhanced tx power entry read from EEPROM before applying the
tx power value. Different versions of EEPROM might contain different size
of table; always a good idea to make sure the entry is valid before
applying to the targeted channel.

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>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 18 Nov 2009 18:55:32 +0000 (10:55 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agodrivers/net/wireless/rtl818x: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:26:02 +0000 (08:26 +0000)]
drivers/net/wireless/rtl818x: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wireless/p54: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:25:43 +0000 (08:25 +0000)]
drivers/net/wireless/p54: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wireless/iwlwifi: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:25:25 +0000 (08:25 +0000)]
drivers/net/wireless/iwlwifi: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/adm8211.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:24:50 +0000 (08:24 +0000)]
drivers/net/adm8211.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wan: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:24:30 +0000 (08:24 +0000)]
drivers/net/wan: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/via-velocity.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:24:13 +0000 (08:24 +0000)]
drivers/net/via-velocity.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/via-rhine.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:53 +0000 (08:23 +0000)]
drivers/net/via-rhine.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/typhoon.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:34 +0000 (08:23 +0000)]
drivers/net/typhoon.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/smsc9420.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:17 +0000 (08:23 +0000)]
drivers/net/smsc9420.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/r6040.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:00 +0000 (08:23 +0000)]
drivers/net/r6040.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/pppol2tp.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:22:44 +0000 (08:22 +0000)]
drivers/net/pppol2tp.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/irda: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:22:05 +0000 (08:22 +0000)]
drivers/net/irda: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/ipg.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:21:45 +0000 (08:21 +0000)]
drivers/net/ipg.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:21:04 +0000 (08:21 +0000)]
drivers/net: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/can: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:20:44 +0000 (08:20 +0000)]
drivers/net/can: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/atl1c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 18:47:03 +0000 (10:47 -0800)]
drivers/net/atl1c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: convert devices list to RCU
Rémi Denis-Courmont [Wed, 18 Nov 2009 18:08:26 +0000 (10:08 -0800)]
Phonet: convert devices list to RCU

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: device name allocation cleanups
Octavian Purdila [Wed, 18 Nov 2009 02:36:59 +0000 (02:36 +0000)]
net: device name allocation cleanups

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/solos-pci.c: fix warning/bug, clean up code
Andrew Morton [Tue, 17 Nov 2009 12:46:44 +0000 (12:46 +0000)]
drivers/atm/solos-pci.c: fix warning/bug, clean up code

drivers/atm/solos-pci.c: In function 'flash_upgrade':
drivers/atm/solos-pci.c:528: warning: 'fw_name' may be used uninitialized in this function

Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Nathan Williams <nathan@traverse.com.au>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Bonding fix for mode 6.
Ron Mercer [Tue, 17 Nov 2009 11:10:40 +0000 (11:10 +0000)]
qlge: Bonding fix for mode 6.

Allow MAC address to be changed even if device is not up.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetns: net_identifiers should be read_mostly
Eric Dumazet [Tue, 17 Nov 2009 10:42:49 +0000 (10:42 +0000)]
netns: net_identifiers should be read_mostly

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: fix setting mcp251x bit timing on open
Christian Pellegrin [Tue, 17 Nov 2009 06:20:44 +0000 (06:20 +0000)]
can: fix setting mcp251x bit timing on open

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Don't set netdev->trans_start
Vladislav Zolotarov [Tue, 17 Nov 2009 06:16:35 +0000 (06:16 +0000)]
bnx2x: Don't set netdev->trans_start

Setting dev->trans_start caused spurious watchdog warnings.

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>
14 years agolinkwatch: linkwatch_forget_dev() to speedup device dismantle
Eric Dumazet [Tue, 17 Nov 2009 05:59:21 +0000 (05:59 +0000)]
linkwatch: linkwatch_forget_dev() to speedup device dismantle

Herbert Xu a écrit :
> On Tue, Nov 17, 2009 at 04:26:04AM -0800, David Miller wrote:
>> Really, the link watch stuff is just due for a redesign.  I don't
>> think a simple hack is going to cut it this time, sorry Eric :-)
>
> I have no objections against any redesigns, but since the only
> caller of linkwatch_forget_dev runs in process context with the
> RTNL, it could also legally emit those events.

Thanks guys, here an updated version then, before linkwatch surgery ?

In this version, I force the event to be sent synchronously.

[PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle

time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105

real 0m0.266s
user 0m0.000s
sys 0m0.001s

real 0m0.770s
user 0m0.000s
sys 0m0.000s

real 0m1.022s
user 0m0.000s
sys 0m0.000s

One problem of current schem in vlan dismantle phase is the
holding of device done by following chain :

vlan_dev_stop() ->
netif_carrier_off(dev) ->
linkwatch_fire_event(dev) ->
dev_hold() ...

And __linkwatch_run_queue() runs up to one second later...

A generic fix to this problem is to add a linkwatch_forget_dev() method
to unlink the device from the list of watched devices.

dev->link_watch_next becomes dev->link_watch_list (and use a bit more memory),
to be able to unlink device in O(1).

After patch :
time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105

real    0m0.024s
user    0m0.000s
sys     0m0.000s

real    0m0.032s
user    0m0.000s
sys     0m0.001s

real    0m0.033s
user    0m0.000s
sys     0m0.000s

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: factorize cache clearing for batched unregister operations
Octavian Purdila [Mon, 16 Nov 2009 13:49:49 +0000 (13:49 +0000)]
ipv4: factorize cache clearing for batched unregister operations

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: introduce NETDEV_UNREGISTER_PERNET
Octavian Purdila [Mon, 16 Nov 2009 13:49:35 +0000 (13:49 +0000)]
net: introduce NETDEV_UNREGISTER_PERNET

This new event is called once for each unique net namespace in batched
unregister operations (with the argument set to a random device from
that namespace) and once per device in non-batched unregister
operations.

It allows us to factorize some device unregister work such as clearing the
routing cache.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomacvlan: Precise RX stats accounting
Eric Dumazet [Tue, 17 Nov 2009 08:53:49 +0000 (08:53 +0000)]
macvlan: Precise RX stats accounting

With multi queue devices, its possible that several cpus call
macvlan RX routines simultaneously for the same macvlan device.

We update RX stats counter without any locking, so we can
get slightly wrong counters.

One possible fix is to use percpu counters, to get precise
accounting and also get guarantee of no cache line ping pongs
between cpus.

Note: this adds 16 bytes (32 bytes on 64bit arches) of percpu
data per macvlan device.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovlan: Precise RX stats accounting
Eric Dumazet [Tue, 17 Nov 2009 04:53:09 +0000 (04:53 +0000)]
vlan: Precise RX stats accounting

With multi queue devices, its possible that several cpus call
vlan RX routines simultaneously for the same vlan device.

We update RX stats counter without any locking, so we can
get slightly wrong counters.

One possible fix is to use percpu counters, to get precise
accounting and also get guarantee of no cache line ping pongs
between cpus.

Note: this adds 16 bytes (32 bytes on 64bit arches) of percpu
data per vlan device.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: add dev_txq_stats_fold() helper
Eric Dumazet [Mon, 16 Nov 2009 03:36:51 +0000 (03:36 +0000)]
net: add dev_txq_stats_fold() helper

Some drivers ndo_get_stats() method need to perform txqueue stats folding.

Move folding from dev_get_stats() to a new dev_txq_stats_fold() function

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovmxnet3: using csum_ipv6_magic requires including net/ip6_checksum.h
Stephen Rothwell [Wed, 18 Nov 2009 07:04:59 +0000 (23:04 -0800)]
vmxnet3: using csum_ipv6_magic requires including net/ip6_checksum.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoznet: fix build failure from i82593.h relocation
John W. Linville [Tue, 17 Nov 2009 15:16:32 +0000 (10:16 -0500)]
znet: fix build failure from i82593.h relocation

znet was including "wireless/i82593.h" (which is a bit wierd), and I
missed that when I relocated i82593.h to drivers/staging/wavelan.  Since
I don't have ISA turned-on in my normal .config, I didn't see the build
failures -- mea culpa!

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet/s390 drivers: add missing 'const' attribute
Heiko Carstens [Tue, 17 Nov 2009 14:47:02 +0000 (06:47 -0800)]
net/s390 drivers: add missing 'const' attribute

Add missing 'const' attribute to avoid the following compile warnings:

drivers/s390/net/ctcm_main.c: In function 'ctcm_init':
drivers/s390/net/ctcm_main.c:1864: warning: assignment from incompatible pointer type
drivers/s390/net/lcs.c: In function 'lcs_init_module':
drivers/s390/net/lcs.c:2468: warning: assignment from incompatible pointer type
drivers/s390/net/claw.c: In function 'claw_init':
drivers/s390/net/claw.c:3408: warning: assignment from incompatible pointer type

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoact_mirred: optimization.
Changli Gao [Tue, 17 Nov 2009 12:15:16 +0000 (04:15 -0800)]
act_mirred: optimization.

move checking if eaction is valid in tcf_mirred_init()

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoact_mirred: cleanup
Changli Gao [Tue, 17 Nov 2009 12:14:00 +0000 (04:14 -0800)]
act_mirred: cleanup

1. don't let go back using goto.
2. don't call skb_act_clone() until it is necessary.
3. one exit of the critical context.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: missing rcu_dereference()
Rémi Denis-Courmont [Mon, 16 Nov 2009 22:17:24 +0000 (22:17 +0000)]
Phonet: missing rcu_dereference()

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Getting rid of the x86 dependency to built vmxnet3
Shreyas Bhatewara [Mon, 16 Nov 2009 13:41:33 +0000 (13:41 +0000)]
net: Getting rid of the x86 dependency to built vmxnet3

This patch removes config dependency on x86 to build vmxnet3 driver. Thus
the driver can be built on big endian architectures now. Although vmxnet3
is not supported on VMs other than x86 architecture, all this code goes in
to ensure correctness. If the code is not dependent on x86, it should not
assume little endian architecture in any of its operations.

Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetlink: remove subscriptions check on notifier
Johannes Berg [Mon, 16 Nov 2009 12:05:34 +0000 (12:05 +0000)]
netlink: remove subscriptions check on notifier

The netlink URELEASE notifier doesn't notify for
sockets that have been used to receive multicast
but it should be called for such sockets as well
since they might _also_ be used for sending and
not solely for receiving multicast. We will need
that for nl80211 (generic netlink sockets) in the
future.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Handle Rx and Tx together in NAPI
Vladislav Zolotarov [Mon, 16 Nov 2009 06:05:58 +0000 (06:05 +0000)]
bnx2x: Handle Rx and Tx together in NAPI

Put Tx and Rx DPC to be handled in the NAPI:
  - Saves status blocks.
  - Moves the Tx work from hardIRQ to NAPI.

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>
14 years agonet: PPP buffer too small for higher speed connections
fangxiaozhi [Tue, 17 Nov 2009 12:02:24 +0000 (04:02 -0800)]
net: PPP buffer too small for higher speed connections

1. This patch is based on the kernel of 2.6.32-rc7

2. In this patch, we enlarge the out buffer size to optimize the
   upload speed for the ppp connection. Then it can support the upload of
   HSUPA data cards.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: improve build
Wolfram Sang [Tue, 17 Nov 2009 11:57:12 +0000 (03:57 -0800)]
net/can/mscan: improve build

- move Kconfig entries to the subdirectory
- do remaining renames of mpc52xx to mpc5xxx

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: add error path to mscan_open()
Wolfram Sang [Mon, 16 Nov 2009 12:57:53 +0000 (12:57 +0000)]
net/can/mscan: add error path to mscan_open()

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: replace hardcoded values with defines
Wolfram Sang [Mon, 16 Nov 2009 12:57:52 +0000 (12:57 +0000)]
net/can/mscan: replace hardcoded values with defines

Not all hardcoded values have been replaced as this made the code quite
unreadable. IMHO this compromise serves the purpose of readability.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mpc52xx_can: improve properties and their description
Wolfram Sang [Mon, 16 Nov 2009 12:57:51 +0000 (12:57 +0000)]
net/can/mpc52xx_can: improve properties and their description

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: devicetree-discuss@ozlabs.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mpc52xx_can: refactor clock-get routine
Wolfram Sang [Mon, 16 Nov 2009 12:57:50 +0000 (12:57 +0000)]
net/can/mpc52xx_can: refactor clock-get routine

Merge two functions into one. The result is smaller as they can now share some
variables.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: drop assignment in while-construct
Wolfram Sang [Mon, 16 Nov 2009 12:57:49 +0000 (12:57 +0000)]
net/can/mscan: drop assignment in while-construct

As suggested by Wolfgang Grandegger.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: fix function annotations
Wolfram Sang [Mon, 16 Nov 2009 12:57:48 +0000 (12:57 +0000)]
net/can/mscan: fix function annotations

- use extern where apropriate
- don't export symbols

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: use {clr|set}bits8 macros
Wolfram Sang [Mon, 16 Nov 2009 12:57:47 +0000 (12:57 +0000)]
net/can/mscan: use {clr|set}bits8 macros

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: drop support for CAN_MODE_{SLEEP|STOP}
Wolfram Sang [Mon, 16 Nov 2009 12:57:46 +0000 (12:57 +0000)]
net/can/mscan: drop support for CAN_MODE_{SLEEP|STOP}

The upper layer does not support it yet.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: trivial fixes
Wolfram Sang [Mon, 16 Nov 2009 12:57:45 +0000 (12:57 +0000)]
net/can/mscan: trivial fixes

- remove whitespaces
- use ! and ?: when apropriate
- make braces consistent

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can/mscan: move defines into .h file
Wolfram Sang [Mon, 16 Nov 2009 12:57:44 +0000 (12:57 +0000)]
net/can/mscan: move defines into .h file

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 17 Nov 2009 08:05:02 +0000 (00:05 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/can/Kconfig

14 years agoKS8695: fix ks8695_rx() unreasonable action.
zeal [Mon, 16 Nov 2009 04:58:10 +0000 (04:58 +0000)]
KS8695: fix ks8695_rx() unreasonable action.

ks8695_rx() will call refill_buffers() for every incoming packet.
Its not necessary. We just need do it after finishing receiving thing.
And the 'RX dma engine' is in the same situation.
This blocks our user space application. The following patch may fix it.

Signed-off-by: zeal <zealcook@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoKS8695: fix ks8695_rx_irq() bug.
zeal [Mon, 16 Nov 2009 04:58:09 +0000 (04:58 +0000)]
KS8695: fix ks8695_rx_irq() bug.

ks8695 rx irq is edge-level. Before arriving at irq handler, the
corresponding status bit has been clear(irq's ack).
So we should not check it after that.

Signed-off-by: zeal <zealcook@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoppp: fix BUG on non-linear SKB (multilink receive)
Ben McKeegan [Mon, 16 Nov 2009 03:44:25 +0000 (03:44 +0000)]
ppp: fix BUG on non-linear SKB (multilink receive)

PPP does not correctly call pskb_may_pull() on all necessary receive paths
before reading the PPP protocol, thus causing PPP to report seemingly
random 'unsupported protocols' and eventually trigger BUG_ON(skb->len <
skb->data_len) in skb_pull_rcsum() when receiving multilink protocol in
non-linear skbs.

ppp_receive_nonmp_frame() does not call pskb_may_pull() before reading the
protocol number.  For the non-mp receive path this is not a problem, as
this check is done in ppp_receive_frame().  For the mp receive path,
ppp_mp_reconstruct() usually copies the data into a new linear skb.
However, in the case where the frame is made up of a single mp fragment,
the mp header is pulled and the existing skb used.  This skb was then
passed to ppp_receive_nonmp_frame() without checking if the encapsulated
protocol header could safely be read.

Signed-off-by: Ben McKeegan <ben@netservers.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fixing EEH handler to handle more than one error
Breno Leitao [Tue, 10 Nov 2009 08:37:47 +0000 (08:37 +0000)]
ixgbe: Fixing EEH handler to handle more than one error

After commmit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff EEH breaks
after the second error, since it calls pci_restore_state()
but it returns 0, since pci->state_saved is false.

So, this patch just call pci_save_state() after pci_restore_state().

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 17 Nov 2009 07:43:01 +0000 (23:43 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agomac80211: Do not queue Probe Request frames for station MLME
Jouni Malinen [Mon, 16 Nov 2009 17:54:08 +0000 (19:54 +0200)]
mac80211: Do not queue Probe Request frames for station MLME

Cooked monitor interfaces cannot currently receive Probe Request
frames when the interface is in station mode. However, we do not
process Probe Request frames internally in the station MLME, so there
is no point in queueing the frame here. Remove Probe Request frames
from the queued frame list to allow cooked monitor interfaces to
receive these frames.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: allow setting txpower to 0
Bob Copeland [Mon, 16 Nov 2009 13:30:29 +0000 (08:30 -0500)]
ath5k: allow setting txpower to 0

As a holdover from earlier code when we used to set
the power limit to '0' after a reset to configure the
default transmit power, ath5k interprets txpower=0 as
12.5 dBm.  Fix that by just passing 0 through.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=14567

Cc: stable@kernel.org
Reported-by: Daniel Folkers <daniel.folkers@task24.nl>
Tested-by: Daniel Folkers <daniel.folkers@task24.nl>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorndis_wlan: handle NL80211_AUTHTYPE_AUTOMATIC
Jussi Kivilinna [Mon, 16 Nov 2009 10:49:43 +0000 (12:49 +0200)]
rndis_wlan: handle NL80211_AUTHTYPE_AUTOMATIC

rndis_wlan didn't know about NL80211_AUTHTYPE_AUTOMATIC and simple
setup with 'iwconfig wlan essid no-encrypt' would fail (ENOSUPP).

v2: use NDIS_80211_AUTH_AUTO_SWITCH instead of _OPEN.
    This will make device try shared key auth first, then open.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: do not enable tbtt unless we are in a beacon mode
Josef Bacik [Mon, 16 Nov 2009 02:33:18 +0000 (21:33 -0500)]
rt2800: do not enable tbtt unless we are in a beacon mode

Please be gentle, I'm a fs developer and this is my first foray into drivers, as
I'm tired of building ralinks driver everytime I update my kernel.  Whenever I
load the rt2800pci driver my box bogs down, and a few printk's later I
discovered its because I was getting 10's of thousands of TBTT interrupts a
second.  I discovered this was because we were setting the beacon timer to 0,
which is apparently what TBTT keys off of.  It seems to me that we should only
be enabling TBTT when we are in a beacon transmitting mode, which from what I
can tell is in AD-HOC and other such modes where the mac80211 layer would have
given us a proper beacon_int to set the beacon timer to instead of 0.  So this
is my fix, only enable TBTT if our sync mode is for beacon.  This makes it so my
box doesn't die everytime I load the rt2800pci driver.  Let me know if this is
acceptable, I just learned all these terms about 15 minutes ago via wikipedia,
so I really am not familiar with how this stuff is supposed to work.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix massive rx packet loss issue
Felix Fietkau [Sun, 15 Nov 2009 21:27:17 +0000 (22:27 +0100)]
ath9k: fix massive rx packet loss issue

This patch fixes a regression introduced in
"ath9k: avoid the copy skb->cb on every RX'd skb"

With that change, the rx status in skb->cb was left uninitialized

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix BUG on rt2800usb when trying to read eFuse EEPROM.
Gertjan van Wingerde [Sat, 14 Nov 2009 19:20:36 +0000 (20:20 +0100)]
rt2x00: Fix BUG on rt2800usb when trying to read eFuse EEPROM.

Current tree hits a BUG_ON in rt2x00_regbusy_read, because the eFuse EEPROM
reading code of rt2800lib uses the function without the csr_mutex locked.

Fix this by locking the csr_mutex for the of the EEPROM reading cycly and
using the _lock variants of the register reading and writing functions.

This also introcudes the register_read_lock function pointer in the
rt2800_ops structure.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Log RT/RF chipset information correctly.
Gertjan van Wingerde [Sat, 14 Nov 2009 19:20:35 +0000 (20:20 +0100)]
rt2x00: Log RT/RF chipset information correctly.

Some drivers (rt2800* most notably) cannot set the RF and RT chipset in
the correct order to have the information logging in rt2x00_set_chip
be correct.
Fix this by decoupling the setting of the chipset information from the
logging of the chipset information so that drivers can determine
themselves when all information is set.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Initialize rf302x RF values properly for rt2800pci.
Gertjan van Wingerde [Tue, 10 Nov 2009 21:42:40 +0000 (22:42 +0100)]
rt2x00: Initialize rf302x RF values properly for rt2800pci.

Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib
for the rt3090 chipset.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix rt2800lib RF chip programming selection.
Gertjan van Wingerde [Mon, 9 Nov 2009 21:59:58 +0000 (22:59 +0100)]
rt2x00: Fix rt2800lib RF chip programming selection.

Mirror the legacy Ralink driver with respect to rt2800 RF register
programming. Execute rt2800_config_channel_rt3x for all RF2020,
RF3020, RF3021 & RF3022 chipsets when operating on RT3070 devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet: Fix the rollback test in dev_change_name()
Eric Dumazet [Sun, 15 Nov 2009 23:30:24 +0000 (23:30 +0000)]
net: Fix the rollback test in dev_change_name()

net: Fix the rollback test in dev_change_name()

In dev_change_name() an err variable is used for storing the original
call_netdevice_notifiers() errno (negative) and testing for a rollback
error later, but the test for non-zero is wrong, because the err might
have positive value as well - from dev_alloc_name(). It means the
rollback for a netdevice with a number > 0 will never happen. (The err
test is reordered btw. to make it more readable.)

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: allow dynamic change of rx checksumming
Frank Blaschka [Thu, 12 Nov 2009 00:11:45 +0000 (00:11 +0000)]
qeth: allow dynamic change of rx checksumming

Technically there is no need to set the card offline to change
RX checksumming. Get rid of this stupid limitation.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: rework TSO functions
Frank Blaschka [Thu, 12 Nov 2009 00:11:44 +0000 (00:11 +0000)]
qeth: rework TSO functions

The maximum TSO size OSA can handle is 15 * PAGE_SIZE. This
patch reduces gso_max_size to this value and adds some sanity
checks and statistics to the TSO implementation.
Since only layer 3 is able to do TSO move all TSO related functions
to the qeth_l3 module.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Recognize return codes of ccw_device_set_online
Ursula Braun [Thu, 12 Nov 2009 00:11:43 +0000 (00:11 +0000)]
qeth: Recognize return codes of ccw_device_set_online

Setting a qeth device online requires to call function
ccw_device_set_online() for read-, write-, and data-subchannel.
Failures should be detected immediately without an attempt to
invoke follow-on activity qeth_qdio_clear_card().,

In addition, ccw_device_set_online calls are consolidated in
qeth_core_main.c only.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: remaining EDDP cleanup
Ursula Braun [Thu, 12 Nov 2009 00:11:42 +0000 (00:11 +0000)]
qeth: remaining EDDP cleanup

EDDP code has been removed from qeth in 2009. This patch removes two
useless remaining EDDP-references.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Exploit Connection Isolation
Einar Lueck [Thu, 12 Nov 2009 00:11:41 +0000 (00:11 +0000)]
qeth: Exploit Connection Isolation

Isolate data connection to a shared OSA card against other data
connections to the same OSA card. Connectivity between isolated
data connections sharing the same OSA card is therefore possible only
through external network gear (e.g. a router).

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRevert "isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation."
David S. Miller [Mon, 16 Nov 2009 06:23:47 +0000 (22:23 -0800)]
Revert "isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation."

This reverts commit 38783e671399b5405f1fd177d602c400a9577ae6.

It causes kernel bugzilla #14594

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoremove deprecated and not used: print_mac()
Marin Mitov [Fri, 13 Nov 2009 07:58:41 +0000 (07:58 +0000)]
remove deprecated and not used: print_mac()

The function print_mac in net/ethernet/eth.c is marked __deprecated
and not used. Remove it.

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: fix 802.3ad standards compliance error
Jay Vosburgh [Fri, 13 Nov 2009 13:13:01 +0000 (13:13 +0000)]
bonding: fix 802.3ad standards compliance error

The language of 802.3ad 43.4.9 requires the "recordPDU" function
to, in part, compare the Partner parameter values in a received LACPDU
to the stored Actor values.  If those match, then the Partner's
synchronization state is set to true.

The current 802.3ad implementation is performing these steps out
of order; first, the synchronization check is done, then the paramters are
checked to see if they match (the synch check being done against a match
check of a prior LACPDU).  This causes delays in establishing aggregators
in some circumstances.

This patch modifies the 802.3ad code to call __choose_matched,
the function that does the "match" comparisions, as the first step of
__record_pdu, instead of immediately afterwards.  This new behavior is
in compliance with the language of the standard.

Some additional commentary relating to code vs. standard is also
added.

Reported by Martin Patterson <martin@gear6.com> who also supplied
the logic of the fix and verified the patch.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovlan: Use __vlan_hwaccel_put_tag() in rx
Eric Dumazet [Fri, 13 Nov 2009 06:33:11 +0000 (06:33 +0000)]
vlan: Use __vlan_hwaccel_put_tag() in rx

Commit 05423b241311c9380 (vlan: allow null VLAN ID to be used)
forgot to update __vlan_hwaccel_rx() & vlan_gro_common()

We need to set VLAN_TAG_PRESENT flag in skb->vlan_tci

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoTI Davinci EMAC : Fix Console Hang when bringing the interface down
Sriram [Thu, 12 Nov 2009 01:55:42 +0000 (01:55 +0000)]
TI Davinci EMAC : Fix Console Hang when bringing the interface down

In the NAPI poll function(emac_poll), check for netif_running()
is unnecassary. In addition to associated runtime overhead, it
also results in a continuous softirq loop when the interface is
brought down under heavy traffic(tested wit Traffic Generator).
Once the interface is disabled, the poll function always returns
zero(with the check for netif_running) and napi_complete() would
never get called resulting in softirq loop.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Acked-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc911x: Fix Console Hang when bringing the interface down.
Sriram [Thu, 12 Nov 2009 02:14:38 +0000 (02:14 +0000)]
smsc911x: Fix Console Hang when bringing the interface down.

In the NAPI poll function, check for netif_running() is unnecassary.
In addition to associated runtime overhead, it also results in
continuous softirq loop when the interface is brought down under heavy
traffic(tested with Traffic Generator).Once the interface is disabled,
the poll function always returns zero(with the check for netif_running)
and napi_complete() would never get called resulting in softirq loop.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Update version to 3.104
Matt Carlson [Fri, 13 Nov 2009 13:03:52 +0000 (13:03 +0000)]
tg3: Update version to 3.104

This patch updates the tg3 version to 3.104.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Fix DIDs, Enable 5717 support
Matt Carlson [Fri, 13 Nov 2009 13:03:51 +0000 (13:03 +0000)]
tg3: Fix DIDs, Enable 5717 support

This patch fixes the 5717 variant device ID enumerations and adds those
DIDs to the PCI ID table.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add rx prod ring consolidation
Matt Carlson [Fri, 13 Nov 2009 13:03:50 +0000 (13:03 +0000)]
tg3: Add rx prod ring consolidation

This patch adds code to funnel each MSI-X vector's rx packet buffers
into a single set of producer rings which will then be submitted to the
hardware.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Create aliases for rx producer mailbox regs
Matt Carlson [Fri, 13 Nov 2009 13:03:49 +0000 (13:03 +0000)]
tg3: Create aliases for rx producer mailbox regs

The rx producer mailbox registers are used in several spots in the code.
The addition of TG3_64BIT_REG_LOW makes register references
uncomfortably long.  This patch creates an alias for the standard and
jumbo ring producer index registers to make the code cleaner.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Lay proucer ring handling groundwork
Matt Carlson [Fri, 13 Nov 2009 13:03:48 +0000 (13:03 +0000)]
tg3: Lay proucer ring handling groundwork

The patch increases the number of producer rings available and
implements the constructor and destructor code that deals with them.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Consider rx_std_prod_idx a hw mailbox
Matt Carlson [Fri, 13 Nov 2009 13:03:47 +0000 (13:03 +0000)]
tg3: Consider rx_std_prod_idx a hw mailbox

This patch changes how the code uses the rx_std_prod_idx member.  In the
following patch, the code will be changed so that it will act just like
a hardware mailbox.  This patch prepares the code so that memory barriers
can be more easily inserted.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: rename rx_[std|jmb]_ptr
Matt Carlson [Fri, 13 Nov 2009 13:03:46 +0000 (13:03 +0000)]
tg3: rename rx_[std|jmb]_ptr

A later patch is going to add consumer indicies for the producer rings.
To keep things readable, this patch renames rx_[std|jmb]_ptr to
rx_[std|jmb]_prod_idx.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: tg3_alloc_rx_skb(tnapi => tp)
Matt Carlson [Fri, 13 Nov 2009 13:03:45 +0000 (13:03 +0000)]
tg3: tg3_alloc_rx_skb(tnapi => tp)

This patch converts the tnapi argument of tg3_alloc_rx_skb() to tp.  The
level of indirection is unnecessary.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add prodring parameter to tg3_alloc_rx_skb()
Matt Carlson [Fri, 13 Nov 2009 13:03:44 +0000 (13:03 +0000)]
tg3: Add prodring parameter to tg3_alloc_rx_skb()

This patch changes the tg3_alloc_rx_skb() implementation to accept the
destination producer ring set pointer as a parameter rather than
assuming the source and destination producer rings are the same.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Make tg3_alloc_rx_skb() a dst-only operation
Matt Carlson [Fri, 13 Nov 2009 13:03:43 +0000 (13:03 +0000)]
tg3: Make tg3_alloc_rx_skb() a dst-only operation

This patch removes the source index parameter of tg3_alloc_rx_skb().  A
later patch will make it possible for the source and destination
producer rings to be different.  This patch opts to make
tg3_alloc_rx_skb() a destination-only implementation and move the code
sensitive to the difference elsewhere.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>