aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00
AgeCommit message (Collapse)AuthorFilesLines
2010-06-30rt2x00: Disable link tuning in AP modeHelmut Schaa1-4/+4
Since the link tuning is based on average RSSI values taken from all received frames it doesn't make sense to enable it in AP mode where every associated station provides independent RSSI values. Furthermore the legacy drivers don't enable link tuning in AP mode as well. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Fix beacon updates in rt61pciHelmut Schaa1-0/+6
Fix rt61pci beacon updates in the same way as rt2800pci. rt61pci didn't update the beacon template after each beacon interval, resulting in the DTIM count being incorrect (if DTIM period > 1). Fix this by calling rt2x00lib_beacondone after the current beacon was sent out. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Fix beacon updates in rt2800pciHelmut Schaa1-0/+6
rt2800pci didn't update the beacon template after each beacon interval, resulting in the DTIM count being incorrect (if DTIM period > 1). Fix this by calling rt2x00lib_beacondone after the current beacon was sent out. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Enable multiBSS in rt2800Ivo van Doorn1-2/+2
MAC_BSSID_DW1_BSS_ID_MASK must be set to the mask 3, to enable 8 BSSID's. The MAC_BSSID_DW1_BSS_BCN_NUM is initialized to 7 to enable the 8 beacons. Signed-off-by: Ivo van Doorn <[email protected]> Tested-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Align rt2800 EEPROM validation to Ralink vendor driver.Gertjan van Wingerde1-1/+7
Align with the latest versions of the Ralink legacy driver(s). Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Correctly detect 93C86 EEPROMs in rt2800pci.Gertjan van Wingerde1-2/+12
Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.Gertjan van Wingerde2-7/+13
Align with the way PCI devices are handled, even though it is not strictly necessary. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Rename driver write_tx_datadesc callback function.Gertjan van Wingerde3-10/+8
Now that the {usb,pci} specific write_tx_data functions are no longer present we can rename the write_tx_datadesc callback function back to its old name. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Move common txdone handling to rt2x00lib_txdone.Gertjan van Wingerde8-55/+20
Now that the write_tx_data functions are merged, also merge the relevant parts of the txdone handling into common code, rather than {usb,pci} specific code. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Merge PCI and USB versions of write_tx_data into single function.Gertjan van Wingerde12-93/+41
Now that rt2x00pci_write_tx_data and rt2x00usb_write_tx_data are similar we can merge them in a single function in rt2x00queue.c. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Move filling of TX URB to rt2x00usb_kick_tx_entry function.Gertjan van Wingerde1-16/+17
There is no need to fill the TX URB this early, and moving it to the rt2x00usb_kick_tx_entry function allows us to merge the PCI and USB variants of the write_tx_data function. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Fix frame dumping for USB devices.Gertjan van Wingerde1-0/+6
We forgot to clear the SKBDESC_DESC_IN_SKB when the descriptor was removed from the front of the skb. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Remove unneeded variableIvo van Doorn1-5/+2
The update_bssid is set only when BSS_CHANGED_BSSID is used, but the check if that field is true is done later in the function but also only when BSS_CHANGED_BSSID is set. This makes the variable useless, as it can never result in a negative check. 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-06-30rt2x00: Write the BSSID to register when interface is addedIvo van Doorn1-1/+2
For the Master mode case, we initialized the BSSID as the MAC address, but never wrote it into the registers. This causes Hardware crypto to break in Master mode when receiving frames which require the BSSID to be filled in. This is safe for STA mode since the BSSID will be initialized to 00:00:00:00:00 at this point, but will be set to the correct value later when the device associates. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30rt2x00: Implement tx mpdu aggregationHelmut Schaa2-1/+48
In order to implement tx mpdu aggregation we only have to implement the ampdu_action callback such that mac80211 allows negotiation of blockack sessions. The hardware will handle everything on its own as long as the ampdu flag in the TXWI struct is set up correctly and we translate the tx status correctly. For now, refuse requests to start rx aggregation. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-24rt2500usb: fallback to SW encryption for TKIP+AESOndrej Zary1-0/+10
HW crypto in rt2500usb does not seem to support keys with different ciphers, which breaks TKIP+AES mode. Fall back to software encryption to fix it. This should fix long-standing problems with rt2500usb and WPA, such as: http://rt2x00.serialmonkey.com/phpBB/viewtopic.php?f=4&t=4834 https://bugzilla.redhat.com/show_bug.cgi?id=484888 Also tested that it does not break WEP, TKIP-only and AES-only modes. Signed-off-by: Ondrej Zary <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-17Merge branch 'master' of ↵David S. Miller9-54/+127
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2010-06-15rt2x00: Synchronize WCID initialization with legacy driverIvo van Doorn2-9/+26
Legacy rt2870 driver handles WCID differently then we expected, the BSSID and Cipher value are 3 bit values, while the 4th bit should be set elsewhere in an extended field. After this, rt2800usb reports frames have been decrypted successfully, indicating that the Hardware decryption now is working correctly. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Enable HW crypto by defaultIvo van Doorn2-2/+2
Hardware cryptography seems to be working on a 11G network with WPA/WPA2 cryptography enabled. WEP still needs to be tested... Signed-of-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Limit TX done looping to number of TX ring entriesIvo van Doorn1-14/+9
Similar to rt2800pci, remove the check for duplicate register reading, and instead limit the for-loop to the maximum number of TX entries inside a queue. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Update author rt2800libIvo van Doorn1-5/+6
rt2800lib has been under development of the rt2x00 project, so add it to the author string for the module information. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Enable fallback rates for rt61pci and rt73usbIvo van Doorn2-0/+25
Explicitly enable the usage of fallback rates for the transmission of frames with rt61pci and rt73usb hardware. Note that for txdone reporting, only rt61pci is capable of reporting the fallback rates, for USB it is not possible to determine the number of retries. However the device will use the fallback rates, so it might still help in the performance. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Fix tx status reporting when falling back to the lowest rateHelmut Schaa1-1/+12
In some corner cases the reported tx rates/retries didn't match the really used ones. The hardware lowers the tx rate on each consecutive retry by 1 (but won't fall back from MCS to legacy rates) _until_ it reaches the lowest one. In case the frame wasn't sent succesful the number of retries is 7 and if a rate index <7 was used the previous code reported negative rate indexes which were then ignored by the rate control algorithm and mac80211. Instead, report the remaining number of retries to have happened with the lowest rate (index 0). This should give the rate control algorithm slightly more accurate information about the used tx rates/retries. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: provide mac80211 a suitable max_rates valueHelmut Schaa1-0/+12
Set up max_rates and max_rate_tries with suitable values even if we do not support the whole functionality. As rt2800 has a global fallback table we cannot specify more then one tx rate per frame but since the hw will try several different rates (based on the fallback table) we should still initialize max_rates to the maximum number of rates we are going to try. Otherwise mac80211 will truncate our reported tx rates and the rc algortihm will end up with incorrect data choosing unsuitable rates for tx. This improves throughput on rt2800 devices considerable. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Fix typo in rt2800_config_txpowerHelmut Schaa1-1/+1
Fix typo in rt2800_config_txpower. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Fix TX_STA_FIFO handlingHelmut Schaa1-14/+9
Currently rt2800pci will read TX_STA_FIFO until the previously read value matches the current value. However, it is obvious that TX_STA_FIFO only contains values that can easily be the same for multiple consecutive frames (especially when communicating with only one other STA). Hence, we often ended up with reading only the first entry and ignoring the rest. One result was that when the TX_STA_FIFO contained multiple entires, only the first one was read and properly handled while the others remained in the tx queue. Thus, drop this check but introduce a maximum number of reads. All legacy drivers use the size of the tx ring as limit but state that the TX_STA_FIFO has only 16 entries. So, let's just stick with the tx ring size for now. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Add comment about BBP1_TX_POWERHelmut Schaa1-1/+3
Add a comment about the meaning of BBP1_TX_POWER stating all possible values. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: Fix IEEE80211_TX_CTL_MORE_FRAMES handlingHelmut Schaa1-2/+7
IEEE80211_TX_CTL_MORE_FRAMES indicates that more frames are queued for tx but has nothing to do with fragmentation. Hence, don't set ENTRY_TXD_MORE_FRAG but only ENTRY_TXD_BURST to not kick the tx queues immediately. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: only set TXDONE_FALLBACK in rt2800pci if the frame was retriedHelmut Schaa1-2/+6
TXDONE_FALLBACK expresses that fallback rates were used for retries. Hence, it only makes sense to set the flag if retries > 0. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: don't use TXDONE_FALLBACK as success indicatorHelmut Schaa1-2/+1
TXDONE_FALLBACK doesn't express if the frame was sent successful or not. It only tells us that the hw used fallback rates for retries. Hence, don't use TXDONE_FALLBACK as success indicator. Before this patch we reported success to the rate control algorithm which was wrong in a number of cases and might have lead to improper tx rate selections. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-15rt2x00: clarify meaning of txdone flagsHelmut Schaa1-1/+8
Update the documentation of the available txdone flags to better express how they should be used. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-11Merge branch 'master' of ↵David S. Miller24-415/+478
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/wl12xx/wl1271.h drivers/net/wireless/wl12xx/wl1271_cmd.h
2010-06-03drivers/net: use __packed annotationEric Dumazet3-7/+7
cleanup patch. Use new __packed annotation in drivers/net/ Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-03rt2x00: Remove suspicious register writeHelmut Schaa1-1/+0
Remove suspicious register write as the reg variable is never filled with an TX_SW_CFG2 associated value before. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: fix use of mcs ratesHelmut Schaa1-3/+12
In case of mcs rates txrate->idx contains the mcs index to be used for transmission. Previously the mcs values dedicated for legacy rates where used for mcs transmissions which resulted in the use of mcs 0 in a number of cases (e.g. for all mcs rates >= 15 as rt2x00 does not register legacy rates with indexes >= 15). Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Update TX_SW_CFG initvals for 305x SoCHelmut Schaa1-0/+4
Update TX_SW_CFG initvals for 305x SoC to match with the appropriate legacy driver. Signed-off-by: Helmut Schaa <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Use IEEE80211_TX_CTL_STBC flagIvo van Doorn1-1/+3
Use the IEEE80211_TX_CTL_STBC flag to determine the correct value to be used for the STBC field in the TX descriptor Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: rt2800: disable TX STBC for 1 stream devicesHelmut Schaa1-1/+4
Disable TX STBC for 1 stream devices as a minimum of 2 streams is needed for TX STBC. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Fix HT40 operation in rt2800.Gertjan van Wingerde4-8/+46
Closer inspection of the legacy Ralink driver reveals that in case of HT40+ or HT40- we must adjust the frequency settings that we program to the device. Implement the same adjustment in the rt2x00 code. With this HT40 seems to work for all devices supported by rt2800pci and rt2800usb. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Sync rt2800 MCU boot signal with Ralink driver.Gertjan van Wingerde2-2/+2
Latest versions of the Ralink rt2800 family drivers use 0 as the token value, not 0xff. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Move PCI/USB specific register initializations to rt2800{pci,usb}.Gertjan van Wingerde4-57/+87
This prevents us having common code depend on PCI or USB specific code. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Simplify check for external LNA in rt2800_init_rfcsr.Gertjan van Wingerde1-2/+1
Instead of parsing the EEPROM information, use the flag that was set during device initialization. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Introduce separate interface type for PCI-express.Gertjan van Wingerde2-2/+12
Needed later for PCI-express specific code in rt2800pci. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Move all register definitions for rt2800 to rt2800.h.Gertjan van Wingerde4-59/+51
There is no point on having them separated across 3 files. At the same time rename USB_CYC_CFG to its proper name US_CYC_CNT (as per the datasheet). Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Remove RT2870 chipset identification.Gertjan van Wingerde3-7/+2
There is no evidence, either in adapters or in the Ralink code, that such a device actually exists. All so-call RT2870 adapter identify themselves as RT2860. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Centralize rt2800 beacon writing.Gertjan van Wingerde4-124/+65
The beacon writing functions of rt2800pci and rt2800usb are now identical. Move them to rt2800lib to only have one central function. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Clean up USB vendor request buffer functions.Gertjan van Wingerde5-87/+14
There is no need to force the separation between a buffer USB vendor request that does fit the CSR cache and one that doesn't onto the callers. This is something that the rt2x00usb_vendor_request_buff function can figure out by itself. Combine the rt2x00usb_vendor_request_buff and rt2x00usb_vendor_request_large_buff functions into a single one, as both of them were equivalent for small buffers anyway. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Fix rt2800usb TX descriptor writing.Gertjan van Wingerde1-1/+1
The recent changes to skb handling introduced a bug in the rt2800usb TX descriptor writing whereby the length of the USB packet wasn't calculated correctly. Found via code inspection, as the devices themselves didn't seem to mind. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Properly reserve room for descriptors in skbs.Gertjan van Wingerde16-79/+109
Instead of fiddling with the skb->data pointer and thereby risking out of bounds accesses, properly reserve the space needed in an skb for descriptors. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>
2010-06-03rt2x00: Reverse calling order of bus write_tx_desc and driver write_tx_desc.Gertjan van Wingerde4-11/+18
For rt2800 reverse the calling order of rt2x00pci_write_data and rt2800pci_write_data. Currently rt2800pci_write_data calls rt2x00pci_write_data as there can be only 1 driver callback function specified by the driver. Reverse this calling order by introducing a new driver callback function, called write_tx_datadesc, which is called from the bus-specific write_tx_data functions. Preparation for futher cleanups in the skb data handling of rt2x00. Signed-off-by: Gertjan van Wingerde <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]>