[PATCH 00/12] staging: wilc1000: changes to address mainline review comments

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh This series contains pending patches from #9 till #15 from previous series[1]. Also added 5 new patches to avoid the use of unnecessary static variables for few leftovers. [1]. https://patchwork.kernel.org/cover/10794463/ https://patchwork.kernel.org/patch/10794479/ Ajay S

[PATCH 03/12] staging: wilc1000: refactor code to use cookie information

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh Make use of cookie information to pass to wpa_s and handle cookie value received in the cfg80211_ops callbacks. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 72 +++ drivers/staging/wilc1000/host_interface.h | 13

[PATCH 05/12] staging: wilc1000: avoid use of interface names for validation

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh Avoid use of interface name i.e 'wlan0' & 'p2p0' to check the interface type in dev_state_ev_handler(). Now making use of netdev_ops and iface type to know interface. Reorder the functions to avoid the forward declaration after the above changes Signed-off-by: Ajay Singh --- d

[PATCH 04/12] staging: wilc1000: use random number for cookie instead of pointer

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh Use random number to assign to cookie value. 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/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_w

[PATCH 02/12] staging: wilc1000: refactor linux_wlan_init_test_config()

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh Refactor linux_wlan_init_test_config() to use correct endianness for wid values and remove unnecessary code. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 200 +--- drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 2 files c

[PATCH 11/12] staging: wilc1000: move 'curr_channel' static variable in 'wilc' struct

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh Avoid the use of static variable and move it as part of wilc structure. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 22 -- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + 2 files changed, 13 insertions(+), 10

[PATCH 10/12] staging: wilc1000: move static variable 'wlan_channel' to 'wilc' struct

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh Avoid use of static variable 'wlan_channel' by moving it inside the wilc structure. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 36 --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + 2 files changed, 20 inser

[PATCH 07/12] staging: wilc1000: remove unused struct 'add_sta_param'

2019-02-04 Thread Ajay.Kathat
From: Ajay Singh Remove 'add_sta_param' structure as its not used now. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h

[PATCH 0/9] staging: wilc1000: fixes & changes for mainline review comments

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh This series contains the following changes: - fix to set 'vif_num' value correctly. The previous Fixes patch for vif count had not fixed the issue completely, so reverted it and added a new patch to fix the issue. - use 'wilc_' prefix for variables and function names. -

[PATCH 3/9] staging: wilc1000: add 'wilc_' prefix to have proper namespace

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to rename data structure and function name to have 'wilc_' prefix. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 54 +++ drivers/staging/wilc1000/host_interface.h | 12 ++--- drivers/staging/wilc1000

[PATCH 2/9] staging: wilc1000: fix to set the correct value for 'vif_num'

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Set correct interface count value in '->vif_num'. 'vif_num' was incorrectly set one less than total number of interfaces because 'i' is used to set its value, which starts from 0. Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") Cc: # v4.10 Signed-off-b

[PATCH 5/9] staging: wilc1000: avoid function forward declaration in wilc_sdio.c file

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to avoid function forward declaration by reordering the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_sdio.c | 91 +--- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/drivers/staging/wilc100

[PATCH 1/9] staging: wilc1000: revert fix related to vif index

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh This patch reverts 0e490657c721 ("staging: wilc1000: Fix problem with wrong vif index") commit. The issue was not completely fixed with the above commit. After 'for' loop completion, '->idx' value is correct but '->vif_num' still contains incorrect interface count. Fixes: 0e490

[PATCH 4/9] staging: wilc1000: move macro and function prototype from wilc_wlan_if.h file

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Move data structure and function prototype from 'wilc_wlan_if.h file. Now, this file contains constant specific to the firmware. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 1 + drivers/staging/wilc1000/host_interface.h | 11 ++ drivers/s

[PATCH 7/9] staging: wilc1000: rename wilc_frmw_to_linux()

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Rename wilc_frmw_to_linux() to wilc_frmw_to_host() to be remove the _linux suffix. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 3 ++- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 5 ++---

[PATCH 6/9] staging: wilc1000: added 'wilc_' prefix for function in wilc_sdio.c file

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to have proper follow clear namespace in wilc_sdio.c file. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_sdio.c | 92 ++-- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_

