aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
AgeCommit message (Collapse)Author
2013-04-22rt2x00: Use more current logging styles, shrink object sizeJoe Perches
Reduce object space ~2% using more current logging styles. Neaten and simplify logging macros. Use wiphy_<level> where appropriate. Coalesce formats. Convert ERROR/WARNING/INFO macros to rt2x00_<level> Convert EEPROM to rt2x00_eeprom_dbg Convert PROBE_ERROR to rt2x00_probe_err Convert DEBUG to rt2x00_dbg Convert EEPROM to rt2x00_eeprom_dbg $ size drivers/net/wireless/rt2x00/built-in.o* text data bss dec hex filename 245639 71696 69584 386919 5e767 drivers/net/wireless/rt2x00/built-in.o.new 240609 70096 68944 379649 5cb01 drivers/net/wireless/rt2x00/built-in.o.new.nodyndbg 240609 70096 68944 379649 5cb01 drivers/net/wireless/rt2x00/built-in.o.new.no_rt2x00_debug 249198 70096 70352 389646 5f20e drivers/net/wireless/rt2x00/built-in.o.old 249198 70096 70352 389646 5f20e drivers/net/wireless/rt2x00/built-in.o.old.nodyndbg 244222 70096 69712 384030 5dc1e drivers/net/wireless/rt2x00/built-in.o.old.no_rt2x00_debug Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-22rt2x00: provide separate information about TXWI & RXWI sizesStanislaw Gruszka
On new 2800 hardware sizes of TXWI & RXIW can be different than TXD & RXD sizes, so we need to difference between them. Let's define winfo_size as size of in buffer descriptor (TXWI & RXWI), and desc_size of as size of additional descriptor - in separate DMA coherent buffer for PCI hardware (TXD & RXD) and yet another in buffer descriptor for USB hardware (TXINFO & RXINFO). Change is rt2x00 wild, but should affect only 2800 driver. Patch also fix beaconing for 5592usb AP mode. Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rt2x00: rt2800pci: use the rt2x00mmio_* routinesGabor Juhos
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/rt2x00/rt2x00pci.c
2013-04-03rt2x00: rt2x00pci: fix build error on Ralink RT3x5x SoCsGabor Juhos
The rt2800pci driver supports the built-in wireless MAC of the Ralink RT3x5x SoCs. However building the driver for these SoCs leads to the following error: LD init/built-in.o drivers/built-in.o: In function `rt2800pci_rxdone_tasklet': <...>/drivers/net/wireless/rt2x00/rt2800pci.c:1012: undefined reference to `rt2x00pci_rxdone' drivers/built-in.o:(.rodata+0x4780): undefined reference to `rt2x00pci_initialize' drivers/built-in.o:(.rodata+0x4784): undefined reference to `rt2x00pci_uninitialize' drivers/built-in.o:(.rodata+0x47bc): undefined reference to `rt2x00pci_flush_queue' drivers/built-in.o:(.rodata+0x4818): undefined reference to `rt2x00pci_regbusy_read' make[5]: *** [vmlinux] Error 1 The missing functions are provided by the rt2x00pci module. This module is only selected by the rt2800pci driver if PCI support is enabled in the kernel, because some parts of the rt2x00pci code depends on PCI support. PCI support is not available on the RT3x5x SoCs because those have no PCI host controller at all. Move the non PCI specific code from rt2x00pci into a separate module. This makes it possible to use that code even if PCI support is disabled. The affected functions are used by all of the rt2x00 PCI drivers so select the new module for those drivers. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-03-18rt2800: 5592: TXWI & RXWI descriptors sizeStanislaw Gruszka
Based on: TXWI_STRUC RXWI_STRUC from: DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/chip/rtmp_mac.h Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-03-18rt2x00: Fix tx status reporting for reordered frames in rt2800pciHelmut Schaa
rt2800 hardware sometimes reorders tx frames when transmitting to multiple BA enabled STAs concurrently. For example a tx queue [ STA1 | STA2 | STA1 | STA2 ] can result in the tx status reports [ STA1 | STA1 | STA2 | STA2 ] when the hw decides to put the frames for STA1 in one AMPDU. To mitigate this effect associate the currently processed tx status to the first frame in the tx queue with a matching wcid. This patch fixes several problems related to incorrect tx status reporting. Furthermore the tx rate selection is much more stable when communicating with multiple STAs. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-03-13rt2x00: fix rt2x00 to work with the new ralink SoC config symbolsJohn Crispin
Since v3.9-rc1 the kernel has basic support for Ralink WiSoC. The config symbols are named slightly different than before. Fix the rt2x00 to match the new symbols. The commit causing this breakage is: commit ae2b5bb6570481b50a7175c64176b82da0a81836 Author: John Crispin <blogic@openwrt.org> Date: Sun Jan 20 22:05:30 2013 +0100 MIPS: ralink: adds Kbuild files Signed-off-by: John Crispin <blogic@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-01wireless: rt2x00: rt2800pci add idXose Vazquez Perez
0x1814,0x359f is a RT3592 802.11a/b/g/n 2x2 WiFi Adapter support added by 872834dfb38edc6f72cfc783a5ce78f2a9f36ec5 Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: users@rt2x00.serialmonkey.com Cc: linux-wireless@vger.kernel.org Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07rt2x00: rt2800: convert read_eeprom functions to return an int valueGabor Juhos
Both the rtt2x00usb_eeprom_read and the ioremap functions are allowed to fail, however their return values are not checked in the read_eeprom functions in the rt2800{pci,usb} drivers. The patch adds the missing checks, and converts all read_eeprom functions to return an int value, so the error values can be propagated up to the 'rt2800_validate_eeprom' function. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-12-06rt2x00: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: users@rt2x00.serialmonkey.com (moderated for non-subscribers) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-25rt2x00: Deprecate max_sta_intf field of struct rt2x00_ops.Gertjan van Wingerde
All drivers set this value to 1, so there is no need (currently) to let drivers set this. Therefor, remove the field; we can always add it back when it is needed. Inspired by an earlier patch from Paul Fertser. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Paul Fertser <fercerpav@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-07rt2x00: rt2800 - Make probe_hw function common between PCI and USB.Gertjan van Wingerde
Refactor the probe_hw code so that more code can be shared between rt2800pci and rt2800usb. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-07rt2x00: Unify GPIO register field namingsGertjan van Wingerde
The various rt2x00 drivers use different methods to name the different GPIO register fields indicating the GPIO pin value and the fields indicating the direction. Start using a unified naming scheme for the GPIO register fields: - <csr>_VAL<x> for fields indicating the GPIO pin value. - <csr>_DIR<x> for fields indicating the GPIO pin direction. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo Van Doorn <ivdoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-05rt2x00: Fix rfkill polling prior to interface start.Gertjan van Wingerde
We need to program the rfkill switch GPIO pin direction to input at device initialization time, not only when the interface is brought up. Doing this only when the interface is brought up could lead to rfkill detecting the switch is turned on erroneously and inability to create the interface and bringing it up. Reported-and-tested-by: Andreas Messer <andi@bastelmap.de> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Cc: <stable@vger.kernel.org> Acked-by: Ivo Van Doorn <ivdoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-02rt2x00 : fix rt3290 resuming failed.Woody Hung
This patch is going to fix the resuming failed from S3/S4 for rt3290 chip. Signed-off-by: Woody Hung <Woody.Hung@mediatek.com> Cc: Kevin Chou <kevin.chou@mediatek.com> Signed-off-by: Chen, Chien-Chia <machen@suse.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-11rt2x00pci: small 3290 changes cleanupStanislaw Gruszka
Fix indention and remove unnecessary brackets and compares. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-20rt2x00 : RT3290 chip support v4Woody Hung
This patch support the new chipset rt3290 wifi implementation in rt2x00. It initailize the related mac, bbp and rf register in startup phase. And this patch modify the efuse read/write method for the different efuse data offset of rt3290. Signed-off-by: Woody Hung <Woody.Hung@mediatek.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05rt2x00: Add support for RT5360 based PCI devices.villacis@palosanto.com
This chip is used at least by the D-Link DWA-525 adapter. Signed-off-by: Alex Villac<ED>s Lasso <a_villacis@palosanto.com> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16rt2x00:Add RT539b chipset supportZero.Lin
Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-16wireless: rt2x00: rt2800pci add more RT539x idsXose Vazquez Perez
RT539x devices: (0x1814, 0x5362) (0x1814, 0x5392) Taken from ralink driver 2011_0406_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-13rt2800: zero registers of unused TX ringsJakub Kicinski
This is needed if we take over after drivers which use those. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-13rt2800: initialize queues before giving up due to DMA errorJakub Kicinski
Don't immediately abort .start if DMA is busy before we initialize the queues. Some drivers do not deinitialize queues properly and we would fail to take over after them. This behaviour is consistent with legacy driver. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-13rt2800: introduce wpdma_disable functionJakub Kicinski
Introduce wpdma_disable function to simplify the code. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12rt2x00: Fix beacon skew in rt2800pciHelmut Schaa
rt2800pci is suffering from beacon skew in AP mode. Some powersaving clients (like VOIP phones) are getting into trouble after some time when the beacon skew is getting too big. The ralink legacy drivers contain a function that indicates that the beacon timer is off by 1us per tbtt. And this function works around that by reducing the beacon interval for every 64th beacon transmission by 64us (the smallest possible value). Do the same in rt2800pci. This allows proper powersaving when rt2800pci is used in AP mode. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27rt2800pci: Fix 'Error - MCU request failed' during initializationJakub Kicinski
Bring MCU operations during device initialization to sync with legacy driver. This should fix following error: phy0 -> rt2800pci_mcu_status: Error - MCU request failed, no response from hardware Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27rt2800: Add documentation on MCU requestsJakub Kicinski
Add documentation on MCU communication, some of known commands and their arguments. Supplement command ids. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27rt2x00:Add RT5372 chipset supportJohn Li
Signed-off-by: John Li <chen-yang.li@mediatek.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27rt2x00:Add VCO recalibrationJohn Li
Signed-off-by: John Li <chen-yang.li@mediatek.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Use struct rt2x00_dev driver data in rt2800{pci,usb}.Gertjan van Wingerde
Start using the struct rt2x00_dev driver data in rt2800 for the calibration data. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-27rt2800: zero MAC_SYS_CTRL bits during BBP and MAC resetStanislaw Gruszka
Zero all other bits than RESET_CSR and RESET_BBP when want to do the reset, that the vendor driver behaviour. Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-13rt2800pci: fix spurious interrupts generationStanislaw Gruszka
Same devices can generate interrupt without properly setting bit in INT_SOURCE_CSR register (spurious interrupt), what will cause IRQ line will be disabled by interrupts controller driver. We discovered that clearing INT_MASK_CSR stops such behaviour. We previously first read that register, and then clear all know interrupt sources bits and do not touch reserved bits. After this patch, we write to all register content (I believe writing to reserved bits on that register will not cause any problems, I tested that on my rt2800pci device). This fix very bad performance problem, practically making device unusable (since worked without interrupts), reported in: https://bugzilla.redhat.com/show_bug.cgi?id=658451 We previously tried to workaround that issue in commit 4ba7d9997869d25bd223dea7536fc1ce9fab3b3b "rt2800pci: handle spurious interrupts", but it was reverted in commit 82e5fc2a34fa9ffea38f00c4066b7e600a0ca5e6 as thing, that will prevent to detect real spurious interrupts. Reported-and-tested-by: Amir Hedayaty <hedayaty@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19module_param: make bool parameters really bool (net & drivers/net)Rusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. (Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false). Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-14rt2x00: Make use of sta_add/remove callbacks in rt2800Helmut Schaa
This allows us to assign a WCID to each STA even for STAs without crypto key. To achieve this search for an unused WCID in the HW WCID table and assign it to the according STA. When configuring a pairwise key for this STA we don't need to write the MAC address and BSSIDX anymore but just update the crypto related fields in the WCID_ATTR table. This has two advantages: 1) Setting a new key for an already available STA (PTK rekeying) is slightly less expensive and should improve performance in situations where a lot of rekeying happens (e.g. a huge number of stations and/or a small rekeying interval) 2) The TXWI now gets a WCID assigned for unencrypted frames which will be reflected in the corresponding tx status report. This should make tx status reports in unencrypted AP mode more reliable as we can distinguish between multiple key-less STAs. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14rt2x00: Avoid unnecessary uncachedHelmut Schaa
Reading the TX desciptor words from coherent memory is always uncached and potentially slow. Hence, don't read the TX descriptor prior to writing it since we update all fields anyway. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14rt2x00: Minor optimizazion in txdone pathHelmut Schaa
We can save an indirect function call + some instructions for fetching the actual function pointer by passing the driver specific txwi pointer directly from rt2800pci/rt2800usb to rt2800lib instead of using the rt2800_drv_get_txwi callback. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13rt2x00: Add new chipset supportzero.lin
Signed-off-by: zero.lin <zero.lin@ralinktech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09rt2x00: Fix PCI interrupt processing race on SMP systemsHelmut Schaa
When toggle_irq is called for PCI devices to disable device interrupts it used tasklet_disable to wait for a possibly running tasklet to finish. However, on SMP systems the tasklet might still be scheduled on another CPU. Instead, use tasklet_kill to ensure that all scheduled tasklets are finished before returning from toggle_irq. Furthermore, it was possible that a tasklet reenabled its interrupt even though interrupts have been disabled already. Fix this by checking the DEVICE_STATE_ENABLED_RADIO flag before reenabling single interrupts during tasklet processing. While at it also enable/kill the TBTT and PRETBTT tasklets in the toggle_irq callback and only use tasklet_kill in stop_queue to wait for a currently scheduled beacon update before returning. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2011-07-07rt2x00: Implement tx_frames_pending mac80211 callback function.Gertjan van Wingerde
Implementing this callback function will cause mac80211 refrain from going to powersave state when there are still untransmitted TX frames in the queues. This would exactly mimic the behaviour of the legacy vendor driver which also doesn't go in powersave mode if there are still TX frames that are not transmitted. This should make powersaving and rt2x00 a better couple. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-07rt2x00: Add device ID for RT539F device.Gertjan van Wingerde
Reported-by: Wim Vander Schelden <wim@fixnum.org> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-08Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2011-06-05drivers/net: Remove unnecessary semicolonsJoe Perches
Semicolons are not necessary after switch/while/for/if braces so remove them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-01rt2x00: Add support for RT3572/RT3592/RT3592+Bluetooth combo cardGertjan van Wingerde
(based on an earlier patch submitted by Shiang) Add support for RT3572/RT3592/RT3592+Bluetooth combo card Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-02rt2x00: Fix optimize register access for rt2800pciIvo van Doorn
The patch rt2x00: Optimize register access in rt2800pci from Helmut Schaa missed one register call, namely the rt2800_register_multiwrite which should be changed to rt2x00pci_register_multiwrite. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19rt2x00: Implement get_ringparam callback functionIvo van Doorn
With the get_ringparam callback function we can export ring parameters to ethtool through the mac80211 interface. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19rt2x00: Optimize register access in rt2800pciHelmut Schaa
All register reads/writes in rt2800pci were previously done with rt2800_register_read/rt2800_register_write. These however indirectly call rt2x00pci_register_read/rt2x00pci_register_write which adds an additional overhead of at least one call and several move instructions to each register access. Replacing the calls to rt2800_register_read/rt2800_register_write with direct calls to rt2x00pci_register_read/rt2x00pci_register_write gets rid of quite a number of instructions in the drivers hotpaths (IRQ handling and txdone handling). For consistency replace all references to rt2800_register_read/write with the rt2x00pci_register_read/write variants. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19rt2x00: Allow dynamic addition of PCI/USB IDs.Gertjan van Wingerde
Both USB and PCI drivers allow a system administrator to dynamically add USB/PCI IDs to the device table that a driver supports via the /sys/bus/{usb,pci,pci_express}/drivers/<driver-name>/new_id files. However, for the rt2x00 drivers using this method currently crashes the system with a NULL pointer failure. This is due to the set-up of rt2x00 where the probe functions require a rt2x00_ops structure in the driver_info field of the probed device. As this field is empty for the dynamically added devices this fails for these devices. Fix this by introducing driver-specific probe wrappers that do nothing but calling the bus-specific probe functions with the rt2x00_ops structure as an argument, rather than depending on the driver_info field. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19rt2x00: Always inline rt2x00pci_enable_interruptHelmut Schaa
This allows the compiler to perform the necessary bitfield calculations during compile time instead of run time and thus reduces the number of instructions to run during each tasklet invocation. This should improve performance in the RX hotpath. This comes at the cost of a slight increase in the module size (for example rt2800pci): Before: text data bss dec hex filename 14133 832 4 14969 3a79 drivers/net/wireless/rt2x00/rt2800pci.ko After: text data bss dec hex filename 14149 832 4 14985 3a89 drivers/net/wireless/rt2x00/rt2800pci.ko Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19rt2x00: Decrease association time for USB devicesIvo van Doorn
When powersaving is enabled, assocaition times are very high (for WPA2 networks, the time can easily be around the 3 seconds). This is caused, because the flushing of the queues takes too much time. Without the flushing callback mac80211 assumes a timeout of 100ms while scanning. Limit all flush waiting loops to the same maximum. We can apply this maximum by passing the drop status to the driver, which makes sure the driver performs extra actions during the waiting for the queue to become empty. After these changes, association times fall within the healthy range of ~0.6 seconds with powersaving enabled. The difference between association time between powersaving enabled and disabled is now only ~0.1 second (which can also be due to the measuring method). Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>