summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2010-04-28iwl: cleanup: remove unneeded error handlingDan Carpenter
This is just a cleanup and doesn't change how the code works. debugfs_create_dir() and debugfs_create_file() return an error pointer (-ENODEV) if CONFIG_DEBUG_FS is not enabled, otherwise if an error occurs they return NULL. This is how they are implemented and what it says in the DebugFS documentation. DebugFS can not be compiled as a module. As a result, we only need to check for error pointers and particularly -ENODEV one time to know that DebugFS is enabled. This patch keeps the first check for error pointers and removes the rest. The other reason for this patch, is that it silences some Smatch warnings. Smatch sees the condition "(result != -ENODEV)" and assumes that it's possible for "result" to equal -ENODEV. If it were possible it would lead to an error pointer dereference. But since it's not, we can just remove the check. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28rt2x00: rt2800lib: update rfcsr & bbp init code for SoC devicesHelmut Schaa
Update the rfcsr and bbp init code for SoC devices to match with the latest Ralink driver. To have better control over which values are used for the register initialization create a new function rt2800_is_305x_soc which checks for SoC interface type, the correct RT chipset and the correct RF chipset. This is based on the assumption that all rt305x SoC devices use a rt2872 and rf3020/rf3021/rf3022. In case an unknown RF chipset is found on a SoC device with a rt2872 don't treat it as rt305x and just print a message. Signed-off-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-04-28wl1271: fix a bunch of sparse warningsLuciano Coelho
A couple of sparse warnings in some rate settings (missing cpu_to_le32) were fixed. Changed the conf_sg_settings struct from le to native endianess. The values are converted to le when copying them to the acx command instead. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28wl1271: Rewrite hardware keep-alive handlingJuuso Oikarinen
The driver had a join command without keep-alive restart procedures in the channel changing code. After associated scans, the mac80211 does re-set the current channel, causing the join to occur. This would stop the hardware keep alive. To make the joins safer in this respect, this patch adds a join function that does the hardware-keep-alive magic along the join. This is now invoked in the above mentioned scenario, and also other scenarios. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28wl1271: Configure QOS nullfunc template for U-APSDSaravanan Dhanabal
When U-APSD is enabled, device is not sending power save state notifications to AP using QOS nullfunc frames. This patch configures nullfunc templates needed for U-APSD. Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28wl1271: Improve command pollingJuuso Oikarinen
In testing I noticed that the wl1271 commands fall into two categories. In the first category are "fast" commands, these mostly take only 0 or 1 polls to complete, but occasionally upto 50 (giving a 0.5ms execution time.) In the second category, the command completion takes well more than 0.5ms (from 1.5ms upwards.) This patch fixes command polling such that it is optimal for the fast commands, but also allows sleep for the longer ones. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28ath9k: Added get_survey callback in order to get channel noiseBenoit Papillault
Signed-off-by: Benoit Papillault <benoit.papillault@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28rtl8180: use cached queue mapping for skb in rtl8180_txJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28libertas: fix 8686 firmware loading regressionDan Williams
The 'ready' condition was incorrectly evaluated which sometimes lead to failures loading the second-stage firmware on 8686 devices. (This was introduced in "libertas: consolidate SDIO firmware wait code". -- JWL) Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28wl1251: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28rt2x00: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
2010-04-28p54: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28libertas_tf: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28b43legacy: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28b43: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28ath9k: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28ath5k: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28ar9170: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-28mwl8k: remove usage of deprecated noise valueJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27mac80211: give virtual interface to hw_scanJohannes Berg
When scanning, it is somewhat important to scan on the correct virtual interface. All drivers that currently implement hw_scan only support a single virtual interface, but that may change and then we'd want to be ready. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k: Avoid corrupt frames being forwarded to mac80211.Vivek Natarajan
If bit 29 is set, MAC H/W can attempt to decrypt the received aggregate with WEP or TKIP, eventhough the received frame may be a CRC failed corrupted frame. If this bit is set, H/W obeys key type in keycache. If it is not set and if the key type in keycache is neither open nor AES, H/W forces key type to be open. But bit 29 should be set to 1 for AsyncFIFO feature to encrypt/decrypt the aggregate with WEP or TKIP. Cc: stable@kernel.org Reported-by: Johan Hovold <johan.hovold@lundinova.se> Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: Ranga Rao Ravuri <ranga.ravuri@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_htc: Handle CONF_IDLE during unassociated state to save power.Vivek Natarajan
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: Fix TX interrupt mitigation settingsLuis R. Rodriguez
TX interrupt mitigation reduces the number of interrupts by addressing several interrupt actions (AR_IMR_TXOK, AR_IMR_TXDESC) all in one interrupt so when enabling it discard setting the other interrupts. Without this TX interrupt mitigation would actually increase the number of interrupts two-fold. We still leave TX interrupt mitigation disabled as it is still being tested. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: fix noisefloor timeout handling on AR9003Felix Fietkau
When the noisefloor calibration times out, do not load -50 into the registers, since this might cause rx issues. Instead, leave enough time for the noise floor calibration to complete until the next check. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: Fix endian bug in an AR9003 EEPROM fieldFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: Fix typos in tx rate power level parsing for AR9003Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: use the configured power limit for AR9003Felix Fietkau
Since the new AR9003 EEPROM code does tune the card for the configured tx power level, we need to fill in the correct power limits in the TPC part of the DMA descriptor. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k: wake queue after processing edma rx framesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: fix fast clock handling for 5GHz channelsFelix Fietkau
Combine multiple checks that were supposed to check for the same conditions, but didn't. Always enable fast PLL clock on AR9280 2.0 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: update EEPROM data structure for AR9280Felix Fietkau
Adds read access for the 5 GHz fast clock flag Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: Fix usec to hw clock conversion in 5Ghz for ar9003Vasanthakumar Thiagarajan
Fast clock operation (44Mhz) is enabled for 5Ghz in ar9003, so take care of the conversion from usec to hw clock. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: disable TX IQ calibration for AR9003Luis R. Rodriguez
Disable TX IQ calibration, it was prematurely enabled in previous versions. Cc: Paul Shaw <Paul.Shaw@Atheros.com> Cc: Thomas Hammel <Thomas.Hammel@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: fix typo in the AR9003 EEPROM data structure definitionFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: fix pll clock setting for 5ghz on AR9003Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_hw: update initvals for AR9003Felix Fietkau
This synchs up the initvals to the values used on the Atheros HAL for AR9003. This specific change adds support for a new high power module. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_htc: Simplify RX IRQ handlerSujith
A bunch of validation and processing in the RX IRQ handler can be moved to the RX tasklet. The IRQ handler is already heavy, with the memory allocation for handling stream mode. Also, a memcpy of 40 bytes for every packet can be avoided in the handler. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_htc: Validate TX Endpoint IDSujith
Check for the endpoint IDs when processing TX completions and drop the unsupported EPIDs. We can add other endpoints (UAPSD,..) when support is added. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27ath9k_htc: Remove unnecessary powersave restoreSujith
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26libertastf: add configurable debug messagesmaster-2010-04-26Steve deRosier
Add the same type of configurable debug messages to libertas_tf as already exist in the libertas driver. This has facilitated creation of a interface specification and will facilitate future development of this driver. Signed-off-by: Steve deRosier <steve@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26rt2x00: rt2800lib: Remove redundant check for RT2872Helmut Schaa
Remove redundant check for RT2872. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26rt2x00: rt2800lib: Fix rx path on SoC devicesHelmut Schaa
Restore the rfcsr initialization for RT305x SoC devices which was removed by "rt2x00: Finish rt3070 support in rt2800 register initialization.". This fixes the rx path on SoC devices. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26rt2x00: fix typo in rt2800.hHelmut Schaa
Fix a typo in a comment in rt2800.h. Instead of replacing the wrong hexvalue (0x171c) with the correct one (0x1718) just use the appropriate readable define. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26ssb: Make bus registration failure not be silentLarry Finger
In kernel Bugzilla #15825, a case where routine ssb_bus_pcibus_register() fails silently is reported. The cause for the failure is still being investigated; however, the diagnosis would be easier if the failure had been reported. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26rt2x00: rt2800: use tx_power2 in rt2800_config_channel_rf3xxxHelmut Schaa
Get closer to what the ralink driver does by setting the rf register 13 to tx_power2 during channel switch. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26rt2x00: rt2800lib: disable HT40 for now as it causes reception problemsHelmut Schaa
Disable HT40 support for now as it causes rx problems with HT40 capable 11n APs (when mac80211 enables HT40, rx is completely disfunctional). Once the rt2800 HT code is capable of using HT40 we should enable the flag again. I only tested this patch with a rt305x SoC device, nevertheless the patch disables HT40 also on PCI and USB rt2800 devices. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26ath9k_htc: Really fix device hotunplugSujith
All commands to the target are disabled when the device is unplugged, but a normal module unload has to be differentiated from this case, as we could still receive data in the RX endpoint. Fix this by checking if the device is attached or not. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26ath9k_htc: Fix WMI command raceSujith
My patch "ath9k_htc: Handle WMI timeouts properly" introduced a race condition in WMI command processing. The last issued command should be stored _before_ issuing a WMI command. Not doing this would result in the WMI event IRQ dropping correct command responses as invalid. Fix this race by storing the command id correctly. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26ath9k_htc: Increase WMI timeout valueSujith
Completion of WMI commands take a longer time on some platforms. Increase the timeout value to handle this. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26ath9k_htc: Process command data properlySujith
When handling the REGIN callback, processing the incoming data first should be the preferred mode of operation. Allocation of a new SKB may fail, in which case, the URB will not be resubmitted. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-26ath9k_htc: Use USB rebootSujith
So, apparently there is a USB reboot command that the target accepts. Using this instead of usb_reset_device() fixes the issue of "descriptor read error" that pops up on repeated load/unload. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>