[PATCH 9/9] staging: wilc1000: rename linux_wlan.c and linux_mon.c

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Rename linux_wlan.c and linux_mon.c to wilc_netdev.c and wilc_mon.c to include 'wilc_' prefix. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile| 2 +- drivers/staging/wilc1000/{linux_mon.c => wilc_mon.c} | 0 drivers/staging/wilc1000/

[PATCH 8/9] staging: wilc1000: remove 'linux_' prefix in function names

2019-02-06 Thread Ajay.Kathat
From: Ajay Singh Remove 'linux_' prefix and replace it with 'wilc_' namespace. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 17 - drivers/staging/wilc1000/wilc_sdio.c | 10 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dri

Re: [PATCH 1/9] staging: wilc1000: revert fix related to vif index

2019-02-07 Thread Ajay.Kathat
Hi Dan, On 2/7/2019 1:42 PM, Dan Carpenter wrote: > This patch was very confusing to review... Apologies for the confusion. > From a process perspective, you really should fold patches 1 and 2 > together. Otherwise we're re-introducing a bug. Patch 1 and Patch 2 both are required if commit 0e4

[PATCH v2 8/8] staging: wilc1000: rename linux_wlan.c and linux_mon.c

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Rename linux_wlan.c and linux_mon.c to wilc_netdev.c and wilc_mon.c to include 'wilc_' prefix. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile| 2 +- drivers/staging/wilc1000/{linux_mon.c => wilc_mon.c} | 0 drivers/staging/wilc1000/

[PATCH v2 6/8] staging: wilc1000: rename wilc_frmw_to_linux()

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Rename wilc_frmw_to_linux() to wilc_frmw_to_host() to be remove the _linux suffix. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 3 ++- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 5 ++---

[PATCH v2 7/8] staging: wilc1000: remove 'linux_' prefix in function names

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Remove 'linux_' prefix and replace it with 'wilc_' namespace. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 17 - drivers/staging/wilc1000/wilc_sdio.c | 10 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dri

[PATCH v2 5/8] staging: wilc1000: added 'wilc_' prefix for function in wilc_sdio.c file

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to have proper follow clear namespace in wilc_sdio.c file. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_sdio.c | 92 ++-- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_

[PATCH v2 3/8] staging: wilc1000: move macro and function prototype from wilc_wlan_if.h file

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Move data structure and function prototype from 'wilc_wlan_if.h file. Now, this file contains constant specific to the firmware. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 1 + drivers/staging/wilc1000/host_interface.h | 11 ++ drivers/s

[PATCH v2 1/8] staging: wilc1000: fix to set correct value for 'vif_num'

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Set correct value in '->vif_num' for the total number of interfaces and set '->idx' value using 'i'. Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") Fixes: 0e490657c721 ("staging: wilc1000: Fix problem with wrong vif index") Cc: Suggested-by: Dan Carpe

[PATCH v2 0/8] staging: wilc1000: fixes & changes for mainline review comments

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh This series contains the following changes: - fix to set 'vif_num' value correctly. - use 'wilc_' prefix for variables and function names. - avoid use of unnecessary 'linux_' prefix from file names. Changes since v1: - merged patch 1 & 2 and added modification as suggeste

[PATCH v2 4/8] staging: wilc1000: avoid function forward declaration in wilc_sdio.c file

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to avoid function forward declaration by reordering the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_sdio.c | 91 +--- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/drivers/staging/wilc100

[PATCH v2 2/8] staging: wilc1000: add 'wilc_' prefix to have proper namespace

2019-02-07 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to rename data structure and function name to have 'wilc_' prefix. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 54 +++ drivers/staging/wilc1000/host_interface.h | 12 ++--- drivers/staging/wilc1000

Re: [PATCH v2 3/8] staging: wilc1000: move macro and function prototype from wilc_wlan_if.h file

2019-02-07 Thread Ajay.Kathat
On 2/7/2019 6:21 PM, Claudiu Beznea - M18063 wrote: > > > On 07.02.2019 13:29, ajay.kat...@microchip.com wrote: >> From: Ajay Singh >> >> Move data structure and function prototype from 'wilc_wlan_if.h file. >> Now, this file contains constant specific to the firmware. >> >> Signed-off-by: Ajay

Re: [PATCH] staging: wilc1000: Fix incorrent type in assignment

