[RESEND 03/33] staging: wilc1000: remove line over 80 char warnings in set_wiphy_params()

2018-04-23 Thread Ajay Singh
Fix 'line over 80 character' issue reported by checkpatch.pl script in set_wiphy_params(). Directly used the 'wiphy' pointer received as function argument instead of using 'priv->dev->ieee80211_ptr->wiphy'. Signed-off-by: Ajay Singh Reviewed-by: Cla

[RESEND 17/33] staging: wilc1000: handle error condition in add_key() and remove auth_type variable

2018-04-23 Thread Ajay Singh
Added the code to return correct error code in add_key() and also removed 'auth_type' variable. Now passing diretly to function instead of using the 'auth_type' variable. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_wfi_

[RESEND 18/33] staging: wilc1000: use sizeof(variable) for memory allocated to store key info

2018-04-23 Thread Ajay Singh
Changes to fix below checkpatch reported issues. CHECK: Prefer kmalloc(sizeof(*priv->wilc_gtk[idx])...) over kmalloc(sizeof(struct wilc_wfi_key)...) CHECK: Prefer kmalloc(sizeof(*priv->wilc_ptk[idx])...) over kmalloc(sizeof(struct wilc_wfi_key)...) Signed-off-by: Ajay Singh Revie

[RESEND 23/33] staging: wilc1000: remove multiple define used for MAX_SSID_LEN

2018-04-23 Thread Ajay Singh
Cleanup patch to have commonly used macro in common header file to avoid same defination in mulitple file. Removed MAX_SSID_LEN macro from coreconfigurator.h header as its already defined in wilc_wlan_if.h. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000

[RESEND 20/33] staging: wilc1000: rename WID_LOGTerminal_Switch to avoid camelCase

2018-04-23 Thread Ajay Singh
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/stagin

[RESEND 05/33] staging: wilc1000: rename WILC_WFI_p2p_rx & s32Freq to avoid camelCase

2018-04-23 Thread Ajay Singh
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Reviewed-by: Dan Carpenter --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 18 +- drive

[RESEND 07/33] staging: wilc1000: rename hAgingTimer to avoid camelCase issue

2018-04-23 Thread Ajay Singh
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Reviewed-by: Dan Carpenter --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drive

[RESEND 22/33] staging: wilc1000: remove unused macros in wilc module

2018-04-23 Thread Ajay Singh
NUM_BASIC_SWITCHES NUM_FHSS_SWITCHES NUM_11N_BASIC_SWITCHES NUM_11N_HUT_SWITCHES BA_SESSION_DEFAULT_BUFFER_SIZE BA_SESSION_DEFAULT_TIMEOUT BLOCK_ACK_REQ_SIZE Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/coreconfigurator.h | 13 - drivers/staging/wilc1000

[RESEND 26/33] staging: wilc1000: remove the use of goto label in wilc_spi_read_size()

2018-04-23 Thread 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 Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[RESEND 24/33] staging: wilc1000: remove multiple define for mac connect and disconnect

2018-04-23 Thread Ajay Singh
Cleanup patch to have commonly used macro in common header file to avoid same defination in mulitple file. Removed MAC_CONNECTED & MAC_DISCONNECTED macro from coreconfigurator.h header. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/coreconfigurator.h

[RESEND 12/33] staging: wilc1000: rename WILC_WFI_wep_key & WILC_WFI_wep_key_len

2018-04-23 Thread Ajay Singh
Cleanup patch to use lower case for variable name as per linux coding style. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 30 +++ drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 +-- 2 files changed, 17

[RESEND 21/33] staging: wilc1000: added identifiers name in function definations

2018-04-23 Thread Ajay Singh
Fix identifier names required for functions definition issues reported by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_wlan.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a

[RESEND 04/33] staging: wilc1000: refactor WILC_WFI_p2p_rx() to avoid line over 80 char

2018-04-23 Thread Ajay Singh
Fix 'line over 80 characters' issue found by checkpatch.pl script. Refactor and split the function to avoid the checkpatch reported issues. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea Reviewed-by: Dan Carpenter --- drivers/staging/wilc1000/wilc_wfi_cfgoperatio

