Commit Graph

420 Commits (f9b124901cd7cf43f272b86008d813ec89d9508b)

Author SHA1 Message Date
George 040a72785c rtlwifi: rtl8192cu: Allow retries for USB I/O
The USB driver does not retry reads - allow 10 tries.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-21 16:20:44 -05:00
Greg Kroah-Hartman d632eb1bf2 USB: convert drivers/net/* to use module_usb_driver()
This converts the drivers in drivers/net/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Petko Manolov <petkan@users.sourceforge.net>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Jiri Pirko <jpirko@redhat.com>
Cc: Pavel Roskin <proski@gnu.org>
Cc: Yoann DI-RUZZA <y.diruzza@lim.eu>
Cc: George <george0505@realtek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 09:44:20 -08:00
John W. Linville 5e819059a2 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2011-11-09 14:49:23 -05:00
Larry Finger 6cddafab54 rtl8192cu: Add new device IDs
The latest vendor (non-mac80211) driver of 9/22/2011 shows some new
device IDs for rtl8192cu. In addition, some typos in the table are
fixed and one duplicate is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-08 15:54:11 -05:00
Linus Torvalds 32aaeffbd4 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include <linux/module.h>
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include <linux/module.h>
  net: sch_generic remove redundant use of <linux/module.h>
  net: inet_timewait_sock doesnt need <linux/module.h>
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
2011-11-06 19:44:47 -08:00
Linus Torvalds de0a5345a5 Merge branch 'for-linus' of git://github.com/richardweinberger/linux
* 'for-linus' of git://github.com/richardweinberger/linux: (90 commits)
  um: fix ubd cow size
  um: Fix kmalloc argument order in um/vdso/vma.c
  um: switch to use of drivers/Kconfig
  UserModeLinux-HOWTO.txt: fix a typo
  UserModeLinux-HOWTO.txt: remove ^H characters
  um: we need sys/user.h only on i386
  um: merge delay_{32,64}.c
  um: distribute exports to where exported stuff is defined
  um: kill system-um.h
  um: generic ftrace.h will do...
  um: segment.h is x86-only and needed only there
  um: asm/pda.h is not needed anymore
  um: hw_irq.h can go generic as well
  um: switch to generic-y
  um: clean Kconfig up a bit
  um: a couple of missing dependencies...
  um: kill useless argument of free_chan() and free_one_chan()
  um: unify ptrace_user.h
  um: unify KSTK_...
  um: fix gcov build breakage
  ...
2011-11-02 09:45:39 -07:00
Al Viro bad3118fcd um: a couple of missing dependencies...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
2011-11-02 14:15:28 +01:00
Paul Gortmaker ee40fa0656 drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE
These were getting the macros from an implicit module.h
include via device.h, but we are planning to clean that up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

drivers/net: Add export.h to wireless/brcm80211/brcmfmac/bcmsdh.c

This relatively recently added file uses EXPORT_SYMBOL and hence
needs export.h included so that it is compatible with the module.h
split up work.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:08 -04:00
Paul Gortmaker 9d9779e723 drivers/net: Add module.h to drivers who were implicitly using it
The device.h header was including module.h, making it present for
most of these drivers.  But we want to clean that up.  Call out the
include of module.h in the modular network drivers.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:07 -04:00
Linus Torvalds 8a9ea3237e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits)
  dp83640: free packet queues on remove
  dp83640: use proper function to free transmit time stamping packets
  ipv6: Do not use routes from locally generated RAs
  |PATCH net-next] tg3: add tx_dropped counter
  be2net: don't create multiple RX/TX rings in multi channel mode
  be2net: don't create multiple TXQs in BE2
  be2net: refactor VF setup/teardown code into be_vf_setup/clear()
  be2net: add vlan/rx-mode/flow-control config to be_setup()
  net_sched: cls_flow: use skb_header_pointer()
  ipv4: avoid useless call of the function check_peer_pmtu
  TCP: remove TCP_DEBUG
  net: Fix driver name for mdio-gpio.c
  ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT
  rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces
  ipv4: fix ipsec forward performance regression
  jme: fix irq storm after suspend/resume
  route: fix ICMP redirect validation
  net: hold sock reference while processing tx timestamps
  tcp: md5: add more const attributes
  Add ethtool -g support to virtio_net
  ...

Fix up conflicts in:
 - drivers/net/Kconfig:
	The split-up generated a trivial conflict with removal of a
	stale reference to Documentation/networking/net-modules.txt.
	Remove it from the new location instead.
 - fs/sysfs/dir.c:
	Fairly nasty conflicts with the sysfs rb-tree usage, conflicting
	with Eric Biederman's changes for tagged directories.
2011-10-25 13:25:22 +02:00
Linus Torvalds 59e5253417 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits)
  MAINTAINERS: linux-m32r is moderated for non-subscribers
  linux@lists.openrisc.net is moderated for non-subscribers
  Drop default from "DM365 codec select" choice
  parisc: Kconfig: cleanup Kernel page size default
  Kconfig: remove redundant CONFIG_ prefix on two symbols
  cris: remove arch/cris/arch-v32/lib/nand_init.S
  microblaze: add missing CONFIG_ prefixes
  h8300: drop puzzling Kconfig dependencies
  MAINTAINERS: microblaze-uclinux@itee.uq.edu.au is moderated for non-subscribers
  tty: drop superfluous dependency in Kconfig
  ARM: mxc: fix Kconfig typo 'i.MX51'
  Fix file references in Kconfig files
  aic7xxx: fix Kconfig references to READMEs
  Fix file references in drivers/ide/
  thinkpad_acpi: Fix printk typo 'bluestooth'
  bcmring: drop commented out line in Kconfig
  btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888'
  doc: raw1394: Trivial typo fix
  CIFS: Don't free volume_info->UNC until we are entirely done with it.
  treewide: Correct spelling of successfully in comments
  ...
2011-10-25 12:11:02 +02:00
Chaoming Li d83579e2a5 rtlwifi: rtl8192de: Updates from latest Reaktek driver - Part III
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtl8192de driver.

The changes include:

1. Update for new chip versions

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:15 -04:00
Chaoming Li 5c079d8848 rtlwifi: rtl8192se: Updates from latest Realtek driver version - Part II
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtl8192se driver.

The changes include:

1. Fixing some typos in register usage.
2. A change in the handling of decryption status for 802.11w packets.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:15 -04:00
Chaoming Li db75993913 rtlwifi: rtl8192ce: Add new chip revisions
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtlwifi driver.

The changes include:

1. Adding new chip revisions including new firmware.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:15 -04:00
Chaoming Li 09e92f0be2 rtlwifi: Update to new Realtek version - Part I
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtlwifi driver.

The changes include:

1. Handling of IEEE80211_HW_CONNECTION_MONITOR.
2. Fix typo to get proper response to nullfunc frames.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:15 -04:00
Larry Finger 603be3885b rtlwifi: Change PCI drivers to use the new PM framework
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:14 -04:00
Larry Finger 73a253ca98 rtlwifi: Change debug parameter to apply to individual drivers
The current debug parameter is applied to rtlwifi, which means that all
loaded drivers have the same level of debugging applied. In addition,
the previous method requires a two-step load process to enable debugging.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:22 -04:00
Eliad Peller 8a3a3c85e4 mac80211: pass vif param to conf_tx() callback
tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
	ops.conf_tx = conf_tx_op;

@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
	conf_tx_op (
-		struct ieee80211_hw *hw,
+		struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		u16 queue,
		const struct ieee80211_tx_queue_params *params) {...}

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:41 -04:00
Larry Finger ffca287118 rtlwifi: Remove unused _usb_nbytes_read_write and _usb_writeN_sync
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:02 -04:00
Larry Finger 970ba6a64d rtlwifi: Remove unused routine _usb_readN_sync
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:02 -04:00
John W. Linville 0874073570 Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-scan.c
	net/wireless/nl80211.c
2011-09-28 10:28:09 -04:00
Eliad Peller 37a41b4aff mac80211: add ieee80211_vif param to tsf functions
TSF can be kept per vif.
Add ieee80211_vif param to set/get/reset_tsf, and move
the debugfs entries to the per-vif directory.

Update all the drivers that implement these callbacks.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:27:48 -04:00
Larry Finger 831d85471e rtlwifi: rtl8192cu: Fix unitialized struct
Driver rtl8192cu assigns a new struct rtl_tcb_desc object, but fails to
clear it.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>  [2.6.39+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-26 14:55:50 -04:00
Larry Finger da3ba88a99 rtlwifi: Combine instances of RTL_HAL_IS_CCK_RATE macros.
Three drivers, rtl8192ce, rtl8192cu and rtl8192de, use the same macro
to check if a particular rate is in the CCK set. This common code is
relocated to a common header file. A distinct macro used by rtl8192se
with the same name is renamed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:50 -04:00
Larry Finger 87b6d09225 rtlwifi: rtl8192de: Change modinfo messages
The various modparam messages are difficult to understand.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:50 -04:00
Larry Finger 7664beeb2f rtlwifi: rtl8192se: Change modinfo messages
The various modparam messages are difficult to understand.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:50 -04:00
Larry Finger eed7231658 rtlwifi: rtl8192ce: Change modinfo messages
The various modparam messages are difficult to understand.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:49 -04:00
John W. Linville 4d8b61490c Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/wl12xx/main.c
2011-09-20 14:11:55 -04:00
Jiri Kosina e060c38434 Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
2011-09-15 15:08:18 +02:00
Vitaliy Ivanov fb914ebff5 treewide: typo 'interrrupt' word corrections.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-15 14:13:02 +02:00
George bac2555c6d rtlwifi: Fix problem when switching connections
The driver fails to clear encryption keys making it impossible
to switch connections.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>        [2.6.39+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13 14:18:38 -04:00
George 3401dc6eba rtlwifi: rtl8192su: Fix problem connecting to HT-enabled AP
The driver fails to connect to 802.11n-enabled APs. The patch fixes
Bug #42262.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>        [2.6.39+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13 14:18:38 -04:00
Larry Finger 5b62bb5cc1 rtlwifi: rtl8192de: Convert to use the new rate-mapping routine in rtlwifi
This patch also deletes the now unused parts of rtl8192de/def.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24 14:57:21 -04:00
Larry Finger 8e35337731 rtlwifi: rtl8192se: Convert to use the new rate-mapping routine in rtlwifi
This patch also deletes the now unused parts of rtl8192se/def.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24 14:57:20 -04:00
Larry Finger 2b67e88f64 rtlwifi: rtl8192cu: Convert to use the new rate-mapping routine in rtlwifi
This patch also removes the now unused code from rtl8192ce/def.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24 14:57:19 -04:00
Larry Finger 78851b66b1 rtlwifi: rtl8192ce: Convert to use the new rate-mapping routine in rtlwifi
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24 14:57:19 -04:00
Larry Finger 7ad0ce3576 rtlwifi: Install updated rate-mapping routine
In preparation for fixing the rate-mapping situation, place a driver-agnostic
version in rtlwifi. This one contains the updated rate incormation.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24 14:57:18 -04:00
Stefan Assmann b5be7e4c8f rtlwifi: add module parameter to set global debug level
No need to recompile the module anymore to set the debug level.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:01 -04:00
Larry Finger 03f18fa16c rtlwifi: rtl892cu: New USB IDs
This patch fixes several problems in the USB_DEVICE table, including missing IDs,
reversed vendor/product codes, and a duplicate ID.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 16:11:32 -04:00
Larry Finger c3ccb3341e rtlwifi: Remove raw read/write routines from header
Now that the driver no longer uses the raw r/w routines, remove their definitions.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:08 -04:00
Larry Finger 886e14b65a rtlwifi: Eliminate raw reads and writes from PCIe portion
The PCIe driver used raw reads and writes on the PCIe hardware.
As all of these are only affecting the configuration space, all of
then can be converted to pci_{read,write}_config_XX calls.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09 15:52:07 -04:00
John W. Linville a5d5a91477 Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2011-08-03 09:18:21 -04:00
Larry Finger b6b67df3f2 rtlwifi: Fix kernel oops on ARM SOC
This driver uses information from the self member of the pci_bus struct to
get information regarding the bridge to which the PCIe device is attached.
Unfortunately, this member is not established on all architectures, which
leads to a kernel oops.

Skipping the entire block that uses the self member to determine the bridge
vendor will only affect RTL8192DE devices as that driver sets the ASPM support
flag differently when the bridge vendor is Intel. If the self member is
available, there is no functional change.

This patch fixes Bugzilla No. 40212.

Reported-by: Hubert Liao <liao.hubertt@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [back to 2.6.38]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-01 13:46:47 -04:00
Linus Torvalds d3ec4844d4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  fs: Merge split strings
  treewide: fix potentially dangerous trailing ';' in #defined values/expressions
  uwb: Fix misspelling of neighbourhood in comment
  net, netfilter: Remove redundant goto in ebt_ulog_packet
  trivial: don't touch files that are removed in the staging tree
  lib/vsprintf: replace link to Draft by final RFC number
  doc: Kconfig: `to be' -> `be'
  doc: Kconfig: Typo: square -> squared
  doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
  drivers/net: static should be at beginning of declaration
  drivers/media: static should be at beginning of declaration
  drivers/i2c: static should be at beginning of declaration
  XTENSA: static should be at beginning of declaration
  SH: static should be at beginning of declaration
  MIPS: static should be at beginning of declaration
  ARM: static should be at beginning of declaration
  rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
  Update my e-mail address
  PCIe ASPM: forcedly -> forcibly
  gma500: push through device driver tree
  ...

Fix up trivial conflicts:
 - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
 - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
 - drivers/net/r8169.c (just context changes)
2011-07-25 13:56:39 -07:00
John W. Linville 41bf37117b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-07-22 17:51:16 -04:00
Joe Perches 292b11926f rtlwifi: Convert printks to pr_<level>
Use the current logging styles.
Add pr_fmt where appropriate.
Remove now unnecessary prefixes from printks.
Convert hard coded prefix to __func__.
Add a missing "\n" to a format.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-21 14:52:05 -04:00
Phil Carmody 497888cf69 treewide: fix potentially dangerous trailing ';' in #defined values/expressions
All these are instances of
  #define NAME value;
or
  #define NAME(params_opt) value;

These of course fail to build when used in contexts like
  if(foo $OP NAME)
  while(bar $OP NAME)
and may silently generate the wrong code in contexts such as
  foo = NAME + 1;    /* foo = value; + 1; */
  bar = NAME - 1;    /* bar = value; - 1; */
  baz = NAME & quux; /* baz = value; & quux; */

