safe/jmp/linux-2.6
14 years agort2x00: move REGISTER_BUSY_* definitions to rt2x00.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:50 +0000 (18:36 +0100)]
rt2x00: move REGISTER_BUSY_* definitions to rt2x00.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib (part two)
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:40 +0000 (18:36 +0100)]
rt2800: add rt2800lib (part two)

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib (part one)
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:24 +0000 (18:36 +0100)]
rt2800: add rt2800lib (part one)

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: prepare for rt2800lib addition
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:17 +0000 (18:36 +0100)]
rt2800: prepare for rt2800lib addition

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: add support for different chipset interfaces
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:10 +0000 (18:36 +0100)]
rt2x00: add support for different chipset interfaces

Enhance rt2x00 infrastructure by adding explicit information
about used chipset interface to struct rt2x00_chip.

The new field will be used by rt2800 drivers for rt2800 library.

Also add commonly used rt2x00_intf_is_pci() and rt2x00_intf_is_usb()
helpers to make code easier to read (noticed by Ivo van Doorn).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: fix comments in rt2800.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:02 +0000 (18:36 +0100)]
rt2800: fix comments in rt2800.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: fix duplication in header files
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:54 +0000 (18:35 +0100)]
rt2800: fix duplication in header files

Updated debugging scripts are located here:

http://www.kernel.org/pub/linux/kernel/people/bart/rt2800/scripts/

(they also work fine with older drivers)

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add RXINFO_DESC_SIZE definition
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:47 +0000 (18:35 +0100)]
rt2800usb: add RXINFO_DESC_SIZE definition

Add RXINFO_DESC_SIZE definition and use it instead of abusing
RXD_DESC_SIZE one (TXD_DESC_SIZE and RXD_DESC_SIZE are specific
to PCI version of the chipset).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:32 +0000 (18:35 +0100)]
rt2800: add rt2800lib.h

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix rt2x00pci_register_multi[read,write]() arguments
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:25 +0000 (18:35 +0100)]
rt2x00: fix rt2x00pci_register_multi[read,write]() arguments

Change type of 'length' argument from u16 to u32 (all arguments
match rt2x00usb_register_multi[read,write]() ones now).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix rt2x00usb_regbusy_read() arguments
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:18 +0000 (18:35 +0100)]
rt2x00: fix rt2x00usb_regbusy_read() arguments

Add const to 'field' argument of rt2x00usb_regbusy_read()
(all arguments match rt2x00pci_regbusy_read() ones now).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix rt2x00usb_register_multiwrite() arguments
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:10 +0000 (18:35 +0100)]
rt2x00: fix rt2x00usb_register_multiwrite() arguments

Add const to 'value' argument of rt2x00usb_register_multiwrite()
(all arguments match rt2x00pci_register_multiwrite() ones now).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: convert to use struct rt2800_ops methods
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:00 +0000 (18:35 +0100)]
rt2800pci: convert to use struct rt2800_ops methods

Add chipset registers access abstraction layer and prepare for later
code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: convert to use struct rt2800_ops methods
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:53 +0000 (18:34 +0100)]
rt2800usb: convert to use struct rt2800_ops methods

Add chipset registers access abstraction layer and prepare for later
code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: add driver private field to struct rt2x00_dev
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:46 +0000 (18:34 +0100)]
rt2x00: add driver private field to struct rt2x00_dev

Enhance rt2x00 infrastructure by adding driver specific field to
struct rt2x00_dev.