[RESEND 29/33] staging: wilc1000: remove the use of goto label in wilc_init()

2018-04-23 Thread Ajay Singh
Added direct return in wilc_init() instead of goto label. Changes are done to avoid the use of '_' in label name. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/host_interface.c | 19 --- 1 file changed, 8 insertions(+), 11 deletion

[RESEND 31/33] staging: wilc1000: rename goto labels starting with '_' in wilc1000_wlan_init()

2018-04-23 Thread Ajay Singh
Rename goto labels starting with '_' in wilc1000_wlan_init() to follow linux coding style. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/linux_wlan.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git

[RESEND 28/33] staging: wilc1000: remove goto label '_done_' in handle_listen_state_expired()

2018-04-23 Thread Ajay Singh
Remove the use of goto label '_done_' in handle_listen_state_expired(). Changes are done to avoid the use of '_' in label name. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/host_interface.c | 3 +-- 1 file changed, 1 insertion(+),

[RESEND 30/33] staging: wilc1000: rename goto label '_fail_' linux naming convension

2018-04-23 Thread Ajay Singh
Rename '_fail_' goto label to have name as per linux coding style. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/linux_wlan.c | 92 +-- drivers/staging/wilc1000/wilc_sdio.c | 84 ---

[RESEND 33/33] staging: wilc1000: rename pu32InactiveTime to avoid camelCase issue

2018-04-23 Thread Ajay Singh
Avoid camelCase issues found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/host_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000

[RESEND 25/33] staging: wilc1000: remove the use of goto label in spi_cmd_complete()

2018-04-23 Thread 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 Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_spi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deleti

[RESEND 32/33] staging: wilc1000: remove the use of goto label in wilc_spi_clear_int_ext()

2018-04-23 Thread 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 Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_spi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --g

[RESEND 27/33] staging: wilc1000: remove the use of goto label in wilc_spi_read_int()

2018-04-23 Thread 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 Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[RESEND 19/33] staging: wilc1000: fix line over 80 chars in change_station()

2018-04-23 Thread Ajay Singh
Fix 'line over 80 chars' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/stagin

[PATCH 1/2] staging: wilc1000: remove registering of ndo_do_ioctl callback

2018-04-24 Thread Ajay Singh
wext-core handling instead of private SIOCSIWPRIV implementation" Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 63 --- 1 file changed, 63 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/li

[PATCH 0/2] staging: wilc1000: TODO list updates

2018-04-24 Thread Ajay Singh
Updated the TODO list by removing items, which are already addressed. Also remove the code to handle IOCTL(SIOCSIWPRIV) as Wext support is not present in the driver. Ajay Singh (2): staging: wilc1000: remove registering of ndo_do_ioctl callback staging: wilc1000: updated TODO list drivers

[PATCH 2/2] staging: wilc1000: updated TODO list

2018-04-24 Thread Ajay Singh
Removed the items from WILC1000 TODO list, which are already addressed to keep it updated. The removed items are already taken care by previously submitted patches. Signed-off-by: Ajay Singh --- If someone feels differently please update for this patch. There are pending fixes for soft-ap, p2p

[PATCH v2 01/21] staging: wilc1000: replace crc7_byte() with inline macro CRC7_BYTE

2018-04-25 Thread Ajay Singh
Replace the function call for crc7_byte() with macro CRC7_BYTE. crc7_byte() was called in close while(), so replaced it with macro to avoid extra functional call depth. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions

[PATCH v2 05/21] staging: wicl1000: removed the unsed variables in wilc_parse_network_info()

2018-04-25 Thread Ajay Singh
Cleanup patch to remove the unused variables in wilc_parse_network_info(). The value is assinged to these local variables but assinged value is not used in that function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 7 --- 1 file changed, 7 deletions(-) diff

[PATCH v2 06/21] staging: wilc1000: remove inner {} in wilc_parse_network_info()

