summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_spi.c
AgeCommit message (Collapse)Author
2019-07-01staging: wilc1000: added support to dynamically add/remove interfacesAjay Singh
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>
2019-03-22staging: wilc1000: Remove return variables from wilc_spi.cNishka Dasgupta
Remove return variables from wilc_spi.c. Issue found with Coccinelle using ret.cocci. Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07staging: wilc1000: add 'wilc_' prefix to have proper namespaceAjay Singh
Cleanup patch to rename data structure and function name to have 'wilc_' prefix. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05staging: wilc1000: correct inconsistent indentingMichael Straube
Correct inconsistent indenting reported by smatch. Instead of simply remove indentation, refactor the loop to also improve readabilitiy. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-12staging: wilc1000: use proper namespace for macros in wilc_wlan_if.h headerAjay Singh
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>
2018-09-25staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()Ajay Singh
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>
2018-09-25staging: wilc1000: avoid use of 'g_spi' static variableAjay Singh
Instead of using static variable 'g_spi' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free is taken care in wilc_netdev_cleanup(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging: wilc1000: added Microchip copyright notice headerAjay Singh
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>
2018-08-02staging: wilc1000: fix compilation warning for ARCH PowerPCAjay Singh
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>
2018-08-02staging: wilc1000: fix endianness warnings reported by sparseAjay Singh
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>
2018-08-02staging: wilc1000: remove unnecessary comments and comments descriptionAjay Singh
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>
2018-07-24staging: wilc1000: use descriptor-based interface for GPIOAjay Singh
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>
2018-07-24staging: wilc1000: change compatible string from atmel to microchipAjay Singh
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>
2018-07-24staging: wilc1000: rename variable from 'gpio' to 'gpio_irq'Ajay Singh
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>
2018-07-24staging: wilc1000: remove gpio parameter from wilc_netdev_init()Ajay Singh
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>
2018-05-03staging: wilc1000: remove unnecessary header file inclusion for wilcAjay Singh
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>
2018-05-03staging: wilc1000: remove unnecessary static function defination in wilc_spiAjay Singh
Cleanup patch to remove the unnecessary code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26staging: wilc1000: simplified if conditions in spi_data_write()Ajay Singh
Cleanup patch to simplify the if conditions logic in spi_data_write(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26staging: wilc1000: remove 'cmd' variable in wilc_spi functionsAjay Singh
Cleanup patch to remove the 'cmd' variable in wilc_spi.c. Instead of using cmd now passing the command directly. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26staging: wilc1000: remove unnecessary assingment from 'if' conditionsAjay Singh
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>
2018-04-26staging: wilc1000: align the #define in wilc_spi fileAjay Singh
Cleanup patch to align the #define used in wilc_spi.c file by adding the tabs. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: remove the use of goto label in wilc_spi_clear_int_ext()Ajay Singh
Remove goto label '_fail_' used in wilc_spi_clear_int_ext(), to avoid the label name starting with '_'. 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>
2018-04-25staging: wilc1000: remove the use of goto label in wilc_spi_read_int()Ajay Singh
In wilc_spi_read_int() remove the use of goto label '_fail_'. Changes are done to avoid the use of '_' in label 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>
2018-04-25staging: wilc1000: remove the use of goto label in wilc_spi_read_size()Ajay Singh
In wilc_spi_read_size() remove the use of goto label '_fail_'. Changes are done to avoid the use of '_' in label 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>
2018-04-25staging: wilc1000: remove the use of goto label in spi_cmd_complete()Ajay Singh
In spi_cmd_complete() remove the use of goto label '_error_'. Changes were done to avoid the use of '_' in label 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>
2018-02-16staging: wilc1000: fix line over 80 chars in wilc_spi_clear_int_ext()Ajay Singh
Refactor wilc_spi_clear_int_ext() to fix the "line over 80 char" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16staging: wilc1000: fix line over 80 characters in wilc_spi_read_int()Ajay Singh
Refactor wilc_spi_read_int() to fix the line over 80 char issues reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16staging: wilc1000: fix line over 80 characters in wilc_spi_init()Ajay Singh
Modified wilc_spi_init() to fix the line over 80 char issues reported by checkpatch.pl script. To overcome the checkpatch.pl reported issue modified debug logs and comments used in wilc_spi_init(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16staging: wilc1000: fix line over 80 characters in spi_cmd_complete()Ajay Singh
Refactor spi_cmd_complete() to fix the line over 80 char issues reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16staging: wilc1000: removed the unnecessary commented codeAjay Singh
Cleanup patch to remove the unused commented code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16staging: wilc1000: modified code comments as per linux coding styleAjay Singh
Cleanup patch to follow the comments style as per the Linux coding style. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23staging: wilc1000: remove unnecessary use of parenthesesAjay Singh
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>
2017-11-28staging: wilc1000: add SPDX identifiers to all wilc100 filesGreg Kroah-Hartman
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>
2017-03-16staging: wilc1000: Remove unnecessary bracketsTamara Diaconita
Remove unnecessary brackets and correspondingly unindent code. Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: wilc1000: Correct name of variablesTamara Diaconita
Correct misspelled variables: 'happended' to 'happened' to make the code grammatically correct. Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: wilc1000: Declare variables to top of functionTamara Diaconita
Move declaration of variables to top of function to make the code more readable. Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging:wilc1000:wilc_spi: Added blank line after function and modified ↵Georgios Emmanouil
comment style Added blank line after function and modified 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>
2017-03-09Staging:wilc1000:wilc_spi: Fixed spelling errorGeorgios Emmanouil
Fixed spelling error. 'unkmown' to 'unknown'. 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>
2017-03-09Staging:wilc1000:wilc_spi: Fixed comment style to the preferred kernel ↵Georgios Emmanouil
comment style Fixed comment style to the 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>
2017-03-07staging: wilc1000: Logical continuations should be on the previous lineArushi Singhal
This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: wilc1000: Alignment should match open parenthesisArushi Singhal
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17staging: wilc1000: Remove unnecessary extern variables.Elise Lennion
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>
2016-10-16staging: wilc1000: Format block comment.Elise Lennion
Fix checkpatch warning: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: wilc1000: wilc_spi: Remove unnecessary blank linesNamrata A Shettar
Remove unnecessary blank lines to resolve checkpatch issue. Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: wilc1000: wilc_spi: Compress return logicNamrata A Shettar
Compress return logic. Done using Coccinelle : @@ local idexpression ret; expression e; @@ -ret= +return e; -return ret; Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: wilc1000: Merge assignment with returnRehas Sachdeva
Instead of storing the return value into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: wilc1000: fix spelling mistake: "retyring" -> "retrying"Colin Ian King
trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-25staging: wilc1000: fix spelling mistake: "interupts" -> "interrupts"Colin Ian King
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>
2016-03-28staging: wilc1000: wilc_spi.c: removes debug print logLeo Kim
This patches removes unnecessary debug print logs. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: Check for quoted strings broken across linesAnchal Jain
checkpatch warn about quoted strings split across lines. So, convert multi-line string into a single line. Signed-off-by: Anchal Jain <anchalj109@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>