aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00
AgeCommit message (Collapse)AuthorFilesLines
2012-12-10rt2800usb: Add support for 2001:3c1e (D-Link DWA-125 rev B1) USB Wi-Fi adapterMaia Kozheva1-0/+1
D-Link DWA-125/B1 is a relatively new USB Wi-Fi adapter, using a Ralink chipset supported by the rt2800usb driver. Currently, to work around the problem (it's missing in all present kernel versions, up to and including 3.7.x), I had to add this to /etc/rc.local: echo 2001 3c1e >> /sys/bus/usb/drivers/rt2800usb/new_id After that, the device works without problems. Been using it for over a week with no bugs in sight. The attached patch is trivial and simply adds the new USB ID to the list of devices handled by rt2800usb. Signed-off-by: Maia Kozheva <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-12-06rt2x00: remove __dev* attributesBill Pemberton4-5/+5
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 <[email protected]> Cc: Ivo van Doorn <[email protected]> Cc: Gertjan van Wingerde <[email protected]> Cc: Helmut Schaa <[email protected]> Cc: [email protected] (moderated for non-subscribers) Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-12-06rt2x00: Only specify interface combinations if more then one interface is ↵Helmut Schaa1-0/+3
possible Otherwise rt2500* triggers a warning in cfg80211, from net/wireless/core.c: /* Combinations with just one interface aren't real */ if (WARN_ON(c->max_interfaces < 2)) This was introduced in commit 55d2e9da744ba11eae900b4bfc2da72eace3c1e1: rt2x00: Replace open coded interface checking with interface combinations. Reported-by: Stefan Lippers-Hollmann <[email protected]> Tested-by: Stefan Lippers-Hollmann <[email protected]> Signed-off-by: Helmut Schaa <[email protected]> Cc: [email protected] [3.7+] Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-12-05Revert: "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"Stanislaw Gruszka2-5/+5
This revert: commit be03d4a45c09ee5100d3aaaedd087f19bc20d01f Author: Andreas Hartmann <[email protected]> Date: Tue Apr 17 00:25:28 2012 +0200 rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails To fix problem workaround by above commit use IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL flag (see change log for "mac80211: introduce IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL" patch). Resolve: https://bugzilla.kernel.org/show_bug.cgi?id=42828 Bisected-by: Francisco Pina Martins <[email protected]> Cc: [email protected] Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-12-03rt2x00: rt2800lib: introduce RFCSR3_VCOCAL_ENGabor Juhos2-2/+4
On the RF3290,RF5360,RF5370,RF5372,RF5390,RF5392 radio frontends, the VCO calibration can be controlled via the RFCSR3 register. The current code uses the RFCSR30_RF_CALIBRATION constant to enable the calibration, however that belongs to the RFCSR30 register. Although the values of the constant is correct, but using that for another register is confusing. Add a new definition for the VCO calibration enable bit of the RFCSR3 register and use that in the relevant places in order to avoid confusions. 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]>
2012-12-03rt2x00: rt2800lib: remove trailing semicolons from RFCSR3_* definesGabor Juhos1-2/+2
Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-12-03rt2x00: rt2800lib: fix indentation in rt2800_init_rfcsrGabor Juhos1-60/+60
The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-12-03rt2x00: rt2800lib: fix indentation of some rt2x00_rt callsGabor Juhos1-9/+9
The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-11-30rt2x00: Use addr_mask to disallow invalid MAC addresses in mutli-bssid modeHelmut Schaa1-0/+7
Reported-by: Petr Stetiar <[email protected]> Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-11-21Merge branch 'master' of ↵John W. Linville1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c drivers/net/wireless/iwlwifi/pcie/tx.c
2012-11-16Merge branch 'for-john' of ↵John W. Linville2-12/+13
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-11-14Wireless: rt2x00: Add device id for Sweex LW323 to rt2800usb.cJaume Delclòs1-0/+1
This patch adds detection for the Sweex LW323 USB wireless network card in the rt2x00 driver (just one line in rt2800usb.c). It applies to linux-3.7-rc3. Signed-off-by: Jaume Delclòs <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-11-09mac80211: clarify interface iteration and make it configurableJohannes Berg2-12/+13
During hardware restart, all interfaces are iterated even though they haven't been re-added to the driver, document this behaviour. The same also happens during resume, which is even more confusing since all of the interfaces were previously removed from the driver. Make this optional so drivers relying on the current behaviour can still use it, but to let drivers that don't want this behaviour disable it. Also convert all API users, keeping the old semantics except in hwsim, where the new normal ones are desired. Signed-off-by: Johannes Berg <[email protected]>
2012-10-30rt2800: validate step value for temperature compensationStanislaw Gruszka1-1/+1
Some hardware has correct (!= 0xff) value of tssi_bounds[4] in the EEPROM, but step is equal to 0xff. This results on ridiculous delta calculations and completely broke TX power settings. Reported-and-tested-by: Pavel Lucik <[email protected]> Cc: [email protected] Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-29Merge branch 'master' of ↵John W. Linville3-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/mwifiex/cfg80211.c
2012-10-24rt2x00: usb: fix reset resumeStanislaw Gruszka3-0/+3
Patch fixes warnings like below happened on resume: WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34() Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0 interface) and then during resume we call usb_unbind_interface() -> ieee80211_unregister_hw() with sdata removed. Patch fixes problem by adding .reset_resume calback, hence we do not unbind usb device on resume. This callback can be the same as normal .resume callback, sice we do all needed initalization during interface start, which is performed on resume [ ieee80211_resume() -> ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ]. Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=48041 Reported-by: David Herrmann <[email protected]> Reported-and-tested-by: Stephen Boyd <[email protected]> Cc: [email protected] Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-19rt2800: comment tx power settingsStanislaw Gruszka1-3/+19
Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-19rt2800: allow to reduce tx power on devices not exporting power limitStanislaw Gruszka1-0/+27
Some rt2800 devices don't have their calibrated max eirp tx power in their calibration data. For those devices reduce tx power according to difference between regulatory max channel power and requested tx power. This patch is based on Helmut Schaa work. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-19rt2800: pass channel pointer to rt2800_config_txpowerStanislaw Gruszka1-4/+5
Preparation for use regulatory max channel power in TX power delta calculations. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-19rt2800: use eeprom OFDM 6M TX power as criterionStanislaw Gruszka1-5/+6
Don use TX_PWR_CFG_0 register value of OFDM 6M tx power as criterion since it can be changed. The same do vendor driver (see AsicAdjustSingleSkuTxPower and AsicGetTxPowerOffset functions from 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO). Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-19rt2800: compensate tx power also for non 11b rates on 2GHzStanislaw Gruszka1-3/+0
We skip compensate calculation for non 11b rates on 2.4GHz band. I do not see that on vendor driver (2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO). Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-19rt2800: limit TX_PWR_CFG_ values to 0xcStanislaw Gruszka1-1/+2
Based on AsicAdjustTxPower function from vendor driver (2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO) limit per rate TX power values we program into TX_PWR_CFG_ registers. Note that on some configurations (devices/rates) is allowed to use bigger values than 0xc, but we use safe maximum value for now. Further work need to be done to allow use bigger values than 0xc. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-19rt2800: use BBP_R1 for setting tx powerStanislaw Gruszka1-8/+19
TX power delta can be negative. TX_PWR_CFG_ registers allow to set delta only in range between 0 dBm and 15 dBm (4 bits for each rate). Se we need to use BBP_R1 to configure negative deltas. Not utilize +6 dBm increasing BBP_R1 option for safety reason. For now, this can be used for devices, which export maximum allowed TX power value. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-10-05rt2x00/rt3352: Fix lnagain assignment to use register 66.Daniel Golle1-2/+2
This should be register 66 instead of 62. (probably happened by copy&past'ing from the lines below) Signed-off-by: Daniel Golle <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-25rt2x00: Replace open coded interface checking with interface combinations.Gertjan van Wingerde3-39/+47
Mac80211 has formal infrastructure to specify which interface combinations are supported. Make use of this facility in favor of open coding it ourselves. So far we only have to specify we can support multiple AP interfaces, no other combinations are supported. Inspired by an earlier patch from Paul Fertser. Signed-off-by: Gertjan van Wingerde <[email protected]> Cc: Paul Fertser <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-25rt2x00: Deprecate max_sta_intf field of struct rt2x00_ops.Gertjan van Wingerde9-11/+2
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 <[email protected]> Cc: Paul Fertser <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-24rt2x00: Clean up RFCSR1 programming in rt2800_config_channel_rf3xxx.Gertjan van Wingerde1-29/+8
Setting of the individual fields of the RF register can be simplified. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-24rt2x00: Code style cleanup in rt2800lib.cGertjan van Wingerde1-1/+1
Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-24rt2x00: rt2800lib - code cleanup.Gertjan van Wingerde1-7/+5
Move RT3290 BBP initialization sequence (part) to the right place in the code. This is just a code style change, no functional changes. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-24rt2x00: rt2800 - Fix default vgc values for RT3572Gertjan van Wingerde1-4/+9
Align with the values used by the RT3572 Ralink vendor driver v2.5.0.0. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-24rt2x00: Code clean up in rt2800lib.Gertjan van Wingerde1-6/+10
Make the code in rt2800_get_default_vgc more understandable and readable, especially for the 5GHz band values. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-11rt2x00: add MediaTek/RaLink Rt3352 WiSoCDaniel Golle3-5/+212
Support for the RT3352 WiSoC was developed for and tested with the ALL5002 devboard running OpenWrt. For now, this supports only devices with internal TXALC. Corrections were made according to the remarks of Stanislaw Gruszka and Gertjan van Wingerde, thank you guys for reviewing! Signed-off-by: Daniel Golle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-07rt2x00: rt2800 - Make probe_hw function common between PCI and USB.Gertjan van Wingerde4-132/+113
Refactor the probe_hw code so that more code can be shared between rt2800pci and rt2800usb. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-07rt2x00: Unify GPIO register field namingsGertjan van Wingerde14-132/+143
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 <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-07rt2x00: Align GPIO register definitions with the datasheets.Gertjan van Wingerde4-2/+20
Ensure that all active GPIO pins are included in the GPIO register definitions, nothing more and nothing less. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-07Merge branch 'master' of ↵John W. Linville13-85/+160
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2012-09-05rt2800usb: Added rx packet length validity checkSergei Poselenov2-2/+10
On our system (ARM Cortex-M3 SOC running linux-2.6.33) frequent crashes were observed in the rt2800usb module because of the invalid length of the received packet (3392, 46920...). This patch adds the sanity check on the packet legth. Also, changed WARNING to ERROR in rt2x00lib_rxdone() so that the bad packet condition would be noticed. The fix was tested on the latest compat-wireless-3.5.1-1-snpc. Cc: [email protected] Signed-off-by: Sergei Poselenov <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2x00: Fix rfkill polling prior to interface start.Gertjan van Wingerde11-0/+69
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 <[email protected]> Signed-off-by: Gertjan van Wingerde <[email protected]> Cc: <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2x00: Fix word size of rt2500usb MAC_CSR19 register.Gertjan van Wingerde2-9/+9
The register is 16 bits wide, not 32. Signed-off-by: Gertjan van Wingerde <[email protected]> Cc: <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2x00: Identify ASUS USB-N53 device.Gertjan van Wingerde1-1/+2
This is an RT3572 based device. Signed-off-by: Maximilian Engelhardt <[email protected]> Signed-off-by: Gertjan van Wingerde <[email protected]> Cc: <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2x00: fix voltage setting for RT3572/RT3592Marc Kleine-Budde1-0/+1
According to the vendor driver v2.6.0.1, during the rf register init the SRAM voltage should be increased to 1.35V and after 1ms decreased back to 1.2V. This patch adds the field setting of LDO_CFG0_LDO_CORE_VLEVEL accordingly. Cc: Gertjan van Wingerde <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-08-06rt61pci: fix NULL pointer dereference in config_lna_gainStanislaw Gruszka1-2/+1
We can not pass NULL libconf->conf->channel to rt61pci_config() as it is dereferenced unconditionally in rt61pci_config_lna_gain() subroutine. Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=44361 Cc: [email protected] Reported-and-tested-by: <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-08-02rt2x00 : fix rt3290 resuming failed.Woody Hung2-71/+68
This patch is going to fix the resuming failed from S3/S4 for rt3290 chip. Signed-off-by: Woody Hung <[email protected]> Cc: Kevin Chou <[email protected]> Signed-off-by: Chen, Chien-Chia <[email protected]> Reviewed-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-07-31mac80211: move TX station pointer and restructure TXThomas Huehn4-12/+18
Remove the control.sta pointer from ieee80211_tx_info to free up sufficient space in the TX skb control buffer for the upcoming Transmit Power Control (TPC). Instead, the pointer is now on the stack in a new control struct that is passed as a function parameter to the drivers' tx method. Signed-off-by: Thomas Huehn <[email protected]> Signed-off-by: Alina Friedrichsen <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> [reworded commit message] Signed-off-by: Johannes Berg <[email protected]>
2012-07-20Merge branch 'master' of ↵John W. Linville1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-07-16wireless: Use eth_random_addrJoe Perches6-6/+6
Convert the existing uses of random_ether_addr to the new eth_random_addr. Signed-off-by: Joe Perches <[email protected]> Acked-by: Hin-Tak Leung <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-12Merge branch 'for-john' of ↵John W. Linville1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/iwmc3200wifi/cfg80211.c drivers/net/wireless/mwifiex/cfg80211.c
2012-07-12mac80211: add time synchronisation with BSS for assocJohannes Berg1-1/+1
Some drivers (iwlegacy, iwlwifi and rt2x00) today use the bss_conf.last_tsf value. By itself though that value is completely worthless since it may be ancient. What really is needed is synchronisation between some device time and the TSF. To clarify this, rename bss_conf.last_tsf to sync_tsf and add sync_device_ts which is obtained from rx_status which gets a new field device_timestamp for this purpose. This is intentionally not using the mactime field since that is used for other things and in IBSS is expected to sync with the IBSS's TSF which isn't necessarily true for the device timestamp. Also, since we have the information and it's useful even before the connection has been established, give all the timing details to the driver before authenticating. Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-07-11rt2x00: remove unused argumentStanislaw Gruszka3-23/+12
Data pointer on rt2x00queue_for_each_entry() is never used - remove it. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-07-11rt2800lib: merge same definesStanislaw Gruszka1-17/+12
Merge 3290 and 5390 POWER_BOUND and FREQ_OFFSET_BOUND defines. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>