summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* carl9170: firmware parser and debugfs codeChristian Lamparter2010-09-143-0/+1437
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: 802.11 rx/tx processing and usb backendChristian Lamparter2010-09-143-0/+3419
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: PHY/RF and MAC routinesChristian Lamparter2010-09-142-0/+2409
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: Register maps, tx/rx descriptor formats and eeprom layoutChristian Lamparter2010-09-146-0/+2436
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: mac80211 glue and command interfaceChristian Lamparter2010-09-146-0/+3024
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove code repetitionWey-Yi Guy2010-09-111-32/+28Star
| | | | | | Move the duplicated code into single static function. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: make sure runtime calibration is enabled after associationWey-Yi Guy2010-09-111-2/+1Star
| | | | | | | | | Clear the "start calib" flag only for new association, The flag will be set in post_associate function to trigger the runtime calibration. Set this flag to "0" will stop the runtime sensitivity calibration Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: fix and describe iwl_adjust_beacon_intervalJohannes Berg2010-09-112-4/+25
| | | | | | | | | | | | | | | | The iwl_adjust_beacon_interval function is a bit of black magic, so add comments to it describing what it does. Also, in the case when there's no beacon interval set, program the default into the device (instead of adjusting, which results in the max) since using the max in that case interacts badly with dual-mode/PAN parameters. Also update the PAN parameters accordingly and use the same constant as here. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: improve timing handling with dual-modeJohannes Berg2010-09-111-1/+13
| | | | | | | | | | | In dual-mode, a number of scenarios need to be considered, and the firmware can be very picky about them. Adjust the timing (most importantly the beacon interval) according to the different modes. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: avoid sending too many commandsJohannes Berg2010-09-114-1/+33
| | | | | | | | | | | | When the PAN context is unused, there's no need to continually update it in the device. So track which contexts are active (with the special case that the WLAN context is always active ...) and only send their commands to the device when needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: allow configure protection modeWey-Yi Guy2010-09-111-0/+40
| | | | | | | Even driver use rts/cts protection mode for aggregation packets by default. Allow the protection mode to be configure through debugfs Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: implement beacon interval changeJohannes Berg2010-09-111-3/+2Star
| | | | | | | | | When the beacon interval needs to be changed, all we need to do is send updated timing to the device. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: fix PAN parameters while scanningJohannes Berg2010-09-111-0/+5
| | | | | | | | | | When only the PAN side was active, we gave no time to the WLAN context, which is OK unless we are scanning, which always happens on the WLAN context. Fix this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: remember the last uCode sysassert error codeWey-Yi Guy2010-09-114-6/+4Star
| | | | | | | | When sysassert happen, uCode will report the error code, driver dump the information to dmesg. Here also remember the last error code for future reference. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: fix default LQ table in 5.2 bandTomas Winkler2010-09-112-20/+8Star
| | | | | | | | | | | | | | | | | | | | | The default LQ is filled decreasingly using iwl_get_prev_ieee_rate from a starting rate. Since the starting rate is already the lowest one for a specific band it should be actually filled evenly with the starting rate: 1M and 6M for 5.2GHZ and 2.4GH respectively. The bug is that for for A or G-only it decreases to CCK rates which are not supported. iwl_get_prev_ieee_rate function is just not band aware. This affects broadcast station which lq table is not updated by rs algorithm G-only scenario is not treated by this patch iwl_get_prev_ieee_rate is removed completely as it is not used in other contexts Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* drivers/net/wireless/iwlwifi/iwl-agn.c: Fix return value from an unsigned ↵Julia Lawall2010-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function The function has an unsigned return type, but returns a negative constant to indicate an error condition. Another error condition in the same function is indicated by returning 0, and indeed the only call to the function checks for 0 to detect errors, so the return of a negative value it converted to a return of 0. A sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ identifier f; constant C; @@ unsigned f(...) { <+... * return -C; ...+> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54spi: Add error message for eeprom failureMichael Büsch2010-09-071-0/+2
| | | | | | | | | | This adds an error message for the eeprom request failure case. This way it's easier for the user to figure out what went wrong. Signed-off-by: Michael Büsch <mb@bu3sch.de> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Restore ANI registers to default during partial reset for AR9271Rajkumar Manoharan2010-09-073-0/+53
| | | | | | | | | For AR9271 chips, if partial reset is done while scanning, the cycpwrThr1 will be set to maximum. This causes the degrade in DL throughput. So restore the ANI registers to default during the partial reset. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Enable fastcc for HTC devices.Rajkumar Manoharan2010-09-071-4/+3Star
| | | | | | | By enabling fastcc, the scan time reduced to half. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Implement an algorithm for Antenna diversity and combiningVasanthakumar Thiagarajan2010-09-073-0/+604
| | | | | | | | | | This algorithm chooses the best main and alt lna out of LNA1, LNA2, LNA1+LNA2 and LNA1-LNA2 to improve rx for single chain chips(AR9285). This would greatly improve rx when there is only one antenna is connected with AR9285. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Add functions to get/set antenna diversity configurationVasanthakumar Thiagarajan2010-09-073-0/+47
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Add capability flag for Antenna diversity and combining featureVasanthakumar Thiagarajan2010-09-074-0/+16
| | | | | | | This is enabled only for ar9285. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: make strings constStephen Hemminger2010-09-071-4/+4
| | | | | | | Make read/only data structures const. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ray_cs: make data constStephen Hemminger2010-09-071-8/+8
| | | | | | | | Make the startup and other data parameters that are read/only const. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: open/close envlope to force move BT state machineWey-Yi Guy2010-09-033-21/+31
| | | | | | | | | | | | | | | In uCode, BT state machine need to receive open envlope command before perform calibration; followed by close envlope command to move to next stage. Since Linux has two separated uCode, one for init and the second one for runtime; we use open envlope commands for init uCode to indicate we are ready to perform calibration operation. But for runtime uCode, we are not doing any init calibration, so we issue open/close envlope commands to force uCode move to "BT COEX ON" state. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* mac80211: only cancel software-based scans on suspendJohn W. Linville2010-09-012-1/+8
| | | | | | | | | Otherwise the hardware scan handler could access an invalid scan request structure. The driver should cancel any pending hardware scans during the suspend process anyway, so also add a warning if the hardware scan is still pending when the device resumes. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: cancel scan in ieee80211_restart_hw if software scan pendingJohn W. Linville2010-08-311-1/+7
| | | | | | | | | | | This function exists to clean-up after a hardware error or something similar. The restart is accomplished using the same infrastructure used to resume after a suspend. The suspend path cancels running scans, so it seems appropriate to do that here as well for software-based scans. If a hardware-based scan is pending, issue a warning message since this indicates that the drivers has failed to clean-up after itself. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rt2x00: Cleanup rt2x00usb_watchdog_reset_txIvo van Doorn2010-08-311-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | rt2x00usb_watchdog_reset_tx performs the same task as rt2x00usb_kill_tx_queue, with the only difference is that it waits for all entries to be returned to the driver and for all frames the status has been reported to mac80211. We can easily split this task by calling rt2x00usb_kill_tx_queue, sleep for a short period and invoke the TX status reporting function. By adding the sleep() to the kill_entry we make sure that even during shutdown we guarentee the entry has been killed when the function returns. To make this work correctly the interrupt handlers have to be updated to prevent checking for the RADIO_ENABLED flag too early which prevents the ownership of the entry to be reset. Additionally a check for the DEVICE_PRESENT flag is not required but is nice to prevent race conditions when the device was unplugged. Additionally rather then calling rt2x00usb_work_txdone() for status reporting we let the driver perform the TX status reporting first. If this is not sufficient then rt2x00usb_work_txdone() will still be used to cleanup the mess. 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>
* rt2x00: Split watchdog check into a DMA and STATUS timeoutIvo van Doorn2010-08-316-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | The watchdog for rt2800usb triggers frequently causing all URB's to be canceled often enough to interrupt the normal TX flow. More research indicated that not the URB upload to the USB host were hanging, but instead the TX status reports. To correctly detect what is going on, we introduce Q_INDEX_DMA_DONE which is an index counter between Q_INDEX_DONE and Q_INDEX and indicates if the frame has been transfered to the device. This also requires the rt2x00queue timeout functions to be updated to differentiate between a DMA timeout (time between Q_INDEX and Q_INDEX_DMA_DONE timeout) and a STATUS timeout (time between Q_INDEX_DMA_DONE and Q_INDEX_DONE timeout) All Q_INDEX_DMA_DONE code was taken from the RFC from Helmut Schaa <helmut.schaa@googlemail.com> for the implementation for watchdog for rt2800pci. 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>
* rt2x00: Correctly kill beacon queueIvo van Doorn2010-08-313-3/+27
| | | | | | | | | | | | | USB devices upload their beacon and then automatically send it out every beacon interval. However when killing a TX queue we only kill the URB and not the actual transmission of the beacon. This will reset the Beacon register to prevent any beacons from being transmitted. 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>
* rt2x00: Set PWR_PIN_CFG during initializationIvo van Doorn2010-08-311-0/+2
| | | | | | | | | Add PWR_PIN_CFG initialization for rt2800usb at the same point as rt2800pci. 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>
* rt2x00: Don't set unicast/BSSID masks when clearning MAC or BSSIDIvo van Doorn2010-08-311-7/+11
| | | | | | | | | | When configuring the MAC_ADDR or MAC_BSSID with an empty address, the UNICAST_TO_ME_MASK and BSS_ID_MASK must also be reset to prevent invalid interpretation of the addresses. 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>
* rt2x00: Wakeup hardware before loading firmwareIvo van Doorn2010-08-312-2/+6
| | | | | | | | | | | | | According to the legacy drivers the AUTOWAKEUP_CFG register must be reset to 0 before loading the firmware. Instead of during rt2800{pci,usb}_write_firmware it must actually be done in rt2800_load_firmware() before resetting the WPDMA_GLO_CFG and PWR_PIN_CFG registers. 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>
* rt2x00: Validate TX status results with current data entryIvo van Doorn2010-08-311-23/+50
| | | | | | | | | | | | | | | Instead of printing a warning when the PID, ACK, or WCID of an entry don't match the TX status report, we should skip the entry to search for the entry which actually does match the TX status data. This reduces the number of watchdog errors on the TX queues for rt2800usb, and seems to improve the reliability of the TX flow a bit. 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>
* rt2x00: Add rt2800_wait_csr_readyIvo van Doorn2010-08-313-21/+20Star
| | | | | | | | | | Similar to rt2800_wait_wpdma_ready() we can add a function to waiting until the CSR is ready. This centralizes some additional code into rt2800lib. 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>
* rt2x00: Update rt2800 comments regarding AMPDU and PACKET_ID in TXWIHelmut Schaa2010-08-311-1/+5
| | | | | | 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>
* rt2x00: Rename txentry_desc.queue -> txentry_desc.qidHelmut Schaa2010-08-315-8/+8
| | | | | | | | | Variables containing queue ids are called qid everywhere else, hence rename the queue field in txentry_desc to qid 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>
* ath9k: fix spurious MIC failure reportsFelix Fietkau2010-08-314-9/+25
| | | | | | | | | | | | | According to the hardware documentation, the MIC failure bit is only valid if the frame was decrypted using a valid TKIP key and is not a fragment. In some setups I've seen hardware-reported MIC failures on an AP that was configured for CCMP only, so it's clear that additional checks are necessary. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net/wireless: Remove double testJulia Lawall2010-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The same expression is tested twice and the result is the same each time. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @expression@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl1251: Fix queue stopping/waking for TX pathDenis 'GNUtoo' Carikli2010-08-313-13/+24
| | | | | | | | | | | | | | This patch was adapted from 06f7bc7db79fabe6b2ec16eff0f59e4acc21eb72 (from linus's linux-2.6 tree of kernel.org) here's the original message: The queue stopping/waking functionality was broken in a way that could cause huge latencies in TX transfers and even cause the TX to stall in the right circumstances. Correct these problems. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Acked-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Do not generate CQM events based on first Beacon framesJouni Malinen2010-08-312-0/+16
| | | | | | | | | | The signal strength value in a single RX frame is not that reliable, so it is better to delay start of CQM events until there is a real average signal strength from more than a single Beacon frame available. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Fix signal strength average initialization for CQM eventsJouni Malinen2010-08-311-1/+1
| | | | | | | | | | | | | | | The ave_beacon_signal value uses 1/16 dB unit and as such, must be initialized with the signal level of the first Beacon frame multiplied by 16. This fixes an issue where the initial CQM events are reported incorrectly with a burst of events while the running average approaches the correct value after the incorrect initialization. This could cause user space -based roaming decision process to get quite confused at the moment when we would like to go through authentication and DHCP. Cc: stable@kernel.org Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'wireless-next-2.6' of ↵John W. Linville2010-08-3129-849/+1658
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
| * iwlwifi: allow using multiple contextsJohannes Berg2010-08-275-40/+82
| | | | | | | | | | | | | | | | | | | | | | We're now ready to start using multiple contexts. We do this by keeping track of the valid interface types per context (exclusive [ibss] and normal) and checking which context is "free" when a new interface is added. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: follow main beacon intervalJohannes Berg2010-08-271-2/+9
| | | | | | | | | | | | | | | | | | | | | | It is necessary that the PAN context always use the same beacon interval as the BSS context unless it is in dual-station mode, ie. the PAN context is a station as well, so implement that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: always send RXON timingJohannes Berg2010-08-271-1/+2
| | | | | | | | | | | | | | | | | | The PAN context requires also getting RXON timing when we send an unassociated RXON in some cases. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: pass context to iwl_send_rxon_timingJohannes Berg2010-08-274-19/+15Star
| | | | | | | | | | | | | | | | | | | | Sometimes we need to send RXON timing even when we don't have a virtual interface yet, so pass the context and allow passing one without a virtual interface pointer. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlwifi: send PAN parametersJohannes Berg2010-08-276-0/+96
| | | | | | | | | | | | | | | | | | | | | | In order for the microcode to be able to handle multiple interfaces, we need to give it the PAN parameters that state how to allocate the time between the two interfaces. Do this, and update it wherever necessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: send beacon before committing associated RXONJohannes Berg2010-08-271-0/+2
| | | | | | | | | | | | | | | | | | Newer AGN microcode requires know the beacon before starting the AP so that it can start beaconing right away. Implement that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: send RXON timing before associatingJohannes Berg2010-08-272-0/+18
| | | | | | | | | | | | | | | | | | | | The PAN functionality requires us to send the timing including a valid DTIM period to the microcode before associating, so request this data from mac80211 and send it to the device. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>