2019-02-25 Thread Ajay.Kathat
On 2/26/2019 8:58 AM, Bo YU wrote: > The patch fixes following sparse warning: > > drivers/staging/wilc1000/host_interface.c:450:30: warning: incorrect type in > assignment (different base types) > drivers/staging/wilc1000/host_interface.c:450:30:expected restricted > __le16 [usertype] be

Re: [PATCH V2] staging: wilc1000: fix incorrent type assignment

2019-02-26 Thread Ajay.Kathat
Thanks. On 2/26/2019 12:55 PM, Bo YU wrote: > Fix sparse warning: > > drivers/staging/wilc1000/host_interface.c:450:30: warning: incorrect type in > assignment (different base types) > drivers/staging/wilc1000/host_interface.c:450:30:expected restricted > __le16 [usertype] beacon_period > d

[PATCH] staging: wilc1000: use helper API to pack data for firmware

2019-08-06 Thread Ajay.Kathat
From: Ajay Singh As discussed in [1] use put_unaligned_le16() & put_unaligned_le32() helper to pack the data before sending to firmware. [1]. https://lore.kernel.org/linux-wireless/86bc79ccd379497d56bade79ec8f717603110ef7.ca...@sipsolutions.net/ Signed-off-by: Ajay Singh --- drivers/staging/

Re: [bug report] staging: wilc1000: added support to dynamically add/remove interfaces

2019-08-12 Thread Ajay.Kathat
Hi Dan, On 8/8/2019 4:18 PM, Dan Carpenter wrote: > > Hello Ajay Singh, > > The patch 9bc061e88054: "staging: wilc1000: added support to > dynamically add/remove interfaces" from Jun 26, 2019, leads to the > following static checker warning: > > drivers/staging/wilc1000/wilc_wlan.c:497 wi

Re: [PATCH 1/2] staging: dt-bindings: wilc1000: add optional rtc_clk property

2019-09-04 Thread Ajay.Kathat
Hi Eugen, On 04-Sep-19 7:03 PM, Eugen Hristev - M18282 wrote: > From: Eugen Hristev > > Add bindings for optional rtc clock pin. > > Signed-off-by: Eugen Hristev Thanks for sending the patch series. The changes in this series looks good to me. Acked-by: Ajay Singh Regards, Ajay > --- >

Re: [PATCH 1/2] staging: dt-bindings: wilc1000: add optional rtc_clk property

2019-09-05 Thread Ajay.Kathat
Hi Greg, On 05-Sep-19 1:07 PM, Greg KH wrote: > On Thu, Sep 05, 2019 at 06:09:43AM +, ajay.kat...@microchip.com wrote: >> Hi Eugen, >> >> On 04-Sep-19 7:03 PM, Eugen Hristev - M18282 wrote: >>> From: Eugen Hristev >>> >>> Add bindings for optional rtc clock pin. >>> >>> Signed-off-by: Eugen H

[PATCH 2/2] staging: wilc1000: avoid twice IRQ handler execution for each single interrupt

2019-09-10 Thread Ajay.Kathat
From: Ajay Singh The IRQ handler(isr_bh_routine()) was called twice for each interrupt from firmware. The data was read completely during the first call and the second call was doing nothing. Now changed the IRQ flag from ‘level’ to ‘edge’ trigger i.e IRQF_TRIGGER_LOW to IRQF_TRIGGER_FALLING to a

[PATCH 1/2] staging: wilc1000: remove unused interrupt status handling code

2019-09-10 Thread Ajay.Kathat
From: Ajay Singh Remove interrupt handling for unused interrupt status(PLL update and Sleep). The firmware only initiates the interrupt for the data transfer to host and rest are not used anymore. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 26 -

[PATCH 1/3] staging: wilc1000: remove unnecessary netdev validation check in del_key()

2019-09-26 Thread Ajay.Kathat
From: Ajay Singh Removed unnecessary check to compare vif interface with zeroth index element in vif array. Already the caller takes care of passing the appropriate netdev handler during the del key operation. Signed-off-by: Ajay Singh --- .../staging/wilc1000/wilc_wfi_cfgoperations.c | 33 +++

[PATCH 2/3] staging: wilc1000: move wlan_deinit_locks() in wilc_netdev_cleanup()

2019-09-26 Thread Ajay.Kathat
From: Ajay Singh Move deinitialization of lock during the module remove and the initialization of lock wilc_cfg80211_init(). This to ensure locks are available during module load and gets free during unload. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_netdev.c| 14 +

