summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_sdio.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: wilc1000: added support to dynamically add/remove interfacesAjay Singh2019-07-011-4/+3Star
| | | | | | | | | | | | | Removed the use of two hardcoded interfaces and added support to add/remove the network interfaces dynamically. Now the driver will have single default interface with name 'wlan0' and later other interface can be added from user space application e.g using 'iw add' command. Also taken care to maintain 'wilc_vif' as part of 'net_device' private data and 'wilc' struct as 'wiphy' private data. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove 'linux_' prefix in function namesAjay Singh2019-02-071-5/+5
| | | | | | | Remove 'linux_' prefix and replace it with 'wilc_' namespace. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: added 'wilc_' prefix for function in wilc_sdio.c fileAjay Singh2019-02-071-46/+46
| | | | | | | Cleanup patch to have proper follow clear namespace in wilc_sdio.c file. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid function forward declaration in wilc_sdio.c fileAjay Singh2019-02-071-48/+43Star
| | | | | | | | Cleanup patch to avoid function forward declaration by reordering the function. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix missing read_write setting when reading dataColin Ian King2018-12-201-0/+1
| | | | | | | | | | | | | | Currently the cmd.read_write setting is not initialized so it contains garbage from the stack. Fix this by setting it to 0 to indicate a read is required. Detected by CoverityScan, CID#1357925 ("Uninitialized scalar variable") Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: stable <stable@vger.kernel.org> Acked-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use proper namespace for macros in wilc_wlan_if.h headerAjay Singh2018-11-121-1/+2
| | | | | | | | | Rename the macros defined in wilc_wlan_if.h header to have clear namespace. As convention used 'WILC_FW_' prefix for constants defined for firmware and 'WILC_' prefix for driver constants. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move sdio_cmd52 & sdio_cmd53 struct to source fileAjay Singh2018-11-121-0/+19
| | | | | | | | Moved sdio_cmd52 & sdio_cmd53 struct from wilc_wlan_if.h, as its used in wilc_sdio.cfile. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()Ajay Singh2018-09-251-3/+1Star
| | | | | | | | Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to zero as the buffer was allocated using kzalloc(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid use of 'g_sdio' static variableAjay Singh2018-09-251-20/+34
| | | | | | | | | Instead of using static variable 'g_sdio' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free during deinitialization. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: added Microchip copyright notice headerAjay Singh2018-08-051-3/+2Star
| | | | | | | | | | Cleanup the copyright notice header from the WILC1000 files. Replace copyright header of 'Atmel' & 'NewportMedia' with 'Microchip & its subsidiaries'. Also added the same copyright notice header for all wilc1000 driver source and header files. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix compilation warning for ARCH PowerPCAjay Singh2018-08-021-1/+1
| | | | | | | | | | | | | Fix below warning reported for PowerPC arch compilation include/uapi/linux/byteorder/big_endian.h:95:37: warning: passing argument 1 of '__swab32s' makes pointer from integer without a cast [-Wint-conversion] Fixes: 02211edc9a1f ("staging: wilc1000: fix endianness warnings reported by sparse") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix endianness warnings reported by sparseAjay Singh2018-08-021-2/+2
| | | | | | | | | | | | | | | | | | This patch fixes the sparse warnings by making use of le32_to_cpus() & cpu_to_le32s() conversion API's. Remove the unnecessary byte-order conversion in wilc_wlan_parse_response_frame() as the data is copied using individual byte operation. Also added the byte-order conversion for 'header' in wilc_wfi_monitor_rx() & wilc_wfi_p2p_rx() as received in LE byte-order. The link [1] contains the details of discussion related to this patch. [1]. https://patchwork.kernel.org/patch/10436791/ Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary comments and comments descriptionAjay Singh2018-08-021-9/+1Star
| | | | | | | | Cleanup patch to remove the unnecessary comments and commented code. Also updated description for few of comments. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use descriptor-based interface for GPIOAjay Singh2018-07-241-7/+16
| | | | | | | | | | | | | | Now making use of descriptor-based interface instead of integer-based interface for IRQ GPIO. Added device tree binding reference for WILC SDIO and SPI interface module. Also moved the code to free gpio descriptor in module remove as the reference was fetched in probe function. Updated the TODO file Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: change compatible string from atmel to microchipAjay Singh2018-07-241-2/+9
| | | | | | | | | | Use 'microchip' in compatible string instead of 'atmel', also replace '_' with '-' before the module. Remove 'wilc1000' prefix from device table name. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename variable from 'gpio' to 'gpio_irq'Ajay Singh2018-07-241-1/+1
| | | | | | | | | Rename from 'gpio' to 'gpio_irq', so its inlcude the information about the purpose of GPIO. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove gpio parameter from wilc_netdev_init()Ajay Singh2018-07-241-2/+2
| | | | | | | | | | Instead of passing the gpio as parameter to wilc_netdev_init() now setting its value after finishing wilc_netdev_init() call. Avoided passing of extra parameter to wilc_netdev_init(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix line over 80 chars in wilc_sdio structAjay Singh2018-05-141-1/+2
| | | | | | | | Fix line over 80 chars issue found by checkpatch.pl script by placing the comment message above the macro preprocessor. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary header file inclusion for wilcAjay Singh2018-05-031-8/+2Star
| | | | | | | | | Remove the unnecessary file inclusion in the source code. Also follow the convension to first include the system header then project specific header files. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary assingment from 'if' conditionsAjay Singh2018-04-261-6/+6
| | | | | | | | Cleanup patch to remove the unnecessary use of '==' check used in if conditions. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename goto label '_fail_' linux naming convensionAjay Singh2018-04-251-42/+42
| | | | | | | | Rename '_fail_' goto label to have name as per linux coding style. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix line over 80 characters in sdio_clear_int_ext()Ajay Singh2018-02-161-2/+5
| | | | | | | | Fix "line over 80 characters" issue found by checkpatch.pl script by modifying the comment description. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()Ajay Singh2018-02-161-69/+65Star
| | | | | | | | Refactor sdio_clear_int_ext() function to remove "Too many leading tabs" warning reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary comments to avoid line over 80 char issueAjay Singh2018-02-161-4/+4
| | | | | | | | Fix "line over 80 characters" issue reported by checkpatch.pl script by removing unnecessary comments. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary use of parenthesesAjay Singh2018-01-231-2/+2
| | | | | | | | | Fix "Unnecessary parentheses around" issue found by checkpatch.pl script.Remove the unnecessary parentheses to follow linux coding style. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: add SPDX identifiers to all wilc100 filesGreg Kroah-Hartman2017-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | | It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the wilc100 driver files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Ganesh Krishna <ganesh.krishna@microchip.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Aditya Shankar <aditya.shankar@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/staging/wilc1000: Removing explicit function tracing using dev_dbg/infoPushkar Jambhlekar2017-03-291-4/+0Star
| | | | | | | ftrace can be used to trace functions. Removing function tracing using dev_dbg/info Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/staging/wilc1000: Using __func__ instead of hardcoded function namePushkar Jambhlekar2017-03-291-2/+2
| | | | | | | dev_err: replacing hardcoded function name with '%s' and __func__ Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:wilc1000:wilc_sdio: Modified comment style to preferred kernel ↵Georgios Emmanouil2017-03-091-8/+5Star
| | | | | | | | | | comment style Modified comment style to preferred kernel comment style. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:wilc1000:wilc_sdio.c Deleted un-needed blank linesScott Matheina2017-01-161-3/+0Star
| | | | | | | | | Fixes checkpatch CHECK: Blank lines aren't necessary before a close brace '}' Please don't use multiple blank lines Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:wilc1000:wilc_sdio.c Aligns code match open parenthesisScott Matheina2017-01-161-1/+1
| | | | | | | Fixes checkpatch CHECK: Alignment should match open parenthesis Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: Remove unnecessary extern variables.Elise Lennion2016-10-171-1/+2
| | | | | | | | | | | Extern variables and functions used in only one file were removed from .h files, and made static in the .c files they're used. Extern variable wilc_initialized was declared and never used, so it was removed. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix spelling mistake: "interupts" -> "interrupts"Colin Ian King2016-06-251-1/+1
| | | | | | | | trivial fix to spelling mistake in dev_err messages Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove typedef from sdio_cmd53_tChaehyun Lim2016-03-041-5/+5
| | | | | | | | This patch removes typedef from struct sdio_cmd53_t and renames it to sdio_cmd53. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove typedef from struct sdio_cmd52_tChaehyun Lim2016-03-041-13/+13
| | | | | | | | This patch removes typedef from struct sdio_cmd52_t and renames it to sdio_cmd52. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: wilc1000: Remove and rename struct typedefs from .c filesBhumika Goyal2016-02-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using typedef for a structure type is not suggested in Linux kernel coding style guidelines. So remove typedefs from structures wilc_sdio_t, wilc_spi_t and wilc_mac_cfg_t. Also remove '_t' suffix from the struct names by hand. The following semantic patch detects cases: @tn1@ type td; @@ typedef struct { ... } td; @script:python tf@ td << tn1.td; tdres; @@ coccinelle.tdres = td; @@ type tn1.td; identifier tf.tdres; @@ -typedef struct + tdres { ... } -td ; @@ type tn1.td; identifier tf.tdres; @@ -td + struct tdres Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: Remove unneeded parentheses in assignmentJanani Ravichandran2016-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Remove parentheses around the right hand side of assignments. They are unnecessary. Semantic patch: @@ expression a, b, c; @@ ( a = (b == c) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: sdio_init: add resume argumentGlen Lee2016-02-041-15/+19
| | | | | | | | Part of sdio init codes should not run when sdio init function is called on sdio resume so skip them. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: add sdio resume/suspendGlen Lee2016-02-041-0/+72
| | | | | | | | | This patch introduces sdio device suspend and resume functionality. sdio_reset function is added to reset sdio. Remove static inline keyword from chip_allow_sleep and chip_wakeup, and export symbols. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove wilc_sdio_initGlen Lee2016-02-041-10/+0Star
| | | | | | | | wilc_sdio_init return always 1, which is needless. Remove it and it's related codes also. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix always return 0 errorGlen Lee2016-02-041-2/+0Star
| | | | | | | | This patch fixes a bug that return always 0 so it fails every time. Fixes: c1af9db78950 ("staging: wilc1000: call linux_sdio_init instead of io_init") Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: linux_wlan_sdio.c: move all the codes to wilc_sdio.cGlen Lee2015-12-211-1/+163
| | | | | | | | | | | To Combine linux_wlan_sdio.c and wilc_sdio.c as one file, move all the codes in linux_wlan_sdio.c to wilc_sdio.c, and make functions static only. No Modification has not been made except static, just moved them. Function declaration in linux_wlan_sdio.h is needless, so just remove them. linux_wlan_sdio.[ch] will be deleted in the next patch. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: wilc_sdio_cmd52: return linux error valueGlen Lee2015-12-211-18/+33
| | | | | | | This patch changes return value with linux error value, not 1 or 0. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: wilc_sdio_cmd53: return linux error valueGlen Lee2015-12-211-10/+16
| | | | | | | This patch changes return value with linux error value, not 1 or 0. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unused functionsGlen Lee2015-12-211-94/+0Star
| | | | | | | | | This patch removes unused function pointer hif_sync and hif_clear_int, and removes it's related functions sdio_clear_int, sdio_sync, wilc_spi_clear_int and wilc_spi_sync. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove wilc_debug_func of hif_initGlen Lee2015-12-211-1/+1
| | | | | | | | This patch removes wilc_debug_func of hif_init and remove it's related functions as well because it is not used anymore. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: sdio/spi: use device print api instead of custom oneGlen Lee2015-12-211-52/+99
| | | | | | | | | | This patch use device print api instead of driver defined print. Remove varialbe dPrint as well. String "[wilc sdio]" and "[wilc spi]" are also removed from all the print statment if exist because it shows which device the message is related to. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use kernel define byte order macrosGlen Lee2015-12-211-6/+2Star
| | | | | | | | | This patch removes define BIG_ENDIAN and use kernel define byte order macros instead of swap itself. Remove unused BYTE_SWAP macro and __CHECK_ENDIAN__ in Makefile also. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: wilc_sdio_cmd53: pass struct wilcGlen Lee2015-12-181-6/+6
| | | | | | | | This patch adds new function parameter struct wilc and use it instead of global variable wilc_dev and pass wilc to the function as well. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: wilc_sdio_cmd52: pass struct wilcGlen Lee2015-12-181-21/+21
| | | | | | | | This patch adds new function parameter struct wilc and use it instead of wilc_dev. Pass wilc to the function as well. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>