aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/init.c
Commit message (Collapse)AuthorAge
...
* ath6kl: Lower SDIO pad drive strength for hw2.1.1 boardRaja Mani2012-02-28
| | | | | | | | | | | | | | Without this change, SDIO shuts down due to CRC error during data communication to the firmware in some of the platform. for example, scan request issued to the firmware doesn't return scan completed events and cause the socket interface to always return -16 (device busy). SDIO pad drive strength should be reduced for hw2.1.1 board to avoid such errors. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx()Vasanthakumar Thiagarajan2012-02-27
| | | | | | | This fixes smatch warning "inconsistent returns sem:&ar->sem". Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add support for AR6003 2048 byte board filePrasanna Kumar2012-02-08
| | | | | | | | | | AR6003 2.1.1 supports both 1792 and 2048 byte board files. Add support for 2048 byte board file. kvalo: add ath6kl prefix to the title Signed-off-by: Prasanna Kumar <kumarpra@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Update license headerVasanthakumar Thiagarajan2012-02-08
| | | | | | | | Update license header with the copyright to Qualcomm Atheros, Inc. for the year 2011-2012. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: fix compiler warning in ath6kl_init_hw_params()Kalle Valo2012-02-02
| | | | | | | | | | | | | | | | Both Luis and John reported that they see a compiler warning: drivers/net/wireless/ath/ath6kl/init.c: In function 'ath6kl_init_hw_params': drivers/net/wireless/ath/ath6kl/init.c:1377:26: warning: ‘hw’ may be used uninitialized in this function Oddly enough I have never seen it. But AFAICT the code is correct and hw is not used uninitalized so add uninitialized_var() to inform that to the compiler. Reported-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Reported-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: fix testmode when fw-2.bin or fw-3.bin is usedKalle Valo2012-01-30
| | | | | | | | | | | Testmode (TCMD and ART) was not enabled when fw-2.bin or fw-3.bin files were available, fix that by fetching testmode file just after the board file but before rest of the firmware files are fetched. I also added testmode field to struct ath6kl and moved the module parameter to core.c. Now all module parameters are grouped in one place. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix bug in maintaining aggregation state in AP modeVasanthakumar Thiagarajan2012-01-24
| | | | | | | | | | | Currently rx aggregation related states are maintained per vif, but this will not properly work when operating in AP mode. Aggregation is completely broken when more than one 11n stations are connected to AP mode vif. Fix this issue by keeping station specific aggregation state in sta_list. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: create ath6kl_core.koKalle Valo2012-01-18
| | | | | | | | | Now ath6kl is ready for splitting core code to ath6kl_core.ko module. This also makes it possible to link both sdio and usb code to kernel at the same time, which earlier failed miserably. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: create core.cKalle Valo2012-01-18
| | | | | | | | | | | Currently core functions are spread between various files, group all the functions into file and rename the functions to follow the style used elsewhere in the driver. This will make it easier to a separate core module. Also fix a bug where wiphy is freed too early. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add ATH6KL_CONF_UART_DEBUGKalle Valo2012-01-18
| | | | | | | | Add ATH6KL_CONF_UART_DEBUG which is set whenever uart_debug module parameter is enabled. This way we can keep the uart_debug parameter static when core.c file is introduced. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: unify cfg80211 init/cleanup functionsKalle Valo2012-01-18
| | | | | | | Group them together and change the naming to follow the common style in ath6kl. No functional changes. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: rename vif init and cleanup functionsKalle Valo2012-01-18
| | | | | | | ath6kl_cfg80211_vif_init/cleanup() follow more closely the style used elsewhere in ath6kl. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add testmode 2 for 6003 ARTAlex Yang2012-01-18
| | | | | | | | | | | | Add testmode 2 for 6003 ART. When you insmod ath6kl_sdio.ko testmode=2, ath6kl will load ART firmware utf.bin and testscript nullTestFlow.bin. These files should be put in the firmware folder. kvalo: add "ath6kl:" to the title, word wrap the commit log and remove extra line in the code Signed-off-by: Alex Yang <xiaojuny@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* Merge remote branch 'wireless-next/master' into ath6kl-nextKalle Valo2012-01-13
|\ | | | | | | | | Conflicts: drivers/net/wireless/ath/ath6kl/usb.c
| * Merge branch 'master' of ↵John W. Linville2012-01-03
| |\ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/b43/dma.c drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
| * | net: fix assignment of 0/1 to bool variables.Rusty Russell2011-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DaveM said: Please, this kind of stuff rots forever and not using bool properly drives me crazy. Joe Perches <joe@perches.com> gave me the spatch script: @@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true I merely installed coccinelle, read the documentation and took credit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ath6kl: Add a module parameter to enable uart debugVasanthakumar Thiagarajan2012-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | To enable firmware debug messages through uart interface, modprobe ath6kl_sdio uart_debug=1. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath6kl: Support for TCP checksum offload to firmwareRishi Panjwani2012-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change enables offloading TCP checksum calculation to firmware. There are still some issues with the checksum offload so better to disable it by default until the issues are resolved. To enable TCP checksum offload for tx and rx paths, use the ethtool as follows: ethtool -K <interface> tx on ethtool -K <interface> rx on To disable TCP checksum offload, for tx and rx paths, use the ethtool as follows: ethtool -K <interface> tx off ethtool -K <interface> rx off kvalo: indentation changes Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath6kl: add support for FW API 3Kalle Valo2011-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As firmware starting from 3.2.0.12 has some API changes and doesn't work with older versions of ath6kl we need to bump up the API version. This way we don't break anything. Also store which version of API is used and print that during boot: ath6kl: ar6003 hw 2.1.1 sdio fw 3.2.0.13 api 3 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath6kl: handle firmware names more dynamicallyKalle Valo2011-12-23
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently ath6kl has just hardcoded paths to each firmware file. Change this more dynamic by separating the the directory and file name from each other. That way it's easier to dynamically create full paths to firmware and code looks better. And now it's possible to remove a function needed by devicetree code. While at it add a structure inside struct ath6kl_hw to contain all firmware names. I deliberately omitted board file support as those will be handled later. This is needed for firmware API 3. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | Merge remote branch 'wireless-next/master' into ath6kl-nextKalle Valo2011-12-16
|\| | | | | | | | | Conflicts: drivers/net/wireless/ath/ath6kl/init.c
| * cfg80211: add flags for off-channel capabilitiesJohannes Berg2011-11-21
| | | | | | | | | | | | | | | | | | | | | | Currently mac80211 implements these for all devices, but given restrictions of some devices that isn't really true, so prepare for being able to remove the capability for some mac80211 devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath6kl: Support different uart_tx pin and refclk configurationRyan Hsu2011-12-14
| | | | | | | | | | | | | | | | | | AR6003 family use uart_tx=8 and refclk=26Mhz by default, and AR6004 family uses different uart_tx pin and could also support various xtal source, moves these per hw configuration. Signed-off-by: Ryan Hsu <ryanhsu@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: implement scheduled scanKalle Valo2011-12-13
| | | | | | | | | | | | | | | | | | | | | | ath6kl firmware supports scheduled scan functionality with the wow ssid filter. But the firmware does not send any events after scan results so I had to add a timer which notifies about new scan results. Sched scan needs firmware version 3.2.0.6 or later. If firmware doesn't support sched scan the driver will not enable the feature. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: fix reading of FW IE capabilitiesKalle Valo2011-12-13
| | | | | | | | | | | | | | | | | | | | For some strange reason I used ALIGN() to calculate index to the buffer. That is totally bogus and wouldn't work when it tried to read the second bit. Fix it by removing the ALIGN() altogether. Also check that ie_len is not too short. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: Enable multiple vif supportVasanthakumar Thiagarajan2011-11-21
| | | | | | | | | | | | | | The maximum number of supported virtual interfaces are 3. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: Find ar->max_norm_iface in firmware IE parsingVasanthakumar Thiagarajan2011-11-21
| | | | | | | | | | | | | | | | | | | | Currently the max number of vifs which can be used for non-p2p mode is determined in ath6kl_core_alloc(). But the maximum supported vifs are parsed from firmware IE in ath6kl_fetch_fw_api2() which would happen after ath6kl_core_alloc(). Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: indicate probe-resp offload supportArik Nemtsov2011-11-21
| | | | | | | | | | | | | | | | | | The ath6kl responds to probe-requests in HW while operating as an AP. It supports offloading exclusions to support the WPS, WPS2, P2P and 802.11u protocols. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: add firmware IE for maximum number of vifsKalle Valo2011-11-16
| | | | | | | | | | | | | | Not all firmwares support multiple vifs and we need to read the limit from the firmware image. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: make maximum number of vifs runtime configurableKalle Valo2011-11-16
| | | | | | | | | | | | Needed when detecting how many vifs firmware supports. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: add firmware filename info to struct ath6kl_hwKalle Valo2011-11-16
| | | | | | | | Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: use hardware version names consistentlyKalle Valo2011-11-16
| | | | | | | | | | | | | | | | Part of ath6kl uses "REV3" style of naming hardware versions and elsewhere "hw 2.1.1" is used instead for the same version. This is confusing, use the latter term everywhere. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: add name field to struct ath6kl_hwKalle Valo2011-11-16
| | | | | | | | | | | | | | To make it easier to print name for each hardware type. Also move the hw info print to ath6kl_init_hw_start() which is more logical place for it. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: add firmware IE for board data addressKalle Valo2011-11-16
| | | | | | | | | | | | | | | | | | Board data address can change between firmwares so we need to read that from the firmware image. Also fix debug log for the patch address to print the address in hex. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: add board address to struct ath6kl_hwKalle Valo2011-11-16
| | | | | | | | | | | | | | | | This is to make it configurable by firmware IEs. Also determine if we need to write or read the board address to the chip by checking if board address is set or not. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: move hw version related to parameters to structKalle Valo2011-11-16
| | | | | | | | | | | | It's easier to handle the values when they are defined in a struct. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: remove hw version related parameter definesKalle Valo2011-11-16
| | | | | | | | | | | | | | | | | | | | Having separate defines, in a different file, makes it difficult to read the actual values. As we are just setting named fields in a struct the defines don't make any sense anymore. There are no functional changes, only moving of constants. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath6kl: firmware boot fixes for ar6004Kalle Valo2011-11-13
|/ | | | | | These have changed a bit since last time ar6004 code was commited. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add suspend_cutpower module parameterKalle Valo2011-11-11
| | | | | | | | | | | | This is to force ath6kl to power off hardware during suspend even if sdio support keep power. This is needed, for example, when sdio controller is buggy or maximum powersaving is desired. Usage: insmod ath6kl.ko suspend_cutpower=1 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: don't power down hardware when interface is downKalle Valo2011-11-11
| | | | | | | | | | | | | | Jouni reported that my patch "ath6kl: power down hardware when interface is down" caused a regression on his x86 boxes and scan didn't work anymore. I was able to reproduce the problem by disabling all debug messages. So there has to be a race condition somewhere in the code and disable the functionality until the race is fixed. Now hardware is powered from the point where module is loaded until it's removed. Reported-by: Jouni Malinen <jouni@qca.qualcomm.com> Tested-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix lockdep warningVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following is the lockdep warning which detects possible deadlock condition with the way ar->lock and ar->list_lock are being used. (&(&ar->lock)->rlock){+.-...}, at: [<ffffffffa0492d13>] ath6kl_indicate_tx_activity+0x83/0x110 [ath6kl] but this lock took another, SOFTIRQ-unsafe lock in the past: (&(&ar->list_lock)->rlock){+.+...} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&ar->list_lock)->rlock); local_irq_disable(); lock(&(&ar->lock)->rlock); lock(&(&ar->list_lock)->rlock); <Interrupt> lock(&(&ar->lock)->rlock); *** DEADLOCK *** softirqs have to be disabled when acquiring ar->list_lock to avoid the above deadlock condition. When the above warning printed the interface is still up and running without issue. Reported-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add state variable depicting hw/fw stateKalle Valo2011-11-11
| | | | | | | | | This way it's easier to track state changes and in the future add more warnings about using hardware in wrong states. Currently there are few random flags for trying to do the same, those will be cleaned and removed in the future. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: print firmware crashes alwaysKalle Valo2011-11-11
| | | | | | | | | Currently firmware crash dump is printed only if debug is enabled. Change it so that the crash dump is always printed. Also move the code from init.c to hif.c. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: power down hardware when interface is downKalle Valo2011-11-11
| | | | | | | | | | | The benefit from this is that user space can control hardware's power state by putting interface up and down. This is handy if firmware gets to some weird state. The downside will be that putting interface up takes a bit longer, I was measuring ~500 ms during interface up. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: separate hardware boot code from module initialisation codeKalle Valo2011-11-11
| | | | | | | | | Refactor the code needed to boot the hardware to a separate function so that it will be easier boot and shutdown hardware. No functional changes (hopefully). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: merge ath6kl_init() to ath6kl_core_init()Kalle Valo2011-11-11
| | | | | | | In preparation for splitting module initialisation and hardware boot code from each other. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: move power control from sdio to coreKalle Valo2011-11-11
| | | | | | In preparation for cutting down power from the chip on the fly. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix compilation error from of.hSangwook Lee2011-11-11
| | | | | | | | | | | | | | | When compiling ath6kl for ARM with device tree tree compilation fails with errors like: include/linux/of.h: In function 'of_property_read_u32_array': include/linux/of.h:249:10: error: 'ENOSYS' undeclared Workaround this by including errno.h from init.c. kvalo: improved commit log Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: use ath6kl_credit prefix consistentlyKalle Valo2011-11-11
| | | | | | Not all credit functions used that prefix, fix that. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: use ath6kl prefix in credit functionsKalle Valo2011-11-11
| | | | | | | This is to follow the common style in the driver. Also add braces to fix a style issue. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>