[PATCH 3/3] staging: wilc1000: use RCU list to maintain vif interfaces list

2019-09-26 Thread Ajay.Kathat
From: Ajay Singh Make use of RCU list to maintain virtual interfaces instead of an array. The update operation on 'vif' list is less compare to the read operations. Mostly the 'vif' list elements are accessed for the read operation, so RCU list is more suited for this requirement. The shifting of

[PATCH] staging: wilc1000: handle mgmt frames for both interfaces during concurrent mode

2019-10-18 Thread Ajay.Kathat
From: Ajay Singh During concurrent mode(AP/STA + P2P), pass the mgmt frames received from firmware to appropriate interface. Iterate the complete interface list to pass frames on the interface which has registered to receive mgmt frame. Added extra time for 'remain_on_ch' timer to ensure that tim

[PATCH 2/6] staging: wilc1000: remove 'wilc_' prefix from filenames

2019-11-05 Thread Ajay.Kathat
From: Ajay Singh Remove 'wilc_' prefix from filenames, the driver is already present inside the 'wilc1000' directory so no need to add 'wilc_' in filenames. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 8 .../wilc1000/{wilc_wfi_cfgoperation

[PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments

2019-11-05 Thread Ajay.Kathat
From: Ajay Singh This patch series contains changes to address some of the review comments received during full driver review [1]. Mainly the changes are related to files rename and comments formatting. 1. https://www.spinics.net/lists/linux-wireless/msg191489.html Ajay Singh (6): staging: wi

[PATCH 6/6] staging: wilc1000: use defines for msg types received from firmware

2019-11-05 Thread Ajay.Kathat
From: Ajay Singh Added defines for different types of messages received from firmware. Removed the unnecessary comments because after the addition of macros the message types are self-explanatory. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wlan_cfg.c | 20 +--- 1 fi

[PATCH 3/6] staging: wilc1000: added 'WILC_' prefix in header guard macro

2019-11-05 Thread Ajay.Kathat
From: Ajay Singh Use 'WILC_' prefix in header guard to follow the proper naming convention for macro name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/cfg80211.h | 4 ++-- drivers/staging/wilc1000/hif.h | 4 ++-- drivers/staging/wilc1000/netdev.h | 4 ++-- 3 files changed, 6

[PATCH 5/6] staging: wilc1000: added proper spacing for comments

2019-11-05 Thread Ajay.Kathat
From: Ajay Singh Added proper space for the comments and added newline before the comments inside a struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/mon.c | 2 +- drivers/staging/wilc1000/netdev.h | 19 ++- drivers/staging/wilc1000/wlan.h | 2 +- driv

[PATCH 1/6] staging: wilc1000: avoid 'bool' datatype in struct sent to firmware

2019-11-05 Thread Ajay.Kathat
From: Ajay Singh Use 'u8' instead of 'bool' datatype for struct element sent to firmware because storage of bool datatype is not guaranteed. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_hif.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/stagi

[PATCH 4/6] staging: wilc1000: avoid use of C++ style comments

2019-11-05 Thread Ajay.Kathat
From: Ajay Singh Replace C++ style comment with C style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/hif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/hif.c b/drivers/staging/wilc1000/hif.c index 25f035c02b10..5f6706bcedf6 100644 ---

[PATCH] staging: wilc1000: fix illegal memory access in wilc_parse_join_bss_param()

2019-11-07 Thread Ajay.Kathat
From: Ajay Singh Do not copy the extended supported rates in 'param->supp_rates' if the array is already full with basic rates values. The array size check helped to avoid possible illegal memory access [1] while copying to 'param->supp_rates' array. 1. https://marc.info/?l=linux-next&m=15730172

[PATCH 1/8] staging: wilc1000: handle p2p operations in caller context

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh Moved the handling of p2p related operation in the caller context instead of using workqueue. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 46 --- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/drivers/s

[PATCH 7/8] staging: wilc1000: remove extra argument passing to wilc_send_config_pkt()

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to remove the passing of driver handler, get the 'idx' value inside the called function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 116 ++ drivers/staging/wilc1000/wilc_wlan.c | 3 +- drivers/stag

[PATCH 5/8] staging: wilc1000: remove unnecessary loop to traverse vif interfaces

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh Cleanup patch to avoid loop to traverse the interfaces instead make use of vif received from net_device priv data. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 7 +-- drivers/staging/wilc1000/wilc_netdev.c| 16 +--- 2 files cha

[PATCH 6/8] staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh Remove use of 'src_addr' element in wilc_vif, as the same information already copied to net_device->dev_addr. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_netdev.c| 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc

[PATCH 0/8] staging: wilc1000: dynamically add/delete interfaces & cleanup fixes

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh This patch series mainly contains the changes to support the add/delete of wlan0/p2p0 network interfaces dynamically. The driver will be loaded with a single default interface and later new interfaces can be added or removed. Also included few cleanup patches in this series. Aja

[PATCH 2/8] staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh For the error path in wilc_wlan_initialize(), the resources are not cleanup in the correct order. Reverted the previous changes and use the correct order to free during error condition. Fixes: b46d68825c2d ("staging: wilc1000: remove COMPLEMENT_BOOT") Cc: Signed-off-by: Ajay Si

[PATCH 8/8] staging: wilc1000: rename 'host_interface' source and header

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh Rename 'host_interface' source and header file to include the 'wilc_' prefix in its name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 2 +- drivers/staging/wilc1000/{host_interface.c => wilc_hif.c} | 0 drivers/staging/wilc1000/{ho

[PATCH 3/8] staging: wilc1000: added support to dynamically add/remove interfaces

2019-06-26 Thread Ajay.Kathat
From: Ajay 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

[PATCH 4/8] staging: wilc1000: remove use of driver_handler_id & ifc_id

2019-06-26 Thread Ajay.Kathat
From: Ajay Singh Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to identify the handler. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 3 +-- drivers/staging/wilc1000/host_interface.h | 1 - drivers/staging/wilc1000/wilc_netdev.c

Re: [PATCH] staging: wilc1000: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-19 Thread Ajay.Kathat
On 7/19/2019 1:40 PM, Chuhong Yuan wrote: > > Merge the combo use of memcpy and le32_to_cpus. > Use get_unaligned_le32 instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan > --- > drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 +-- > 1 file changed, 1 insertion(+), 2 dele

Re: [PATCH] staging: wilc1000: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-19 Thread Ajay.Kathat
On 7/19/2019 5:16 PM, Chuhong Yuan wrote: > > 于2019年7月19日周五 下午7:34写道: >> >> On 7/19/2019 1:40 PM, Chuhong Yuan wrote: >>> >>> Merge the combo use of memcpy and le32_to_cpus. >>> Use get_unaligned_le32 instead. >>> This simplifies the code. >>> >>> Signed-off-by: Chuhong Yuan >>> --- >>> driver

[PATCH 0/4] staging: wilc1000: handle few full driver review comments

2020-01-17 Thread Ajay.Kathat
From: Ajay Singh The patch series contains changes to address the below code review comments - 1/ Avoid use of infinite loops. 2/ Use separate header file to keep firmware related 'struct'. 3/ Remove unused code. Ajay Singh (4): staging: wilc1000: remove use of infinite loop conditions s

[PATCH 4/4] staging: wilc1000: remove unused code prior to throughput enhancement in SPI

2020-01-17 Thread Ajay.Kathat
From: Ajay Singh The firmware now uses throughput enhancement code by default for SPI so remove the previous implementation as its not used anymore. Removed the use of 'has_thrpt_enh' element as its always true. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/spi.c | 143 +--

[PATCH 1/4] staging: wilc1000: remove use of infinite loop conditions

2020-01-17 Thread Ajay.Kathat
From: Ajay Singh Avoid the use of 'while (1)' infinite loop conditions. It's not recommended to have infinite loop in kernel code because a small bug can cause never ending loops so use terminator condition as suggested in full driver review [1]. [1]. https://lore.kernel.org/linux-wireless/2019

[PATCH 3/4] staging: wilc1000: added 'wilc_' prefix for 'struct assoc_resp' name

2020-01-17 Thread Ajay.Kathat
From: Ajay Singh Use 'wilc_' prefix for 'assoc_resp' struct to have proper naming convention. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/fw.h | 2 +- drivers/staging/wilc1000/hif.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/fw.h

[PATCH 2/4] staging: wilc1000: move firmware API struct's to separate header file

2020-01-17 Thread Ajay.Kathat
From: Ajay Singh It's recommended to keep the 'struct' used for passing data to firmware in separate header file. So added 'fw.h' header file to keep struct's used to pass data to firmware. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/fw.h | 119 + dr

[PATCH 2/2] staging: wilc1000: avoid mutex unlock without lock in wilc_wlan_handle_txq()

2020-01-23 Thread Ajay.Kathat
From: Ajay Singh In wilc_wlan_handle_txq(), mutex unlock was called without acquiring it. Also error code for full VMM condition was incorrect as discussed in [1]. Now used a proper code to indicate VMM is full, for which transfer to VMM is required again. 'wilc_wlan_handle_txq()' should be calle

[PATCH 1/2] staging: wilc1000: return zero on success and non-zero on function failure

2020-01-23 Thread Ajay.Kathat
From: Ajay Singh Some of the HIF layer API's return zero for failure and non-zero for success condition. Now, modified the functions to return zero for success and non-zero for failure as its recommended approach suggested in [1]. 1. https://lore.kernel.org/driverdev-devel/20191113183322.a54mh2

Re: [PATCH 1/2] staging: wilc1000: return zero on success and non-zero on function failure

2020-01-27 Thread Ajay.Kathat
Hi Dan, On 27/01/20 1:07 pm, Dan Carpenter wrote: > > Looks good. > > Reviewed-by: Dan Carpenter > > On Thu, Jan 23, 2020 at 12:50:47PM +, ajay.kat...@microchip.com wrote: >> @@ -384,19 +378,18 @@ static int wilc_sdio_write_reg(struct wilc *wilc, u32 >> addr, u32 data) >> cm

[PATCH] staging: wilc1000: refactor SPI read/write commands handling API's

2020-02-03 Thread Ajay.Kathat
From: Ajay Singh Refactor SPI commands handling by making use of 'struct' for data exchange and extraction of information flow between host and firmware. The SPI read/write commands are now handled in separate function instead of using a single function to process all types of command. The use of

[PATCH 3/3] staging: wilc1000: refactor p2p action frames handling API's

2020-02-10 Thread Ajay.Kathat
From: Ajay Singh Refactor handling of P2P specific action frames. Make use of 'struct' to handle the P2P frames instead of manipulating using 'buf' pointer. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/cfg80211.c | 298 1 file changed, 127 insertions(+),

[PATCH 2/3] staging: wilc1000: directly fetch 'priv' handler from 'vif' instance

2020-02-10 Thread Ajay.Kathat
From: Ajay Singh The 'priv' handler is already present in 'vif' struct so directly fetch its value from vif handler in wilc_handle_roc_expired(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/hif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/w

[PATCH 1/3] staging: wilc1000: remove use of vendor specific IE for p2p handling

2020-02-10 Thread Ajay.Kathat
From: Ajay Singh Remove the use of vendor specific IE parameter to decide p2p_GO/p2p_Client roles between two 'wilc' device. Previously p2p group formation between two 'wilc' device make use of vendor IE for roles decision. The role is decided based on the 'go_intent' value. Signed-off-by: Ajay

Re: [PATCH 3/3] staging: wilc1000: refactor p2p action frames handling API's

2020-02-11 Thread Ajay.Kathat
Hi Dan, On 11/02/20 12:21 pm, Dan Carpenter wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Mon, Feb 10, 2020 at 06:36:01PM +, ajay.kat...@microchip.com wrote: >> + if (sta_ch == WILC_INVALID_CHANNEL) >> + return; >

[PATCH v2 1/3] staging: wilc1000: remove use of vendor specific IE for p2p handling

2020-02-11 Thread Ajay.Kathat
From: Ajay Singh Remove the use of vendor specific IE parameter to decide p2p_GO/p2p_Client roles between two 'wilc' device. Previously p2p group formation between two 'wilc' device make use of vendor IE for roles decision. The role is decided based on the 'go_intent' value. Signed-off-by: Ajay

[PATCH v2 3/3] staging: wilc1000: refactor p2p action frames handling API's

2020-02-11 Thread Ajay.Kathat
From: Ajay Singh Refactor handling of P2P specific action frames. Make use of 'struct' to handle the P2P frames instead of manipulating using 'buf' pointer. Signed-off-by: Ajay Singh --- v2: corrected 'while' condition by adding 'struct' size as suggested by Dan. drivers/staging/wilc1000/cfg

[PATCH v2 2/3] staging: wilc1000: directly fetch 'priv' handler from 'vif' instance

2020-02-11 Thread Ajay.Kathat
From: Ajay Singh The 'priv' handler is already present in 'vif' struct so directly fetch its value from vif handler in wilc_handle_roc_expired(). Signed-off-by: Ajay Singh --- v2: No change drivers/staging/wilc1000/hif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/d

Re: [PATCH v2 3/3] staging: wilc1000: refactor p2p action frames handling API's

2020-02-12 Thread Ajay.Kathat
Hi Greg, On 12/02/20 12:48 am, Greg KH wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Tue, Feb 11, 2020 at 09:57:10AM +, ajay.kat...@microchip.com wrote: >> From: Ajay Singh >> >> Refactor handling of P2P specific action frames.

[PATCH] staging: wilc1000: refactor p2p action frames handling API's

2020-02-12 Thread Ajay.Kathat
From: Ajay Singh Refactor handling of P2P specific action frames. Make use of 'struct' to handle the P2P frames instead of manipulating using 'buf' pointer. Signed-off-by: Ajay Singh --- [resending this patch as it failed to apply earlier] drivers/staging/wilc1000/cfg80211.c | 300 ++

[PATCH 1/8] staging: wilc1000: make use of FIELD_GET/_PREP macro

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Simplified the code by making use of FIELD_GET/_PREP bitfield macro. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/cfg80211.c | 2 +- drivers/staging/wilc1000/mon.c | 2 +- drivers/staging/wilc1000/netdev.h | 2 -- drivers/staging/wilc1000/spi.c | 2 +-

[PATCH 8/8] staging: wilc1000: define macros to replace magic number values

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Define macros for global as well as SPI/SDIO specific register to avoid use of magic numbers. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/sdio.c | 7 ++- drivers/staging/wilc1000/spi.c | 17 --- drivers/staging/wilc1000/wlan.c | 83 +++-

[PATCH 7/8] staging: wilc1000: use short name for hif local variable in chip_wakeup()

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Make use of a shorter name for 'hif' variable to avoid possible 80 character checkpatch warning while the replacing hardcoded value with macros in chip_wakeup(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wlan.c | 35 +++-- 1 file change

[PATCH 2/8] staging: wilc1000: remove use of MAX_NUN_INT_THRPT_ENH2 macro

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Make use of MAX_NUM_INT existing macro to handle the maximum supported interrupts count and removed MAX_NUN_INT_THRPT_ENH2 macro. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/sdio.c | 20 +++- drivers/staging/wilc1000/wlan.h | 2 +- 2 files changed,

[PATCH 6/8] staging: wilc1000: define macros for different register address for SDIO

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Instead of using hardcoded value for SDIO register address added the macro for them. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/sdio.c | 77 + drivers/staging/wilc1000/wlan.h | 36 +++ 2 files changed, 76 insertions(+), 3

[PATCH 0/8] staging: wilc1000: remove magic values and handle review comments

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh This patch series mainly contains changes to remove the magic value for different registers and define the macros for constant numbers. Also, it contains few patches to make use FIELD_GET/_PUT macro to extract the bitfield element. Ajay Singh (8): staging: wilc1000: make use o

[PATCH 5/8] staging: wilc1000: use commmon function to set SDIO block size

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Use common function wilc_sdio_set_block_size() to set the block size for SDIO. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/sdio.c | 51 +++-- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/drivers/staging/wilc1000/sdio.c

[PATCH 4/8] staging: wilc1000: make use of ALIGN macro

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Make use of 'ALIGN' macro to align the size data value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/sdio.c | 34 ++--- drivers/staging/wilc1000/wlan.c | 4 +--- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/drivers/stag

[PATCH 3/8] staging: wilc1000: refactor interrupt handling for sdio

2020-02-14 Thread Ajay.Kathat
From: Ajay Singh Make use of FIELD_PREP/FIELD_GET macro to refactor the interrupt handling for SDIO. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/sdio.c | 98 - drivers/staging/wilc1000/spi.c | 4 -- drivers/staging/wilc1000/wlan.h | 3 + 3 files ch

[PATCH] staging: wilc1000: avoid double unlocking of 'wilc->hif_cs' mutex

2020-02-21 Thread Ajay.Kathat
From: Ajay Singh Possible double unlocking of 'wilc->hif_cs' mutex was identified by smatch [1]. Removed the extra call to release_bus() in wilc_wlan_handle_txq() which was missed in earlier commit fdc2ac1aafc6 ("staging: wilc1000: support suspend/resume functionality"). [1]. https://lists.01.o

[PATCH] staging: wilc1000: use YAML schemas for DT binding documentation

2020-02-21 Thread Ajay.Kathat
From: Ajay Singh Use YAML schemas for wilc1000 DT binding documentations. Currently, the files are present in '/drivers/staging/wilc1000/' but these will be moved to '/Documentation/devicetree/bindings/net/wireless/' later once the driver move out-of-staging. Signed-off-by: Ajay Singh --- .../

[PATCH v3 17/18] dt: bindings: net: add microchip,wilc1000,spi.yaml

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved '/drivers/staging/wilc1000//microchip,wilc1000,spi.yaml' to 'Documentation/devicetree/bindings/net/wireless/microchip,wilc1000,spi.yaml'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip,wilc1000,spi.yaml | 61 +++ 1 file changed, 61 insertions(+

[PATCH v3 07/18] wilc1000: add cfg80211.h

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/cfg80211.h' to 'drivers/net/wireless/microchip/wilc1000/cfg80211.h'. Signed-off-by: Ajay Singh --- .../wireless/microchip/wilc1000/cfg80211.h| 29 +++ 1 file changed, 29 insertions(+) create mode 100644 drivers/net/wireless/

[PATCH v3 16/18] dt: bindings: net: add microchip,wilc1000,sdio.yaml

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved '/drivers/staging/wilc1000/microchip,wilc1000,sdio.yaml' to 'Documentation/devicetree/bindings/net/wireless/microchip,wilc1000,sdio.yaml'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip,wilc1000,sdio.yaml | 68 +++ 1 file changed, 68 insertions(

[PATCH v3 14/18] wilc1000: add sdio.c

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/sdio.c' to 'drivers/net/wireless/microchip/wilc1000/sdio.c'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc1000/sdio.c| 1030 + 1 file changed, 1030 insertions(+) create mode 100644 drivers/net/wireless/microc

[PATCH v3 02/18] wilc1000: add hif.c

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/hif.c' to 'drivers/net/wireless/microchip/wilc1000/hif.c'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/hif.c | 1959 + 1 file changed, 1959 insertions(+) create mode 100644 drivers/net/wireless/microchi

[PATCH v3 05/18] wilc1000: add wlan_cfg.c

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/wlan_cfg.c' to 'drivers/net/wireless/microchip/wilc1000/wlan_cfg.c'. Signed-off-by: Ajay Singh --- .../wireless/microchip/wilc1000/wlan_cfg.c| 413 ++ 1 file changed, 413 insertions(+) create mode 100644 drivers/net/wireless

[PATCH v3 15/18] wilc1000: add fw.h

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/fw.h' to 'drivers/net/wireless/microchip/wilc1000/fw.h'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/fw.h | 119 +++ 1 file changed, 119 insertions(+) create mode 100644 drivers/net/wireless/microchip/w

[PATCH v3 11/18] wilc1000: add spi.c

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/spi.c' to 'drivers/net/wireless/microchip/wilc1000/spi.c'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/spi.c | 1001 + 1 file changed, 1001 insertions(+) create mode 100644 drivers/net/wireless/microchi

[PATCH v3 03/18] wilc1000: add wlan_if.h

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/wlan_if.h' to 'drivers/net/wireless/microchip/wilc1000/wlan_if.h'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc1000/wlan_if.h | 803 ++ 1 file changed, 803 insertions(+) create mode 100644 drivers/net/wireless/m

[PATCH v3 10/18] wilc1000: add mon.c

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/mon.c' to 'drivers/net/wireless/microchip/wilc1000/mon.c'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/mon.c | 260 ++ 1 file changed, 260 insertions(+) create mode 100644 drivers/net/wireless/microchip

[PATCH v3 01/18] wilc1000: add hif.h

2020-02-24 Thread Ajay.Kathat
From: Ajay Singh Moved 'drivers/staging/wilc1000/hif.h' to 'drivers/net/wireless/microchip/wilc1000/hif.h'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/hif.h | 214 ++ 1 file changed, 214 insertions(+) create mode 100644 drivers/net/wireless/microchip

<    1   2   3   4   >