aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00
AgeCommit message (Collapse)AuthorFilesLines
2010-08-25rt2x00: Merge rt2800{pci/usb} radio enabling/disabling code to rt2800libIvo van Doorn4-145/+107
The functions rt2800pci_enable_radio and rt2800usb_disable_radio are almost equal and can be merged into rt2800lib. This reduces the number of functions which must be exported from rt2800lib to the drivers at the same time. Also rt2800pci_disable_radio and rt2800usb_disable_radio are almost equal and can be merged into rt2800lib in a similar fashion. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-25rt2x00: Fix rt2800 retry calculationIvo van Doorn1-1/+0
The retry count for a frame is calculated by the realized MCS rate subtracting of the requested MCS rate. However during TX done reporting we accidently override the requested MCS rate with the realized MCS rate. This causes the retry count to be reset to 0 always, and feeding invalid rate information into minstrel_ht. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-25rt2x00: Remove Q_INDEX_CRYPTO and ENTRY_OWNER_DEVICE_CRYPTOIvo van Doorn2-11/+3
Q_INDEX_CRYPTO and ENTRY_OWNER_DEVICE_CRYPTO where initially added with the plan to implement hardware encryption for rt2500pci. However there are no plans to do so anymore as the crypto mechanism in rt2500pci is very different then any other Ralink device. So we can now safely remove the definitions, and don't think about this feature anymore. :) Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-25rt2x00: Move direct access to queue->entries to rt2x00queue.cIvo van Doorn4-57/+83
All access to queue->entries through the Q_INDEX/Q_INDEX_DONE variables must be done using spinlock protection. It is best to manage this completely from rt2x00queue.c. For safely looping through all entries in the queue, the function rt2x00queue_for_each_entry is added which will walk from from a index range in a safe manner. This also fixes rt2x00usb which walked the entries list from 0 to length to kill each entry (killing entries must be done from Q_INDEX_DONE to Q_INDEX to enforce TX status reporting to occur in the correct order. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-25rt2x00: Reduce indentingIvo van Doorn1-13/+14
Cosmetic change, reduce indenting. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-25rt2x00: Simplify arguments to rt2x00 driver callback functionsIvo van Doorn11-115/+90
write_tx_desc shouldn't pass a rt2x00dev and skb pointer, instead it should use the same format as other TX frame callback functions, which is passing the data_entry pointer which contains all the information which is needed to work on a TX frame. Most callers of the kick_tx_queue and kill_tx_queue already have the data_queue pointer, so rather then sending the QID with the given function, when the driver requests a new pointer to the data_queue, it is more efficient to just send the data_queue pointer directly. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-17drivers/net: Convert unbounded kzalloc calls to kcallocJoe Perches8-9/+9
These changes may be slightly safer in some instances. There are other kzalloc calls with a multiply, but those calls are typically "small fixed #" * sizeof(some pointer)" and those are not converted. Signed-off-by: Joe Perches <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Luciano Coelho <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-08-16mac80211: use cipher suite selectorsJohannes Berg2-10/+11
Currently, mac80211 translates the cfg80211 cipher suite selectors into ALG_* values. That isn't all too useful, and some drivers benefit from the distinction between WEP40 and WEP104 as well. Therefore, convert it all to use the cipher suite selectors. Signed-off-by: Johannes Berg <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: Remove ieee80211_rx_status from rt2x00_devIvo van Doorn6-20/+16
rt2x00 was keeping a copy of ieee80211_rx_status embedded into the rt2x00_dev structure. For each RX frame, this structure was copied into the skb->cb where mac80211 would handle it further. However at the moment only the fields current band, and frequency were updated. Whereas the band was already provided directly within the rt2x00_dev structure. Save a memcpy action, and reduce memory a bit, by adding a curr_freq field to rt2x00_dev, and completely remove the ieee80211_rx_status structure from rt2x00_dev. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: Update comments regarding TXWI and TX_STA_FIFOHelmut Schaa1-1/+26
Add some comments about the TXWI fields and the TX_STA_FIFO register. Especially describe the relationship between the TXWI field PACKETID and the PID field in the TX_STA_FIFO register. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: Implement TX status reporting for rt2800usbIvo van Doorn4-107/+162
The TX_STA_FIFO register which is used for per-frame TX frame status reporting is also valid on rt2800usb. We can move the rt2800pci_txdone function into rt2800lib where it can also be used by rt2800usb. rt2800usb needs to overwrite the txdone work handler to a different function. Both rt2800usb as rt2800_txdone need to take into account that IO failures can occur while uploading the URB, which means that when obtaining the new entry the IO status must be checked. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: Request TXWI pointer from driverIvo van Doorn4-18/+26
The only reason why the write_tx_data callback function is needed inside the driver, is because the location of the TXWI descriptor is different on PCI and USB hardware. Except for the beacon, where the TXWI is always at the start of the SKB buffer. In both cases the drivers write_tx_data function only wrap around the function rt2800_write_txwi. Move write_tx_data completely into the rt2800lib library, and add a callback function to obtain the TXWI pointer. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: Add helper function for reporting tx statusIvo van Doorn4-13/+16
At some points, some drivers can't report the full TX status information. This can happen for the UNKNOWN state, or the FAILURE state (in case the URB failed). Add a wrapper function to simplify reporting the empty TX information. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: Set MIMO PS flag in tx descriptor for STAs in dynamic SMPS modeIvo van Doorn3-1/+14
Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: Move USB tx/rx done handling to workqueueIvo van Doorn5-62/+128
Move all TX and RX completion handling into a work structure, which is handeled on the mac80211 workqueue. This simplifies the code in rt2x00lib since it no longer needs to check if the device is USB or PCI to decide which mac80211 function should be used. In the watchdog some changes are needed since it can no longer rely on the TX completion function to be run while looping through the entries. (Both functions now work on the same workqueue, so this would deadlock). So the watchdog now waits for the URB to return, and handle the TX status report directly. As a side-effect, the debugfs entry for the RX queue now correctly displays the positions of the INDEX and INDEX_DONE counters. This also implies that it is not possible to perform checks like queue_empty() and queue_full() on the RX queue. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-08-16rt2x00: do not shortcut rt2x00lib_config_antennaJohn W. Linville1-8/+0
This function was exiting early if the existing diversity settings were unchanged. Unfortunately, in some cases the antenna configuration is not initialized at all. https://bugzilla.kernel.org/show_bug.cgi?id=14751 Signed-off-by: John W. Linville <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Cc: Gertjan van Wingerde <[email protected]>
2010-08-16rt2x00: update fw version info in wiphy structJohn W. Linville1-0/+3
This makes the information available through ethtool... Signed-off-by: John W. Linville <[email protected]> Acked-by: Ivo van Doorn <[email protected]>
2010-08-04rt2x00: do not use PCI resources before pci_enable_device()Kulikov Vasiliy1-11/+10
IRQ and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. The semantic match that finds this problem is as follows: // <smpl> @@ identifier x; identifier request ~= "pci_request.*|pci_resource.*"; @@ ( * x->irq | * x->resource | * request(x, ...) ) ... *pci_enable_device(x) // </smpl> Signed-off-by: Kulikov Vasiliy <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-27rt2500usb: disallow to set WEP key with non zero indexStanislaw Gruszka1-0/+8
On our hardware (050d:7050 Belkin Components F5D7050 Wireless G Adapter), setting any WEP key with non zero index, cause rx frames corruption. Note: perhaps (I did not check) this can be fixed differently - by using hw_key_idx the same as true MAC key index. But according to the comment in rt2x00mac_set_key(): "the hardware requires keys to be assigned in correct order (When key 1 is provided but key 0 is not, then the key is not found by the hardware during RX)" this will be quite problematic. Since WEP should not be used, disabling hardware crypto offload for it will not hurt much. Beside static one key WEP will still be offloaded. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-27rt2500usb: truly disable encryption when initializeStanislaw Gruszka1-0/+1
Without cipher part nullify of TXRX_CSR0 register we can receive corrupted frames (removed IV or IVC), after reloading rt2500usb module with nohwcrypt=1 option, if previous some keys were configured into the hardware. Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-27rt2500usb: write keys to proper registersStanislaw Gruszka1-1/+1
Fix rt2500usb hardware encryption broken by commit 96b61bafe22b2f2abcc833d651739edb977f1b1e "rt2x00: Clean up USB vendor request buffer functions" Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-27Merge branch 'master' of ↵John W. Linville4-12/+12
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-26rt2x00: Fix regression for rt2500pciIvo van Doorn1-6/+13
Since commit: commit f1aa4c541e98afa8b770a75ccaa8504d0bff44a7 Author: Ivo van Doorn <[email protected]> Date: Tue Jun 29 21:38:55 2010 +0200 rt2x00: Write the BSSID to register when interface is added mananged mode in rt2500pci was broken, due to intf->bssid containing random data rather then the expected 00:00:00:00:00:00 This is corrected by sending the BSSID to rt2x00lib_config_intf only in AP mode where the bssid is set to a valid value. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-20Merge branch 'master' of ↵David S. Miller1-5/+5
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/vhost/net.c net/bridge/br_device.c Fix merge conflict in drivers/vhost/net.c with guidance from Stephen Rothwell. Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d since net-next-2.6 has fixes that make bridge netpoll work properly thus we don't need it disabled. Signed-off-by: David S. Miller <[email protected]>
2010-07-20rt2x00: correct sparse warning in rt2x00debug.cJohn W. Linville1-1/+1
CHECK drivers/net/wireless/rt2x00/rt2x00debug.c drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: warning: incorrect type in assignment (different base types) drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: expected restricted __le32 [usertype] chip_rev drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: got restricted __le16 [usertype] <noident> Signed-off-by: John W. Linville <[email protected]> Acked-by: Ivo van Doorn <[email protected]>
2010-07-16rt2x00: Fix lockdep warning in rt2x00lib_probe_dev()Stephen Boyd1-5/+5
The rt2x00dev->intf_work workqueue is never initialized when a driver is probed for a non-existent device (in this case rt2500usb). On such a path we call rt2x00lib_remove_dev() to free any resources initialized during the probe before we use INIT_WORK to initialize the workqueue. This causes lockdep to get confused since the lock used in the workqueue hasn't been initialized yet but is now being acquired during cancel_work_sync() called by rt2x00lib_remove_dev(). Fix this by initializing the workqueue first before we attempt to probe the device. This should make lockdep happy and avoid breaking any assumptions about how the library cleans up after a probe fails. phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device. INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 2027, comm: modprobe Not tainted 2.6.35-rc5+ #60 Call Trace: [<ffffffff8105fe59>] register_lock_class+0x152/0x31f [<ffffffff81344a00>] ? usb_control_msg+0xd5/0x111 [<ffffffff81061bde>] __lock_acquire+0xce/0xcf4 [<ffffffff8105f6fd>] ? trace_hardirqs_off+0xd/0xf [<ffffffff81492aef>] ? _raw_spin_unlock_irqrestore+0x33/0x41 [<ffffffff810628d5>] lock_acquire+0xd1/0xf7 [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e [<ffffffff8104f06e>] __cancel_work_timer+0xd0/0x17e [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e [<ffffffff8104f136>] cancel_work_sync+0xb/0xd [<ffffffffa0096675>] rt2x00lib_remove_dev+0x25/0xb0 [rt2x00lib] [<ffffffffa0096bf7>] rt2x00lib_probe_dev+0x380/0x3ed [rt2x00lib] [<ffffffff811d78a7>] ? __raw_spin_lock_init+0x31/0x52 [<ffffffffa00bbd2c>] ? T.676+0xe/0x10 [rt2x00usb] [<ffffffffa00bbe4f>] rt2x00usb_probe+0x121/0x15e [rt2x00usb] [<ffffffff813468bd>] usb_probe_interface+0x151/0x19e [<ffffffff812ea08e>] driver_probe_device+0xa7/0x136 [<ffffffff812ea167>] __driver_attach+0x4a/0x66 [<ffffffff812ea11d>] ? __driver_attach+0x0/0x66 [<ffffffff812e96ca>] bus_for_each_dev+0x54/0x89 [<ffffffff812e9efd>] driver_attach+0x19/0x1b [<ffffffff812e9b64>] bus_add_driver+0xb4/0x204 [<ffffffff812ea41b>] driver_register+0x98/0x109 [<ffffffff813465dd>] usb_register_driver+0xb2/0x173 [<ffffffffa00ca000>] ? rt2500usb_init+0x0/0x20 [rt2500usb] [<ffffffffa00ca01e>] rt2500usb_init+0x1e/0x20 [rt2500usb] [<ffffffff81000203>] do_one_initcall+0x6d/0x17a [<ffffffff8106cae8>] sys_init_module+0x9c/0x1e0 [<ffffffff8100296b>] system_call_fastpath+0x16/0x1b Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-13Merge branch 'master' of ↵John W. Linville22-476/+1019
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/wl12xx/wl1271_cmd.h
2010-07-12rt2x00: Move driver callback functions into the ops structureIvo van Doorn4-48/+36
All callback functions are gathered in rt2x00dev->ops except for the callback functions which are used in rt2800lib to acces rt2800pci/usb. Move the priv pointer from rt2x00dev to rt2x00dev->ops and rename it to drv to make it obvious that it is the driver callback structure. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Move common firmware loading into rt2800libIvo van Doorn4-211/+179
Large parts of the firmware initialization are shared between rt2800pci and rt2800usb. Move this code into rt2800lib. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Add missing TSF sync mode for AP operationHelmut Schaa3-4/+8
Currently rt2x00 uses the TSF_SYNC_BEACON mode for all beaconing interface types. However, TSF_SYNC_BEACON is meant for IBSS networks and thus implements TSF merging in the hardware. Rename TSF_SYNC_BEACON to TSF_SYNC_ADHOC to better express its purpose and introduce the missing TSF sync mode TSF_SYNC_AP_NONE which should be used for beaconing modes that don't need TSF merging. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Don't initialize beacon interval to 0 on rt2800 devicesHelmut Schaa1-1/+1
Activating the TBTT interrupt when a beacon interval of 0 is configured results in an interrupt storm causing the machine to hang. Hence, initialize the beacon interval to a reasonable default of 100TUs. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Remove set_tim callback from PCI driversHelmut Schaa4-4/+0
Using the set_tim callback without managing the DTIM count and the broad- and multicast buffering in hw, fw or the driver results in wrong DTIM count values being sent out in beacons. Since all PCI drivers fetch new beacons periodically and hence get an updated TIM we can just remove the set_tim callback from these. The rt2x00 USB drivers don't update the beacon periodically and thus rely on the set_tim callback to get a correct TIM for beacon transmission. USB devices still suffer from the DTIM count being wrong under some circumstances but removing the set_tim callback from these would cause more harm then good. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Use separate mac80211_ops for rt2800pci and rt2800usbHelmut Schaa4-37/+69
Use separate mac80211_ops for rt2800pci and rt2800usb in preparation for further fixes. This shouldn't introduce functional changes. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Use pretbtt irq for fetching beacons on rt2800pciHelmut Schaa5-10/+70
Updating the beacon on pre tbtt instead of beacondone allows much lower latency in regard to TIM updates. Hence, use the pre tbtt interrupt for updating the beacon in rt2800pci (older devices don't provide a pre tbtt interrupt). Also, add a new driver flag to indicate if a driver has pre tbtt support or not and implement the according behavior in rt2x00lib. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Implement broad- and multicast bufferingHelmut Schaa1-2/+30
Although mac80211 buffers broad- and mutlicast frames for us in AP mode we still have to send them out after a DTIM beacon. Implement this behavior by sending out the buffered frames when the beacondone interrupt is processed. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Allow beacon update without scheduling a workHelmut Schaa2-9/+30
Since all rt2x00 PCI drivers use threaded interrupts now we don't need to schedule a work just to update the beacon. The only place where the beacon still gets updated in atomic context is from the set_tim callback. Hence, move the work scheduling there. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Convert rt2x00 to use threaded interruptsHelmut Schaa11-70/+201
Use threaded interrupts for all rt2x00 PCI devices. This has several generic advantages: - Reduce the time we spend in hard irq context - Use non-atmic mac80211 functions for rx/tx Furthermore implementing broad- and multicast buffering will be much easier in process context while maintaining low latency and updating the beacon just before transmission (pre tbtt interrupt) can also be done in process context. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Make rt2800_write_beacon only export to GPLIvo van Doorn1-1/+1
rt2800_write_beacon is the only function which uses EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL. All symbols in rt2x00 should however use the GPL restricted export. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Implement watchdog monitoringIvo van Doorn11-3/+159
Implement watchdog monitoring for USB devices (PCI support can be added later). This will determine if URBs being uploaded to the hardware are actually returning. Both rt2500usb and rt2800usb have shown that URBs being uploaded can remain hanging without being released by the hardware. By using this watchdog, a queue can be reset when this occurs. For rt2800usb it has been tested that the connection is preserved even though this interruption. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Fix vgc_level_reg handlingIvo van Doorn3-8/+16
Currently vgc_level_reg and vgc_level are equal to eachother, while the purpose of vgc_level_reg is the value last written to the register and is remembered through link tuning resets. The vgc_level is the currently active level, which is reset during link tuning resets. The usage of these variables depends on the drivers, some drivers need both, while others need only one of the two. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Disable link tuning while scanningIvo van Doorn9-4/+47
While scanning the link tuner must be disabled. Otherwise it will interfere with receiving all beacons for each channel due to changing sensitivity levels. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Rename CONFIG_DISABLE_LINK_TUNINGIvo van Doorn9-17/+13
Rename CONFIG_DISABLE_LINK_TUNING to DRIVER_SUPPORT_LINK_TUNING Link tuning support is not only based on EEPROM decisions, but also if the device actually supports it. Currently only rt2500usb doesn't support link tuning because of hardware problems. But rt2800usb is also suspected of having problems with link tuning. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Convert AGC value from descriptor to RSSI (dBm)Ivo van Doorn5-10/+55
The RSSI values in the RXWI descriptor aren't true RSSI values. Instead they are more like the AGC values similar to rt61pci. And as such, it needs the same conversion before it can be passed to rt2x00lib/mac80211. This requires the struct queue_entry to be passed to rt2800_process_rxwi rather then the skb structure which is contained in the queue_entry. This is required to obtain the lna_gain information from the rt2x00_dev structure. This fixes connection problems when using wpa_supplicant which would try to connect to the worst AP's rather then the best ones. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-12rt2x00: Limit txpower by eeprom valuesHelmut Schaa2-53/+120
Limit the txpower per rate by the approriate values in the eeprom. This avoids too high txpower values resulting in bad tx performance. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-01Merge branch 'master' of ↵David S. Miller17-211/+222
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/libertas/host.h
2010-06-30rt2x00: Fix compile warning when debug disabledIvo van Doorn1-2/+1
CC [M] drivers/net/wireless/rt2x00/rt2800lib.o drivers/net/wireless/rt2x00/rt2800lib.c: In function 'rt2800_ampdu_action': drivers/net/wireless/rt2x00/rt2800lib.c:2821: warning: unused variable 'rt2x00dev' Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Always set BBP_CSR_CFG_BBP_RW_MODE to 1Ivo van Doorn1-4/+2
Latest rt2870 legacy driver also sets BBP_CSR_CFG_BBP_RW_MODE to 1 when reading or writing the EEPROM. This means we can make the BBP reading and writing completely equal on all platforms. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Fix antenna initializationIvo van Doorn1-3/+1
Legacy driver indicates that BBP1_TX_ANTENNA must be set to 0 for TXPATH values of 1 and 3. So the previous statement that nothing should be done for TXPATH = 3, is false. Furthermore, remove the false BBP3_RX_ANTENNA initialization when TXPATH is 1 for PCI and SOC devices. This field will always be overridden in the next switch statement, making this initialization bogus. History of this line indicates it was there from the beginning, and was once caught as typo. Instead of replacing the line with the correct line, the correct line was added... Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Fix IEEE80211_HT_CAP_RX_STBC assignmentIvo van Doorn1-2/+5
IEEE80211_HT_CAP_RX_STBC is a 2 bit flag, and should thus never be set as normal flag. Instead we must read the number of RX paths from the EEPROM and set the IEEE80211_HT_CAP_RX_STBC with the correct value (using the same logic as the number of TX streams). Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: fix beacon reset on rt2800Helmut Schaa1-18/+24
When an interface is removed the according beacon entry should be reset. The current approach to only clear the first word is not enough to stop the device from sending out the beacon, hence resulting in beacons being sent out for already removed interfaces. Fix this by invalidating the entire TXWI in front of the beacon instead of only the first word. Also clear all beacons during startup in the same way. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>