The new field will be used by rt2800 drivers for chipset registers
access abstraction layer.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_mcu_request() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:39 +0000 (18:34 +0100)]
rt2800pci: add rt2800_mcu_request() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_mcu_request() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:32 +0000 (18:34 +0100)]
rt2800usb: add rt2800_mcu_request() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_rf_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:25 +0000 (18:34 +0100)]
rt2800pci: add rt2800_rf_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_rf_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:18 +0000 (18:34 +0100)]
rt2800usb: add rt2800_rf_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_rfcsr_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:11 +0000 (18:34 +0100)]
rt2800pci: add rt2800_rfcsr_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_rfcsr_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:04 +0000 (18:34 +0100)]
rt2800usb: add rt2800_rfcsr_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_bbp_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:57 +0000 (18:33 +0100)]
rt2800pci: add rt2800_bbp_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_bbp_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:50 +0000 (18:33 +0100)]
rt2800usb: add rt2800_bbp_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_regbusy_read() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:41 +0000 (18:33 +0100)]
rt2800pci: add rt2800_regbusy_read() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_regbusy_read() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:34 +0000 (18:33 +0100)]
rt2800usb: add rt2800_regbusy_read() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_register_multi[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:27 +0000 (18:33 +0100)]
rt2800pci: add rt2800_register_multi[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_register_multi[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:20 +0000 (18:33 +0100)]
rt2800usb: add rt2800_register_multi[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_register_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:13 +0000 (18:33 +0100)]
rt2800pci: add rt2800_register_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_register_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:05 +0000 (18:33 +0100)]
rt2800usb: add rt2800_register_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Don't queue ieee80211 work after USB removal
Sean Cross [Thu, 5 Nov 2009 19:22:03 +0000 (20:22 +0100)]
rt2x00: Don't queue ieee80211 work after USB removal

This prevents the rt2x00 driver from queueing ieee80211 work after the  
USB card has been removed, preventing a kernel panic.

Signed-off-by: Sean Cross <sean@chumby.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRevert "ipw2200: fix oops on missing firmware"
John W. Linville [Fri, 6 Nov 2009 17:58:20 +0000 (12:58 -0500)]
Revert "ipw2200: fix oops on missing firmware"

This reverts commit e6c5fc53d0f44a772398402ee8a1879818e42b4e.

Based on this regression report:

Date: Thu, 05 Nov 2009 15:59:16 +0100
From: Holger Schurig <holgerschurig@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: BUG: oops when "rmmod ipw2200"

This happened on wireless-testing v2.6.32-rc6-41575-g5e68bfb. I
modprobed ipw2200, put it into monitor mode, used tshark a while to
monitor, then I stopped tshark, "ifconfig eth2 down" and finally
"rmmod ipw2200", and voila:

