pandora-kernel.git
13 years agodrivers: isdn: use kernel macros to convert hex digit
Andy Shevchenko [Thu, 15 Jul 2010 02:37:18 +0000 (02:37 +0000)]
drivers: isdn: use kernel macros to convert hex digit

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Tilman Schmidt <tilman@imap.cc>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn/hisax: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:07:30 +0000 (09:07 +0000)]
isdn/hisax: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:05:38 +0000 (09:05 +0000)]
mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn/hardware/eicon: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:04:45 +0000 (09:04 +0000)]
isdn/hardware/eicon: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:04:07 +0000 (09:04 +0000)]
mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn/hardware/mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 09:02:36 +0000 (09:02 +0000)]
isdn/hardware/mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 08:49:32 +0000 (08:49 +0000)]
atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 08:48:26 +0000 (08:48 +0000)]
atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 08:45:32 +0000 (08:45 +0000)]
atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 08:44:11 +0000 (08:44 +0000)]
atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 08:42:12 +0000 (08:42 +0000)]
atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 08:41:08 +0000 (08:41 +0000)]
atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
Peter Huewe [Thu, 15 Jul 2010 08:38:20 +0000 (08:38 +0000)]
atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/nuc900: enable Mac driver clock
Wan ZongShun [Tue, 13 Jul 2010 23:48:45 +0000 (23:48 +0000)]
net/nuc900: enable Mac driver clock

This patch fixed a bug that Mac driver does not work,because I missed the clk enable.

I have ever tested the driver when I submitted previous Mac driver patch,
and it worked good, since my bootloader has enabled the clock in advance.

But when I try to use other bootloader where clock engine was disabled,the
Mac driver does not work, so I send this patch to fix this issue.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net/mlx4: Use %pV, pr_<level>, printk_once
Joe Perches [Sat, 10 Jul 2010 07:22:46 +0000 (07:22 +0000)]
drivers/net/mlx4: Use %pV, pr_<level>, printk_once

Remove near duplication of format string constants by using the newly
introduced vsprintf extention %pV to reduce text by 20k or so.

$ size drivers/net/mlx4/built-in.o*
   text    data     bss     dec     hex filename
 161367    1866   48784  212017   33c31 drivers/net/mlx4/built-in.o
 142621    1866   46248  190735   2e90f drivers/net/mlx4/built-in.o.new

Use printk_once as appropriate.
Convert printks to pr_<level>, some bare printks now use pr_cont.
Remove now unused #define PFX.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNet: ethernet: pe2.c: fix EXPORT_SYMBOL macro code style issue
Chihau Chau [Thu, 15 Jul 2010 01:27:09 +0000 (18:27 -0700)]
Net: ethernet: pe2.c: fix EXPORT_SYMBOL macro code style issue

This patch fix a code style issue, if a function is exported, the
EXPORT_SYMBOL macro for it should follow immediately after the closing
function brace line.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: fix a buffer overflow in bonding_show_queue_id.
Nicolas de Pesloüan [Thu, 15 Jul 2010 01:24:54 +0000 (18:24 -0700)]
bonding: fix a buffer overflow in bonding_show_queue_id.

The test for buffer overflow ensures we have room for 6 more bytes.
sprintf, called with %s:%d, slave->dev->name, slave->queue_id may yield
far more than 6 bytes.

The correct test is res > (PAGE_SIZE - IFNAMSIZ - 6) .

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoeth16i: fix memory leak
Kulikov Vasiliy [Thu, 15 Jul 2010 00:57:19 +0000 (17:57 -0700)]
eth16i: fix memory leak

Free allocated netdev if no probe is expected.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/sched: potential data corruption
Dan Carpenter [Thu, 15 Jul 2010 00:56:37 +0000 (17:56 -0700)]
net/sched: potential data corruption

The reset_policy() does:
        memset(d->tcfd_defdata, 0, SIMP_MAX_DATA);
        strlcpy(d->tcfd_defdata, defdata, SIMP_MAX_DATA);

In the original code, the size of d->tcfd_defdata wasn't fixed and if
strlen(defdata) was less than 31, reset_policy() would cause memory
corruption.

Please Note:  The original alloc_defdata() assumes defdata is 32
characters and a NUL terminator while reset_policy() assumes defdata is
31 characters and a NUL.  This patch updates alloc_defdata() to match
reset_policy() (ie a shorter string).  I'm not very familiar with this
code so please review carefully.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: fix for kdump
Rajesh Borundia [Thu, 15 Jul 2010 00:55:35 +0000 (17:55 -0700)]
netxen: fix for kdump

