aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00
AgeCommit message (Collapse)AuthorFilesLines
2013-05-24rt2800: initialize BBP_R31 on proper subroutinesStanislaw Gruszka1-8/+8
Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-24rt2800: move rt2800_bbp4_mac_if_ctrl to proper subroutinesStanislaw Gruszka1-5/+2
Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-24rt2800: move 3352 bbp specific codeStanislaw Gruszka1-5/+2
Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-24rt2800: add rt2800_init_bbp_305x_soc subroutineStanislaw Gruszka1-0/+7
New routine for SOC specific BBP initialization, empty for now. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-24rt2800: prepare for rt2800_init_bbp spitStanislaw Gruszka1-1/+56
Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-24rt2800: make rt2800_init_bbp return voidStanislaw Gruszka1-9/+5
This function can not fail, we always return 0. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-22rt2x00pci: Use PCI MSIs whenever possibleJakub Kicinski1-1/+8
All PCIe devices must support MSIs, make use of them. Signed-off-by: Jakub Kicinski <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-22rt2x00: rt2x00dev: defer operational mode detectionGabor Juhos1-17/+17
Only do it after the queues are allocated. This will allow to use the 'rt2x00dev->bcn->limit' instead of 'rt2x00dev->ops->bcn->entry_num'. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-22rt2x00: rt2800lib: use rt2x00dev->bcn->winfo_sizeGabor Juhos1-1/+1
The beacon data queue is initialized already when the rt2800_clear_beacon_register() function is called. Fetch the size of the TXWI descriptor from that instead of using the winfo_size field of the data queue descriptor. The two values are the same, and the use of the rt2x00dev->bcn->winfo_size value allows us to get rid of a superfluous pointer dereference. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-22rt2x00: rt2800usb: use rt2x00dev->rx->limitGabor Juhos1-1/+1
The RX data queue is initialized already when the rt2800_usb_enable_radio() function is called. Fetch the number of the queue entries from that instead of using the entry_num field of the data queue descriptor. The two values are the same, and the use of the rt2x00dev->rx->limit value allows us to get rid of a superfluous pointer dereference. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-22rt2x00: rt2800pci: use rt2x00dev->tx->limitGabor Juhos1-1/+1
The TX data queue is initialized already when the rt2800pci_txstatus_interrupt() function is called. Fetch the number of the queue entries from that instead of using the entry_num field of the data queue descriptor. The two values are the same, and the use of the rt2x00dev->tx->limit value allows us to get rid of a superfluous pointer dereference. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-22rt2x00: rt61pci: use rt2x00dev->tx->limitGabor Juhos1-1/+1
The TX data queue is initialized already when the rt61pci_txdone() function is called. Fetch the number of the queue entries from that instead of using the entry_num field of the data queue descriptor. The two values are the same, and the use of the rt2x00dev->tx->limit value allows us to get rid of a superfluous pointer dereference. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-05-22rt2x00: rt2x00dev: use rt2x00dev->tx->limitGabor Juhos1-1/+1
The TX data queue is initialized already when the rt2x00lib_probe_hw() function is called. Fetch the number of the queue entries from that instead of using the entry_num field of the data queue descriptor. The two values are the same, and the use of the rt2x00dev->tx->limit value allows us to get rid of a superfluous pointer dereference. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2x00: Use more current logging styles, shrink object sizeJoe Perches19-240/+228
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 <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2x00: rt2800lib: rename rt2800_init_bbb_early to rt2800_init_bbp_earlyGabor Juhos1-2/+2
The function is used for BBP register initialization, fix the typo in the function name to reflect that. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: nulify all last words of TXWIStanislaw Gruszka1-4/+7
Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2x00: provide separate information about TXWI & RXWI sizesStanislaw Gruszka5-25/+34
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 <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: cleanup rt2800_init_rfcsrStanislaw Gruszka1-21/+6
This procedure is simple switch now and return no error any longer. Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: add rt2800_normal_mode_setup_3xxx subroutineStanislaw Gruszka1-77/+77
Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: add rt2800_led_open_drain_enable subroutineStanislaw Gruszka1-4/+25
Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: move RF_R27 setup to individual rfcsr init subroutinesStanislaw Gruszka1-7/+11
Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: add rt2800_rx_filter_calibration procedureStanislaw Gruszka1-46/+57
Add procedure for both bands filter calibration and use it on individual chipset init rfcsr subroutines. Remove "Set back to initial state" code for 3290 since vendor driver DPO_RT3290_LinuxSTA_V2600_20120508 does not include it. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: move RFCSR6_R2 & LDO_CFG0 setup to 3572 specific rfcsr initStanislaw Gruszka1-17/+17
Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: move GPIO_SWITCH setup to 3390 specific rfcsr initStanislaw Gruszka1-5/+7
Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: move 30xx common rf init codeStanislaw Gruszka1-28/+35
Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: move RFCSR29_RSSI_GAIN to 3290 specific rfcsr initStanislaw Gruszka1-6/+6
Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: move rf init calibration codeStanislaw Gruszka1-22/+32
Add separate function for rf init calibration code and use it on all init rf subroutines. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2800: merge 5xxx normal mode setupStanislaw Gruszka1-48/+36
Merge code which program the same registes at the end of rfcsr initialization for 5592, 5392 and 5390 chips. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-22rt2x00: Fix transmit power troubles on some Ralink RT30xx cardsAlex A. Mihaylov1-2/+6
Some cards on Ralink RT30xx chipset not have correctly TX_MIXER_GAIN value in them EEPROM/EFUSE. In this case, we must use default value, but always used EEPROM/EFUSE value. As result we have tranmitt power range from -10dBm to +6dBm instead 0dBm to +16dBm. Correctly value in EEPROM/EFUSE is one or more for RT3070 and two or more for other RT30xx chips. Tested on Canyon CNP-WF518N1 usb Wi-Fi dongle and Jorjin WN8020 usb embedded Wi-Fi module. Signed-off-by: Alex A. Mihaylov <[email protected]> Cc: [email protected] Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10rt2x00: rt2x00mmio: remove unused rt2x00pci_* definesGabor Juhos1-11/+0
All users are converted to use the rt2x00mmio_* functions so remove the now unused defines. The patch contain no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10rt2x00: rt2800pci: use the rt2x00mmio_* routinesGabor Juhos1-118/+123
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10rt2x00: rt61pci: use the rt2x00mmio_* routinesGabor Juhos1-256/+259
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10rt2x00: rt2500pci: use the rt2x00mmio_* routinesGabor Juhos1-167/+167
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10rt2x00: rt2400pci: use the rt2x00mmio_* routinesGabor Juhos1-154/+155
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10rt2x00: rt2x00mmio: use rt2x00mmio prefix in function namesGabor Juhos2-50/+61
The functions in the rt2x00mmio module has been moved from the rt2x00pci module. Each function uses the rt2x00pci prefix which is a bit confusing. Use the r2x000mmio prefix for each function to make it consistent with the module name. The renamed functions are used by several modules, and updating the names in all of them would result in a big patch. In order to keep the patch simple, add compatibility defines for the old function names. This allows to update the names in each module separately. After each module is updated, the defines can be removed. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10Merge branch 'for-john' of ↵John W. Linville4-11/+11
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/ath/carl9170/debug.c drivers/net/wireless/ath/carl9170/main.c net/mac80211/ieee80211_i.h
2013-04-10Merge branch 'master' of ↵John W. Linville10-264/+347
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 Juhos10-264/+347
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-03rt2x00: rt2x00pci_regbusy_read() - only print register access failure onceTim Gardner1-2/+2
BugLink: http://bugs.launchpad.net/bugs/1128840 It appears that when this register read fails it never recovers, so I think there is no need to repeat the same error message ad infinitum. Cc: Ivo van Doorn <[email protected]> Cc: Gertjan van Wingerde <[email protected]> Cc: Helmut Schaa <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Tim Gardner <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-01rt2x00: rt2800lib: probe RT chipset earlierGabor Juhos1-35/+45
The 'rt2800_validate_eeprom' function uses the type of the RT chipset for verifying the number of RX streams on RT28x0 devices. However the type of the RT chipset is not yet detected when the 'rt2800_validate_eeprom' function is called. Move the RT chipset detection code into a separate helper function, and call it before rt2800_validate_eeprom. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-01rt2x00: rt2800lib: separate RT and RF chipset detectionGabor Juhos1-24/+32
Use the newly introduced rt2x00_set_{rf,rt} helpers to set the RT and RF chipset separately. This change makes it possible to move the RT detection code into another function which will be done in a subseqent patch. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-01rt2x00: introduce rt2x00_set_{rt,rf} helpersGabor Juhos1-0/+17
The new helpers can be used to set the type of the RT and RF chipsets separately. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-03-25Merge branch 'for-john' of ↵John W. Linville2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-03-25mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chanKarl Beldan4-11/+11
Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <[email protected]> [fix kernel-doc] Signed-off-by: Johannes Berg <[email protected]>
2013-03-18rt2800: 5592: add more USB devices IDsStanislaw Gruszka1-0/+9
Reported-by: Xose Vazquez Perez <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Tested-by: Wanlong Gao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-03-18rt2800: 5592: iq calibration for 5GHzStanislaw Gruszka1-10/+60
Based on: RT5592_IQCalibration() DPO_RT5572_LinuxSTA_2.6.1.3_20121022/cips/rt5592.c Signed-off-by: Stanislaw Gruszka <[email protected]> Tested-by: Wanlong Gao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-03-18rt2800: 5592: add KconfigStanislaw Gruszka1-0/+7
Enable support to 5592 chip. Signed-off-by: Stanislaw Gruszka <[email protected]> Tested-by: Wanlong Gao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-03-18rt2800: 5592: TXWI & RXWI descriptors sizeStanislaw Gruszka4-7/+58
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 <[email protected]> Tested-by: Wanlong Gao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-03-18rt2800: 5592: add chip specific vgc calculationsStanislaw Gruszka1-7/+22
Based on: RT5592_ChipAGCAdjust() from: DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c Signed-off-by: Stanislaw Gruszka <[email protected]> Tested-by: Wanlong Gao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-03-18rt2800: 5592: add AGC initStanislaw Gruszka1-1/+4
Based on: RT5592_RTMPAGCInit() from: DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c Signed-off-by: Stanislaw Gruszka <[email protected]> Tested-by: Wanlong Gao <[email protected]> Signed-off-by: John W. Linville <[email protected]>