2018-04-25 Thread Ajay Singh
Cleanup patch to remove the unnecessary {/**/} block in wilc_parse_network_info(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 77 ++--- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH v2 11/21] staging: wilc1000: remove unused #define related to MAC status

2018-04-25 Thread Ajay Singh
Remove below #define which are not used in code: WILC_MAC_STATUS_READY WILC_MAC_STATUS_CONNECT Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000

[PATCH v2 07/21] staging: wilc1000: simplified if conditions in spi_data_write()

2018-04-25 Thread Ajay Singh
Cleanup patch to simplify the if conditions logic in spi_data_write(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000

[PATCH v2 02/21] staging: wilc1000: align the #define in wilc_spi file

2018-04-25 Thread Ajay Singh
Cleanup patch to align the #define used in wilc_spi.c file by adding the tabs. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers

[PATCH v2 04/21] staging: wilc1000: remove 'cmd' variable in wilc_spi functions

2018-04-25 Thread Ajay 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 --- drivers/staging/wilc1000/wilc_spi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wil

[PATCH v2 09/21] staging: wilc1000: remove unsed typedef wilc_debug_func

2018-04-25 Thread Ajay Singh
Cleanup patch to remove the unused typedef and also removed the unecessary comment about that typedef. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000

[PATCH v2 03/21] staging: wilc1000: remove unnecessary assingment from 'if' conditions

2018-04-25 Thread Ajay Singh
Cleanup patch to remove the unnecessary use of '==' check used in if conditions. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_sdio.c | 12 ++-- drivers/staging/wilc1000/wilc_spi.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drive

[PATCH v2 00/21] staging: wilc1000: remove unused code and reorder functions

2018-04-25 Thread Ajay Singh
This patch series contains fixes to remove the unused code. It also has patches to reorganize the function and simplify the function logic. Ajay Singh (21): staging: wilc1000: replace crc7_byte() with inline macro CRC7_BYTE staging: wilc1000: align the #define in wilc_spi file staging

[PATCH v2 13/21] staging: wilc1000: rename WILC_WFI_stats to avoid uppercase

2018-04-25 Thread Ajay Singh
Cleanup patch to have struct name as per linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000

[PATCH v2 14/21] staging: wilc1000: rename num_reg_frame macro to have uppercase in macro name

2018-04-25 Thread Ajay Singh
Cleanup patch to follow name as per linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000

[PATCH v2 17/21] staging: wilc1000: remove unused enum 'stats_flags'

2018-04-25 Thread Ajay Singh
Cleanup patch to remove the unused enum. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index e6489fa..5f4dbff

[PATCH v2 10/21] staging: wilc1000: remove used #define HIF_SDIO_GPIO_IRQ

2018-04-25 Thread Ajay Singh
Cleanup patch to remove unused #define. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index eb8d819..e8a56f4 100644 --- a/drivers/staging

[PATCH v2 12/21] staging: wilc1000: rename mac status macros and moved related #define together

2018-04-25 Thread Ajay Singh
Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 22 +++--- drivers/staging/wilc1000/linux_wlan.c | 4 ++-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 8

[PATCH v2 15/21] staging: wilc1000: rename wlan init and deinit function prefixed with wil1000

2018-04-25 Thread Ajay Singh
Rename wilc1000_wlan_init() & wilc1000_wlan_deinit() function to avoid unecessary 'wilc1000' prefix in function to be inline with other function naming convension. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 10 +- drivers/st

[PATCH v2 08/21] staging: wilc1000: remove unused variable scan_while_connected

2018-04-25 Thread Ajay Singh
Cleanup patch to remove the unused variable. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 12414f4

[PATCH v2 18/21] staging: wilc1000: rename P2P_LISTEN_STATE variable to use lowercase

2018-04-25 Thread Ajay Singh
Rename P2P_LISTEN_STATE variable to avoid using uppercase for variable name to follow linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c

[PATCH v2 19/21] staging: wilc1000: remove inner block '{}' in handle_remain_on_chan()

2018-04-25 Thread Ajay Singh
Cleanup patch to remove unnecessary inner block {\* *\} in handle_remain_on_chan(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b

[PATCH v2 21/21] staging: wilc1000: reorder functions to avoid forward declaration in linux_wlan

2018-04-25 Thread Ajay Singh
Reorder the functions in linux_wlan.c file to avoid having explicit declaration of static functions. Forward declaration is avoided with the help of reordering the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 106 +++--- 1 file

[PATCH v2 20/21] staging: wilc1000: change function to static in linux_wlan

2018-04-25 Thread Ajay Singh
Defined function as static which are used only in single file. And also removed their declaration from header file. Below function are changed to static wilc_wlan_initialize() wilc_wlan_deinitialize() wilc_wlan_get_firmware() Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c

[PATCH v2 16/21] staging: wilc1000: remove unused elements in 'wilc_priv' struct

2018-04-25 Thread Ajay Singh
uct napi_struct napi; Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 0a91468..e6489fa 100644 --- a/driv

Re: [PATCH v2 00/21] staging: wilc1000: remove unused code and reorder functions

2018-04-26 Thread Ajay Singh
Hi Greg, This series is actually V1 and not V2. Sorry, it's mistake from my side. If you want me to resend this series, please let me know. On Wed, 25 Apr 2018 22:48:05 +0530 Ajay Singh wrote: > This patch series contains fixes to remove the unused code. It also > has patches to

Re: [PATCH v2 01/21] staging: wilc1000: replace crc7_byte() with inline macro CRC7_BYTE

2018-04-26 Thread Ajay Singh
Hi Greg, On Thu, 26 Apr 2018 09:40:20 +0200 Greg KH wrote: > On Wed, Apr 25, 2018 at 10:48:06PM +0530, Ajay Singh wrote: > > Replace the function call for crc7_byte() with macro CRC7_BYTE. > > crc7_byte() was called in close while(), so replaced it with > > macro to avoid

Re: [PATCH] staging: wilc1000: fix infinite loop and out-of-bounds access

2018-04-30 Thread Ajay Singh
Reviewed-by: Ajay Singh On Mon, 30 Apr 2018 07:50:40 -0500 "Gustavo A. R. Silva" wrote: > If i < slot_id is initially true then it will remain true. Also, > as i is being decremented it will end up accessing memory out of > bounds. > > Fix this by incrementing *i

Re: [PATCH] staging: wilc1000: fix infinite loop and out-of-bounds access

2018-05-01 Thread Ajay Singh
On Mon, 30 Apr 2018 18:23:21 +0300 Dan Carpenter wrote: > On Mon, Apr 30, 2018 at 07:59:16PM +0530, Ajay Singh wrote: > > Reviewed-by: Ajay Singh > > > > On Mon, 30 Apr 2018 07:50:40 -0500 > > "Gustavo A. R. Silva" wrote: > > > > > If i

[PATCH 04/21] staging: wilc1000: remove unnecessary bracket used in switch in wilc_mgmt_frame_register()

2018-05-02 Thread Ajay Singh
Cleanup patch to remove the curly braces used in 'case' statement to follow as per linux standard. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/stagin

[PATCH 01/21] staging: wilc1000: remove inner block in wilc_netdev_init()

2018-05-02 Thread Ajay Singh
Cleanup patch to remove unnecessary inner block ( {/**/} ) in wilc_netdev_init(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b

[PATCH 13/21] staging: wilc1000: remove static variable 'del_beacon' and null check

2018-05-02 Thread Ajay Singh
Using local variable instead of static varible 'del_beacon'. Also removed the unnecessary 'if' check in handle_del_beacon(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/driv

[PATCH 02/21] staging: wilc1000: remove unnecessary 'out of memory' message in handle_key()

2018-05-02 Thread Ajay Singh
Fix "Possible unnecessary 'out of memory' message" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/driv

[PATCH 09/21] staging: wilc1000: rename WILC_WFI_mon_priv to avoid uppercase for struct name

2018-05-02 Thread Ajay Singh
Cleanup patch to avoid 'struct' name with uppercase letters. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 6 +++--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/stagin

[PATCH 12/21] staging: wilc1000: rename WILC_WFI_deinit_mon_interface to avoid uppercase for function name

2018-05-02 Thread Ajay Singh
Changes to avoid the use of uppercase for function name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 3 files changed, 3 insertions

[PATCH 03/21] staging: wilc1000: modified NULL check used for 'if' condition in delete_key()

2018-05-02 Thread Ajay Singh
Fix below issue reported by checkpatch.pl script. 'Comparison to NULL could be written "priv->wilc_gtk[key_index]"' 'Comparison to NULL could be written "priv->wilc_ptk[key_index]"' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_w

[PATCH 10/21] staging: wilc1000: rename WILC_WFI_mon_xmit to avoid uppercase for function name

2018-05-02 Thread Ajay Singh
Changes to avoid the use of uppercase for function name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 1667646..d5af736

[PATCH 15/21] staging: wilc1000: remove unused macros in host_interface

2018-05-02 Thread Ajay Singh
Cleanup patch to remove the unused macro mentioned below. Also move macro up along with other macro declaration. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH 00/21] staging: wilc1000: code cleanup & checkpatch fixes

2018-05-02 Thread Ajay Singh
This patch series contains fixes to remove unused code and changes for checkpatch.pl script reported issues. Ajay Singh (21): staging: wilc1000: remove inner block in wilc_netdev_init() staging: wilc1000: remove unnecessary 'out of memory' message in handle_key() staging

[PATCH 16/21] staging: wilc1000: remove unnecessary static function defination in wilc_spi

2018-05-02 Thread Ajay Singh
Cleanup patch to remove the unnecessary code. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index c17f5d2..1f2dde1 100644 --- a/drivers/staging

[PATCH 07/21] staging: wilc1000: remove unnecessary file and function header comments

2018-05-02 Thread Ajay Singh
Cleanup patch to remove the unnecessary comments used for file and functions header. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.h | 10 -- drivers/staging/wilc1000/linux_mon.c | 44 --- drivers/staging/wilc1000

[PATCH 21/21] staging: wilc1000: rename WILC_WFI_band_2ghz variable to avoid mixedcase

2018-05-02 Thread Ajay Singh
Rename 'WILC_WFI_band_2ghz' to avoid mixedcase for variable name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

[PATCH 11/21] staging: wilc1000: rename WILC_WFI_init_mon_interface to avoid uppercase in function name

2018-05-02 Thread Ajay Singh
Changes to avoid the use of uppercase for function name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 3 ++- 3 files changed, 4 insertions

[PATCH 14/21] staging: wilc1000: remove the use of cur_byte variable in functions

2018-05-02 Thread Ajay Singh
Instead of using the intermediate variable to hold the value, now directly using the allocated variable. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c

[PATCH 05/21] staging: wilc1000: fix line over 80 chars in remove_network_from_shadow()

2018-05-02 Thread Ajay Singh
Added changes to avoid line over 80 character issue in remove_network_from_shadow(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH 19/21] staging: wilc1000: use is_broadcast_ether_addr check for broadcast address

2018-05-02 Thread Ajay Singh
Make use of is_broadcast_ether_addr() to check if mac address is broadcast address. Remove static 'broadcast', as its not needed after use of is_broadcast_ether_addr(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 08/21] staging: wilc1000: rename WILC_WFI_monitor_rx to avoid uppercase for function name

2018-05-02 Thread Ajay Singh
Cleanup patch to follow names as per linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 3 files changed, 3 insertions

[PATCH 06/21] staging: wilc1000: use 'else if' condition in get_station()

2018-05-02 Thread Ajay Singh
Use 'else if' in get_station(), as only one condition will statisfy. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drive

[PATCH 20/21] staging: wilc1000: rename 'during_ip_time' macro to have uppercase name for macro

2018-05-02 Thread Ajay Singh
Rename 'during_ip_time' to 'DURING_IP_TIME_OUT' to have uppercase letter for macros(#define). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc

[PATCH 18/21] staging: wilc1000: move macro after the #include file in wilc_wfi_netdevice

2018-05-02 Thread Ajay Singh
Cleanup patch to organize macro in a file together after #include statements. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b

[PATCH 17/21] staging: wilc1000: remove unnecessary header file inclusion for wilc

2018-05-02 Thread Ajay 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 --- drivers/staging/wilc1000/coreconfigurator.c | 5 + drivers/staging/wilc1000/host_interface.c

Re: [PATCH] staging: wilc1000: fix infinite loop and out-of-bounds access

2018-05-02 Thread Ajay Singh
On Wed, 2 May 2018 11:39:36 +0300 Dan Carpenter wrote: > We're mainly discussing readability, right? > > To me when people use "int" that tells me as a reader that we don't > need to think about the type. It's going to be a small number. > > Say you have data which the user can control, then i

Re: [PATCH] staging: wilc1000: allocate less memory

2018-05-03 Thread Ajay Singh
gt; > Signed-off-by: Dan Carpenter Reviewed-by: Ajay Singh Thanks for submitting the changes by using correct structure size for memory allocation. > > diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c > b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index >

Re: [PATCH 1/3] staging: wilc1000: Remove unused variables

2018-05-06 Thread Ajay Singh
Thank you for the patch series. On Sun, 6 May 2018 00:33:31 -0700 Nathan Chancellor wrote: > GCC warns these variables are all set but never used so remove them. > > Signed-off-by: Nathan Chancellor Reviewed-by: Ajay Singh > --- > drivers/staging/wilc1000/host_interface

Re: [PATCH 2/3] staging: wilc1000: Remove useless function

2018-05-06 Thread Ajay Singh
t; > Signed-off-by: Nathan Chancellor Reviewed-by: Ajay Singh > --- > drivers/staging/wilc1000/host_interface.c | 12 > drivers/staging/wilc1000/host_interface.h | 1 - > drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +- > 3

Re: [PATCH 3/3] staging: wilc1000: Remove unnecessary array index check

2018-05-06 Thread Ajay Singh
On Sun, 6 May 2018 00:33:33 -0700 Nathan Chancellor wrote: > This statment triggers GCC's -Wtype-limit since key_index is an > unsigned integer so it cannot be less than zero. > > Signed-off-by: Nathan Chancellor Reviewed-by: Ajay Singh > --- > d

[PATCH 05/30] staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info()

2018-05-07 Thread Ajay Singh
Fix line over 80 characters issue reported by checkpatch.pl in host_int_parse_assoc_resp_info(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 37 ++- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH 00/30] staging: wilc1000: checkpatch fixes and code cleanup

2018-05-07 Thread Ajay Singh
This patch series contains modification to remove checkpatch related issues, mainly related to 'line over 80 chars'. We are left with around '5' checkpatch warnings in WILC1000. Also code cleanup related change to follow as per linux coding style are included in this patch

[PATCH 01/30] staging: wilc1000: added complete() call for error scenario in handle_key()

2018-05-07 Thread Ajay Singh
During memory allocation failure in handle_key() the complete() was not called for comp_test_key_block event. So now added the code to call complete() for event during error scenario. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 19 +++ 1 file

[PATCH 04/30] staging: wilc1000: fix line over 80 characters issue in handle_connect()

2018-05-07 Thread Ajay Singh
Fix line over 80 character issue found by checkpatch.pl script by aligning the input argument in function call. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH 07/30] staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param()

2018-05-07 Thread Ajay Singh
Split host_int_parse_join_bss_param() to avoid the line over 80 character issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 247 -- 1 file changed, 131 insertions(+), 116 deletions(-) diff --git a

[PATCH 03/30] staging: wilc1000: fix line over 80 chars in handle_key()

2018-05-07 Thread Ajay Singh
Fix checkpatch reported issue of line over 80 char in handle_key(). Introduced new functions by spliting existing function to address the checkpatch issue. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 59 +++ 1 file changed, 37 insertions

[PATCH 06/30] staging: wilc1000: fix line over 80 chars issue in host_int_handle_disconnect()

2018-05-07 Thread Ajay Singh
Fix line over 80 char issue in host_int_handle_disconnect() by using temp variable to hold the 'wilc_connect_result' function pointer. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 02/30] staging: wilc1000: remove 'ret' variable in handle_key()

2018-05-07 Thread Ajay Singh
Remove the use of unnecessary 'ret' variable and use existing 'result' variable to hold the status. Also changed type of 'result' from s32 to int to confirm with the function return type. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c

[PATCH 11/30] staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc()

2018-05-07 Thread Ajay Singh
Fix below reported checkpatch issues in wilc_wfi_cfg_alloc(). kzalloc(sizeof(*wdev)...) over kzalloc(sizeof(struct wireless_dev) Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH 08/30] staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info()

2018-05-07 Thread Ajay Singh
Fix line over 80 characters issue in host_int_parse_assoc_resp_info() by using shorter name for the local variable. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH 10/30] staging: wilc1000: fix line over 80 chars in linux_mon

2018-05-07 Thread Ajay Singh
Fix line over 80 char issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index

[PATCH 20/30] staging: wilc1000: fix line over 80 characters in add_key()

2018-05-07 Thread Ajay Singh
Fix line over 80 character issue found by checkpatch.pl script in add_key(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

[PATCH 19/30] staging: wilc1000: fix line over 80 chars in wilc_create_wiphy() declaration

2018-05-07 Thread Ajay Singh
Fix line over 80 characters issue found by checkpatch.pl script in function declaration. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b

[PATCH 14/30] staging: wilc1000: fix line over 80 chars in add_network_to_shadow()

2018-05-07 Thread Ajay Singh
Fix line over 80 characters issue reported by checkpatch in add_network_to_shadow() by using temporary variable. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 52 +++ 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/drivers

[PATCH 18/30] staging: wilc1000: fix line over 80 chars in get_station()

2018-05-07 Thread Ajay Singh
Fix line over 80 characters issue in get_station(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000

[PATCH 09/30] staging: wilc1000: rename kmalloc with kmemdup() in handle_connect_timeout()

2018-05-07 Thread Ajay Singh
Instead of kmalloc and memcpy use kmemdup in handle_connect_timeout(). Also return -ENOMEM incase of failure to allocate the memory. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 22/30] staging: wilc1000: fix line over 80 chars issue in connect()

2018-05-07 Thread Ajay Singh
Fix line over 80 characters in connect() by using temporary variables. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 29 +-- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

[PATCH 24/30] staging: wilc1000: refactor del_station() to avoid parenthesis misalignment

2018-05-07 Thread Ajay Singh
Refactor the code to fix open parenthesis alignment issue reported by checkpatch.pl script in del_station(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/staging

[PATCH 17/30] staging: wilc1000: fix line over 80 chars in wilc_wfi_cfg_tx_vendor_spec()

2018-05-07 Thread Ajay Singh
Fix line over 80 characters issues reported by checkpatch.pl script in wilc_wfi_cfg_tx_vendor_spec() by using temporary variable. Simplified 'if else' condition with 'if'. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++--

[PATCH 16/30] staging: wilc1000: fix line over 80 charas in wilc_wfi_remain_on_channel_expired()

2018-05-07 Thread Ajay Singh
Refactor wilc_wfi_remain_on_channel_expired() to avoid line over 80 character issue reported by checkpatch.pl script. Also assigned value in the variable at the time of declaration. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 16 +++- 1 file

[PATCH 26/30] staging: wilc1000: added #define for setting radiotap header

2018-05-07 Thread Ajay Singh
Added new macro to resolve below checkpatch issues in linux_mon. "Lines should not end with a '('" Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/li

[PATCH 12/30] staging: wilc1000: use kmalloc(sizeof(*mgmt_tx)...) in mgmt_tx()

2018-05-07 Thread Ajay Singh
Fix below checkpatch issue found in mgmt_tx() Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct p2p_mgmt_data)...) Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

<    1   2   3   4   5   6   7   >