aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-10-14rt2x00: rt2800lib: use rt2x00_has_cap_* helpersGabor Juhos1-13/+12
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt2x00lib: use rt2x00_has_cap_* helpersGabor Juhos6-13/+13
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: add rt2x00_has_cap_* helpersGabor Juhos1-0/+87
The rt2x00 code directly accesses the 'cap_flags' field of 'struct rt2x00_dev' when checking presence of a given capability flag. The direct access needs long expressions which lowers readability of the code. Add a few helper functions which can be used to test device capabilities without directly accessing the cap_flags filed. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: cleanup indentation in rt2800.hGabor Juhos1-21/+21
Adjust whitespaces to move badly aligned constants to the right column. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: fix VGC adjustment for RT3572 and RT3593Gabor Juhos1-5/+20
The Ralink DPO_RT5572_LinuxSTA_2.6.1.3_20121022 reference driver uses different RSSI threshold and VGC adjustment values for the RT3572 and RT3593 chipsets. Update the rt2800_link_tuner function to use the same values. Also change the comment in the function to make it more generic. References: RT35xx_ChipAGCAdjust function in chips/rt35xx.c RSSI_FOR_MID_LOW_SENSIBILITY constant in include/chip/rtmp_phy.h RT3593_R66_MID_LOW_SENS_GET macro in include/chip/rt3593.h RT3593_R66_NON_MID_LOW_SEMS_GET macro in include/chips/rt3593.h Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: fix VGC adjustment for RT5592Gabor Juhos1-4/+7
In commit 3d81535ea5940446510a8a5cee1c6ad23c90c753 (rt2800: 5592: add chip specific vgc calculations) the rt2800_link_tuner function has been modified to adjust VGC level for the RT5592 chipset. On the RT5592 chipset, the VGC level must be adjusted only if rssi is greater than -65. However the current code adjusts the VGC value by 0x10 regardless of the actual chipset if the rssi value is between -80 and -65. Fix the broken behaviour by reordering the if-else statements. Cc: stable@vger.kernel.org Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: use generic EWMA functions for average RSSI calculationsGabor Juhos3-58/+29
Remove the local MOVING_AVERAGE implementation, and use the generic EWMA functions instead. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: no need to toggle RF R30 bit 7 twiceKevin Lo1-7/+0
In rt2800_config_channel_rf3xxx(), there's no need to toggle RF R30 bit 7 twice. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: do not pause queue on flushStanislaw Gruszka2-31/+8
Pausing queue on flush make no sense since txdone procedure un-pause queue. Before flush procedure we have to assure queue is stopped, i.e. on receive path h/w RX is disabled, on transmit path queue is disabled in mac80211. That conditions are true except one function: rt2x00usb_watchdog_tx_dma(), so add stop/start queue there. Note stop/start queue can be racy if we do this from multiple paths, but currently we stop TX queues only on rt2x00lib_disable_radio(), which also stop/sync watchdog, hance we have no race condition. Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: fix default VGC values for RT3572 for the 5GHz bandGabor Juhos1-4/+11
The rt2x00 driver uses 0x22 as a default VGC value in VGC adjustment for the RT3572 chipset. In the Ralink DPO_RT5572_LinuxSTA_2.6.1.3_20121022 driver, this value is only used for initialization. During VGC adjustment, the reference driver uses different values. Update the 'rt2800_get_default_vgc' function to synchronize the values with the reference driver. Also add the missing AGC initialization code into the 'rt2800_config_channel' function. References: RT35xx_SetAGCInitValue in chip/rt35xx.c RT35xx_ChipAGCAdjust in chip/rt35xx.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: fix VGC programming for RT3572 and RT3593Gabor Juhos1-2/+8
According to the DPO_RT5572_LinuxSTA_2.6.1.3_20121022 reference driver, programming of the 'BBP 66' register on the RT3572 and RT3593 chipsets must be done via the 'rt2800_bbp_write_with_rx_chain' function. This ensures that value is correclty set for all RX chains. References: RT35xx_ChipAGCAdjust and RT35xx_SetAGCInitValue functions in chips/rt35xx.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: fix default VGC values for RT3593Gabor Juhos1-0/+3
Update the rt2800_get_default_vgc function to use the same VGC values that the DPO_RT5572_LinuxSTA_2.6.1.3_20121022 reference driver uses. References: RT35xx_ChipAGCAdjust in chips/rt35xx.c RT3593_R66_MID_LOW_SENS_GET macro in include/chip/rt3593.h RT3593_R66_NON_MID_LOW_SEMS_GET macro in include/chips/rt3593.h Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: remove TXPOWER_DELTA entry from extended EEPROM mapGabor Juhos1-1/+0
The TXPOWER_DELTA field of the regular EEPROM stores the TX power compensation value for HT40. The extended EEPROM has no such field, it stores separate TX power values for HT20 and for HT40. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00: rt2800lib: remove TXMIXER_GAIN entries from the extended EEPROM mapGabor Juhos1-2/+0
The comments are indicating that the TXMIXER_GAIN_BG and TXMIXED_GAIN_A entries are overlapping with the RSSI_BG2 and RSSI_A2 entries in the extended EEPROM map. This is not correct, because the upper byte of the RSSI_BG2 and RSSI_A2 entries are reserved. There are no TX mixer gain values are stored at all in the extended EEPROM. Remove the initialization of these entries from the extended EEPROM map to reflect this. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-10rt2x00_pci: Fix interrupt handler name (visible at /proc/interrupts)Kirill Tkhai1-1/+1
Currently driver name is wrong. PCI device address is visible at /proc/interrupts instead of the name: 43: 124 0 0 0 PCI-MSI-edge rtsx_pci 44: 384 0 0 0 PCI-MSI-edge snd_hda_intel 45: 25096 0 0 0 PCI-MSI-edge 0000:01:00.0 ^^^^^^^^^^^^ So, pass the right name. rt2x00_ops->name contains KBUILD_MODNAME and good for that, so pass it. Handler names will be "rt2500pci", "rt2500pci" etc. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> CC: Ivo van Doorn <IvDoorn@gmail.com> CC: Gertjan van Wingerde <gwingerde@gmail.com> CC: Helmut Schaa <helmut.schaa@googlemail.com> CC: linux-wireless@vger.kernel.org Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03wireless: rt2x00: rt2800usb: add new devicesXose Vazquez Perez1-1/+16
0411,0241 RT5572 BUFFALO WI-U2-300D Wireless LAN Adapter 0789,0170 RT3572 Logitec LAN-W300AN/U2 0846,9013 RT3573 NETGEAR Adaptador USB Inalambrico Movistar 0df6,006e RT3573 Sitecom WiFi USB adapter N900 2001,3c1f RT3573 D-Link DWA-162 Wireless N900 Dual Band Adapter 2001,3c20 RT5372 D-Link DWA-140 Wireless N USB Adapter(rev.D) 2001,3c21 RT5572 D-Link DWA-160 Xtreme N Dual Band USB Adapter(rev.C) 2001,3c22 RT5372 D-Link DWA-132 Wireless N USB Adapter(rev.B) 2001,3c23 RT5372 D-Link GO-USB-N300 Wireless N Easy USB Adapter 2019,ab29 ? Planex GW-USMirco300 20f4,724a RT5572 TRENDnet N600 Wireless Dual Band USB Adapter 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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rt2800: add support for radio chip RF3070Stanislaw Gruszka2-1/+9
Add support for new RF chip ID: 3070. It seems to be the same as 5370, maybe vendor just put wrong value on the eeprom, but add this id anyway since devices with it showed on the marked. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-30Revert "rt2x00pci: Use PCI MSIs whenever possible"Stanislaw Gruszka1-8/+1
This reverts commit 9483f40d8d01918b399b4e24d0c1111db0afffeb. Some devices stop to connect with above commit, see: https://bugzilla.kernel.org/show_bug.cgi?id=61621 Since there is no clear benefit of having MSI enabled, just revert change to fix the problem. Cc: stable@vger.kernel.org # 3.11+ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-26rt2x00: Fix rf register for RT3070Kevin Lo1-1/+1
Fix RT3070 chip RF initial value to be similar to the latest Ralink vendor driver. Tested on Asus N13 usb wifi dongle. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-26rt2x00: rt2800lib: fix band selection and LNA PE control for RT3593 PCIe cardsGabor Juhos1-9/+17
The band selection and PE control code for the RT3593 chipsets only handles USB based devices currently. Due to this limitation RT3593 based PCIe cards are not working correctly. On PCIe cards band selection is controlled via GPIO #8 which is identical to the USB devices. The LNA PE control is slightly different, all LNA PEs are controlled by GPIO #4. Update the code to configure the GPIO_CTRL register correctly on PCIe devices. Cc: Steven Liu <steven.liu@mediatek.com> Cc: JasonYS Cheng <jasonys.cheng@mediatek.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-26rt2800: comment enable radio initialization sequenceStanislaw Gruszka1-2/+11
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-09rt2800: change initialization sequence to fix system freezeStanislaw Gruszka1-5/+6
My commit commit c630ccf1a127578421a928489d51e99c05037054 Author: Stanislaw Gruszka <stf_xl@wp.pl> Date: Sat Mar 16 19:19:46 2013 +0100 rt2800: rearrange bbp/rfcsr initialization make Maxim machine freeze when try to start wireless device. Initialization order and sending MCU_BOOT_SIGNAL request, changed in above commit, is important. Doing things incorrectly make PCIe bus problems, which can froze the machine. This patch change initialization sequence like vendor driver do: function NICInitializeAsic() from 2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO (PCI devices) and DPO_RT5572_LinuxSTA_2.6.1.3_20121022 (according Mediatek, latest driver for RT8070/RT3070/RT3370/RT3572/RT5370/RT5372/RT5572 USB devices). It fixes freezes on Maxim system. Resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1000679 Reported-and-tested-by: Maxim Polyakov <polyakov@dexmalabs.com> Bisected-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-03drivers/net: Convert uses of compare_ether_addr to ether_addr_equalJoe Perches1-2/+2
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: (and a little typing) $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-28rt2800usb: Add WLI-UC-G300HP's Product ID.Masami Ichikawa1-0/+1
Support Bufallo WLI-UC-G300HP. Signed-off-by: Masami Ichikawa <masami256@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-28Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-1/+2
Conflicts: drivers/net/wireless/iwlwifi/pcie/trans.c net/mac80211/ibss.c
2013-08-26rt2800: fix wrong TX power compensationStanislaw Gruszka1-0/+7
We should not do temperature compensation on devices without EXTERNAL_TX_ALC bit set (called DynamicTxAgcControl on vendor driver). Such devices can have totally bogus TSSI parameters on the EEPROM, but still threaded by us as valid and result doing wrong TX power calculations. This fix inability to connect to AP on slightly longer distance on some Ralink chips/devices. Reported-and-tested-by: Fabien ADAM <id2ndr@crocobox.org> Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-26rt2x00: rt2800lib: don't hardcode beacon offsetsGabor Juhos2-8/+24
The values written into the BCN_OFFSET[01] registers are hardcoded in the rt2800_init_register function. Add a macro and a helper function to derive these values directly from the base address of a given beacon, and use the new function instead of the hardcoded numbers. The patch contains no functional changes. The programmed register values are the same before and after the patch. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-26rt2x00: rt2800lib: add rt2800_hw_beacon_base helperGabor Juhos1-2/+9
The HW_BEACON_BASE() macro returns the base address of a given beacon, however the returned values are not usable on all chipsets. On devices which have selectable shared memory parts, some beacon may be located in the high part of the shared memory. Instead of extending the already complicated macro, add a new helper function and use that to get the base address of a given beacon. The actual patch contains no functional changes, the helper function will be extended in a further patch to handle different chipsets' requirements. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800lib: adjust frequency offset for RF3053Gabor Juhos1-1/+1
Along with other chipsets, the Ralink driver uses the frequency adjustment code for RF3053 as well. Remove the bogus place-holder comment from the RF3053 specific channel configuration function and call the frequency adjustment function instead Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RT3593_ChipSwitchChannel function in chips/rt3593.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800lib: move rt2800_adjust_freq_offset functionGabor Juhos1-36/+37
Move the rt2800_adjust_freq_offset function before the channel configuration functions to make it usable from those without a forward declaration. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800lib: use step-by-step frequency offset adjustment on MMIO devicesGabor Juhos1-3/+16
According to the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver, the RFCSR17 register can't be programmed in one step on devices which are using the frequency offset adjustment code. Update the code to use step-by-step adjustment. Reference: RT30xxWriteRFRegister function in common/rt_rf.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800lib: use a MCU command for frequency adjustment on USB devicesGabor Juhos2-1/+6
According to the Ralink driver, there is an MCU command which can be used to send the frequency offset value directly to the USB device without going through the RFCSR writing sequence. Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RTMPAdjustFrequencyOffset function in common/rt_rf.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800lib: optimize frequency offset adjustmentGabor Juhos1-1/+6
Don't write the new value into the register if it is the same as the old value to avoid unncessary USB bus traffic with USB devices. The change also saves a few cycle on MMIO based devices. Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RTMPAdjustFrequencyOffset function in common/rt_rf.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800lib: fix frequency offset boundary calculationGabor Juhos1-4/+5
The current code in the 'rt2800_adjust_freq_offset' function limits the device specific frequency offset value to FREQ_BOUND but ignores the fact that the uppermost bit is not part of the frequency offset value. As the result, the driver always uses the FREQ_BOUND value if the uppermost bit is set. Update the code to use the correct source value for calculating the boundary. Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RTMPAdjustFrequencyOffset function in common/rt_rf.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800lib: pass beacon index to rt2800_clear_beacon_registerGabor Juhos1-11/+7
Instead of precomputing the beacon base in each caller, pass the beacon index to the 'rt2800_clear_beacon_register' function and compute the beacon base in there. This allows to simplify the caller functions a bit. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22rt2x00: rt2800: rename HW_BEACON_OFFSET macroGabor Juhos2-3/+3
The name of the HW_BEACON_OFFSET macro is a bit confusing. It returns with one of the HW_BEACON_BASE* values, so rename the macro to HW_BEACON_BASE to reflect that. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-22Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211John W. Linville1-1/+2
2013-08-21mac80211: add a flag to indicate CCK support for HT clientsFelix Fietkau1-1/+2
brcm80211 cannot handle sending frames with CCK rates as part of an A-MPDU session. Other drivers may have issues too. Set the flag in all drivers that have been tested with CCK rates. This fixes a reported brcmsmac regression introduced in commit ef47a5e4f1aaf1d0e2e6875e34b2c9595897bef6 "mac80211/minstrel_ht: fix cck rate sampling" Cc: stable@vger.kernel.org # 3.10 Reported-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-16rt2x00: rt2800pci: fix AUX_CTRL register setup for RT3090/3390/3593/5592Gabor Juhos1-2/+6
The 2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO driver enables PCIe wakeup for these chips as well. Do the same in rt2x00. References: rt28xx_init in common/rtmp_init_intf.c RTMPInitPCIeLinkCtrlValue in os/linux/rt_rbus_pci_drv.c Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-16rt2x00: rt2800lib: introduce rt2800_get_txwi_rxwi_size helperGabor Juhos4-13/+36
The rt2800pci driver uses the same [RT]XWI size for all chipsets, however some chips requires different values. The size of the [RT]XWI structures is a constant value for a given chipset and it does not depend on the underlying interface. Add a helper function which returns the correct values for the actual chipset and use the new helper both in the rt2800usb and in the rt2800pci drivers. This ensures that both drivers are using the correct values. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-09net: wireless: rt2x00: Staticize rt2x00queue_pause_queue_nocheck()Jingoo Han1-1/+1
rt2x00queue_pause_queue_nocheck()is used only in this file. Fix the following sparse warning: drivers/net/wireless/rt2x00/rt2x00queue.c:939:6: warning: symbol 'rt2x00queue_pause_queue_nocheck' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-09Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-7/+11
2013-07-29rt2x00: fix stop queueStanislaw Gruszka1-7/+11
Since we clear QUEUE_STARTED in rt2x00queue_stop_queue(), following call to rt2x00queue_pause_queue() reduce to noop, i.e we do not stop queue in mac80211. To fix that introduce rt2x00queue_pause_queue_nocheck() function, which will stop queue in mac80211 directly. Note that rt2x00_start_queue() explicitly set QUEUE_PAUSED bit. Note also that reordering operations i.e. first call to rt2x00queue_pause_queue() and then clear QUEUE_STARTED bit, will race with rt2x00queue_unpause_queue(), so calling ieee80211_stop_queue() directly is the only available solution to fix the problem without major rework. Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-07-25Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-1/+1
2013-07-24wireless: rt2x00: rt2800usb: add RT3573 devicesXose Vazquez Perez1-0/+30
taken from Ralink linux and windows drivers: 0x1b75, 0x7733 AirLive 450Mbps Wireless-N Dual Band USB Adapter 0x0b05, 0x17bc ASUS USB-N66 450Mbps Dual Band USB Adapter 0x0b05, 0x17ad ASUS USB-N66 Dual Band N Network Adapter 0x050d, 0x1103 Belkin Wireless Adapter 0x148f, 0xf301 Cameo Ralink3573 3x3 single band USB dongle 0x7392, 0x7733 Edimax 0x0e66, 0x0020 Hawking HD45U Dual Band USB Wireless-N Adapter 0x0e66, 0x0021 Hawking HD45U Dual Band Wls-450N Adapter 0x04bb, 0x094e I-O DATA WN-AG450U Wireless LAN Adapter 0x0789, 0x016b Logitec LAN-W450AN/U2 0x0846, 0x9012 NETGEAR WNDA4100 N900 Wireless Dual Band USB Adapter 0x0846, 0x9019 NETGEAR WNDA4200D Wireless Dual Band USB Adapter 0x2019, 0xed19 Planex GW-USDual450 0x148f, 0x3573 Ralink 802.11n USB Wireless LAN Card 0x0df6, 0x0067 Sitecom Wireless Dualband Network Adapter N750 X6 0x0df6, 0x006a Sitecom Wireless Dualband Network Adapter N900 X7 0x0586, 0x3421 ZyXEL Dual-Band Wireless N450 USB Adapter 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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-07-22rt2x00: rt2800usb: add USB device ID for Linksys AE3000Gabor Juhos2-0/+10
The Linksys AE3000 device is based on the RT3573 chipset. The support for this chipset is available already, and the AE3000 device works with the driver. Only managed mode works correctly at the moment, for AP mode additional changes are needed in the driver. Also add a new RT2800USB_RT3573 Kconfig option and only enable support for RT3573 based devices if that is enabled. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-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-07-22rt2x00: rt2800usb: use correct [RT]XWI size for RT3593Gabor Juhos2-1/+5
The RT3593 chipset requires different [RT]XWI size values. Modify the driver to use the correct values. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-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-07-22rt2x00: rt2800lib: enable RT3593 supportGabor Juhos1-0/+1
Support for the RT3593 has been implemented in the previous changes, so it is safe to mark it supported in the driver. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-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-07-22rt2x00: rt2800lib: enable RF3053 supportGabor Juhos1-0/+1
Support for the RF3053 has been implemented in the previous changes, so it is safe to mark it supported in the driver. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-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-07-22rt2x00: rt2800lib: enable VCO recalibration for RF3053Gabor Juhos1-0/+2
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>