aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAge
...
* | iwlwifi: fix possible data overwrite in hcmd callbackStanislaw Gruszka2011-04-25
| | | | | | | | | | | | | | | | | | | | | | | | My commit 3598e1774c94e55c71b585340e7dc4538f310e3f "iwlwifi: fix enqueue hcmd race conditions" move hcmd callback after command queue reclaim, to avoid call it with hcmd_lock. But since queue read index was updated, cmd data can be overwritten. Fix problem by calling callback before taking hcmd_lock and queue reclaim. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Remove unused macros and structuresSujith Manoharan2011-04-25
| | | | | | | | | | Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Use power save wrappers when accessing HWSujith Manoharan2011-04-25
| | | | | | | | | | Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Fix max A-MPDU size handlingSujith Manoharan2011-04-25
| | | | | | | | | | | | | | | | Set the maximum ampdu size of a station correctly in the target by using the ampdu_factor. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Fix AMPDU subframe handlingSujith Manoharan2011-04-25
| | | | | | | | | | | | | | | | | | | | | | * Register the driver's maximum ampdu subframe limit to mac80211. * Cleanup the target capabilities structure and fix an endian issue. * Fix BTCOEX by sending a command to the target when the BT priority changes. * Bump the required firmware version to 1.1 Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix warnings from -Wunused-but-set-variableSujith Manoharan2011-04-25
| | | | | | | | | | Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Enable AR9340 supportVasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | | | | | | | AR9340 is a AR9003 family built-in 2x2 wmac of ar934x SOCs. It is single band in ar9341 SOC and dual band in ar9344/ar9342 SOCs. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Disable INTR_HOST1_FATAL to avoid interrupt strom with ar9430Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Assign macversion based on devid for built-in wmacVasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Add AR9340 platform id to id tableVasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Read iq calibration data only for active chainsVasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Configure chain switch table and attenuation control only for ↵Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | | | | | active chains Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Enable byte Tx/Rx data swap for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Configure tuning capacitance value for AR9340 as wellVasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Skip internal regulator configuration for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Don't configure AR_CH0_THERM for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Fix register offset AR_PHY_65NM_CH0_THERM for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Clean up rx/tx chain configuration before AGC/IQ calVasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | | | | | Use hw supported chains instead of hard coded values. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Configure RF channel freqency for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Read spur frequency information from eeprom for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Initialize tx and rx gain table from initvals.h for ar9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Don't do ani initialization for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Initialize mode registers from initvals.h for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Add initvals.h for ar9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Configure pll control register accordingly for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Get AHB clock information from ath9k_platform_dataVasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | | | | | | | Add a bool in ath9k_platform_data to pass AHB clock speed information. Driver needs this to configure PLL on some SOCs. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Take care of few host interface register changes for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Define devid and mac version for AR9340Vasanthakumar Thiagarajan2011-04-25
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'wireless-next-2.6' of ↵John W. Linville2011-04-25
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
| * | iwlagn: remove hw_ready variableJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This variable is only ever checked right after the function that sets it, but the same function will also return the status, so we can pass it through instead of checking hw_ready later. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: combine firmware code/dataJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On new hardware, ucode images always come in pairs: code and data. Therefore, combine the variables into an appropriate struct and use that when both code and data are needed. Also, combine allocation and copying so that we have less code in total. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: implement synchronous firmware loadJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current firmware loading mechanism in iwlwifi is very hard to follow, and thus hard to maintain. To make it easier, make the firmware loading synchronous. For now, as a side effect, this removes a number of retry possibilities we had. It isn't typical for this to fail, but if it does happen we restart from scratch which this also makes easier to do should it be necessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: leave notification waits on firmware errorsJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the firmware encounters an error while the driver is waiting for a notification, it will never get that notification. Therefore, instead of timing out, bail out on errors when waiting for notifications. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: make iwlagn_wait_notification return error codeJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're unlikely to care about the actual time spent waiting, so make the function return an error code which is less error prone in coding new uses. Also, while at it, mark __must_check. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: extend notification wait functionJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A notification wait function is called with the command, but currently has no way of passing data back to the caller -- fix that by adding a void pointer to the function that can be used between the caller and the function. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: refactor up pathJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting the device consists of many things, refactor out enabling the hardware and also return -ERFKILL when the rfkill signal is found to be asserted (which makes more sense anyway, but is also required now to make the __iwl_up function return right away.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: refactor down pathJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | The iwl_down path really consists of multiple things, refactor out the hardware resetting (including, of course, related software state like irqs). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: clean up some exit codeJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no point in running through iwl_down() when we never registered with mac80211, as it just cleans up internal structures that were never initialised in this case. Therefore we can also remove the special handling for this case from __iwl_down(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlagn: simplify error table readingJohannes Berg2011-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code to read the error table header just hardcodes all the offsets, which is a bit hard to understand. We can read in the entire header (as much as we need) into a structure, and then take the data from there, which makes it easier to understand. To read a bigger blob we also don't need to grab NIC access for each word read, making the code more efficient. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | | Merge branch 'for-linville' of ↵John W. Linville2011-04-25
|\ \ \ | |/ / |/| | | | | git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
| * | wl12xx: fix sparse warning about undeclared wl12xx_alloc_dummy_packetLuciano Coelho2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse warning: CHECK drivers/net/wireless/wl12xx/main.c drivers/net/wireless/wl12xx/main.c:1246:17: warning: symbol 'wl12xx_alloc_dummy_packet' was not declared. Should it be static? Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: remove unused conf_radio_params structureLuciano Coelho2011-04-19
| | | | | | | | | | | | | | | | | | | | | This structure has not been used anymore since commit e6b190ff3c2f4e4859502c41fa17b5c595e82000. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: move hardcoded hci_io_ds value into the conf structLuciano Coelho2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hardcoding the hci_io_ds configuration that we write to the SDIO_IO_DS top registed, read it from the default configuration so that it's easier to change for different platforms. Reported-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: use kstrtoul functionsLuciano Coelho2011-04-19
| | | | | | | | | | | | | | | | | | Use the new kstrtoul functions instead of the deprecated strict_strtoul(). Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: Handle platforms without level trigger interruptsIdo Yariv2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms are incapable of triggering on level interrupts. Add a platform quirks member in the platform data structure, as well as an edge interrupt quirk which can be set on such platforms. When the interrupt is requested with IRQF_TRIGGER_RISING, IRQF_ONESHOT cannot be used, as we might miss interrupts that occur after the FW status is cleared and before the threaded interrupt handler exits. Moreover, when IRQF_ONESHOT is not set, iterating more than once in the threaded interrupt handler introduces a few race conditions between this handler and the hardirq handler. Currently this is worked around by limiting the loop to one iteration only. This workaround has an impact on performance. To remove to this restriction, the race conditions will need to be addressed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: Simplify TX blocks accountingIdo Yariv2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The total number of TX memory blocks may change when the dynamic memory option is enabled. The current implementation only tracks the available memory blocks, which over-complicates TX blocks accounting. By tracking the number of allocated blocks, calculation of the number of available blocks becomes simpler and cleaner. It simply equals the total number of TX memory blocks minus the allocated ones. Also, remove some unnecessary castings and use union member accesses instead. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: Clean up the dummy packet mechanismIdo Yariv2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation allocates a skb each time one is requested by the firmware. Since dummy packets are handled differently than regular packets, the skb needs to be marked. Currently, this is done by setting the pkt_type member to 5. This might not be safe, as we cannot be sure that there won't be any other packets with this pkt_type value. Since the packet does not change from one request to another, we can simply allocate a dummy packet template and always send it. All changes to the skb done during packet preparation must be reverted, so the same skb can be reused. The dummy packets are not transmitted, therefore there's no need to set the BSSID or our own MAC address. In addition, the header portion of the packet was zeroed by mistake, so fix that as well. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: Clean up the block size alignment codeIdo Yariv2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify and clean up the block size alignment code: 1. Set the block size according to the padding field type, as it cannot exceed the maximum value this field can hold. 2. Move the alignment code into a function instead of duplicating it in multiple places. 3. In the current implementation, the block_size member can be misleading because a zero value actually means that there's no need to align. Declare a block size alignment quirk instead. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: Clean up and fix the 128x boot sequenceIdo Yariv2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the boot sequence code & fix the following issues: 1. Always read the registers' values and set the relevant bits instead of zeroing all other bits 2. Handle cases where wl1271_top_reg_read returns an error 3. Verify that the HW can detect the selected clock source 4. Remove 128x PG10 initialization code 5. Configure the MCS PLL to work in HP mode Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * | wl12xx: fix "JOIN while associated" commentaryOhad Ben-Cohen2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issuing multiple JOIN commands to the wl12xx's firmware, while we're associated, might have undesired implications, so the driver prints a message when that happens, and warn developers who check out the source. Update the commentary in order to consider the one valid scenario where this can happen: roaming. Cautiously keep the message for now, until we either gain confidence there are no unintentional JOIN-while-associated events, or until we move to the new multi-role fw who solves this multiple-join issue for good. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>