Reported on comp.lang.c,
Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com>
Initial analysis of the dangers provided by Keith Thompson in that thread.

There are many more instances of more complicated macros having unnecessary
trailing semicolons, but this pile seems to be all of the cases of simple
values suffering from the problem. (Thus things that are likely to be found
in one of the contexts above, more complicated ones aren't.)

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-21 14:10:00 +02:00
Andy Shevchenko 1d15b5f2d3 wireless: rtlwifi: throw away MAC_FMT and use %pM instead
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-20 15:04:38 -04:00
John W. Linville 95a943c162 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	net/bluetooth/l2cap_core.c
2011-07-15 10:05:24 -04:00
David S. Miller 6a7ebdf2fd Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/bluetooth/l2cap_core.c
2011-07-14 07:56:40 -07:00
Larry Finger 1288aa4e80 rtlwifi: rtl8192cu: Fix duplicate if test
A typo causes routine rtl92cu_phy_rf6052_set_cck_txpower() to test the
same condition twice. The problem was found using cppcheck-1.49, and the
proper fix was verified against the pre-mac80211 version of the code.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org>  [back to 2.6.39]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11 15:02:20 -04:00
John W. Linville d859898114 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/ath/ath5k/sysfs.c
	net/bluetooth/l2cap_core.c
	net/mac80211/wpa.c
2011-07-11 14:46:59 -04:00
John W. Linville 204d1641d2 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-07-08 11:03:36 -04:00
Larry Finger 45a771385c rtlwifi: rtl8192de: Fix error exit from hw_init
In routine rtl92de_hw_init(), there are two places where a failure is
not handled correctly.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:55 -04:00
Larry Finger eb8b27ada9 rtlwifi: rtl8192de: Replace loops calling udelay with single mdelay
There are a number of loops to implement delays. These are replaced with
single calls to mdelay().

The need for a fix was noted by Andrew Morton <akpm@linux-foundation.org>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:55 -04:00
Larry Finger 9928c7d1b1 rtlwifi: rtl8192de: Remove comparison of boolean with true
Tests of a boolean against "true" are not needed as non-zero is sufficient..

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:54 -04:00
Mike McCormack f2e795ffae rtlwifi: rtl8192{ce,cu,se} Remove irq_enabled
This should be unnecessary if synchronize_irq is used.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:54 -04:00
Larry Finger 80b69593a8 rtlwifi: rtl8192de: Remove irq_enabled boolean
Prepare rtl8192de for the removal of irq_enaqbled.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:53 -04:00
Andrew Morton faeef8acb1 drivers/net/wireless/rtlwifi/rtl8192de/phy.c: fix udelay() usage
ERROR: "__bad_udelay" [drivers/net/wireless/rtlwifi/rtl8192de/rtl8192de.ko] undefined!

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 15:26:53 -04:00
Yoann DI-RUZZA 35cbcbc6f3 rtlwifi: rtl8192cu: Add new USB ID for Netgear WNA1000M
Signed-off-by: Yoann DI-RUZZA <y.diruzza@lim.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 14:42:38 -04:00
John W. Linville df2cbe4075 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-06-30 13:34:06 -04:00
Dan Carpenter 9a4ba833a2 rtlwifi: potential forever loop in rtl92de_hw_init()
"i" should be an int here because we are trying to use it to count
to 10000.  The original code looks like it could hang in a forever
loop.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:07 -04:00
Larry Finger ab049fbf5e rtlwifi: rtl8192de: Fix build errors when using allyes configuration
After adding rtl8192de to linux-next, making the rtlwifi drivers be built-in
results in the following warnings:

  LD      drivers/net/wireless/rtlwifi/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_on':
(.text+0x11fb6): multiple definition of `rtl92ce_sw_led_on'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa326): first defined here
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o:(.bss+0x0): multiple definition of `dm_digtable'
drivers/net/wireless/rtlwifi/rtl8192c/built-in.o:(.bss+0x0): first defined here
ld: Warning: size of symbol `dm_digtable' changed from 40 in drivers/net/wireless/rtlwifi/rtl8192c/built-in.o to 48 in drivers/net/wireless/rtlwifi/rtl8192de/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_off':
(.text+0x11cfe): multiple definition of `rtl92ce_sw_led_off'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa06e): first defined here

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:06 -04:00
Jon Mason f01dce9474 rtlwifi: use PCI_VENDOR_ID_*
Use PCI_VENDOR_ID_* from pci_ids.h instead of creating #define locally.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:10:59 -04:00
Jon Mason 6a4ecc29c9 rtlwifi: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Also, remove unnecessary and unused #defines for PCI.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:10:59 -04:00
John W. Linville 3be3fdb58a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-tx.c
2011-06-28 13:56:21 -04:00
Chaoming Li f9fc51365d rtlwifi: rtl8192de: Modify Kconfig and Makefile routines for new driver
Set up Kconfig and Makefile for new driver for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Larry Finger f34317db36 rtlwifi: Fix build problems introduced by merging rtl8192de
These patches allow compilation of rtlwifi, rtl8192c_common,
rtl8192ce, rtl8192cu and rtl8192se to compile after rtl8192de
was added.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li 674f0523ec rtlwifi: rtl8192de: Merge TX and RX routines
Merge routines trx.c and trx.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li e501016884 rtlwifi: rtl8192de: Merge table routines
Merge routines table.c and table.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li a7dbd3b50d rtlwifi: rtl8192de: Merge main (sw) routines
Merge routines sw.c and sw.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li f219eff1e5 rtlwifi: rtl8192de: Merge rf routines
Merge routines rf.c and rf.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li 3de1ef7304 rtlwifi: rtl8192de: Merge register definitions
Merge routines reg.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li 7274a8c229 rtlwifi: rtl8192de: Merge phy routines
Merge routines phy.c and phy.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li f53d5a7006 rtlwifi: rtl8192de: Merge led routines
Merge routines led.c and led.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 3affdf4237 rtlwifi: rtl8192de: Merge hardware routines
Merge routines hw.c and hw.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 985d4d3f6d rtlwifi: rtl8192de: Merge firmware routines
Merge routines fw.c and fw.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 4f01358e5b rtlwifi: rtl8192de: Merge dynamic management routines
Merge routines dm.c and dm.h for RTL8192DE.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 23a8c61416 rtlwifi: rtl8192de: Merge def.h
Introduce routine def.h for rtl8192de.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
David S. Miller cd5f3e2064 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2011-06-24 14:21:00 -07:00
Jesper Juhl 95cb3656c0 net: Remove unneeded version.h includes from drivers/net/
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/net/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 02:40:08 -07:00
Larry Finger 9935d12651 rtl8192cu: Fix missing firmware load
In commit 3ac5e26a1e entitled
"rtlwifi: rtl8192c-common: Change common firmware routines for addition
of rtl8192se and rtl8192de", the firmware loading code was moved.
Unfortunately, some necessary code was dropped for rtl8192cu.

The dmesg output shows the following:

rtl8192c: Loading firmware file rtlwifi/rtl8192cufw.bin
rtl8192c_common:_rtl92c_fw_free_to_go():<0-0> Polling FW ready fail!! REG_MCUFWDL:0x00000006 .
rtl8192c_common:rtl92c_download_fw():<0-0> Firmware is not ready to run!

In addition, the interface will authenticate and associate, but cannot
transfer data.

This is reported as Kernel Bug #38012.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22 15:47:59 -04:00
David S. Miller 9f6ec8d697 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
	drivers/net/wireless/rtlwifi/pci.c
	net/netfilter/ipvs/ip_vs_core.c
2011-06-20 22:29:08 -07:00
Mike McCormack e10542c447 rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with true
These are a potential source of confusion, as most C code treats all
non-zero values as true.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-20 15:47:43 -04:00
Mike McCormack 4b9d8d67b4 rtlwifi: rtl8192cu: Remove unused parameter
rtl_ps_set_rf_state's protect_or_not parameter is not set to
true anywhere, except for commented out code.

It enables some legacy locking code, which is no longer used,
so delete the parameter and the old locking code.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-20 15:47:43 -04:00
Mike McCormack 9c05044037 rtlwifi: Fix typo in variable name
offchan_deley should be offchan_delay

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-20 15:47:42 -04:00
Kalle Valo 0521ecf335 rtlwifi: include mac80211.h from core.h
core.h references ieee80211_ops but doesn't include mac80211.h, which issues
a warning once mac80211-compat.h is taken into use.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-20 15:16:32 -04:00
Larry Finger fa7ccfb170 rtlwifi: rtl8192se: Handle duplicate PCI ID 0x10ec:0x8192 conflict with r8192e_pci
There are two devices with PCI ID 0x10ec:0x8192, namely RTL8192E and
RTL8192SE. The method of distinguishing them is by the revision ID
at offset 0x8 of the PCI configuration space. If the value is 0x10,
then the device uses rtl8192se for a driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-20 14:56:56 -04:00
Larry Finger 7101f4043c rtlwifi: Fix warnings on parisc arch
In "Build regressions/improvements in v3.0-rc2", Geert Uytterhoeven
reports a number of warnings that occur for parisc builds of rtlwifi
and dependents.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:54 -04:00
Mike McCormack fd854772c1 rtlwifi: Factor out code to receive one packet
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:51 -04:00
Mike McCormack 14058adddd rtlwifi: Free skb in one place
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:51 -04:00
Mike McCormack 8db8ddf13d rtlwifi: Resubmit skbs with bad CRC early
Once we realize a bad packet was received, don't
waste time unmapping it, freeing it, then allocation
a new skb and mapping it, just resubmit the existing
skb.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:50 -04:00
Mike McCormack 2c333366a4 rtlwifi: Remove unnecessary indent
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:50 -04:00
John W. Linville c48b1f729a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
	drivers/net/wireless/rtlwifi/pci.c
2011-06-10 14:26:12 -04:00
Mike McCormack 6633d64978 rtlwifi: Avoid modifying skbs that are resubmitted
In the case we fail to allocate a new skb, the old skb should
be resubmitted unmodified.

Fixes bug introduced in a9e1286975.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:19:07 -04:00
Mike McCormack 4fea2e0e59 rtlwifi: Fix logic in rx_interrupt
Should pass along packet if there's no CRC and no hardware error.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:19:03 -04:00
Mike McCormack dabd3001f9 rtlwifi: Fix logic in rx_interrupt
Should pass along packet if there's no CRC and no hardware error.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:01:06 -04:00
Mike McCormack 71352b2318 rtlwifi: Use write barrier when assigning ownership
Make sure all updates to a descriptor are flushed to memory
before assigning ownship to hardware.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:01:06 -04:00
Mike McCormack febc9fe538 rtlwifi: Assign rx buffer ownership to hardware last
Ownership of an rx buffer should only be given to the hardware
after all other changes are written, otherwise there's
a potential race.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:01:06 -04:00
Mike McCormack 312d5479dc rtlwifi: Don't block interrupts in spinlocks
Now power state transitions are not called from an
interrupt context, there's no need to block interrupts.

This code appears to block interrupts for too long,
causing my trackpad to lose sync occasionally.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:01:05 -04:00
Mike McCormack 67fc6052a4 rtlwifi: Run IPS leave work in a tasklet
This removes the need to use IRQ safe spinlocks in many places.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 14:57:33 -04:00
Mike McCormack 34ddb2077e rtlwifi: Store loop index in local variable
_rtl_pci_rx_interrupt uses rtlpci->rx_ring[rx_queue_idx].idx a
few times, so store it in a separate variable.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 14:57:33 -04:00
Mike McCormack f2ea312cf4 rtlwifi: Remove set_rfpowerstate_inprogress
set_rfpowerstate_inprogress is only set and never read
so remove it.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 14:57:33 -04:00
Mike McCormack 2e69167c32 rtlwifi: Synchronize IRQ after disabling it
This make sure any IRQ handlers running on other CPUs complete.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 14:57:32 -04:00
Larry Finger 049436b980 rtlwifi: rtl8192se: Synchronize IRQ after disabling it
As suggested by Mike McCormack <mikem@ring3k.org> for rtl8192ce, make sure any IRQ
handlers running on other CPUs complete.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:19:02 -04:00
Larry Finger 5111dd3e42 rtlwifi: rtl8192se: Use write barrier when assigning ownership
As noted by Mike McCormack <mikem@ring3k.org> for rtl8192ce, make sure
all updates to a descriptor are flushed to memory before assigning ownship
to hardware.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:19:02 -04:00
Larry Finger 78d57372cc rtl8192se: Fix warnings from gcc 4.6.0
gcc 4.6.0 warnings for rtl8192se:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/dm.o
drivers/net/wireless/rtlwifi/rtl8192se/dm.c: In function ‘_rtl92s_dm_refresh_rateadaptive_mask’:
drivers/net/wireless/rtlwifi/rtl8192se/dm.c:225:5: warning: variable ‘rssi_level’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/fw.o
drivers/net/wireless/rtlwifi/rtl8192se/fw.c: In function ‘rtl92s_download_fw’:
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:361:6: warning: variable ‘file_length’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/hw.o
drivers/net/wireless/rtlwifi/rtl8192se/hw.c: In function ‘_rtl92se_hw_configure’:
drivers/net/wireless/rtlwifi/rtl8192se/hw.c:887:6: warning: variable ‘reg_ratr’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192se/hw.c: In function ‘_rtl92se_set_media_status’:
drivers/net/wireless/rtlwifi/rtl8192se/hw.c:1125:20: warning: variable ‘ledaction’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192se/hw.c: In function ‘rtl92se_gpio_radio_on_off_checking’:
drivers/net/wireless/rtlwifi/rtl8192se/hw.c:2274:32: warning: variable ‘cur_rfstate’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/phy.o
drivers/net/wireless/rtlwifi/rtl8192se/phy.c: In function ‘rtl92s_phy_set_bw_mode’:
drivers/net/wireless/rtlwifi/rtl8192se/phy.c:266:5: warning: variable ‘reg_prsr_rsc’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/trx.o
drivers/net/wireless/rtlwifi/rtl8192se/trx.c: In function ‘_rtl92se_translate_rx_signal_stuff’:
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:584:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:12:30 -04:00
Larry Finger 52722592b1 rtl8192cu: Fix warnings from gcc 4.6.0
gcc 4.6.0 warnings for rtl8192cu:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192cu/mac.o
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c: In function ‘rtl92c_translate_rx_signal_stuff’:
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c:1116:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:12:30 -04:00
Larry Finger 6c0d4988c7 rtl8192ce: Fix warnings from gcc 4.6.0
gcc 4.6.0 warnings for rtl8192ce:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192ce/hw.o
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c: In function ‘_rtl92ce_hw_configure’:
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c:766:6: warning: variable ‘reg_ratr’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c: In function ‘rtl92ce_gpio_radio_on_off_checking’:
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c:1972:41: warning: variable ‘cur_rfstate’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192ce/phy.o
drivers/net/wireless/rtlwifi/rtl8192ce/phy.c: In function ‘rtl92c_phy_config_rf_with_headerfile’:
drivers/net/wireless/rtlwifi/rtl8192ce/phy.c:284:7: warning: variable ‘rtstatus’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192ce/trx.o
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘_rtl92ce_translate_rx_signal_stuff’:
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:595:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:12:29 -04:00
Larry Finger c0fda68d00 rtl8192c-common: Fix warnings from gcc 4.6.0
gcc 4.6.0 warnings for rtl8192c-common:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192c/fw_common.o
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: In function ‘_rtl92c_cmd_send_packet’:
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:549:5: warning: variable ‘own’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/rtl8192c/phy_common.o
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c: In function ‘_rtl92c_phy_iq_calibrate’:
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:1256:6: warning: variable ‘bbvalue’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c: In function ‘rtl92c_phy_iq_calibrate’:
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:1766:6: warning: variable ‘reg_ecc’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:1765:34: warning: variable ‘reg_eac’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:12:29 -04:00
Larry Finger 19086fcef1 rtlwifi: Fix warnings from gcc 4.6.0
gcc 4.6.0 warnings for rtlwifi:

  CC [M]  drivers/net/wireless/rtlwifi/base.o
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_stop’:
drivers/net/wireless/rtlwifi/base.c:891:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_oper’:
drivers/net/wireless/rtlwifi/base.c:921:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/efuse.o
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_pg_packet_write’:
drivers/net/wireless/rtlwifi/efuse.c:928:24: warning: variable ‘dataempty’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_get_current_size’:
drivers/net/wireless/rtlwifi/efuse.c:1179:5: warning: variable ‘hoffset’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/ps.o
drivers/net/wireless/rtlwifi/ps.c: In function ‘rtl_ps_set_rf_state’:
drivers/net/wireless/rtlwifi/ps.c:85:19: warning: variable ‘rtstate’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/regd.o
drivers/net/wireless/rtlwifi/regd.c: In function ‘_rtl_dump_channel_map’:
drivers/net/wireless/rtlwifi/regd.c:310:28: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/usb.o
drivers/net/wireless/rtlwifi/usb.c: In function ‘_rtl_usb_transmit’:
drivers/net/wireless/rtlwifi/usb.c:826:21: warning: variable ‘urb_list’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/usb.c:825:23: warning: variable ‘skb_list’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:12:29 -04:00
John W. Linville 11ad2f5282 Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-05-27 15:18:35 -04:00
Larry Finger 0019a2c927 rtlwifi: Use order 2 RX buffer allocation only if necessary
Although a previous fix handles the kernel panics that result from
failure to allocate a new RX buffer, memory fragmentation can be
reduced if the amsdu_8k capability is disabled as new buffers need only
be of O(0), not O(2).

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-26 15:43:30 -04:00
Larry Finger a9e1286975 rtlwifi: Fix kernel panic resulting from RX buffer allocation failure
To handle amsdu_8k capability, the PCI routine of this driver must
allocate receive buffers of order 2. Under heavy load, this causes
fragmentation of memory. The present code releases the current buffer
before checking to see if a new one is availble. Recovery from
allocation failures is not possible, which results in kernel panics.

The fix is to reorder the code to check that a new buffer can be
allocated before the old one is released. If not possible, the
received frame is dropped and the old one is reused. Without this
change, it is impossible to transfer a 2 GB file without a kernel panic.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>              [2.6.{37,38,39}]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-26 15:43:29 -04:00
David S. Miller 22e95ac87d Merge branch 'for-davem' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2011-05-25 13:28:55 -04:00
John W. Linville 31ec97d9ce Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-05-24 16:47:54 -04:00
Linus Torvalds 57d19e80f4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  b43: fix comment typo reqest -> request
  Haavard Skinnemoen has left Atmel
  cris: typo in mach-fs Makefile
  Kconfig: fix copy/paste-ism for dell-wmi-aio driver
  doc: timers-howto: fix a typo ("unsgined")
  perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
  md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
  treewide: fix a few typos in comments
  regulator: change debug statement be consistent with the style of the rest
  Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
  audit: acquire creds selectively to reduce atomic op overhead
  rtlwifi: don't touch with treewide double semicolon removal
  treewide: cleanup continuations and remove logging message whitespace
  ath9k_hw: don't touch with treewide double semicolon removal
  include/linux/leds-regulator.h: fix syntax in example code
  tty: fix typo in descripton of tty_termios_encode_baud_rate
  xtensa: remove obsolete BKL kernel option from defconfig
  m68k: fix comment typo 'occcured'
  arch:Kconfig.locks Remove unused config option.
  treewide: remove extra semicolons
  ...
2011-05-23 09:12:26 -07:00
John W. Linville e00cf3b9eb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-tx.c
	net/mac80211/sta_info.h
2011-05-16 19:32:19 -04:00
Larry Finger 099fb8ab1e rtlwifi: rtl8192c-common: rtl8192ce: Fix for HT40 regression
The changes that were made to rtl8192ce when rtl8192cu was added broke
HT40. The errors included a typo in rtlwifi, a missing routine in
rtl8192ce and a missing callback of that routine in rtl8192c-common.

This patch fixes the regression reported in Bug #35082.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-16 14:25:30 -04:00
Joe Perches 73f743670d rtlwifi: rtl8192cu: Fix memset/memcpy using sizeof(ptr) not sizeof(*ptr)
Found via coccinelle script

@@
type T;
T* ptr;
expression E1;
@@
* memset(E1, 0, sizeof(ptr));

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-10 15:54:51 -04:00
Chaoming Li fc7707a469 rtlwifi: rtl8192se: Remove need to disable ASPM
When this driver was initially submitted, the system would crash unless
ASPM was disabled. This problem has been fixed.

This patch also adds a printk that outputs the name of the firmware
file that is used.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-10 15:54:47 -04:00
Larry Finger c84aa5af99 rtlwifi: Move 2 large arrays off stack
In driver rtlwifi, efuse_read() places two relatively large arrays on the
stack - a 1D u8 array of size 128, and a 2D array of u16 with 128 * 4 elements.
With driver rtl8192de, the sizes will be 256 and 256 * 4 respectively. As that
will make the 2D array be 2048 bytes, I have changed the code to use kmalloc to
allocate the space.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-10 15:54:46 -04:00
Chaoming Li 85e09b4040 rtlwifi: rtl8192se: Modify Kconfig and Makefile routines for new driver
Modify rtlwifi routines for rtl8192se and set up Kconfig
and Makefile for new driver.

This patch also disables ASPM for the RTL8192SE to prevent some strange
crashes on LF's system.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:14 -04:00
Chaoming Li 84f494cef7 rtlwifi: rtl8192se: Merge TX and RX routines
Merge routines trx.c and trx.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:14 -04:00
Chaoming Li 18906ae27d rtlwifi: rtl8192se: Merge table routines
Merge routines table.c and table.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:13 -04:00
Chaoming Li 5a183eec62 rtlwifi: rtl8192se: Merge main (sw) routines
Merge routines sw.c and sw.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:12 -04:00
Chaoming Li e5e8cd7651 rtlwifi: rtl8192se: Merge rf routines
Merge routines rf.c and rf.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:12 -04:00
Chaoming Li cf76bbf7c0 rtlwifi: rtl8192se: Merge register definitions
Merge routines reg.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:11 -04:00
Chaoming Li d15853163b rtlwifi: rtl8192se: Merge phy routines
Merge routines phy.c and phy.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:10 -04:00
Chaoming Li 293380046b rtlwifi: rtl8192se: Merge led routines
Merge routines led.c and led.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:10 -04:00
Chaoming Li 2428453149 rtlwifi: rtl8192se: Merge hardware routines
Merge routines hw.c and hw.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:09 -04:00
Chaoming Li 701307a885 rtlwifi: rtl8192se: Merge firmware routines
Merge routines fw.c and fw.h for RTL8192SE. In addition, make changes
to rtlwifi/wifi.h to support RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:09 -04:00
Chaoming Li 9fe255ee3c rtlwifi: rtl8192se: Merge dynamic management routines
Merge routines dm.c and dm.h for RTL8192SE.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:08 -04:00
Chaoming Li e52dadb341 rtlwifi: rtl8192se: Merge def.h
Introduce routine def.h for rtl8192se.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05 14:59:07 -04:00
John W. Linville a70171dce9 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/libertas/if_cs.c
	drivers/net/wireless/rtlwifi/pci.c
	net/bluetooth/l2cap_sock.c
2011-05-05 13:32:35 -04:00
Larry Finger 982d96bbb7 rtlwifi: Fix typo in pci.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-02 14:49:19 -04:00
Jiri Kosina 80e8ff562a rtlwifi: don't touch with treewide double semicolon removal
This is a partial revert of 6eab04a876 ("treewide: remove extra
semicolons"). Wireless tree removes the code in question in rtlwifi
driver, so drop the hunk to avoid conflict.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-27 11:20:34 +02:00
Larry Finger d3bb1429a2 rtlwifi: rtl8192ce: rtl8192cu: Fix most sparse warnings
Fix most sparse warnings in rtlwifi, rtl8192ce and rtl8192cu drivers.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:14:55 -04:00
Chaoming_Li 76c34f910a rtlwifi: rtl8192ce: Change rtl8192ce routines phy and trx and modify rtl8192cu for addition of rtl8192se and rtl8192de
Change rtl8192ce routines phy and trx for addition of RTL8192SE and RTL8192DE.
In addition, make necessary modifications to rtl8192cu. This patch also
removes the temporary patches needed to enable intermediate steps to build
without error.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:14:55 -04:00
Chaoming_Li e0b5a50786 rtlwifi: rtl8192ce: Change phy and rc routines for addition of rtl8192se and rtl8192de
Change rtl8192ce routines phy and rc for addition of RTL8192SE and
RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:14:55 -04:00
Chaoming_Li 2b8359f85b rtlwifi: rtl8192ce: Change sw and LED routines for addition of rtl8192se and rtl8192de
Change rtl8192ce sw and LED routines for addition of RTL8192SE and
RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:14:55 -04:00
Chaoming_Li f73b279cdb rtlwifi: rtl8192ce: Change hw routine for addition of rtl8192se and rtl8192de
Change rtl8192ce hw routine for addition of RTL8192SE and RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:33 -04:00
Chaoming_Li c07ccff326 rtlwifi: rtl8192c-common: Change common PHY routines for addition of rtl8192se and rtl8192de
Change common PHY routines for addition of RTL8192SE and RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:33 -04:00
Chaoming_Li 3ac5e26a1e rtlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se and rtl8192de
Change common firmware routines for addition of RTL8192SE and
RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:33 -04:00
Chaoming_Li beb5bc4020 rtlwifi: rtl8192c-common: Convert common dynamic management routines for addition of rtl8192se and rtl8192de
Convert common dynamic management routines for addition of RTL8192SE
and RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:33 -04:00
Chaoming_Li d93cdee975 rtlwifi: Convert usb routines for addition of rtl8192se and rtl8192de
Convert usb routines for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:32 -04:00
Chaoming_Li 81b2904511 rtlwifi: Convert regulatory domain routines for addition of rtl8192se and rtl8192de
Convert regulatory domain  routines for addition of RTL8192SE and
RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:32 -04:00
Chaoming_Li c6a9de0823 rtlwifi: Convert rc routines for addition of rtl8192se and rtl8192de
Convert rc routines for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:32 -04:00
Chaoming_Li cc7dc0c4ff rtlwifi: Convert ps routines for addition of rtl8192se and rtl8192de
Convert ps routines for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:32 -04:00
Chaoming_Li c7cfe38ee0 rtlwifi: Convert pci routines for addition of rtl8192se and rtl8192de
Convert pci routines for addition of RTL8192SE and RTL8192DE code
These changes allow the upper-level driver to specify the BAR to be
used as it is different for rtl8192se than for the others.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:32 -04:00
Chaoming_Li 0baa0fd76f rtlwifi: Convert core routines for addition of rtl8192se and rtl8192de
Convert core routines for addition of RTL8192SE and RTL8192DE code.

Additional files are changed to allow compilation.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:32 -04:00
Chaoming_Li 46a6272c20 rtlwifi: Change cam routines for addition of rtl8192se and rtl8192de
Change cam routines for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:31 -04:00
Chaoming_Li acd48572c3 rtlwifi: Change base routines for addition of rtl8192se and rtl8192de
Change base routines for addition of RTL8192SE and RTL8192DE code.

Additional files are modified to allow compilation.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:31 -04:00
Chaoming_Li 3dad618b7b rtlwifi: Change wifi.h for rtl8192se and rtl8192de
Change wifi.h for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:31 -04:00
Chaoming_Li e25f51d4f9 rtlwifi: Change efuse routines addition of RTL8192SE and RTL8192DE
Change efuse routines for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 16:13:31 -04:00
Jiri Kosina 07f9479a40 Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
2011-04-26 10:22:59 +02:00
John W. Linville cfef6047c4 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-core.c
	drivers/net/wireless/rt2x00/rt2x00queue.c
	drivers/net/wireless/rt2x00/rt2x00queue.h
2011-04-25 14:34:25 -04:00
Larry Finger 9f219bd248 rtlwifi: Fix unitialized variable warnings
In http://lkml.indiana.edu/hypermail/linux/kernel/1104.1/01955.html, Geerti
Uytterhoeven reports the following warnings for the rtlwifi drivers.

src/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c: warning:
	 'cck_index' may be used uninitialized in this function: => 637
src/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c: warning:
	 'cck_index_old' may be used uninitialized in this function: => 637
src/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: warning:
	 'box_extreg' may be used uninitialized in this function: => 303
src/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: warning:
	 'box_reg' may be used uninitialized in this function: => 303
src/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c: warning:
	 'chnlgroup' may be used uninitialized in this function: => 205
src/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c: warning:
	 'u4_regvalue' may be used uninitialized in this function: => 450
src/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c: warning:
	 'hq_sele' may be used uninitialized in this function: => 924

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:14 -04:00
Chaoming Li 228bdfca9a rtlwifi: rtl8192ce: Fix LED initialization
Driver rtl8192ce does not initialize the LED correctly.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:34 -04:00
John W. Linville 252f4bf400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/ath/ar9170/main.c
	drivers/net/wireless/ath/ar9170/phy.c
	drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
2011-04-12 16:18:44 -04:00
Linus Torvalds c44eaf41a5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
  net: Add support for SMSC LAN9530, LAN9730 and LAN89530
  mlx4_en: Restoring RX buffer pointer in case of failure
  mlx4: Sensing link type at device initialization
  ipv4: Fix "Set rt->rt_iif more sanely on output routes."
  MAINTAINERS: add entry for Xen network backend
  be2net: Fix suspend/resume operation
  be2net: Rename some struct members for clarity
  pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
  dsa/mv88e6131: add support for mv88e6085 switch
  ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
  be2net: Fix a potential crash during shutdown.
  bna: Fix for handling firmware heartbeat failure
  can: mcp251x: Allow pass IRQ flags through platform data.
  smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
  iwlwifi: accept EEPROM version 0x423 for iwl6000
  rt2x00: fix cancelling uninitialized work
  rtlwifi: Fix some warnings/bugs
  p54usb: IDs for two new devices
  wl12xx: fix potential buffer overflow in testmode nvs push
  zd1211rw: reset rx idle timer from tasklet
  ...
2011-04-11 07:27:24 -07:00
Justin P. Mattock 6eab04a876 treewide: remove extra semicolons
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-10 17:01:05 +02:00
John W. Linville b37e3b6d64 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/rtlwifi/efuse.c
	drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
	net/bluetooth/mgmt.c
2011-04-07 16:45:40 -04:00
Larry Finger 324732848c rtlwifi: Remove unused/unneeded variables
Remove some unused variables and correct spelling errors.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-04 16:20:01 -04:00
Larry Finger 2e3e66e3bb rtlwifi: Fix some warnings/bugs
Some compiler/architecture combinations generate some warnings that are
not seen on my main system. Two of the "warnings" about unitialized variables
are really bugs.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-04 15:22:13 -04:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Larry Finger 716b1bf3c5 rtlwifi: rtl8192c{e,u}: Remove some extraneous casts on memcpy commands
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-30 14:15:14 -04:00
Ilia Mirkin 6e9d592f02 rtlwifi: Fix memset argument order
These were found using the following semantic match:
// <smpl>
@@expression E1; type T;@@
* memset(E1, ... * sizeof(T) * ..., ...);
// </smpl>

Also take this opportunity to remove the unnecessary void* casts.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-21 15:19:48 -04:00
John W. Linville 409ec36c32 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-03-11 14:11:11 -05:00
John W. Linville 85a7045a90 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-03-04 14:10:40 -05:00
John W. Linville 1ffe4dd126 rtlwifi: usb parts should depend on CONFIG_USB
ERROR: "usb_unanchor_urb" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_control_msg" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_submit_urb" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_get_dev" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_kill_anchored_urbs" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_put_dev" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_free_urb" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_anchor_urb" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
ERROR: "usb_alloc_urb" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make: *** [sub-make] Error 2

The USB-part of rtlwifi should depend on CONFIG_USB.  This also
corrects the existing check for CONFIG_PCI to build pci.o.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-04 14:05:16 -05:00
Chaoming Li 375ff4c778 rtlwifi: Fix error registering rate-control
When a second module such as rtl8192ce or rtl8192cu links to rtlwifi, the attempt
to register a rate-control mechanism fails with the warning shown below. The fix is to
select the RC mechanism when rtlwifi is initialized.

WARNING: at net/mac80211/rate.c:42 ieee80211_rate_control_register+0xc9/0x100 [mac80211]()
Hardware name: HP Pavilion dv2700 Notebook PC
Modules linked in: arc4 ecb rtl8192ce rtl8192cu(+) rtl8192c_common rtlwifi snd_hda_codec_conexant amd74xx(+) ide_core sg mac80211 snd_hda_intel snd_hda_codec i2c_nforce2 snd_pcm snd_timer cfg80211 snd k8temp hwmon serio_raw joydev i2c_core soundcore snd_page_alloc rfkill forcedeth video ac battery button ext3 jbd mbcache sd_mod ohci_hcd ahci libahci libata scsi_mod ehci_hcd usbcore fan processor thermal
Pid: 2227, comm: modprobe Not tainted 2.6.38-rc6-wl+ #468
Call Trace:
 [<ffffffff8104a3da>] ? warn_slowpath_common+0x7a/0xb0
 [<ffffffff8104a425>] ? warn_slowpath_null+0x15/0x20
 [<ffffffffa02de409>] ? ieee80211_rate_control_register+0xc9/0x100 [mac80211]
 [<ffffffffa03b3790>] ? rtl_rate_control_register+0x10/0x20 [rtlwifi]
 [<ffffffffa03ab9c9>] ? rtl_init_core+0x189/0x620 [rtlwifi]
 [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
 [<ffffffffa03b9dea>] ? rtl_usb_probe+0x709/0x82e [rtlwifi]
 [<ffffffffa002a7fd>] ? usb_match_one_id+0x3d/0xc0 [usbcore]
 [<ffffffffa002aae9>] ? usb_probe_interface+0xb9/0x160 [usbcore]
 [<ffffffff8126ed19>] ? driver_probe_device+0x89/0x1a0
 [<ffffffff8126eed3>] ? __driver_attach+0xa3/0xb0
 [<ffffffff8126ee30>] ? __driver_attach+0x0/0xb0
 [<ffffffff8126dd4e>] ? bus_for_each_dev+0x5e/0x90
 [<ffffffff8126e9d9>] ? driver_attach+0x19/0x20
 [<ffffffff8126e5e8>] ? bus_add_driver+0x158/0x290
 [<ffffffff8126f151>] ? driver_register+0x71/0x140
 [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
 [<ffffffffa002a2cc>] ? usb_register_driver+0xdc/0x190 [usbcore]
 [<ffffffffa0013000>] ? rtl8192cu_init+0x0/0x20 [rtl8192cu]
 [<ffffffffa001301e>] ? rtl8192cu_init+0x1e/0x20 [rtl8192cu]
 [<ffffffff810002cf>] ? do_one_initcall+0x3f/0x180
 [<ffffffff8108fd4b>] ? sys_init_module+0xbb/0x200
 [<ffffffff81002c7b>] ? system_call_fastpath+0x16/0x1b
 ---[ end trace 726271c07a47439e ]---
rtlwifi:rtl_init_core():<0-0> rtl: Unable to register rtl_rc,use default RC !!
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-01 13:48:22 -05:00
Sergei Shtylyov ff938e43d3 net: use pci_dev->revision, again
Several more network drivers that read the device's revision ID
from the PCI configuration register were merged after the commit
44c10138fd (PCI: Change all drivers
to use pci_device->revision), so it's time to do another pass of
conversion to using the 'revision' field of 'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-28 11:57:33 -08:00
Alessio Igor Bogani c2a7dca0ce rtlwifi: fix places where uninitialized data is used
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘rtl92ce_rx_query_desc’:
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:255:5: warning: ‘rf_rx_num’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:257:12: warning: ‘total_rssi’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:466:6: warning: ‘weighting’ may be used uninitialized in this function

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-28 14:06:54 -05:00
Alessio Igor Bogani 701c2be03a rtlwifi: Add the missing rcu_read_lock/unlock
===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
net/mac80211/sta_info.c:125 invoked rcu_dereference_check() without protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
5 locks held by wpa_supplicant/468:
 #0:  (rtnl_mutex){+.+.+.}, at: [<c1465d84>] rtnl_lock+0x14/0x20
 #1:  (&rdev->mtx){+.+.+.}, at: [<f84b8c2b>] cfg80211_mgd_wext_siwfreq+0x6b/0x170 [cfg80211]
 #2:  (&rdev->devlist_mtx){+.+.+.}, at: [<f84b8c37>] cfg80211_mgd_wext_siwfreq+0x77/0x170 [cfg80211]
 #3:  (&wdev->mtx){+.+.+.}, at: [<f84b8c44>] cfg80211_mgd_wext_siwfreq+0x84/0x170 [cfg80211]
 #4:  (&rtlpriv->locks.conf_mutex){+.+.+.}, at: [<f8506476>] rtl_op_bss_info_changed+0x26/0xc10 [rtlwifi]

stack backtrace:
Pid: 468, comm: wpa_supplicant Not tainted 2.6.38-rc6+ #79
Call Trace:
 [<c108806a>] ? lockdep_rcu_dereference+0xaa/0xb0
 [<f8523d2c>] ? sta_info_get_bss+0x19c/0x1b0 [mac80211]
 [<f8523d62>] ? ieee80211_find_sta+0x22/0x40 [mac80211]
 [<f850661c>] ? rtl_op_bss_info_changed+0x1cc/0xc10 [rtlwifi]
 [<c153671c>] ? __mutex_unlock_slowpath+0x14c/0x160
 [<c153673d>] ? mutex_unlock+0xd/0x10
 [<f8507180>] ? rtl_op_config+0x120/0x310 [rtlwifi]
 [<c10896db>] ? trace_hardirqs_on+0xb/0x10
 [<f8522169>] ? ieee80211_bss_info_change_notify+0xf9/0x1f0 [mac80211]
 [<f8506450>] ? rtl_op_bss_info_changed+0x0/0xc10 [rtlwifi]
 [<f853646f>] ? ieee80211_set_channel+0xbf/0xd0 [mac80211]
 [<f84b5f41>] ? cfg80211_set_freq+0x121/0x180 [cfg80211]
 [<f85363b0>] ? ieee80211_set_channel+0x0/0xd0 [mac80211]
 [<f84b8ceb>] ? cfg80211_mgd_wext_siwfreq+0x12b/0x170 [cfg80211]
 [<f84b87eb>] ? cfg80211_wext_siwfreq+0x9b/0x100 [cfg80211]
 [<c153b98b>] ? sub_preempt_count+0x7b/0xb0
 [<c150f874>] ? ioctl_standard_call+0x74/0x3b0
 [<c1465d84>] ? rtnl_lock+0x14/0x20
 [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
 [<c14568bd>] ? __dev_get_by_name+0x8d/0xb0
 [<c150fddb>] ? wext_handle_ioctl+0x16b/0x180
 [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
 [<c145bc7a>] ? dev_ioctl+0x5ba/0x720
 [<c108a947>] ? __lock_acquire+0x3e7/0x19b0
 [<c1443b0b>] ? sock_ioctl+0x1eb/0x290
 [<c108bfa5>] ? lock_release_non_nested+0x95/0x2f0
 [<c1443920>] ? sock_ioctl+0x0/0x290
 [<c114d74d>] ? do_vfs_ioctl+0x7d/0x5c0
 [<c1112232>] ? might_fault+0x62/0xb0
 [<c113e3c6>] ? fget_light+0x226/0x390
 [<c1112278>] ? might_fault+0xa8/0xb0
 [<c114dd17>] ? sys_ioctl+0x87/0x90
 [<c1002f9f>] ? sysenter_do_call+0x12/0x38

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-28 14:06:53 -05:00
Johannes Berg 7bb4568372 mac80211: make tx() operation return void
The return value of the tx operation is commonly
misused by drivers, leading to errors. All drivers
will drop frames if they fail to TX the frame, and
they must also properly manage the queues (if they
didn't, mac80211 would already warn).

Removing the ability for drivers to return a BUSY
value also allows significant cleanups of the TX
TX handling code in mac80211.

Note that this also fixes a bug in ath9k_htc, the
old "return -1" there was wrong.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k]
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00]
Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi]
Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-25 15:32:34 -05:00
David S. Miller b08cd667c4 rtlwifi: Need to include vmalloc.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-24 22:50:30 -08:00
Johannes Berg 41cae2d013 rtl8192c: fix compilation errors
On my G5 this fails to compile with

drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict

since you can't export static functions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-24 17:13:37 -05:00
Larry Finger 1472d3a875 rtlwifi: rtl8192ce: rtl8192cu: Fix multiple def errors for allyesconfig build
As noted by Stephan Rothwell, an allyesconfig build fails since rtl8192cu
was merged with failures such as:

drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_phy_sw_chnl':
(.opd+0xf30): multiple definition of `rtl92c_phy_sw_chnl'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.opd+0xb70): first defined here
drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_fill_h2c_cmd':
(.opd+0x288): multiple definition of `rtl92c_fill_h2c_cmd'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.opd+0x288): first defined here

These are caused because the code shared between rtl8192ce and rtl8192cu
is included in both drivers. This has been fixed by creating a new modue that
contains the shared code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23 16:28:41 -05:00
Willy Tarreau 8c6113cd03 rtlwifi: Eliminate udelay calls with too large values
On ARM, compilation of rtlwifi/efuse.c fails with the message:
ERROR: "__bad_udelay" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
On inspection, the faulty calls are in routine efuse_reset_loader(), a
routine that is never used, and the faulty routine is deleted.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23 16:25:30 -05:00
Willy Tarreau 892c05c093 rtlwifi: Let rtlwifi build when PCI is not enabled
On systems where PCI does not exist, a build of rtlwifi will fail.
Apply the same fix in case there are systems with PCI but not USB.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23 16:25:30 -05:00
Willy Tarreau 4c0f13f3e7 rtl8192cu: fix build error (vmalloc/vfree undefined)
On the ARM system, a build fails due to missing include.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23 16:25:30 -05:00
Johannes Berg 6ebacbb79d mac80211: rename RX_FLAG_TSFT
The flag isn't very descriptive -- the intention
is that the driver provides a TSF timestamp at
the beginning of the MPDU -- make that clearer
by renaming the flag to RX_FLAG_MACTIME_MPDU.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23 16:25:29 -05:00
Larry Finger 9e0bc67187 rtlwifi: Remove obsolete/unused macros
The original code has many macros that are no longer needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:59 -05:00
Larry Finger 17c9ac6281 rtlwifi: rtl8192ce: Fix endian warnings
Drivers rtlwifi, and rtl8192ce generate a large number of
sparse warnings. This patch fixes most of them.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:59 -05:00
Larry Finger 663dcc7367 rtlwifi: Modify build system for rtl8192cu
Modify Kconfig and Makefile to build rtl8192cu.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:58 -05:00
George 29d00a3e46 rtlwifi: rtl8192cu: Add routine trx
Add routine rtlwifi/rtl8192cu/trx.c. This routine differs from the rtl8192ce
file of the same name.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:58 -05:00
George 59187c5b12 rtlwifi: rtl8192cu: Add routine table
Add rtlwifi/rtl8192cu/table.c. These tables are different than the ones used
in rtl8192ce.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:58 -05:00
George 3ac23f8106 rtlwifi: rtl8192cu: Add routine rf
Add rtlwifi/rtl8192cu/rf.c. This routine is distinct from the one in
rtl8192ce with the same name.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:58 -05:00
George f0a39ae738 rtlwifi: rtl8192cu: Add routine phy
Add the routine rtlwifi/rtl8192cu/phy.c. Most of the code is included from
rtlwifi/rtl8192c/phy_common.c.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:58 -05:00
George 666e8457fa rtlwifi: rtl8192cu: Add routine mac
Add the routine rtlwifi/rtl8192cu/hw.c.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:58 -05:00
George dc0313f466 rtlwifi: rtl8192cu: Add routine hw
Add the routine rtlwifi/rtl8192cu/hw.c. This one is distinct from the
routine of the same name in rtl8192ce.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:58 -05:00
George 442888c706 rtlwifi: rtl8192cu: Add routines dm, fw, led and sw
Add the rtlwifi/rtl8192cu routines for dm.c, fw.c, led.c and sw.c.
Where possible, these routines use the corresponding code in rtl8192ce.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:57 -05:00
Larry Finger 4295cd254a rtlwifi: Move common parts of rtl8192ce/phy.c
Move common routines from rtlwifi/rtl8192ce/phy.c and .../rtl8192cu/phy.c
into rtlwifi/rtl8192c/phy_common.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:57 -05:00
Larry Finger e97b775d9b rtlwifi: Modify wifi.h for rtl8192cu
Further merge of parameters needed for rtl8192cu. In addition,
some changes needed for rtl8192se and rtl8192de are included
and additional Hungarian notation is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:57 -05:00
George 18d30067d3 rtlwifi: Add headers for rtl8187cu
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: George <george0505@realtek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:57 -05:00
Larry Finger 7ea4724036 rtlwifi: Modify some rtl8192ce routines for merging rtl8192cu
Modify some rtl8192ce routines for merging with rtl8192cu. In addition,
remove some usage of Hungarian notation.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:57 -05:00
Larry Finger 0e80b9d1c5 rtlwifi: Make changes in rtlwifi/rtl8192ce/def.h to support rtl8192cu
This change modifies rtlwifi/rtl8192ce/def.h to handle rtl8192cu. In
addition, a couple of routines needed for both drivers are converted
to be inline.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:57 -05:00
Larry Finger a9dd591919 rtlwifi: Make changes in rtlwifi/rtl8192ce/reg.h to support rtl8192cu
This change modifies rtlwifi/rtl8192ce/reg.h to support rtl8192cu.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-21 15:39:56 -05:00
Larry Finger a3dc5e881a rtlwifi: rtl8192ce: Rework rtl8192ce/phy.c
Make the phy.c codes for rtl8192ce and rtl8192cu be as alike as possible.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-11 16:16:38 -05:00
Larry Finger 25b2bc3086 rtlwifi: rtl8192ce: Refactor rtl8192ce/fw
Make rtlwifi/rtl8192ce/fw.{h,c} match what will be needed for
rtlwifi/rtl8192cu.{h,c}.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-11 16:16:38 -05:00
Larry Finger 8c96fcf721 rtlwifi: rtl8192ce: Refactor rtl8192ce/dm
To reuse as much code as possible when adding additional drivers to the
rtlwifi tree, the common parts of various routines are moved to
drivers/net/wireless/rtlwifi. This patch does that for the version of
dm.{h,c} used by rtl8192ce.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-11 16:16:38 -05:00
George 2ca20f79e0 rtlwifi: Add usb driver
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: George <george0505@realtek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-11 16:16:37 -05:00
Larry Finger 62e63975f4 rtlwifi: Modify core routines
The rtlwifi core needs some changes before inclusion of a driver
for the RTL8192CU USB device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: <chaoming_li@realsil.com.cn>
Signed-off-by: <george0505@realtek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-11 16:16:37 -05:00
John W. Linville 3e11210d46 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/ath/ath9k/init.c
2011-01-28 16:23:14 -05:00
Chaoming Li bc5892c9ec rtlwifi: Fix firmware upload errors
When the source code from Realtek was prepared for kernel inclusion,
some routines were refactored to reduce the level of indentation. This
patch repairs errors introduced in that process.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-27 16:32:19 -05:00
Jesper Juhl bdc4bf652b rtlwifi: Fix possible NULL dereference
In drivers/net/wireless/rtlwifi/pci.c::_rtl_pci_rx_interrupt() we call
dev_alloc_skb(), which may fail and return NULL, but we do not check the
returned value against NULL before dereferencing the returned pointer.
This may lead to a NULL pointer dereference which means we'll crash - not
good.

In a separate call to dev_alloc_skb(), the debug level is changed so that
the failure message will always be logged.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21 15:07:38 -05:00
Johannes Berg 0b01f030d3 mac80211: track receiver's aggregation reorder buffer size
The aggregation code currently doesn't implement the
buffer size negotiation. It will always request a max
buffer size (which is fine, if a little pointless, as
the mac80211 code doesn't know and might just use 0
instead), but if the peer requests a smaller size it
isn't possible to honour this request.

In order to fix this, look at the buffer size in the
addBA response frame, keep track of it and pass it to
the driver in the ampdu_action callback when called
with the IEEE80211_AMPDU_TX_OPERATIONAL action. That
way the driver can limit the number of subframes in
aggregates appropriately.

Note that this doesn't fix any drivers apart from the
addition of the new argument -- they all need to be
updated separately to use this variable!

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-19 11:36:11 -05:00
Chaoming Li 5c4bc1ce91 rtlwifi: Fix large packet issue
An RX buffer is set to 9100 bytes to receive 8K AMSDU; however, an skb
of this size fails in the kernel.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:45:52 -05:00
Larry Finger e6d8a817d0 rtlwifi: rtl8192ce: Fix driver problem when radio switch off at module load
If the radio enable switch is off when the driver is loaded, it is not
possible to get radio output until the driver is unloaded and reloaded
with the switch on.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:31 -05:00
Hauke Mehrtens 8d6a686a0d rtlwifi: Use pci_pcie_cap()
Use function pci_pcie_cap() instead of accessing struct member directly.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22 15:43:27 -05:00
John W. Linville 3d986b25b5 rtlwifi: use alloc_workqueue
create_workqueue is deprecated.  The workqueue usage does not seem to
demand any special treatment, so do not set any flags either.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Tejun Heo <tj@kernel.org>
2010-12-20 14:52:18 -05:00
Larry Finger d704300fa5 rtlwifi: Fix use of mutex in interrupt code
A previous conversion from semaphoreto mutexes missed the fact that one
of the semaphores was used in interrupt code. Fixed by changing to
a spinlock.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:48 -05:00
Anisse Astier 18db45c46e rtl8192ce: Fix typo in Kconfig description
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-20 14:49:48 -05:00
John W. Linville 5c405b5c3e rtl8192ce: drop 'rtl8192c-' prefix from files
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
2010-12-20 14:49:47 -05:00
Larry Finger 8a09d6d80c rtlwifi: Switch locking from semaphores to mutexes
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:32 -05:00
Larry Finger 4aea248dd7 rtl8192ce: Fix build on powerpc
After merge of the rtl8192ce driver, a powerpc build fails with:

drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c: In function 'rtl92c_init_sw_vars':
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c:76: error: implicit declaration of function 'vmalloc'
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c:76: warning: cast to pointer from integer of different size
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c: In function 'rtl92c_deinit_sw_vars':
drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c:91: error: implicit declaration of function 'vfree'

The problem is fixed by explicitly including the appropriate header.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 15:22:32 -05:00
John W. Linville e137478b56 rtlwifi: convert to __packed notation
Use "__packed" instead of "__attribute__ ((packed))"...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-16 09:20:16 -05:00
Sujith Manoharan bd2ce6e43f mac80211: Add timeout to BA session start API
Allow drivers or rate control algorithms to specify BlockAck session
timeout when initiating an ADDBA transaction. This is useful in cases
where maintaining persistent BA sessions does not incur any overhead.

The current timeout value of 5000 TUs is retained for all non ath9k/ath9k_htc
drivers.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15 17:03:59 -05:00
Larry Finger 0c8173385e rtl8192ce: Add new driver
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15 16:17:49 -05:00