[  917.189620] ------------[ cut here ]------------
[  917.189717] kernel BUG at net/wireless/core.c:543!
[  917.189805] invalid opcode: 0000 [#1] PREEMPT SMP
[  917.190002] last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0d.0/firmware/0000:02:0d.0/loading
[  917.190136] Modules linked in: lib80211_crypt_wep ipw2200(-) libipw lib80211 ath5k mac80211 ath cfg80211 psmouse uhci_hcd
[  917.190680]
[  917.190759] Pid: 1763, comm: rmmod Not tainted (2.6.32-rc6-wl #26) Amilo M1425
[  917.190886] EIP: 0060:[<f8accf34>] EFLAGS: 00010202 CPU: 0
[  917.190992] EIP is at wiphy_unregister+0xd3/0x175 [cfg80211]
[  917.191083] EAX: f601d4c4 EBX: 00000000 ECX: 00000000 EDX: f79e8600
[  917.191176] ESI: f601d400 EDI: f95b4350 EBP: f6009eb4 ESP: f6009e8c
[  917.191269]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  917.191360] Process rmmod (pid: 1763, ti=f6008000 task=f79e8130 task.ti=f6008000)
[  917.191486] Stack:
[  917.191562]  f601d5a0 f601d484 f6460e98 f6009ea0 c01407ee f6009eb8 00000246 f64604c0
[  917.191916] <0> f6460e5c f95b4350 f6009ec0 f94fd030 f6460e98 f6009edc f95a9d4f f787bc00
[  917.192100] <0> f787bc58 f787bc00 f95b4350 f95b4350 f6009ee8 c0207fca f787bc58 f6009ef8
[  917.192100] Call Trace:
[  917.192100]  [<c01407ee>] ? trace_hardirqs_on+0xb/0xd
[  917.192100]  [<f94fd030>] ? unregister_ieee80211+0xe/0x27 [libipw]
[  917.192100]  [<f95a9d4f>] ? ipw_pci_remove+0x59/0x227 [ipw2200]
[  917.192100]  [<c0207fca>] ? pci_device_remove+0x19/0x39
[  917.192100]  [<c02b93a4>] ? __device_release_driver+0x59/0x9d
[  917.192100]  [<c02b944f>] ? driver_detach+0x67/0x85
[  917.192100]  [<c02b88d6>] ? bus_remove_driver+0x69/0x85
[  917.192100]  [<c02b9878>] ? driver_unregister+0x4d/0x54
[  917.192100]  [<c02081c3>] ? pci_unregister_driver+0x28/0x71
[  917.192100]  [<f95a9cf4>] ? ipw_exit+0x1c/0x1e [ipw2200]
[  917.192100]  [<c0148e2b>] ? sys_delete_module+0x192/0x1ef
[  917.192100]  [<c0162cdb>] ? remove_vma+0x52/0x58
[  917.192100]  [<c01028bb>] ? sysenter_exit+0xf/0x18
[  917.192100]  [<c0102888>] ? sysenter_do_call+0x12/0x36
[  917.192100] Code: 74 07 e8 81 bc 8c c7 eb c8 8d 55 e0 89 f8 e8 d6 6d 66 c7 8b 45 dc 31 d2 e8 81 cc 8c c7 8d 86 c4 00 00 00 39 86 c4 00 00 00 74 04 <0f> 0b eb fe 8b 45 dc 8d 5e 0c e8 5a cc 8c c7 8b 86 94 03 00 00
[  917.192100] EIP: [<f8accf34>] wiphy_unregister+0xd3/0x175 [cfg80211] SS:ESP 0068:f6009e8c
[  917.203718] ---[ end trace bcaaf449945a5100 ]---

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'linux-2.6.33.y' of git://git.kernel.org/pub/scm/linux/kernel/git/inaky...
David S. Miller [Fri, 6 Nov 2009 13:01:54 +0000 (05:01 -0800)]
Merge branch 'linux-2.6.33.y' of git://git./linux/kernel/git/inaky/wimax

14 years agoieee802154: add support for creation/removal of logic interfaces
Dmitry Eremin-Solenikov [Thu, 5 Nov 2009 13:56:23 +0000 (16:56 +0300)]
ieee802154: add support for creation/removal of logic interfaces

Add support for two more NL802154 commands: ADD_IFACE and DEL_IFACE,
thus allowing creation and removal of logic WPAN interfaces on the top
of wpan-phy.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoieee802154: add PHY_NAME to LIST_IFACE command results
Dmitry Eremin-Solenikov [Thu, 29 Oct 2009 13:28:52 +0000 (16:28 +0300)]
ieee802154: add PHY_NAME to LIST_IFACE command results

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoieee802154: add two nl802154 helpers
Dmitry Eremin-Solenikov [Wed, 4 Nov 2009 15:05:38 +0000 (18:05 +0300)]
ieee802154: add two nl802154 helpers

Add two nl802154 helpers: one for starting a reply message, one for sending.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agofakehard: mlme_ops->get_phy implementation
Dmitry Eremin-Solenikov [Wed, 4 Nov 2009 14:53:40 +0000 (17:53 +0300)]
fakehard: mlme_ops->get_phy implementation

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoieee802154: add an mlme_ops call to retrieve PHY object
Dmitry Eremin-Solenikov [Wed, 4 Nov 2009 14:53:23 +0000 (17:53 +0300)]
ieee802154: add an mlme_ops call to retrieve PHY object

ops->get_phy should increment reference to wpan-phy. As we return
the external structure, we should do refcounting correctly.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agofakehard: claim all 2.4 Ghz channels as supported
Dmitry Eremin-Solenikov [Tue, 22 Sep 2009 11:31:25 +0000 (15:31 +0400)]
fakehard: claim all 2.4 Ghz channels as supported

Make fakehard device claim all 2.4 Ghz channels from 802.15.4-2006,
802.15.4a-2007 as supported by the hw.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agofakehard: no need to export net_to_phy, make it static
Dmitry Eremin-Solenikov [Thu, 29 Oct 2009 13:32:46 +0000 (16:32 +0300)]
fakehard: no need to export net_to_phy, make it static

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoieee802154: add LIST_PHY command support
Dmitry Eremin-Solenikov [Tue, 15 Sep 2009 13:04:44 +0000 (17:04 +0400)]
ieee802154: add LIST_PHY command support

Add nl802154 command to get information about PHY's present in
the system.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoieee802154: split away MAC commands implementation
Dmitry Eremin-Solenikov [Mon, 14 Sep 2009 14:17:36 +0000 (18:17 +0400)]
ieee802154: split away MAC commands implementation

Move all mac-related stuff to separate file so that ieee802154/netlink.c
contains only generic code.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoieee802154: merge nl802154 and wpan-class in single module
Dmitry Eremin-Solenikov [Thu, 10 Sep 2009 13:50:12 +0000 (17:50 +0400)]
ieee802154: merge nl802154 and wpan-class in single module

There is no real need to have ieee802154 interfaces separate
into several small modules, as neither of them has it's own use.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoieee802154: constify struct net_device in some operations
Dmitry Eremin-Solenikov [Fri, 2 Oct 2009 15:05:00 +0000 (19:05 +0400)]
ieee802154: constify struct net_device in some operations

Some of ieee802154 operations really shouldn't change passed net_device.
Constify passed argument.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agowpan-phy: follow usual patter of devices registration
Dmitry Eremin-Solenikov [Mon, 28 Sep 2009 15:01:20 +0000 (19:01 +0400)]
wpan-phy: follow usual patter of devices registration

Follow the usual pattern of devices registration by adding new function
(wpan_phy_set_dev) that sets child->parent relationship and removing
parent argument from wpan_phy_register call.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agowpan-phy: allow specifying a per-page channel mask
Dmitry Eremin-Solenikov [Tue, 22 Sep 2009 11:26:48 +0000 (15:26 +0400)]
wpan-phy: allow specifying a per-page channel mask

IEEE 802.15.4-2006 defines channel pages that hold channels (max 32 pages,
27 channels per page). Allow the driver to specify supported channels
on pages, other than the first one.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agowpan-phy: use snprintf to limit the amount of chars written
Dmitry Eremin-Solenikov [Mon, 28 Sep 2009 14:58:32 +0000 (18:58 +0400)]
wpan-phy: use snprintf to limit the amount of chars written

Use snprintf to limit the amount of chars put in the buffer for attr -> show.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agowpan-phy: init channel/page fields
Dmitry Eremin-Solenikov [Fri, 18 Sep 2009 12:35:06 +0000 (16:35 +0400)]
wpan-phy: init channel/page fields

Set page to zero (for compatibility w/ devices supporting only first page).
Also init channel by default to -1 to disallow transfers for non-initialised
devices.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agowpan-phy: add wpan-phy iteration functions
Dmitry Eremin-Solenikov [Tue, 15 Sep 2009 12:57:04 +0000 (16:57 +0400)]
wpan-phy: add wpan-phy iteration functions

Add API to iterate over the wpan-phy instances.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agowpan-phy: add a helper to put the wpan_phy device
Dmitry Eremin-Solenikov [Mon, 14 Sep 2009 14:11:03 +0000 (18:11 +0400)]
wpan-phy: add a helper to put the wpan_phy device

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Fri, 6 Nov 2009 08:55:55 +0000 (00:55 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/usb/cdc_ether.c

All CDC ethernet devices of type USB_CLASS_COMM need to use
'&mbm_info'.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodecnet: netdevice refcount leak
Eric Dumazet [Fri, 6 Nov 2009 08:50:39 +0000 (00:50 -0800)]
decnet: netdevice refcount leak

While working on device refcount stuff, I found a device refcount leak
through DECNET.
This nasty bug can be used to hold refcounts on any !DECNET netdevice.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetfilter: nf_nat: fix NAT issue in 2.6.30.4+
Jozsef Kadlecsik [Fri, 6 Nov 2009 08:43:42 +0000 (00:43 -0800)]
netfilter: nf_nat: fix NAT issue in 2.6.30.4+

Vitezslav Samel discovered that since 2.6.30.4+ active FTP can not work
over NAT. The "cause" of the problem was a fix of unacknowledged data
detection with NAT (commit a3a9f79e361e864f0e9d75ebe2a0cb43d17c4272).
However, actually, that fix uncovered a long standing bug in TCP conntrack:
when NAT was enabled, we simply updated the max of the right edge of
the segments we have seen (td_end), by the offset NAT produced with
changing IP/port in the data. However, we did not update the other parameter
(td_maxend) which is affected by the NAT offset. Thus that could drift
away from the correct value and thus resulted breaking active FTP.

The patch below fixes the issue by *not* updating the conntrack parameters
from NAT, but instead taking into account the NAT offsets in conntrack in a
consistent way. (Updating from NAT would be more harder and expensive because
it'd need to re-calculate parameters we already calculated in conntrack.)

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Fix CQE_STATUS_EXTD_SHIFT define
Sathya Perla [Fri, 6 Nov 2009 08:31:01 +0000 (00:31 -0800)]
be2net: Fix CQE_STATUS_EXTD_SHIFT define

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Fix build warning in sock_bindtodevice().
David S. Miller [Fri, 6 Nov 2009 06:37:11 +0000 (22:37 -0800)]
net: Fix build warning in sock_bindtodevice().

net/core/sock.c: In function 'sock_setsockopt':
net/core/sock.c:396: warning: 'index' may be used uninitialized in this function
net/core/sock.c:396: note: 'index' was declared here

GCC can't see that all paths initialize index, so just
set it to the default (0) and eliminate the specific
code block that handles the null device name string.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopktgen: tx_bytes might be slightly wrong
Eric Dumazet [Fri, 6 Nov 2009 05:04:32 +0000 (21:04 -0800)]
pktgen: tx_bytes might be slightly wrong

cur_pkt_size can be changed in proc fs while pktgen is running,
we better use a private field to get precise tx-bytes counter.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: sock_bindtodevice() RCU-ification
Eric Dumazet [Fri, 6 Nov 2009 05:03:39 +0000 (21:03 -0800)]
net: sock_bindtodevice() RCU-ification

Avoid dev_hold()/dev_put() in sock_bindtodevice()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoip_frag: dont touch device refcount
Eric Dumazet [Fri, 6 Nov 2009 04:59:47 +0000 (20:59 -0800)]
ip_frag: dont touch device refcount

When sending fragmentation expiration ICMP V4/V6 messages,
we can avoid touching device refcount, thanks to RCU

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet_cls: Use __dev_get_by_index()
Eric Dumazet [Fri, 6 Nov 2009 04:57:26 +0000 (20:57 -0800)]
net_cls: Use __dev_get_by_index()

We hold RTNL in tc_dump_tfilter(), we can avoid dev_hold()/dev_put()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: ipv6: avoid touching device refcount
Eric Dumazet [Fri, 6 Nov 2009 04:56:46 +0000 (20:56 -0800)]
sctp: ipv6: avoid touching device refcount

Avoid touching device refcount in sctp/ipv6, thanks to RCU

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetlabel: remove dev_put() calls
Eric Dumazet [Fri, 6 Nov 2009 04:53:47 +0000 (20:53 -0800)]
netlabel: remove dev_put() calls

Use dev_get_by_name_rcu() to avoid dev_put() calls,
in sections already inside a rcu_read_lock()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: remove dev_put() in add_del_if()
Eric Dumazet [Fri, 6 Nov 2009 04:47:35 +0000 (20:47 -0800)]
bridge: remove dev_put() in add_del_if()

add_del_if() is called with RTNL, we can use __dev_get_by_index()
instead of [dev_get_by_index() + dev_put()]

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: check kern before calling security subsystem
Eric Paris [Fri, 6 Nov 2009 04:45:52 +0000 (20:45 -0800)]
net: check kern before calling security subsystem

Before calling capable(CAP_NET_RAW) check if this operations is on behalf
of the kernel or on behalf of userspace.  Do not do the security check if
it is on behalf of the kernel.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: pass kern to net_proto_family create function
Eric Paris [Fri, 6 Nov 2009 06:18:14 +0000 (22:18 -0800)]
net: pass kern to net_proto_family create function

The generic __sock_create function has a kern argument which allows the
security system to make decisions based on if a socket is being created by
the kernel or by userspace.  This patch passes that flag to the
net_proto_family specific create function, so it can do the same thing.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: drop capability from protocol definitions
Eric Paris [Fri, 6 Nov 2009 04:44:37 +0000 (20:44 -0800)]
net: drop capability from protocol definitions

struct can_proto had a capability field which wasn't ever used.  It is
dropped entirely.

struct inet_protosw had a capability field which can be more clearly
expressed in the code by just checking if sock->type = SOCK_RAW.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agorose: device refcount leak
Eric Dumazet [Fri, 6 Nov 2009 04:56:07 +0000 (20:56 -0800)]
rose: device refcount leak

While hunting dev_put() for net-next-2.6, I found a device refcount
leak in ROSE, ioctl(SIOCADDRT) error path.

Fix is to not touch device refcount, as we hold RTNL

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: prevent bridging wrong device
Stephen Hemminger [Fri, 6 Nov 2009 04:46:52 +0000 (20:46 -0800)]
bridge: prevent bridging wrong device

The bridge code assumes ethernet addressing, so be more strict in
the what is allowed. This showed up when GRE had a bug and was not
using correct address format.

Add some more comments for increased clarity.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: version 1.52.1-3
Yaniv Rosner [Fri, 6 Nov 2009 04:00:59 +0000 (20:00 -0800)]
bnx2x: version 1.52.1-3

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Fix register access timeout in 10M
Yaniv Rosner [Thu, 5 Nov 2009 17:18:32 +0000 (19:18 +0200)]
bnx2x: Fix register access timeout in 10M

In BCM8481 when link speed goes from 1G to 10M, driver received timeout
since the MAC clock hasn't synced yet with the new speed, so it is required
first to program the MAC with the new speed, and only then configure other
parameters

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Fix 10G mode in BCM8481/BCM84823
Yaniv Rosner [Thu, 5 Nov 2009 17:18:30 +0000 (19:18 +0200)]
bnx2x: Fix 10G mode in BCM8481/BCM84823

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Fix BCM8726 ROM load seq
Yaniv Rosner [Thu, 5 Nov 2009 17:18:26 +0000 (19:18 +0200)]
bnx2x: Fix BCM8726 ROM load seq

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Add support for BCM84823
Yaniv Rosner [Thu, 5 Nov 2009 17:18:23 +0000 (19:18 +0200)]
bnx2x: Add support for BCM84823

Add support for new phy type BCM84823 (Dual copper-port phy)

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Modify BCM8706 link init seq
Yaniv Rosner [Thu, 5 Nov 2009 17:18:21 +0000 (19:18 +0200)]
bnx2x: Modify BCM8706 link init seq

Modify BCM8706 link initialization sequence so that first it link up
between Serdes and BCM8706, and only then between BCM8706 to network

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Enable FC when parallel-detect is used
Yaniv Rosner [Thu, 5 Nov 2009 17:18:12 +0000 (19:18 +0200)]
bnx2x: Enable FC when parallel-detect is used

When parallel detect is used, flow-control is set to the
req_fc_auto_adv instead of none.

Motive: when 577xx is FC configuration is set to AUTO, while LP speed
is set to FORCE mode and FC to force RX/TX, link would come up using
parallel detect, and the FC will be set to NONE since FC capabilities
were not negotiated, although the LP is setting FC to force RX/TX.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Miscellaneous debug print and tabs
Yaniv Rosner [Thu, 5 Nov 2009 17:18:10 +0000 (19:18 +0200)]
bnx2x: Miscellaneous debug print and tabs

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Fix CL73 autoneg issues
Yaniv Rosner [Thu, 5 Nov 2009 17:18:07 +0000 (19:18 +0200)]
bnx2x: Fix CL73 autoneg issues

- Advertise 1G KX4 in CL73 when 1G speed capability is enabled
- Add flow-control negotiation over CL73
- External loopback test on Serdes should be done in FORCE mode, since in
CL73 it is unable to link up with the same core using AUTONEG
- Fix bnx2x_set_led function to support CL73 link leds

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Fix Parallel-Detect settings
Yaniv Rosner [Thu, 5 Nov 2009 17:18:04 +0000 (19:18 +0200)]
bnx2x: Fix Parallel-Detect settings

Enable Parallel-Detect for 10G and 1G only if the relevant speed
capability is enabled

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovirtio_net: rename driver struct to please modpost
Uwe Kleine-König [Thu, 5 Nov 2009 09:32:44 +0000 (01:32 -0800)]
virtio_net: rename driver struct to please modpost

Commit

3d1285b (move virtnet_remove to .devexit.text)

introduced the first reference to __devexit in struct virtio_driver
virtio_net which upset modpost ("Section mismatch in reference from the
variable virtio_net to the function .devexit.text:virtnet_remove()").

Fix this by renaming virtio_net to virtio_net_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Blame-taken-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Use defaults when no route options are available
Gilad Ben-Yossef [Thu, 5 Nov 2009 07:23:10 +0000 (23:23 -0800)]
tcp: Use defaults when no route options are available

Trying to parse the option of a SYN packet that we have
no route entry for should just use global wide defaults
for route entry options.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Tested-by: Valdis.Kletnieks@vt.edu
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Do not call IPv4 specific func in tcp_check_req
Gilad Ben-Yossef [Thu, 5 Nov 2009 07:21:44 +0000 (23:21 -0800)]
tcp: Do not call IPv4 specific func in tcp_check_req

Calling IPv4 specific inet_csk_route_req in tcp_check_req
is a bad idea and crashes machine on IPv6 connections, as reported
by Valdis Kletnieks

Also, all we are really interested in is the timestamp
option in the header, so calling tcp_parse_options()
with the "estab" set to false flag is an overkill as
it tries to parse half a dozen other TCP options.

We know whether timestamp should be enabled or not
using data from request_sock.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Tested-by: Valdis.Kletnieks@vt.edu
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoTI DaVinci EMAC: Add suspend/resume capability
Ranjith Lohithakshan [Thu, 5 Nov 2009 06:06:20 +0000 (22:06 -0800)]
TI DaVinci EMAC: Add suspend/resume capability

Add suspend/resume capability to TI DaVinci EMAC driver.

Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: net/ipv4/devinet.c cleanups
Eric Dumazet [Thu, 5 Nov 2009 06:05:10 +0000 (22:05 -0800)]
net: net/ipv4/devinet.c cleanups

As pointed by Stephen Rothwell, commit c6d14c84 added a warning :

net/ipv4/devinet.c: In function 'inet_select_addr':
net/ipv4/devinet.c:902: warning: label 'out' defined but not used

delete unused 'out' label and do some cleanups as well

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agortl8187: Fix kernel oops when device is removed when LEDS enabled
Larry Finger [Wed, 4 Nov 2009 06:00:25 +0000 (00:00 -0600)]
rtl8187: Fix kernel oops when device is removed when LEDS enabled

As reported by Rick Farina (sidhayn@gmail.com), removing the RTL8187
USB stick, or unloading the driver rtl8187 using rmmod will cause a
kernel oops.  There are at least two forms of the failure, (1) BUG:
Scheduling while atomic, and (2) a fatal kernel page fault. This
problem is reported in Bugzilla #14539.

This problem does not occur for kernel 2.6.31, but does for 2.6.32-rc2,
thus it is technically a regression; however, bisection did not locate
any faulty patch. The fix was found by comparing the faulty code in
rtl8187 with p54usb.  My interpretation is that the handling of work
queues in mac80211 changed enough to the LEDs to be unregistered
before tasks on the work queues are cancelled. Previously, these
actions could be done in either order.

(Herton Ronaldo Krzesinski <herton@mandriva.com.br> reports that the
code is the same in 2.6.31, so this may be a candidate for 2.6.31.x.
-- JWL)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Rick Farina <sidhayn@gmail.com>
Tested-by: Rick Farina <sidhayn@gmail.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: use __dev_alloc_skb() on RX
Luis R. Rodriguez [Mon, 2 Nov 2009 17:15:15 +0000 (12:15 -0500)]
wl1271: use __dev_alloc_skb() on RX

RX is handled in a workqueue therefore allocating for GFP_ATOMIC
is overkill and not required.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix internal scan request
Johannes Berg [Mon, 2 Nov 2009 10:31:51 +0000 (11:31 +0100)]
mac80211: fix internal scan request

The internal scan request mac80211 uses to
scan for IBSS networks was set up to contain
no channels at all because n_channels wasn't
set after setting up the channels array. Fix
this to properly scan for networks.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix IBSS merge
Sujith [Mon, 2 Nov 2009 07:03:23 +0000 (12:33 +0530)]
mac80211: Fix IBSS merge

Currently, in IBSS mode, a single creator would go into
a loop trying to merge/scan. This happens because the IBSS timer is
rearmed on finishing a scan and the subsequent
timer invocation requests another scan immediately.

This patch fixes this issue by checking if we have just completed
a scan run trying to merge with other IBSS networks.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: remove needless ifdefs from rt2x00leds.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:33 +0000 (18:36 +0100)]
rt2x00: remove needless ifdefs from rt2x00leds.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: fix comments in rt2800usb.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:39 +0000 (18:35 +0100)]
rt2800usb: fix comments in rt2800usb.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: use rt2x00usb_register_multiwrite() to set key entries
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:58 +0000 (18:32 +0100)]
rt2800usb: use rt2x00usb_register_multiwrite() to set key entries

Since struct hw_key_entry is 32-bytes large and is smaller than
CSR cache size (which is 64-bytes large) we can use the standard
rt2x00usb_register_multiwrite() helper to set key entries.

This cleanup is a part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix rt2x00usb_register_read() comment
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:50 +0000 (18:32 +0100)]
rt2x00: fix rt2x00usb_register_read() comment

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: fix comment about IV/EIV fields
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:40 +0000 (18:32 +0100)]
rt2800pci: fix comment about IV/EIV fields