When the crash kernel is loaded after crash, the device is in unknown state.
So reset the device contexts prior to its creation in case of kdump,
depending upon kernel parameter reset_devices.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agowd: fix memory leak
Kulikov Vasiliy [Thu, 15 Jul 2010 00:53:18 +0000 (17:53 -0700)]
wd: fix memory leak

Unmap mapped IO in wd_probe1() if register_netdev() failed.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotulip: formatting of pointers in printk()
Kulikov Vasiliy [Wed, 14 Jul 2010 08:02:47 +0000 (08:02 +0000)]
tulip: formatting of pointers in printk()

Use %p instead of %08x in printk().

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: restore NPAR config data after recovery
Anirban Chakraborty [Tue, 13 Jul 2010 20:33:35 +0000 (20:33 +0000)]
qlcnic: restore NPAR config data after recovery

o NPAR configuration which is programmed in fw, need to
  restore after fw recovery.
o Update version to 5.0.7

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: aer support
Sucheta Chakraborty [Tue, 13 Jul 2010 20:33:34 +0000 (20:33 +0000)]
qlcnic: aer support

Pci error recovery support added.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix netdev notifier in error path
Amit Kumar Salecha [Tue, 13 Jul 2010 20:33:33 +0000 (20:33 +0000)]
qlcnic: fix netdev notifier in error path

netdev notifier are not unregistered if pci_register_driver fails.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: disable tx timeout recovery
Amit Kumar Salecha [Tue, 13 Jul 2010 20:33:32 +0000 (20:33 +0000)]
qlcnic: disable tx timeout recovery

Disable tx timeout recovery, if auto_fw_reset is disable

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix pause params setting
Rajesh Borundia [Tue, 13 Jul 2010 20:33:31 +0000 (20:33 +0000)]
qlcnic: fix pause params setting

Turning off rx pause param and autoneg param is not supported so
return error in that case.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoeth_v10: Removing dead ETRAX_NETWORK_RED_ON_NO_CONNECTION
Christoph Egger [Wed, 14 Jul 2010 20:41:53 +0000 (13:41 -0700)]
eth_v10: Removing dead ETRAX_NETWORK_RED_ON_NO_CONNECTION

ETRAX_NETWORK_RED_ON_NO_CONNECTION doesn't exist in Kconfig, therefore
removing all references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocs89x0: Removing dead SH_HICOSH4
Christoph Egger [Wed, 14 Jul 2010 20:40:36 +0000 (13:40 -0700)]
cs89x0: Removing dead SH_HICOSH4

SH_HICOSH4 doesn't exist in Kconfig, therefore removing all references
for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocassini: Removing dead CASSINI_NAPI
Christoph Egger [Wed, 14 Jul 2010 20:36:18 +0000 (13:36 -0700)]
cassini: Removing dead CASSINI_NAPI

CASSINI_NAPI doesn't exist in Kconfig, therefore removing all
references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocassini: Removing dead CASSINI_MULTICAST_REG_WRITE
Christoph Egger [Wed, 14 Jul 2010 20:35:45 +0000 (13:35 -0700)]
cassini: Removing dead CASSINI_MULTICAST_REG_WRITE

CASSINI_MULTICAST_REG_WRITE doesn't exist in Kconfig, therefore
removing all references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocassini: Removing dead CASSINI_QGE_DEBUG
Christoph Egger [Wed, 14 Jul 2010 19:18:31 +0000 (12:18 -0700)]
cassini: Removing dead CASSINI_QGE_DEBUG

CASSINI_QGE_DEBUG doesn't exist in Kconfig, therefore removing all
references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Removing dead {AR,WAVE}LAN
Christoph Egger [Wed, 14 Jul 2010 19:17:35 +0000 (12:17 -0700)]
net: Removing dead {AR,WAVE}LAN

