aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btmrvl_sdio.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-09-08Bluetooth: btmrvl: remove pointless conditional before kfree_skb()Wei Yongjun1-2/+1
Remove pointless conditional before kfree_skb(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-08-06Bluetooth: Use devm_kzalloc in btmrvl_sdio.c fileSachin Kamat1-11/+4
devm_kzalloc() eliminates the need to free memory explicitly thereby saving some cleanup code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-09Bluetooth: btmrvl: trivial style fixesAndrei Emeltchenko1-1/+2
Patch shortens locals scope and adds missing braces. This is a diff between v1 which was applied and v2 of patch "Bluetooth: btmrvl: Do not send vendor events to bluetooth stack". Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-06-26Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetoothGustavo Padovan1-3/+5
2012-06-19Bluetooth: btmrvl: Do not send vendor events to bluetooth stackAndrei Emeltchenko1-3/+5
Vendor-specific events shall be processed in driver and not sent to bluetooth stack where they screw up HCI command countings. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-06-05Bluetooth: btmrvl: add SD8787 Bluetooth AMP device IDBing Zhao1-0/+3
SD8787 SDIO function 3 (device ID 0x911B) is for Bluetooth AMP. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-05-09Bluetooth: btmrvl: add support for SDIO suspend/resume callbacksAmitkumar Karwar1-0/+100
Host sleep is activated using already configured host sleep parameters in suspend handler and it is cancelled in resume handler. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
2012-05-09Bluetooth: btmrvl: configure default host sleep parametersAmitkumar Karwar1-0/+3
Currently debugfs commands "hscfgcmd" and "gpiogap" are provided for host sleep configuration. But if user doesn't configure host sleep parameters using these commands, host sleep activation is failed during suspend (support for suspend and resume handlers is added in next patch). Default host sleep configuration is done during driver initialisation in this patch. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
2012-05-09Bluetooth: btmrvl_sdio: remove pointless conditional before release_firmware()Jesper Juhl1-7/+2
release_firmware() deals gracefullt with NULL pointers so there's no reason to test for one prior to calling the function. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
2011-12-09Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davemJohn W. Linville1-2/+13
2011-11-21Bluetooth: btmrvl: support Marvell Bluetooth device SD8797Bing Zhao1-2/+13
The SD8797 firmware image is shared with mwifiex driver. Whoever gets loaded first will be responsible for firmware downloading. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-10-31bluetooth: add module.h to drivers/bluetooth files as required.Paul Gortmaker1-0/+1
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-05btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888'Paul Bolle1-2/+2
It should be 'btmrvl_sdio_sd8688', of course. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-13Bluetooth: btmrvl: support Marvell Bluetooth device SD8787Kevin Gan1-30/+94
The SD8787 firmware image is shared with mwifiex driver. Whoever gets loaded first will be responsible for firmware downloading. Signed-off-by: Kevin Gan <ganhy@marvell.com> Signed-off-by: Tristan Xu <xurf@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2010-07-21Bluetooth: Use kzalloc for driversJulia Lawall1-6/+2
Use kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,size,flags; statement S; @@ -x = kmalloc(size,flags); +x = kzalloc(size,flags); if (x == NULL) S -memset(x, 0, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2010-07-21Bluetooth: Process interrupt in main thread of btmrvl driver as wellAmitkumar Karwar1-47/+50
When driver is sending a command or data and the firmware is also sending a sleep event, sometimes it is observed that driver will continue to send the command/data to firmware right after processing sleep event. Once sleep event is processed driver is not supposed to send anything because firmware is in sleep state after that. Previously interrupt processing was done in SDIO interrupt callback handler. Now it is done in btmrvl driver main thread to solve the cross-sending properly. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2010-07-21Bluetooth: Silence warning in btmrvl SDIO driverKulikov Vasiliy1-3/+3
Clone checking of ret to simplify the code. This patch silences a compiler warning: drivers/bluetooth/btmrvl_sdio.c: In function ‘btmrvl_sdio_verify_fw_download’: drivers/bluetooth/btmrvl_sdio.c:80: warning: ‘fws1’ may be used uninitialized in this function drivers/bluetooth/btmrvl_sdio.c:80: note: ‘fws1’ was declared here Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2010-05-10Bluetooth: Separate btmrvl_register_hdev() from btmrvl_add_card()Bing Zhao1-1/+6
Move btmrvl hdev registration code out of btmrvl_add_card(). New function btmrvl_register_hdev() is added. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-02-27Bluetooth: Add __init/__exit macros to Marvell SDIO driverPeter Huewe1-2/+2
Trivial patch which adds the __init/__exit macros to the module_init/ module_exit functions of btmrvl_sdio.c driver. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2010-02-03Bluetooth: Fix memory leak in Marvell BT-over-SDIO driverYoichi Yuasa1-0/+1
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-12-09Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits) tree-wide: fix misspelling of "definition" in comments reiserfs: fix misspelling of "journaled" doc: Fix a typo in slub.txt. inotify: remove superfluous return code check hdlc: spelling fix in find_pvc() comment doc: fix regulator docs cut-and-pasteism mtd: Fix comment in Kconfig doc: Fix IRQ chip docs tree-wide: fix assorted typos all over the place drivers/ata/libata-sff.c: comment spelling fixes fix typos/grammos in Documentation/edac.txt sysctl: add missing comments fs/debugfs/inode.c: fix comment typos sgivwfb: Make use of ARRAY_SIZE. sky2: fix sky2_link_down copy/paste comment error tree-wide: fix typos "couter" -> "counter" tree-wide: fix typos "offest" -> "offset" fix kerneldoc for set_irq_msi() spidev: fix double "of of" in comment comment typo fix: sybsystem -> subsystem ...
2009-12-04tree-wide: fix assorted typos all over the placeAndré Goddard Rosa1-1/+1
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-03Bluetooth: Declare MODULE_FIRMWARE for Marvell SDIO driverBen Hutchings1-0/+2
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-12-03Bluetooth: Enable auto sleep mode for btmrvl driverAmitkumar Karwar1-0/+2
The auto sleep mode for btmrvl driver is not enabled by default. This patch enables auto sleep mode when card is probed. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-08-22Bluetooth: Add missing kmalloc NULL tests to Marvell driverJulia Lawall1-2/+3
Check that the result of kmalloc is not NULL before dereferencing it. The patch also replaces kmalloc + memset by kzalloc. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; identifier f; constant char *C; @@ x = \(kmalloc\|kcalloc\|kzalloc\)(...); ... when != x == NULL when != x != NULL when != (x || ...) ( kfree(x) | f(...,C,...,x,...) | *f(...,x,...) | *x->f ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-08-22Bluetooth: Fix incorrect alignment in Marvell BT-over-SDIO driverBing Zhao1-5/+7
The driver uses "u32" for alignment check and calculation which works only on 32-bit system. It will crash the 64-bit system. Replace "u32" with "unsigned long" to fix this issue. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-08-22Bluetooth: Remove Enter/Leave debug statements from Marvell driverMarcel Holtmann1-123/+12
The Marvell Bluetooth driver is full of Enter/Leave debug statements and all of them are really pointless and only clutter the code. Seems to be some left-overs when they ported the driver from Windows. For the Linux driver lets remove these. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-08-22Bluetooth: Remove private device name of Marvell SDIO driverMarcel Holtmann1-3/+0
For some reason the btmrvl_device struct has a name field that the SDIO fills in, but then never ever uses again. That is totally pointless and so just remove it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-08-22Bluetooth: Fix module description strings for Marvell driverMarcel Holtmann1-1/+1
Make the module description entries for the core and also the Marvell SDIO driver match common practive inside the Bluetooth subsystem. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-08-22Bluetooth: Fix complicated assignment of firmware for Marvell devicesMarcel Holtmann1-52/+38
The Marvell Bluetooth SDIO driver has a really complicated concept on how firmware names are assigned to specific device ids. Fix that by doing a proper structure and assign it to the module device table. And while at it fix various coding style weirdness that is still present in this driver. Signed-off-by: Marcel Holtman <marcel@holtmann.org>
2009-08-22Bluetooth: Add Marvell BT-over-SDIO driverBing Zhao1-0/+1128
This driver supports Marvell Bluetooth enabled devices with SDIO interface. Currently only SD8688 chip is supported. The helper/firmware images of SD8688 can be downloaded from this tree: git://git.infradead.org/users/dwmw2/linux-firmware.git This patch incorporates a lot of comments given by Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre. Signed-off-by: Rahul Tank <rahult@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>