The bit tested by hardware is TXD_W3_WIV and its value
equals the negated value of ENTRY_TXD_ENCRYPT_IV bit.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: fix comment about register access
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:32 +0000 (18:32 +0100)]
rt2800pci: fix comment about register access

Registers used for indirect BBP and RF registers access are
respectively BBPCSR and RFCSR, also make it clear that all CSR
registers access goes through rt2x00pci_register_[read,write]()
methods.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: fix crypto in TX frame
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:24 +0000 (18:32 +0100)]
rt2800pci: fix crypto in TX frame

Based on rt2800usb patch from Benoit PAPILLAULT
(commit 17616310836ad2cc45a64576ef0e1520b0dcc81b).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: fix rt2800usb_rfcsr_read()
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:17 +0000 (18:32 +0100)]
rt2800usb: fix rt2800usb_rfcsr_read()

The driver should write the read request into RF_CSR_CFG register
and not BBP_CSR_CFG one in rt2800usb_rfcsr_read().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: make Kconfig help entry more helpful
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:10 +0000 (18:32 +0100)]
rt2800pci: make Kconfig help entry more helpful

Document known issues with the driver to aid distribution makers,
users and developers in making informed decisions instead of wasting
their time needlessly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: make Kconfig help entry more helpful
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:31:58 +0000 (18:31 +0100)]
rt2800usb: make Kconfig help entry more helpful