{AR,WAVE}LAN doesn't exist in Kconfig, therefore removing all
references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 13 Jul 2010 21:25:13 +0000 (14:25 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years agoRevert "tc35815: fix iomap leak"
David S. Miller [Tue, 13 Jul 2010 21:20:58 +0000 (14:20 -0700)]
Revert "tc35815: fix iomap leak"

This reverts commit b31fb86815153be3bc94e8ffb9dbf6e9d7694b2d.

pcim_*() managed drivers do not need explicit resource
releasing like this.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 13 Jul 2010 19:57:29 +0000 (15:57 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
drivers/net/wireless/wl12xx/wl1271_cmd.h

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 13 Jul 2010 19:31:51 +0000 (15:31 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agodrivers/net: Add Micrel KS8841/42 support to ks8842 driver
David J. Choi [Tue, 13 Jul 2010 17:09:19 +0000 (10:09 -0700)]
drivers/net: Add Micrel KS8841/42 support to ks8842 driver

Body of the explanation:
   -support 16bit and 32bit bus width.
   -add device reset for ks8842/8841 Micrel device.
   -set 100Mbps as a default for Micrel device.
   -set MAC address in both MAC/Switch layer with different sequence for Micrel
    device, as mentioned in data sheet.
   -use private data to set options both 16/32bit bus width and Micrel device/
    Timberdale(FPGA).
   -update Kconfig in order to put more information about ks8842 device.

Signed-off-by: David J. Choi <david.choi@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agohso: remove driver version
Filip Aben [Tue, 13 Jul 2010 04:21:27 +0000 (21:21 -0700)]
hso: remove driver version

This patch removes the driver version from the driver. This version
hasn't changed since the driver's inclusion in the kernel and is a
source of confusion for some customers.

Signed-off-by: Filip Aben <f.aben@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/irda: Remove unnecessary casts of private_data
Joe Perches [Mon, 12 Jul 2010 10:50:24 +0000 (10:50 +0000)]
net/irda: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/core: Remove unnecessary casts of private_data
Joe Perches [Mon, 12 Jul 2010 10:50:23 +0000 (10:50 +0000)]
net/core: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net/caif: Remove unnecessary casts of private_data
Joe Perches [Mon, 12 Jul 2010 10:50:05 +0000 (10:50 +0000)]
drivers/net/caif: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/isdn: Remove unnecessary casts of private_data
Joe Perches [Mon, 12 Jul 2010 10:50:02 +0000 (10:50 +0000)]
drivers/isdn: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: remove IRQF_DISABLED in combination with IRQF_SHARED
chas williams - CONTRACTOR [Sat, 10 Jul 2010 03:42:02 +0000 (03:42 +0000)]
atm: remove IRQF_DISABLED in combination with IRQF_SHARED

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofec: use interrupt for MDIO completion indication
Baruch Siach [Sun, 11 Jul 2010 21:12:51 +0000 (21:12 +0000)]
fec: use interrupt for MDIO completion indication

With the move to phylib (commit e6b043d) I was seeing sporadic "MDIO write
timeout" messages. Measure of the actual time spent showed latency times of
more than 1600us.

This patch uses the MII event indication of the FEC hardware to detect
completion of MDIO transactions.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: autoconvert trivial BKL users to private mutex
Arnd Bergmann [Sun, 11 Jul 2010 11:18:57 +0000 (11:18 +0000)]
net: autoconvert trivial BKL users to private mutex

All these files use the big kernel lock in a trivial
way to serialize their private file operations,
typically resulting from an earlier semi-automatic
pushdown from VFS.

None of these drivers appears to want to lock against
other code, and they all use the BKL as the top-level
lock in their file operations, meaning that there
is no lock-order inversion problem.

Consequently, we can remove the BKL completely,
replacing it with a per-file mutex in every case.
Using a scripted approach means we can avoid
typos.

file=$1
name=$2
if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
            sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
    else
            sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
    fi
    sed -i ${file} \
        -e "/^#include.*linux.mutex.h/,$ {
                1,/^\(static\|int\|long\)/ {
                     /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }"  \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[      ]*cycle_kernel_lock();/d'
else
    sed -i -e '/include.*\<smp_lock.h\>/d' ${file}  \
                -e '/cycle_kernel_lock()/d'
fi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn: autoconvert trivial BKL users to private mutex
Arnd Bergmann [Sun, 11 Jul 2010 11:18:53 +0000 (11:18 +0000)]
isdn: autoconvert trivial BKL users to private mutex

All these files use the big kernel lock in a trivial
way to serialize their private file operations,
typically resulting from an earlier semi-automatic
pushdown from VFS.

None of these drivers appears to want to lock against
other code, and they all use the BKL as the top-level
lock in their file operations, meaning that there
is no lock-order inversion problem.

Consequently, we can remove the BKL completely,
replacing it with a per-file mutex in every case.
Using a scripted approach means we can avoid
typos.

file=$1
name=$2
if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
            sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
    else
            sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
    fi
    sed -i ${file} \
        -e "/^#include.*linux.mutex.h/,$ {
                1,/^\(static\|int\|long\)/ {
                     /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }"  \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[      ]*cycle_kernel_lock();/d'
else
    sed -i -e '/include.*\<smp_lock.h\>/d' ${file}  \
                -e '/cycle_kernel_lock()/d'
fi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sock_free() optimizations
Eric Dumazet [Sat, 10 Jul 2010 22:45:17 +0000 (22:45 +0000)]
net: sock_free() optimizations

Avoid two extra instructions in sock_free(), to reload
skb->truesize and skb->sk

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinet, inet6: make tcp_sendmsg() and tcp_sendpage() through inet_sendmsg() and inet_se...
Changli Gao [Sat, 10 Jul 2010 20:41:55 +0000 (20:41 +0000)]
inet, inet6: make tcp_sendmsg() and tcp_sendpage() through inet_sendmsg() and inet_sendpage()

a new boolean flag no_autobind is added to structure proto to avoid the autobind
calls when the protocol is TCP. Then sock_rps_record_flow() is called int the
TCP's sendmsg() and sendpage() pathes.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 include/net/inet_common.h |    4 ++++
 include/net/sock.h        |    1 +
 include/net/tcp.h         |    8 ++++----
 net/ipv4/af_inet.c        |   15 +++++++++------
 net/ipv4/tcp.c            |   11 +++++------
 net/ipv4/tcp_ipv4.c       |    3 +++
 net/ipv6/af_inet6.c       |    8 ++++----
 net/ipv6/tcp_ipv6.c       |    3 +++
 8 files changed, 33 insertions(+), 20 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: cleanups
Changli Gao [Sat, 10 Jul 2010 20:41:06 +0000 (20:41 +0000)]
net: cleanups

remove useless blanks.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 include/net/inet_common.h |   55 ++++-------
 include/net/tcp.h         |  222 +++++++++++++++++-----------------------------
 include/net/udp.h         |   38 +++----
 3 files changed, 123 insertions(+), 192 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxtsonic: free irq if sonic_open() fails
Kulikov Vasiliy [Sat, 10 Jul 2010 01:01:44 +0000 (01:01 +0000)]
xtsonic: free irq if sonic_open() fails

xtsonic_open() doesn't check sonic_open() return code. If it is error
we must free requested IRQ.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomacsonic: free irqs if sonic_open() fails
Kulikov Vasiliy [Sat, 10 Jul 2010 01:39:06 +0000 (01:39 +0000)]
macsonic: free irqs if sonic_open() fails

macsonic_open() doesn't check sonic_open() return code. If it is error
we must free requested IRQs.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojazzsonic: free irq if sonic_open() fails
Kulikov Vasiliy [Sat, 10 Jul 2010 01:00:35 +0000 (01:00 +0000)]
jazzsonic: free irq if sonic_open() fails

jazzsonic_open() doesn't check sonic_open() return code. If it is error
we must free requested IRQ.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn: fix strlen() usage
Dan Carpenter [Sat, 10 Jul 2010 04:31:11 +0000 (04:31 +0000)]
isdn: fix strlen() usage

There was a missing "else" statement so the original code overflowed if
->master->name was too long.  Also the ->slave and ->master buffers can
hold names with 9 characters and a NULL so I cleaned it up to allow
another character.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years ago9p: strlen() doesn't count the terminator
Dan Carpenter [Fri, 9 Jul 2010 23:51:54 +0000 (23:51 +0000)]
9p: strlen() doesn't count the terminator

This is an off by one bug because strlen() doesn't count the NULL
terminator.  We strcpy() addr into a fixed length array of size
UNIX_PATH_MAX later on.

The addr variable is the name of the device being mounted.

CC: stable@kernel.org
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotc35815: fix iomap leak
Kulikov Vasiliy [Sat, 10 Jul 2010 00:03:18 +0000 (00:03 +0000)]
tc35815: fix iomap leak

If tc35815_init_one() fails we must unmap mapped regions.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoll_temac: Fix missing validate_addr hook
Denis Kirjanov [Sat, 10 Jul 2010 11:10:44 +0000 (11:10 +0000)]
ll_temac: Fix missing validate_addr hook

Fix missing validate_addr hook

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: fix TX Queue restart
Casey Leedom [Mon, 12 Jul 2010 21:39:07 +0000 (14:39 -0700)]
cxgb4vf: fix TX Queue restart

Fix up TX Queue Host Flow Control to cause an Egress Queue Status Update to
be generated when we run out of TX Queue Descriptors.  This will, in turn,
allow us to restart a stopped TX Queue.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodepca: fix leaks in depca_module_init()
Kulikov Vasiliy [Mon, 12 Jul 2010 04:52:33 +0000 (04:52 +0000)]
depca: fix leaks in depca_module_init()

Since some of xxx_register_driver() can return error we must unregister
already registered drivers.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agop54: update MAINTAINERS
Christian Lamparter [Mon, 12 Jul 2010 17:01:41 +0000 (19:01 +0200)]
p54: update MAINTAINERS

Michael has been out of the scene for a while now,
but despite Michael's absence, p54 is still maintained.

Cc: Michael Wu <aluminum.tape@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: merge noisefloor load implementations
Felix Fietkau [Sun, 11 Jul 2010 13:44:42 +0000 (15:44 +0200)]
ath9k: merge noisefloor load implementations

AR5008+ and AR9003 currently use two separate implementations of the
ath9k_hw_loadnf function. There are three main differences:

 - PHY registers for AR9003 are different
 - AR9003 always uses 3 chains, earlier versions are more selective
 - The AR9003 variant contains a fix for NF load timeouts

This patch merges the two implementations into one, storing the
register array in the ath_hw struct. The fix for NF load timeouts is
not just relevant for AR9003, but also important for earlier hardware,
so it's better to just keep one common implementation.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: validate the TID in the tx status information
Felix Fietkau [Sun, 11 Jul 2010 10:48:44 +0000 (12:48 +0200)]
ath9k: validate the TID in the tx status information

Occasionally the hardware can send out tx status information with the wrong
TID. In that case, the BA status cannot be trusted and the aggregate
must be retransmitted.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: report the TID in the tx status on AR5008-AR9002
Felix Fietkau [Sun, 11 Jul 2010 10:48:43 +0000 (12:48 +0200)]
ath9k_hw: report the TID in the tx status on AR5008-AR9002

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: prevent a fast channel change after a rx DMA stuck issue
Felix Fietkau [Sun, 11 Jul 2010 10:48:42 +0000 (12:48 +0200)]
ath9k_hw: prevent a fast channel change after a rx DMA stuck issue

If the receive path gets stuck, a full hardware reset is necessary to
recover from it. If this happens during a scan, the whole scan might fail,
as each channel change bypasses the full reset sequence.
Fix this by resetting the fast channel change flag if stopping the
receive path fails.

This will reduce the number of error messages that look like this:
ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix an off-by-one error in the PDADC boundaries calculation
Felix Fietkau [Sun, 11 Jul 2010 10:48:41 +0000 (12:48 +0200)]
ath9k_hw: fix an off-by-one error in the PDADC boundaries calculation

PDADC values were only generated for values surrounding the target
index, however not for the target index itself, leading to a minor
error in the generated curve.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix a sign error in the IQ calibration code
Felix Fietkau [Sun, 11 Jul 2010 10:48:40 +0000 (12:48 +0200)]
ath9k_hw: fix a sign error in the IQ calibration code

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix antenna diversity on AR9285
Felix Fietkau [Sun, 11 Jul 2010 10:48:39 +0000 (12:48 +0200)]
ath9k_hw: fix antenna diversity on AR9285

On AR9285, the antenna switch configuration register uses more than just
16 bits. Because of an arbitrary mask applied to the EEPROM value that
stores this configuration, diversity was broken in some cases, leading
to a significant degradation in signal strength.
Fix this by changing the callback to return a 32 bit value and remove
the arbitrary mask.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Move driver callback functions into the ops structure
Ivo van Doorn [Sun, 11 Jul 2010 10:31:23 +0000 (12:31 +0200)]
rt2x00: Move driver callback functions into the ops structure

All callback functions are gathered in rt2x00dev->ops except
for the callback functions which are used in rt2800lib to
acces rt2800pci/usb.

Move the priv pointer from rt2x00dev to rt2x00dev->ops and
rename it to drv to make it obvious that it is the driver callback
structure.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Move common firmware loading into rt2800lib
Ivo van Doorn [Sun, 11 Jul 2010 10:30:37 +0000 (12:30 +0200)]
rt2x00: Move common firmware loading into rt2800lib

Large parts of the firmware initialization are shared
between rt2800pci and rt2800usb. Move this code into
rt2800lib.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add missing TSF sync mode for AP operation
Helmut Schaa [Sun, 11 Jul 2010 10:30:13 +0000 (12:30 +0200)]
rt2x00: Add missing TSF sync mode for AP operation

Currently rt2x00 uses the TSF_SYNC_BEACON mode for all beaconing
interface types. However, TSF_SYNC_BEACON is meant for IBSS networks and
thus implements TSF merging in the hardware. Rename TSF_SYNC_BEACON to
TSF_SYNC_ADHOC to better express its purpose and introduce the missing
TSF sync mode TSF_SYNC_AP_NONE which should be used for beaconing modes
that don't need TSF merging.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Don't initialize beacon interval to 0 on rt2800 devices
Helmut Schaa [Sun, 11 Jul 2010 10:29:49 +0000 (12:29 +0200)]
rt2x00: Don't initialize beacon interval to 0 on rt2800 devices

Activating the TBTT interrupt when a beacon interval of 0 is configured
results in an interrupt storm causing the machine to hang. Hence,
initialize the beacon interval to a reasonable default of 100TUs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove set_tim callback from PCI drivers
Helmut Schaa [Sun, 11 Jul 2010 10:29:26 +0000 (12:29 +0200)]
rt2x00: Remove set_tim callback from PCI drivers

Using the set_tim callback without managing the DTIM count and the
broad- and multicast buffering in hw, fw or the driver results in wrong
DTIM count values being sent out in beacons. Since all PCI drivers
fetch new beacons periodically and hence get an updated TIM we can just
remove the set_tim callback from these.

The rt2x00 USB drivers don't update the beacon periodically and thus
rely on the set_tim callback to get a correct TIM for beacon
transmission. USB devices still suffer from the DTIM count being wrong
under some circumstances but removing the set_tim callback from these
would cause more harm then good.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Use separate mac80211_ops for rt2800pci and rt2800usb
Helmut Schaa [Sun, 11 Jul 2010 10:28:54 +0000 (12:28 +0200)]
rt2x00: Use separate mac80211_ops for rt2800pci and rt2800usb

Use separate mac80211_ops for rt2800pci and rt2800usb in preparation
for further fixes. This shouldn't introduce functional changes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Use pretbtt irq for fetching beacons on rt2800pci
Helmut Schaa [Sun, 11 Jul 2010 10:28:23 +0000 (12:28 +0200)]
rt2x00: Use pretbtt irq for fetching beacons on rt2800pci

Updating the beacon on pre tbtt instead of beacondone allows much lower
latency in regard to TIM updates. Hence, use the pre tbtt interrupt for
updating the beacon in rt2800pci (older devices don't provide a pre tbtt
interrupt).

Also, add a new driver flag to indicate if a driver has pre tbtt support
or not and implement the according behavior in rt2x00lib.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Implement broad- and multicast buffering
Helmut Schaa [Sun, 11 Jul 2010 10:27:58 +0000 (12:27 +0200)]
rt2x00: Implement broad- and multicast buffering

Although mac80211 buffers broad- and mutlicast frames for us in AP mode
we still have to send them out after a DTIM beacon. Implement this
behavior by sending out the buffered frames when the beacondone
interrupt is processed.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Allow beacon update without scheduling a work
Helmut Schaa [Sun, 11 Jul 2010 10:27:26 +0000 (12:27 +0200)]
rt2x00: Allow beacon update without scheduling a work

Since all rt2x00 PCI drivers use threaded interrupts now we don't need
to schedule a work just to update the beacon. The only place where the
beacon still gets updated in atomic context is from the set_tim
callback. Hence, move the work scheduling there.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Convert rt2x00 to use threaded interrupts
Helmut Schaa [Sun, 11 Jul 2010 10:26:48 +0000 (12:26 +0200)]
rt2x00: Convert rt2x00 to use threaded interrupts

Use threaded interrupts for all rt2x00 PCI devices.

This has several generic advantages:
- Reduce the time we spend in hard irq context
- Use non-atmic mac80211 functions for rx/tx

Furthermore implementing broad- and multicast buffering will be
much easier in process context while maintaining low latency and
updating the beacon just before transmission (pre tbtt interrupt)
can also be done in process context.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Make rt2800_write_beacon only export to GPL
Ivo van Doorn [Sun, 11 Jul 2010 10:26:12 +0000 (12:26 +0200)]
rt2x00: Make rt2800_write_beacon only export to GPL

rt2800_write_beacon is the only function which uses
EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL. All symbols
in rt2x00 should however use the GPL restricted export.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Implement watchdog monitoring
Ivo van Doorn [Sun, 11 Jul 2010 10:25:46 +0000 (12:25 +0200)]
rt2x00: Implement watchdog monitoring

Implement watchdog monitoring for USB devices (PCI support can
be added later). This will determine if URBs being uploaded to
the hardware are actually returning. Both rt2500usb and rt2800usb
have shown that URBs being uploaded can remain hanging without
being released by the hardware.
By using this watchdog, a queue can be reset when this occurs.
For rt2800usb it has been tested that the connection is preserved
even though this interruption.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix vgc_level_reg handling
Ivo van Doorn [Sun, 11 Jul 2010 10:25:17 +0000 (12:25 +0200)]
rt2x00: Fix vgc_level_reg handling

Currently vgc_level_reg and vgc_level are equal to eachother,
while the purpose of vgc_level_reg is the value last written
to the register and is remembered through link tuning resets.
The vgc_level is the currently active level, which is
reset during link tuning resets.

The usage of these variables depends on the drivers, some drivers
need both, while others need only one of the two.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Disable link tuning while scanning
Ivo van Doorn [Sun, 11 Jul 2010 10:24:47 +0000 (12:24 +0200)]
rt2x00: Disable link tuning while scanning

While scanning the link tuner must be disabled. Otherwise
it will interfere with receiving all beacons for each channel
due to changing sensitivity levels.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Rename CONFIG_DISABLE_LINK_TUNING
Ivo van Doorn [Sun, 11 Jul 2010 10:24:22 +0000 (12:24 +0200)]
rt2x00: Rename CONFIG_DISABLE_LINK_TUNING

Rename CONFIG_DISABLE_LINK_TUNING to DRIVER_SUPPORT_LINK_TUNING
Link tuning support is not only based on EEPROM decisions, but
also if the device actually supports it.

Currently only rt2500usb doesn't support link tuning because
of hardware problems. But rt2800usb is also suspected of having
problems with link tuning.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Convert AGC value from descriptor to RSSI (dBm)
Ivo van Doorn [Sun, 11 Jul 2010 10:23:50 +0000 (12:23 +0200)]
rt2x00: Convert AGC value from descriptor to RSSI (dBm)

The RSSI values in the RXWI descriptor aren't true RSSI
values. Instead they are more like the AGC values similar
to rt61pci. And as such, it needs the same conversion
before it can be passed to rt2x00lib/mac80211.

This requires the struct queue_entry to be passed to
rt2800_process_rxwi rather then the skb structure which
is contained in the queue_entry. This is required to
obtain the lna_gain information from the rt2x00_dev structure.

This fixes connection problems when using wpa_supplicant
which would try to connect to the worst AP's rather then the
best ones.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Limit txpower by eeprom values
Helmut Schaa [Sun, 11 Jul 2010 10:23:09 +0000 (12:23 +0200)]
rt2x00: Limit txpower by eeprom values

Limit the txpower per rate by the approriate values in the eeprom.
This avoids too high txpower values resulting in bad tx performance.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agohostap: fixup strlen() math
Dan Carpenter [Sat, 10 Jul 2010 22:10:42 +0000 (00:10 +0200)]
hostap: fixup strlen() math

In hostap_add_interface() we do:
sprintf(dev->name, "%s%s", prefix, name);

dev->name has IFNAMSIZ (16) characters.
prefix is local->dev->name.
name is "wds%d"

strlen() returns the number of characters in the string not counting the
NULL so if we have a string with 11 characters we get "12345678901wds%d"
which is 16 characters and a NULL so we're past the end of the array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoadm8211: fix memory leak
Kulikov Vasiliy [Sat, 10 Jul 2010 12:28:57 +0000 (16:28 +0400)]
adm8211: fix memory leak

We must free priv->eeprom allocated in adm8211_read_eeprom().

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoprism54: call BUG_ON() earlier
Dan Carpenter [Sat, 10 Jul 2010 08:53:38 +0000 (10:53 +0200)]
prism54: call BUG_ON() earlier

This test is off by one because strlen() doesn't include the NULL
terminator.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1271: use __packed annotation
Luciano Coelho [Fri, 9 Jul 2010 11:10:58 +0000 (14:10 +0300)]
wl1271: use __packed annotation

This patch changes __attribute__ ((packed)) annotations to __packed in wl1271
code that was introduced in a recent patch in wireless-testing.

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: Added support for host sleep feature
Amitkumar Karwar [Thu, 8 Jul 2010 01:13:48 +0000 (06:43 +0530)]
libertas: Added support for host sleep feature

Existing "ethtool -s ethX wol X" command configures hostsleep
parameters, but those are activated only during suspend/resume,
there is no way to configure host sleep without actual suspend.

This patch adds debugfs command to enable/disable host sleep based on
already configured host sleep parameters using wol command.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: ignore spurious deauth
Johannes Berg [Mon, 12 Jul 2010 12:46:43 +0000 (14:46 +0200)]
cfg80211: ignore spurious deauth

Ever since mac80211/drivers are no longer
fully in charge of keeping track of the
auth status, trying to make them do so will
fail. Instead of warning and reporting the
deauthentication to userspace, cfg80211 must
simply ignore it so that spurious
deauthentications, e.g. before starting
authentication, aren't seen by userspace as
actual deauthentications.

Cc: stable@kernel.org
Reported-by: Paul Stewart <pstew@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMAINTAINERS: mark adm8211 as an orphan
John W. Linville [Mon, 12 Jul 2010 20:03:07 +0000 (16:03 -0400)]
MAINTAINERS: mark adm8211 as an orphan

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet/core: EXPORT_SYMBOL cleanups
Eric Dumazet [Fri, 9 Jul 2010 21:22:04 +0000 (21:22 +0000)]
net/core: EXPORT_SYMBOL cleanups

CodingStyle cleanups

EXPORT_SYMBOL should immediately follow the symbol declaration.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/ipv4: EXPORT_SYMBOL cleanups
Eric Dumazet [Fri, 9 Jul 2010 21:22:10 +0000 (21:22 +0000)]
net/ipv4: EXPORT_SYMBOL cleanups

CodingStyle cleanups

EXPORT_SYMBOL should immediately follow the symbol declaration.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoac3200: fix error path
Kulikov Vasiliy [Fri, 9 Jul 2010 02:28:09 +0000 (02:28 +0000)]
ac3200: fix error path

Do not call free_irq() if request_irq() failed.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoat1700: fix double free_irq
Kulikov Vasiliy [Fri, 9 Jul 2010 02:31:26 +0000 (02:31 +0000)]
at1700: fix double free_irq

free_irq() is called both in net_close() and cleanup_card().  Since it
is requested in at1700_probe1(), leave free_irq() only in cleanup_card()
for balance.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: exclude registers with read side effects from register dumps
Dimitris Michailidis [Mon, 12 Jul 2010 00:33:48 +0000 (17:33 -0700)]
cxgb4: exclude registers with read side effects from register dumps

A few registers have side effects on reads, eg FIFO pointers that
auto advance or mailboxes which change ownership when read.  They are
unsafe to read so exclude them from ethtool register dumps.

Bump ethtool_regs.version to indicate the changed register set.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: implement the ETHTOOL_GRXFH command
Dimitris Michailidis [Sun, 11 Jul 2010 12:01:18 +0000 (12:01 +0000)]
cxgb4: implement the ETHTOOL_GRXFH command

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: add user manipulation of the RSS table
Dimitris Michailidis [Sun, 11 Jul 2010 12:01:17 +0000 (12:01 +0000)]
cxgb4: add user manipulation of the RSS table

Implement the get_rxnfc, get_rxfh_indir, and set_rxfh_indir ethtool
methods for user manipulation of the RSS table.  Besides the methods
themselves the rest of the changes here store, initialize, and write
the table contents.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: avoid duplicating some resource freeing code
Dimitris Michailidis [Sun, 11 Jul 2010 12:01:16 +0000 (12:01 +0000)]
cxgb4: avoid duplicating some resource freeing code

Currently there are two copies of some resource freeing code, turn it into
a function and call it.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: move the choice of interrupt type before net_device registration
Dimitris Michailidis [Sun, 11 Jul 2010 12:01:15 +0000 (12:01 +0000)]
cxgb4: move the choice of interrupt type before net_device registration

We need to settle on the kind of interrupts we'll be using, a choice that
also impacts the number of queues, before registering and making visible
the net_devices.  Move the relevant code up a bit.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>