aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-07-07ath9k: fix a buffer leak in A-MPDU completionmaster-2010-07-07Felix Fietkau
When ath_tx_complete_aggr() is called, it's responsible for returning all buffers in the linked list. This was not done when the STA lookup failed, leading to a race condition that could leak a few buffers when a STA just disconnected. Fix this by immediately returning all buffers to the free list in this case. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-07ath9k: fix a potential buffer leak in the STA teardown pathFelix Fietkau
It looks like it might be possible for a TID to be paused, while still holding some queued buffers, however ath_tx_node_cleanup currently only iterates over active TIDs. Fix this by always checking every allocated TID for the STA that is being cleaned up. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-07NET: nl80211, fix lock imbalance and netdev referencingJiri Slaby
Stanse found that nl80211_set_wiphy imporperly handles a lock and netdev reference and contains unreachable code. It is because there return statement isntead of assignment to result variable. Fix that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jouni Malinen <j@w1.fi> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-06wl12xx: Use MODULE_ALIAS macro at correct postion for SPI busmaster-2010-07-06Ameya Palande
(Changed title, was "wl1251: Use MODULE_ALIAS macro at correct postion for SPI bus". -- JWL) Signed-off-by: Ameya Palande <ameya.palande@nokia.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-06Merge branch 'wireless-next-2.6' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
2010-07-02iwlwifi: adding enhance sensitivity table entriesWey-Yi Guy
For newer devices (6000g2a and 6000g2b), the sensitivity table send to uCode require additional table entries to help sensitivity calibration. All the additional entries has fix data for now, but do expect the value will be change in the future when device become more stable. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-07-02iwlwifi: generic parameter define for _agn deviceWey-Yi Guy
Code clean up to change name from having 5000 as part of name which easy to confuse and think it is for 5000 series devices to more generic _agn name since it is being used by multiple _agn devices. No functional changes. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: debugfs file for txfifo command testingWey-Yi Guy
Add debugfs file for REPLY_TXFIFO_FLUSH host command testing. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: add support for device tx flush requestWey-Yi Guy
"Flush" request can come from two different sources, it can either from mac80211, or from device when the operation is needed. Here adding the support for device issue "flush" request. When receive tx complete with status is TX_STATUS_FAIL_RFKILL_FLUSH, issue REPLY_TXFIFO_FLUSH command to uCode to flush out all the tx frames in queues. In this condition, since mac80211 has no knowledge of "flush" operation, driver need to stop all the tx queues and wait for the operation completed before wake up the queues for frames transmission. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: add mac80211 flush callback supportWey-Yi Guy
Adding flush callback support in the driver. Two type of flush can be issued by mac80211: 1. drop = true: frame drop is ok, issue REPLY_TXFIFO_FLUSH host command to uCode to drop all the frames in tx fifo queues; then return the control back to mac80211 2. drop = false: wait for either all the frames in tx fifo queues been transmitted, or timeout; then return the control back to mac80211 If the flush request coming from mac80211, mac80211 will make sure there are no additional frames push down to driver before flush operation is completed. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: tx fifo queue flush commandWey-Yi Guy
Add host command and structure for tx fifo queue flush Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: add debug print for parsing firmware TLVWey-Yi Guy
When parsing TLV during loading firmware, if encounter any TLV error, log the error message to help debugging. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02iwlwifi: fix fw_restart module parameterWey-Yi Guy
fw_restart module parameter was broken by the recent check for stuck queue patch, driver check the fx_restart module parameter before reload the firmware; but the stuck queue timer kick in after firmware error and reload the firmware even fw_restart=0. In this case, driver should not reload the firmware, it is important to help debugging uCode error. The only case we can ignore the module parameter is when user request firmware reload from debugfs, which can bypass the checking and perform firmware reload all the time. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-07-02minstrel_ht: fix check for downgrading of top2 ratemaster-2010-07-02Ming Lei
The check should be against current top2 rate, instead of current top rate. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02minstrel_ht: fix updating rate with best probabilityMing Lei
The throughput should be considered when updating rate with best probability. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02ath9k: fix crash with WEP in ad-hoc modeFelix Fietkau
Commit eed8e22f0133e8278b1f8079fcb452f1f9692f9d added support for using multicast key lookup to support per-vif/sta keys for AP and ad-hoc. Unfortunately, it also introduced a crash in ad-hoc mode when the sta pointer is NULL, which happens when setting up an interface with WEP keys. This patch fixes it by falling back to the assigned key index. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reported-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02ath9k: fix false positives in the baseband hang checkFelix Fietkau
ath9k_hw_check_alive() occasionally returns false, as the hardware is still processing data in a specific state. Fix this issue by repeating the test a few times with longer delay inbetween attempts. This gets rid of excessive hardware resets that appear frequently on some AR9132 based devices, but could also happen on AR9280. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reported-by: Björn Smedman <bjorn.smedman@venatech.se> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02ath9k_hw: clean up the noise floor calibration code to reduce code duplicationFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02ath9k_hw: sanitize noise floor values properly on all chipsFelix Fietkau
This refactors the noise floor range checks to make them generic, and adds proper ranges for each supported chip type. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02ath9k_hw: sync initvals for ar9001 and ar9002 with AtherosFelix Fietkau
This includes the following changes/fixes: - a bugfix for stuck beacon issues - timing changes for improved performance - AGC setting improvements - fixes for high temperature issues on some chips Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02ath9k_hw: reformat the ar5008, ar9001 and ar9002 initvals to match ar9003Felix Fietkau
This format is generated by the initval tool, available at: git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/initvals-tool.git Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02ath9k_hw: fix a few inconsistencies in initval array namesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30ath9k_htc: Add LED support for AR7010master-2010-07-01master-2010-06-30Sujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30mac82011: Allow selection of minstrel_ht as default rc algorithmHelmut Schaa
Allow selection of minstrel_ht as default rate control algorithm. At the moment minstrel_ht can only be requested by the driver code but not selected as default in make menuconfig. Fix this by using minstrel_ht when minstrel was selected as default and minstrel_ht is available. This change won't affect legacy devices as minstrel_ht falls back to minstrel in that case. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30ath9k: fix TSF after reset on AR913xFelix Fietkau
When issuing a reset, the TSF value is lost in the hardware because of the 913x specific cold reset. As with some AR9280 cards, the TSF needs to be preserved in software here. Additionally, there's an issue that frequently prevents a successful TSF write directly after the chip reset. In this case, repeating the TSF write after the initval-writes usually works. This patch detects failed TSF writes and recovers from them, taking into account the delay caused by the initval writes. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reported-by: Björn Smedman <bjorn.smedman@venatech.se> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Fix compile warning when debug disabledIvo van Doorn
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 <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Always set BBP_CSR_CFG_BBP_RW_MODE to 1Ivo van Doorn
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 <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Fix antenna initializationIvo van Doorn
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 <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Fix IEEE80211_HT_CAP_RX_STBC assignmentIvo van Doorn
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 <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: fix beacon reset on rt2800Helmut Schaa
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 <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Disable link tuning in AP modeHelmut Schaa
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 <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Fix beacon updates in rt61pciHelmut Schaa
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 <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Fix beacon updates in rt2800pciHelmut Schaa
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 <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Enable multiBSS in rt2800Ivo van Doorn
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 <IvDoorn@gmail.com> Tested-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Align rt2800 EEPROM validation to Ralink vendor driver.Gertjan van Wingerde
Align with the latest versions of the Ralink legacy driver(s). Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Correctly detect 93C86 EEPROMs in rt2800pci.Gertjan van Wingerde
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30eeprom_93cx6: Add support for 93c86 EEPROMs.Gertjan van Wingerde
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.Gertjan van Wingerde
Align with the way PCI devices are handled, even though it is not strictly necessary. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Rename driver write_tx_datadesc callback function.Gertjan van Wingerde
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 <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Move common txdone handling to rt2x00lib_txdone.Gertjan van Wingerde
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 <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Merge PCI and USB versions of write_tx_data into single function.Gertjan van Wingerde
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 <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Move filling of TX URB to rt2x00usb_kick_tx_entry function.Gertjan van Wingerde
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 <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Fix frame dumping for USB devices.Gertjan van Wingerde
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 <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Remove unneeded variableIvo van Doorn
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 <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Write the BSSID to register when interface is addedIvo van Doorn
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 <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-30rt2x00: Implement tx mpdu aggregationHelmut Schaa
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 <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-29ath9k: make ath9k_hw_keysetmac staticJohn W. Linville
Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-29ath9k: remove unused function ath9k_hw_keyisvalidJohn W. Linville
Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-29mac80211: add basic tracing to drv_get_surveyJohn W. Linville
Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-29mac80211: remove unnecessary check in ieee80211_dump_surveyJohn W. Linville
This check is duplicated in drv_get_survey. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>