summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/sdio.c
AgeCommit message (Collapse)AuthorFilesLines
2013-06-01ath6kl: Unify sg_sz and buf_sz in ath6kl_sdio_alloc_prep_scat_req()Geert Uytterhoeven1-6/+6
sg_sz and buf_sz are initialized and used in a mutual exclusive way. However, some versions of gcc are not smart enough to see this: drivers/net/wireless/ath/ath6kl/sdio.c: In function ‘ath6kl_sdio_alloc_prep_scat_req’: drivers/net/wireless/ath/ath6kl/sdio.c:338: warning: ‘sg_sz’ may be used uninitialized in this function Unify the sg_sz and buf_sz variables into a single size variable to kill the compiler warning. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-18ath6kl: add tracing points for sdio transfersKalle Valo1-0/+10
Add tracing points for sdio transfers, just dump the address, flags and the buffer. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-03-05ath6kl: Return error from ath6kl_bmi_done()Mohammed Shafi Shajakhan1-2/+4
This addresses a FIXME in the driver. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-10-24ath6kl: fix uninitialized variable in ath6kl_sdio_enable_scatter()Andi Kleen1-1/+1
gcc 4.8 warns /backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/ath/ath6kl/sdio.c: In function 'ath6kl_sdio_enable_scatter': /backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/ath/ath6kl/sdio.c:748:16: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] if (virt_scat || ret) { ^ The variable can indeed be uninitialized when the previous if branch is skipped. I just set it to zero for now. I'm not fully sure the fix is correct, maybe the || should be an && ? Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-10-24ath6kl: Recover from fw crashVasanthakumar Thiagarajan1-0/+3
Re-initialize the target when fw crash is reported. This would make the device functional again after target crash. During the target re-initialization it is made sure that target is not bugged with data/cmd request, ar->state ATH6KL_STATE_RECOVERY is used for this purpose. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-10-24ath6kl: rework scheduled scanThomas Pedersen1-19/+0
This patch reflects changes in the firmware scheduled scan implementation to behave better in cases with multiple concurrent vifs. Major changes: - scheduled scan filters and state are now programmed per-vif. - decouple scheduled scan from host sleep. To maintain graceful failure with old firmwares, a new firmware capability bit is introduced: ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2. ath6kl simply won't advertise scheduled scan to cfg80211 if the SCHED_SCAN_V2 is not supported. Since firmwares from here on out won't support the previous implicit API for scheduled scan (set WoW filters and host sleep), bump the firmware API to protect old drivers. Unfortunately, due to firmware RAM constraints ath6kl still cannot expect a scan complete event at the end of a scheduled scan results cycle, so the sched_scan_timer is retained. Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-10-24ath6kl: Add support for AR6004 hardware version 1.3Bala Shanmugam1-0/+3
Add support for AR6004 hardware with version 1.3 and has id 0x31c8088a. Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-04-30ath6kl: Complete failed tx packet in ath6kl_htc_tx_from_queue()Vasanthakumar Thiagarajan1-1/+1
Return status of ath6kl_htc_tx_issue() is ignored in ath6kl_htc_tx_from_queue(), but failed tx packet is is not cleaned up. To fix memory leak in this case, call completion with error. Also, throw an error debug message when tx fails in ath6kl_sdio_write_async() due to shortage in bus request buffer. kvalo: change the error message to WARN_ON_ONCE() Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-04-23ath6kl clear the MMC_PM_KEEP_POWER for cutpower caseMing Jiang1-0/+3
ath6kl: If wow deepsleep pno suspend failure driver will choose cutpower. in this scenario MMC_PM_KEEP_POWER should be cleared so that mmc will power off the ar6000 kvalo: remove extra parenthesis Signed-off-by: Ming Jiang <mjiang@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-04-16ath6kl: merge split format strings into oneKalle Valo1-5/+4
Found by checkpatch: WARNING: quoted string split across lines Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-04-12ath6kl: Add AR6004 1.2 support for USB and SDIORay Chen1-0/+3
Add the necessary change for AR6004 1.2 chip support Signed-off-by: Ray Chen <raychen@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-26ath6kl: add htc opsKalle Valo1-1/+1
In preparation for adding HTC pipe implementation add htc-ops.h to make it possible dynamically choose which HTC type is used. Needed for full USB support. Based on the code by Ray Chen <raychen@qca.qualcomm.com>. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Ray Chen <raychen@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-13ath6kl: fix open parenthesis alignment in ath6kl_sdio_suspend()Kalle Valo1-4/+5
ath6kl/sdio.c:875: CHECK: Alignment should match open parenthesis Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-07ath6kl: document all spinlocksKalle Valo1-0/+5
Also fixes quite a few checkpatch warnings like this: ath6kl/hif.h:226: CHECK: spinlock_t definition without comment Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-07ath6kl: alignment should match open parenthesisKalle Valo1-3/+3
Fix the issues which checkpatch found and were easy to fix. Especially callers of ath6kl_bmi_write() are tricky and that needs to be fixed separately. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-07ath6kl: Check wow state before sending control and data pktRaja Mani1-0/+7
Below two scenarios are taken care in this patch which helped to fix the firmware crash during wow suspend/resume. * TX operation (ctrl tx and data tx) has to be controlled based on suspend state. i.e, with respect to WOW mode, control packets are allowed to send from the host until the suspend state goes ATH6KL_STATE_WOW and the data packets are allowed until WOW suspend operation starts. * Similarly, wow resume is NOT allowed if WOW suspend is in progress. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-07ath6kl: Add provision to define suspend policy in disconnected state.Raja Mani1-5/+13
It gives flexibility to the user to define suspend policy when the suspend mode is set to WOW and the device is in disconnected state at the time of suspend. New module parameter wow_mode is added to get the choice from the user. This parameter is valid only if the module parameter suspend_mode is set to WOW. To force WOW in connected state and cut power in disconnected state: suspend_mode=0x3 wow_mode=0x1 To force WOW in connected state and deep sleep in disconnected state (this is also the default wow_mode): suspend_mode=0x3 wow_mode=0x2 If there is no value specified to wow_mode during insmod, deep sleep mode will be tried in the disconnected state. kvalo: clarified commit log Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-05ath6kl: Restrict memcpy to bounce buffer only for write requestRaja Mani1-1/+4
No need to copy received local buffer content to bounce buffer (DMA buffer) while performing sync READ operation from the chip. It's applicable for only WRITE operation. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-01ath6kl: Fix random system lockupRaja Mani1-8/+26
The commit "ath6kl: Use a mutex_lock to avoid race in diabling and handling irq" introduces a state where ath6kl_sdio_irq_handler() would be waiting to claim the sdio function for receive indefinitely when things happen in the following order. ath6kl_sdio_irq_handler() - aquires mtx_irq - sdio_release_host() ath6kl_sdio_irq_disable() - sdio_claim_host() - sleep on mtx_irq ath6kl_hif_intr_bh_handler() - (indefinitely) wait for the sdio function to be released to exclusively claim it again for receive operation. Fix this by replacing the mtx_irq with an atomic variable and a wait_queue. kvalo: add ath6kl_sdio_is_on_irq() due to open parenthesis alignment Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-02-08ath6kl: prioritize Tx bundling based on AC prioritiesChilam Ng1-0/+2
Tx bundling is the more efficient use of SDIO bus and allows more packet transfers with fewer bus transactions, and is a way to improve overall throughput. However, Tx bundling has only 4 scatter request resources available. When there are multiple traffic streams of different priorities, it's possible that lower priority traffic may hog all the scatter requests and lock out the higher prioirty traffic from bundling. Tx bundling is now enabled per AC. When an AC do a scatter request and the remaining scatter request resources is lower than a configurable threshold, it will disable Tx bundling for all AC's of lower priorities. When an AC has Tx bundling disabled and has no Tx bundles sent in a consecutive and configurable number of packets, Tx bundling will be re-enabled for that AC. Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-02-08ath6kl: Update license headerVasanthakumar Thiagarajan1-0/+1
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>
2012-01-31ath6kl: Workaround to support Deep Sleep with MSM.Santosh Sajjan1-0/+13
Set the host pm flag MMC_PM_WAKE_SDIO_IRQ to allow host to disable the sdc2_clk and sdc2_h_clk,so that the MSM device enter into TCXO shutdown. Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30ath6kl: Re-architect suspend mode handling in ath6kl_sdio_suspendRaja Mani1-32/+54
Using this patch, the user can bypass existing auto suspend mode selection logic and force ath6kl to enter into the suspend mode what he/she wants. If the user doesn't choose any suspend mode while doing insmod of the driver, auto suspend mode selection logic will kick in and choose suspend mode based on the host SDIO controller capability. Generic module parameter is required to specify suspend mode including Deep Sleep and WOW while doing insmod. Renaming existing mod param variable suspend_cutpower would be sufficient to meet this requirement. New module parameter suspend_mode can take any one of the below suspend state, 1. cut power 2. deep sleep 3. wow Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-24ath6kl: Fix memory leak when unloading ath6kl_sdioVasanthakumar Thiagarajan1-0/+1
The patch "ath6kl: create core.c" removes wiphy_free() from ath6kl_cfg80211_cleanup() and misses to free wiphy in ath6kl_sdio_remove(). This patch fixes this regression. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18ath6kl: add back beginnings of USB supportKalle Valo1-1/+1
John Linville had to revert the part of USB support which was already in ath6kl due to build problems in commit cb00ec382b ("ath6kl: revert USB support"). Now that I fixed the build problems properly by adding ath6kl_core.ko kernel module it's possible to add back the (incomplete) USB support. This patch is a revert of John's patch and adds back the USB code which as already in ath6kl, only difference being minor changes in Makefile and adapting usb.c to new core function names. Note that USB support in ath6kl is not complete yet. This code only makes it possible to boot firmware but as HTC layer does not yet support USB it's not possible to send any WMI commands nor data packets to the firmware. That will be added soon. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18ath6kl: create core.cKalle Valo1-2/+2
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>
2012-01-13Merge remote branch 'wireless-next/master' into ath6kl-nextKalle Valo1-1/+1
Conflicts: drivers/net/wireless/ath/ath6kl/usb.c
2012-01-12ath6kl: Fix SDIO error pathSujith Manoharan1-1/+0
sdio_release_host() would be called twice if sdio_set_block_size() fails for some reason, which would result in the following warning. WARNING: at /home/sujith/dev/wireless-testing/drivers/mmc/core/core.c:828 mmc_release_host+0x42/0x50 [mmc_core]() Call Trace: [<ffffffff81064fdf>] warn_slowpath_common+0x7f/0xc0 [<ffffffff8106503a>] warn_slowpath_null+0x1a/0x20 [<ffffffffa03beb42>] mmc_release_host+0x42/0x50 [mmc_core] [<ffffffffa03c917e>] sdio_release_host+0x1e/0x30 [mmc_core] [<ffffffffa053fac7>] ath6kl_sdio_config+0xc7/0x110 [ath6kl_sdio] [<ffffffffa053fd2c>] ath6kl_sdio_probe+0x21c/0x320 [ath6kl_sdio] [<ffffffffa03beb2a>] ? mmc_release_host+0x2a/0x50 [mmc_core] [<ffffffffa03c7d2a>] sdio_bus_probe+0xfa/0x130 [mmc_core] [<ffffffff813015ae>] driver_probe_device+0x7e/0x1b0 [<ffffffff8130178b>] __driver_attach+0xab/0xb0 [<ffffffff813016e0>] ? driver_probe_device+0x1b0/0x1b0 [<ffffffff813016e0>] ? driver_probe_device+0x1b0/0x1b0 [<ffffffff81300504>] bus_for_each_dev+0x64/0xa0 [<ffffffff8130123e>] driver_attach+0x1e/0x20 [<ffffffff81300e80>] bus_add_driver+0x1b0/0x280 [<ffffffffa0065000>] ? 0xffffffffa0064fff [<ffffffff81301d06>] driver_register+0x76/0x140 [<ffffffffa0065000>] ? 0xffffffffa0064fff [<ffffffffa03c7b71>] sdio_register_driver+0x21/0x30 [mmc_core] [<ffffffffa0065012>] ath6kl_sdio_init+0x12/0x35 [ath6kl_sdio] [<ffffffff81002042>] do_one_initcall+0x42/0x180 [<ffffffff810b025f>] sys_init_module+0x8f/0x200 [<ffffffff81425ac2>] system_call_fastpath+0x16/0x1b Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-09ath6kl: Use a mutex_lock to avoid race in diabling and handling irqVasanthakumar Thiagarajan1-10/+9
Currently this race is handled but in a messy way an atomic variable is being checked in a loop which sleeps upto ms in every iteration. Remove this logic and use a mutex to make sure irq is not disabled when irq handling is in progress. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-05ath6kl: revert USB supportJohn W. Linville1-1/+1
The ath6kl driver is causing build failures when the ath6kl bits are not built as modules. A better fix is forthcoming in a future release, but for now lets revert the problematic code. This reverts the following commits: fde57764ef8751b9aca11b6f6221ac5555bda699 d70385a26ad9a122a5450d066550470107b6bc38 59d954dda4b9b3f3e61d4b87a2b26952b8c4c09d Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-23ath6kl: handle firmware names more dynamicallyKalle Valo1-8/+8
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>
2011-12-16Merge remote branch 'wireless-next/master' into ath6kl-nextKalle Valo1-0/+1
Conflicts: drivers/net/wireless/ath/ath6kl/init.c
2011-12-13ath6kl: implement scheduled scanKalle Valo1-1/+25
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>
2011-11-22Merge branch 'master' of ↵John W. Linville1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Conflicts: drivers/net/wireless/iwlegacy/iwl-debugfs.c drivers/net/wireless/iwlegacy/iwl-rx.c drivers/net/wireless/iwlegacy/iwl-scan.c drivers/net/wireless/iwlegacy/iwl-tx.c include/net/bluetooth/bluetooth.h
2011-11-21ath6kl: Use mutex to protect dma buffer in sync read writeRaja Mani1-0/+9
Firmware crashes while starting Soft AP in 32 bit x86 platform. The reason is that the single dma buffer (ar_sdio->dma_buffer) is used in ath6kl_sdio_read_write_sync() for unaligned buffer handling and this function is called in the multiple context at the same time. So, finally hits dma buffer corruption and firmware crash. Mutex is used to protect dma buffer to avoid data corruption. Spin lock can not used to fix this issue since mmc stack read/write calls may for sleep. Observed this issue with recently commited patch "ath6kl: Claim sdio function only at appropriate places" 861dd058f495973c7ad2a44b8f68f3cc05733eab kvalo: change name of mutex to more descriptive and add a comment about what it protects Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: add ar6004 firmwares to sdio moduleKalle Valo1-0/+6
When adding ar6004 SDIO support I forgot to add corresponding MODULE_FIRMWARE() definitions to sdio.c. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: use hardware version names consistentlyKalle Valo1-10/+10
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>
2011-11-13ath6kl: enable USB supportKalle Valo1-1/+1
Now two modules are built, ath6kl_sdio.ko and ath6kl_usb.ko. But the USB module isn't fully functional yet as HTC layer is missing support and that's why it's marked as experimental for now. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: add hif_typeKalle Valo1-0/+1
In some rare cases core code needs to know what hif type is used. Add a field to struct ath6kl to denote that. Hopefully this is just a temporary solution. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: AR6004 SDIO supportNaveen Gangadharan1-0/+2
Add support for AR6004 SDIO. Tested scan, association (open mode) and ping. kvalo: change commit log a bit, drop board address changes Signed-off-by: Naveen Gangadharan <ngangadh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: move diag commands to hif driverKalle Valo1-0/+100
This is preparation for USB support which will have different diag commands. Based on code by Kevin Fang. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: change bmi sizes being configurable by HIFKalle Valo1-0/+1
SDIO and USB have different maximum sizes for BMI commands so make that configurable. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: move bmi calls to hif driverKalle Valo1-0/+162
In preparation for USB support which has it's own method for bmi. Based on code by Kevin Fang. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Remove WARN_ON msg in Suspend pathRaja Mani1-2/+0
In the current code, WOW resume is executed first from RX path and ar->state is moved to ATH6KL_STATE_ON. When platform calls ath6kl_sdio_resume() in CFG resume context, that time ar->state could have moved to ON state. Printing WARN_ON(1) is void in this context. Hence removing this. Once WOW resume is removed from RX path, This WARN_ON msg can be reverted. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Invoke WOW suspend/resume calls during PM operationRaja Mani1-0/+20
Link ath6kl's wow suspend/resume functions with the actual suspend/resume path. WOW mode is selected when the host sdio controller supports both MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ capabilities. kvalo: also adds a missing break in ath6kl_cfg80211_resume(), luckily it didn't have any effect on functionality. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Include new parameter in suspend path for wowlanRaja Mani1-3/+4
cfg80211 layer provides user defined wow parameters like Filter options, Patterns, Pattern's mask, etc via "struct cfg80211_wowlan *wow" to suspend function. Right now, this wowlan parameter is not handled in __ath6kl_cfg80211_suspend func. This parameter has to be passed to HIF layer, So that it can be passed back to ath6kl's cfg interface layer when WOW mode is selected. In case of deep sleep and cut power mode, it's not handled. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: add suspend_cutpower module parameterKalle Valo1-1/+2
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>
2011-11-11ath6kl: cut power during suspendKalle Valo1-8/+56
If sdio controller doesn't support keep power, cut power from hardware during suspend and restart firmware during resume. If we are connected during suspend, send a disconnected event to user space. Earlier suspend failed with an error if sdio didn't support keep power. Now suspend will happen succesfully even with that case. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: refactor sdio configuration to a separate functionKalle Valo1-33/+44
These commands are also needed after cutpower suspend so create a function for them. Also fix memory leaks in ath6kl_sdio_probe() error path. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: implement ath6kl_cfg80211_suspend()Kalle Valo1-7/+2
This is in preparation for cutpower suspend feature. HIF layer makes the decision based on information provided by cfg80211 and what hardware actually supports. Then it calls ath6kl_cfg80211_suspend() to enable the chosen mode. Functionality should be the same, this is just preparation for more suspend modes (cutpower and wow). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>