Document known issues with the driver to aid distribution makers,
users and developers in making informed decisions instead of wasting
their time needlessly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make ieee80211_find_sta per virtual interface
Johannes Berg [Wed, 4 Nov 2009 13:42:28 +0000 (14:42 +0100)]
mac80211: make ieee80211_find_sta per virtual interface

Since we have a TODO item to make all station
management dependent on virtual interfaces, I
figured I'd start with pushing such a change
to drivers before more drivers start using the
ieee80211_find_sta() API with a hw pointer and
cause us grief later on.

For now continue exporting the old API in form
of ieee80211_find_sta_by_hw(), but discourage
its use strongly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: remove dead variable
Johannes Berg [Sat, 31 Oct 2009 15:15:39 +0000 (16:15 +0100)]
cfg80211: remove dead variable

commit 211a4d12abf86fe0df4cd68fc6327cbb58f56f81
  Author: Johannes Berg <johannes@sipsolutions.net>
  Date:   Tue Oct 20 15:08:53 2009 +0900

      cfg80211: sme: deauthenticate on assoc failure

accidentally introduced a dead variable, I had
changed the code to not need it while creating
the patch and it looks like I forgot to remove
the variable (and nobody else noticed either).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: pci BAR mapping changes
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:43 +0000 (20:20 +0200)]
mwl8k: pci BAR mapping changes

Map BAR0 as well, as we need to write to it during init on some chips.

Also, if BAR0 is a 64bit BAR, the register BAR becomes BAR2, so try
mapping BAR2 if mapping BAR1 fails.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: shorten receive/transmit state variable names
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:40 +0000 (20:20 +0200)]
mwl8k: shorten receive/transmit state variable names

To conserve horizontal space.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: add support for enabling hardware sniffer mode
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:32 +0000 (20:20 +0200)]
mwl8k: add support for enabling hardware sniffer mode

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>