Re: [PATCH 13/19] wilc: add linux_wlan.c

2018-10-11 Thread Ajay Singh
On 10/11/2018 12:33 PM, Johannes Berg wrote: > On Thu, 2018-10-11 at 12:30 +0530, Ajay Singh wrote: >>>> + if (queue_count > FLOW_CONTROL_UPPER_THRESHOLD) { >>>> + netif_stop_queue(wilc->vif[0]->ndev); >>>> + netif_stop_queue(

Re: [PATCH 14/19] wilc: add linux_mon.c

2018-10-11 Thread Ajay Singh
On 10/8/2018 8:14 PM, Johannes Berg wrote: > On Wed, 2018-09-26 at 15:55 +0530, Ajay Singh wrote: >> +static struct net_device *wilc_wfi_mon; /* global monitor netdev */ > There might not exist platforms with multiple devices (yet), but it's > really bad practice to do this

Re: [PATCH 13/19] wilc: add linux_wlan.c

2018-10-11 Thread Ajay Singh
On 10/8/2018 8:11 PM, Johannes Berg wrote: > On Wed, 2018-09-26 at 15:55 +0530, Ajay Singh wrote: >> Moved '/driver/staging/wilc1000/linux_wlan.c' to >> 'drivers/net/wireless/microchip/wilc/'. >> >> Signed-off-by: Ajay Singh >> --- >> drivers/net/wire

Re: [PATCH 05/19] wilc: add wilc_wlan_if.h

2018-10-11 Thread Ajay Singh
On 10/8/2018 8:03 PM, Johannes Berg wrote: >> +#define WILC_TX_ERR_NO_BUF (-2) > Hmm? what's wrong with just e.g. -ENOBUFS? If it doesn't go to userspace > it doesn't matter, and if it does you can't use this anyway? This would > be -ENOENT which is a bad idea. > Actually this value doesn't

Re: [PATCH 04/19] wilc: add host_interface.c

2018-10-11 Thread Ajay Singh
Hi, On 10/8/2018 8:01 PM, Johannes Berg wrote: >> +*currbyte = (u32)0 & DRV_HANDLER_MASK; > You do this a few times, not sure what it's supposed to achieve? > Agree, the bitwise operation is useless here and this logic should be modified. > > So far I guess I'd say: > * use more kernel

Re: [PATCH 03/19] wilc: add host_interface.h

2018-10-09 Thread Ajay Singh
On 10/9/2018 5:16 PM, Johannes Berg wrote: > On Tue, 2018-10-09 at 17:14 +0530, Ajay Singh wrote: >> On 10/9/2018 4:06 PM, Johannes Berg wrote: >>> On Tue, 2018-10-09 at 16:04 +0530, Ajay Singh wrote: >>> >>>>>> +typedef void (*wilc_remain_on_cha

Re: [PATCH 03/19] wilc: add host_interface.h

2018-10-09 Thread Ajay Singh
On 10/9/2018 4:06 PM, Johannes Berg wrote: > On Tue, 2018-10-09 at 16:04 +0530, Ajay Singh wrote: > >>>> +typedef void (*wilc_remain_on_chan_expired)(void *, u32); >>>> +typedef void (*wilc_remain_on_chan_ready)(void *); >> I think as per coding style the type

Re: [PATCH 03/19] wilc: add host_interface.h

2018-10-09 Thread Ajay Singh
On 10/8/2018 7:50 PM, Johannes Berg wrote: > On Wed, 2018-09-26 at 15:55 +0530, Ajay Singh wrote: > >> +#include > you include it > >> +#include "coreconfigurator.h" >> + >> +#define IDLE_MODE 0x00 >> +#define AP_MODE 0x01 >

Re: [PATCH 02/19] wilc: add coreconfigurator.c

2018-10-09 Thread Ajay Singh
Hi, Firstly, thanks alot for taking out time and reviewing our driver. I will work on review comment and submit the updated code changes. On 10/8/2018 7:46 PM, Johannes Berg wrote: >> +static inline u16 get_beacon_period(u8 *data) >> +{ >> +u16 bcn_per; >> + >> +bcn_per = data[0]; >> +

Re: [RFC 00/19] wilc: added driver for wilc module

2018-10-07 Thread Ajay Singh
On Sat, 6 Oct 2018 15:45:41 +0300 Kalle Valo wrote: > Ajay Singh writes: > > > This patch set contains the driver files from > > 'driver/staging/wilc1000'. Renamed the driver from 'wilc1000' to > > 'wilc' to have generic name, as the same driver will be used by >

Re: feedback on mainlining wilc1000 staging driver

2018-10-04 Thread Ajay Singh
Hi Kalle, On Thu, 4 Oct 2018 15:27:57 +0300 Kalle Valo wrote: > Ajay Singh writes: > > > Hi Kalle, > > > > On Thu, 23 Aug 2018 16:37:45 +0530 > > Kalle Valo wrote: > > > >> Ajay Singh writes: > >> > >> >> >>>

Re: [PATCH v3 00/29] staging: wilc1000: avoid static variables and cleanup changes

2018-10-01 Thread Ajay Singh
Hi Dan, On Mon, 1 Oct 2018 10:47:34 +0300 Dan Carpenter wrote: > On Tue, Sep 25, 2018 at 11:53:15AM +0530, Ajay Singh wrote: > > This patch series contains changes to avoid the use of static > > variables. Cleanup changes to fix some checkpatch issues and return > &

Re: feedback on mainlining wilc1000 staging driver

2018-09-26 Thread Ajay Singh
Hi Kalle, On Thu, 23 Aug 2018 16:37:45 +0530 Kalle Valo wrote: > Ajay Singh writes: > > >> >>> We need help to review and identify if there are any pending > >> >>> items for wilc1000 driver, so we can address those issues and > >>

[PATCH 19/19] wilc: added wilc module compilation in wireless Makefile & Kconfig

2018-09-26 Thread Ajay Singh
Modified wireless Makefile and Kconfig to include the microchip/wilc files compilation. Signed-off-by: Ajay Singh --- drivers/net/wireless/Kconfig | 1 + drivers/net/wireless/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless

[PATCH 05/19] wilc: add wilc_wlan_if.h

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wlan_if.h' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc/wilc_wlan_if.h | 830 + 1 file changed, 830 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 08/19] wilc: add wilc_wlan.h

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wlan.h' to ' drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc/wilc_wlan.h | 297 1 file changed, 297 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 18/19] wilc: add Makefile and Kconfig files for wilc compilation

2018-09-26 Thread Ajay Singh
Added the Makefile and Kconfig for compiling the wilc module. Renaming the module as 'wilc', so modified the Kconfig and Makefile accordingly. Modified wilc_sdio.c file to avoid the use of wilc1000 in macro name. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/Kconfig | 14

[PATCH 17/19] wilc: updated DT device binding for wilc device

2018-09-26 Thread Ajay Singh
Added the device tree binding document from '/driver/staging/wilc1000/' to '/Documentation/devicetree/bindings/net/wireless/' folder. Signed-off-by: Ajay Singh --- .../net/wireless/microchip,wilc1000,sdio.txt | 32 ++ .../net/wireless/microchip,wilc1000,spi.txt

[PATCH 16/19] wilc: add wilc_sdio.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_sdio.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc/wilc_sdio.c | 1124 +++ 1 file changed, 1124 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 11/19] wilc: add wilc_wfi_cfgoperations.h

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wfi_cfgoperations.h' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../microchip/wilc/wilc_wfi_cfgoperations.h| 23 ++ 1 file changed, 23 insertions(+) create mode 100644 drivers/net/wireless/microchip

[PATCH 09/19] wilc: add wilc_wlan.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wlan.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc/wilc_wlan.c | 1350 +++ 1 file changed, 1350 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 12/19] wilc: add wilc_wfi_cfgoperations.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wfi_cfgoperations.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../microchip/wilc/wilc_wfi_cfgoperations.c| 2216 1 file changed, 2216 insertions(+) create mode 100644 drivers/net/wireless

[PATCH 13/19] wilc: add linux_wlan.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/linux_wlan.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc/linux_wlan.c | 1161 ++ 1 file changed, 1161 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 15/19] wilc: add wilc_spi.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_spi.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc/wilc_spi.c | 1137 1 file changed, 1137 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 14/19] wilc: add linux_mon.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/linux_mon.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc/linux_mon.c | 273 1 file changed, 273 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 06/19] wilc: add wilc_wlan_cfg.h

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wlan_cfg.h' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc/wilc_wlan_cfg.h| 54 ++ 1 file changed, 54 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 04/19] wilc: add host_interface.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/host_interface.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc/host_interface.c | 3927 1 file changed, 3927 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 10/19] wilc: add wilc_wfi_netdevice.h

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wfi_netdevice.h' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../wireless/microchip/wilc/wilc_wfi_netdevice.h | 230 + 1 file changed, 230 insertions(+) create mode 100644 drivers/net/wireless/microchip

[PATCH 07/19] wilc: add wilc_wlan_cfg.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/wilc_wlan_cfg.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc/wilc_wlan_cfg.c| 497 + 1 file changed, 497 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 03/19] wilc: add host_interface.h

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/host_interface.h' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc/host_interface.h | 362 + 1 file changed, 362 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH 01/19] wilc: add coreconfigurator.h

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/coreconfigurator.h' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc/coreconfigurator.h | 81 ++ 1 file changed, 81 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[RFC 00/19] wilc: added driver for wilc module

2018-09-26 Thread Ajay Singh
interface for wilc family. For now only wilc1000 module support has been intergrated in this driver. Ajay Singh (19): wilc: add coreconfigurator.h wilc: add coreconfigurator.c wilc: add host_interface.h wilc: add host_interface.c wilc: add wilc_wlan_if.h wilc: add wilc_wlan_cfg.h

[PATCH 02/19] wilc: add coreconfigurator.c

2018-09-26 Thread Ajay Singh
Moved '/driver/staging/wilc1000/coreconfigurator.c' to 'drivers/net/wireless/microchip/wilc/'. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc/coreconfigurator.c | 287 + 1 file changed, 287 insertions(+) create mode 100644 drivers/net/wireless/microchip/wilc

[PATCH v3 29/29] staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()

2018-09-25 Thread Ajay Singh
Refactor wilc_netdev_init() to return the error code received from register_netdev() during the failure condition. Earlier discussion link [1]. https://www.spinics.net/lists/linux-wireless/msg177304.html Suggested-by: Claudiu Beznea Signed-off-by: Ajay Singh --- drivers/staging/wilc1000

[PATCH v3 27/29] staging: wilc1000: use usleep_range() in place of udelay()

2018-09-25 Thread Ajay Singh
Changes to avoid the below checkpatch warning: 'usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt;' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000

[PATCH v3 28/29] staging: wilc1000: refactor wilc_set_multicast_list() function

2018-09-25 Thread Ajay Singh
-by: Joe Perches Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 695d5b2..3ac82a1 100644

[PATCH v3 24/29] staging: wilc1000: remove p2p related static variables to wilc_vif struct

2018-09-25 Thread Ajay Singh
Avoid use of static variable and move them as part of private data(wilc_priv) struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 2 + drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 60 +++ drivers/staging/wilc1000

[PATCH v3 26/29] staging: wilc1000: remove unnecessary option used with ccflags-y in Makefile

2018-09-25 Thread Ajay Singh
Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in ccflag-y in Makefile. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index 5718bc4

[PATCH v3 25/29] staging: wilc1000: remove wilc_debugfs.c file as its not used

2018-09-25 Thread Ajay Singh
Deleted wilc_debugfs.c file as it's not used. Earlier discussion link: [1]. https://www.spinics.net/lists/linux-wireless/msg176076.html Suggested-by: Greg KH Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 5 +- drivers/staging/wilc1000/wilc_debugfs.c | 115

[PATCH v3 20/29] staging: wilc1000: remove use of unnecessary 'wilc_connected_ssid' variable

2018-09-25 Thread Ajay Singh
'wilc_connected_ssid' actually used to store the BSSID information for connected BSSID. 'wilc_vif' already has 'bssid' variable to store the same information. So refactor code to remove 'wilc_connected_ssid' and instead used 'wilc_vif' struct 'bssid' element. Signed-off-by: Ajay Singh

[PATCH v3 21/29] staging: wilc1000: avoid use of 'g_sdio' static variable

2018-09-25 Thread Ajay Singh
Instead of using static variable 'g_sdio' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free during deinitialization. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 1 + drivers/staging/wilc1000/wilc_sdio.c | 54

[PATCH v3 18/29] staging: wilc1000: rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals'

2018-09-25 Thread Ajay Singh
Rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' as its more appropriate for structure to store the values of string configuration. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 14 +++--- drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++-- 2 files changed

[PATCH v3 17/29] staging: wilc1000: refactor code to avoid static variables for config parameters

2018-09-25 Thread Ajay Singh
Refactor the code in wilc_wlan_cfg.c file to avoid the use of static variables. Move the static variables as part of wilc struct and also dynamically allocating memory for keeping those variables. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 12 +- drivers

[PATCH v3 16/29] staging: wilc1000: refactor code to remove 'mac_status' from 'wilc_mac_cfg' struct

2018-09-25 Thread Ajay Singh
Refactor the code by removing use of 'mac_status' from 'wilc_mac_cfg' and only have the string type configuration values in 'wilc_mac_cfg' struct. Now fetch the value 'WID_STATUS' configuration from 'g_cfg_byte' array. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c

[PATCH v3 22/29] staging: wilc1000: avoid use of 'g_spi' static variable

2018-09-25 Thread Ajay 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 --- drivers/staging/wilc1000/wilc_spi.c | 58 +++-- 1 file

[PATCH v3 23/29] staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()

2018-09-25 Thread 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 --- drivers/staging/wilc1000/wilc_sdio.c | 4 +--- drivers/staging/wilc1000/wilc_spi.c | 3 --- 2 files changed, 1 insertion(+), 6 deleti

[PATCH v3 19/29] staging: wilc1000: avoid the use of 'hif_driver_comp' completion variable

2018-09-25 Thread Ajay Singh
Instead of using extra completion variable to handle the sync call now using msg->is_sync flag to handle the sync call. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 23 +++ drivers/staging/wilc1000/host_interface.h |

[PATCH v3 12/29] staging: wilc1000: set default value of cfg response type in wilc_wlan_cfg_indicate_rx()

2018-09-25 Thread Ajay Singh
Handle the setting of default value for 'wilc_cfg_rsp' type for all cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this value to know the type of the received message. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 3 +-- 1 file changed, 1 insertion

[PATCH v3 14/29] staging: wilc1000: remove unused wid type values

2018-09-25 Thread Ajay Singh
Cleanup patch to remove the wid type not used in the code. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index b81a73b..ce2066b

[PATCH v3 09/29] staging: wilc1000: use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack()

2018-09-25 Thread Ajay Singh
Use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() as it always return value '1' and its not used by the caller. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c

[PATCH v3 15/29] staging: wilc1000: remove unused wid from cfg struct

2018-09-25 Thread Ajay Singh
-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 107 --- 1 file changed, 107 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index 2c463a3..541251b 100644 --- a/drivers/staging/wilc1000

[PATCH v3 06/29] staging: wilc1000: use 'void' return type for host_int_get_assoc_res_info()

2018-09-25 Thread Ajay Singh
Change return type to 'void' for host_int_get_assoc_res_info() as its return value is not used. 'rcvd_assoc_resp_info_len' parameter value is used to know the status. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 11 +-- 1 file changed, 5 insertions(+), 6

[PATCH v3 10/29] staging: wilc1000: change return type to 'void' for wilc_wlan_cfg_indicate_rx()

2018-09-25 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_wlan_cfg_indicate_rx(), as its return value is not used in caller. The value set in 'rsp' argument is used to get the success status. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 8 ++-- drivers/staging/wilc1000

[PATCH v3 07/29] staging: wilc1000: use 'void' return for wilc_wlan_txq_add_to_head()

2018-09-25 Thread Ajay Singh
Use 'void' return for wilc_wlan_txq_add_to_head() as its always return '0' value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000

[PATCH v3 08/29] staging: wilc1000: change return type to 'void' tcp ack filter functions

2018-09-25 Thread Ajay Singh
Use 'void' return type for below functions as they always return '0' and their return value is not used by caller. add_tcp_pending_ack() update_tcp_session() add_tcp_pending_ack() Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 15 ++- 1 file changed, 6

[PATCH v3 11/29] staging: wilc1000: refactor wilc_wlan_parse_info_frame() function

2018-09-25 Thread Ajay Singh
Return 'void' from wilc_wlan_parse_info_frame() as same constant value is returned always. Also removed the 'size' from input parameter as its not used in the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 12 1 file changed, 4 insertions(+), 8

[PATCH v3 13/29] staging: wilc1000: changes 'val' type to u8 in wilc_cfg_byte struct

2018-09-25 Thread Ajay Singh
Use the correct datatype for storing the byte value in 'wilc_cfg_byte' struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000

[PATCH v3 04/29] staging: wilc1000: change return type to 'void' for wilc_deinit_host_int()

2018-09-25 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_deinit_host_int(), as its return value is not used in caller. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 2 files changed, 2 insertions(+), 4

[PATCH v3 02/29] staging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid()

2018-09-25 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_wlan_set_bssid(), as its always returns the same value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 4 +--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions

[PATCH v3 01/29] staging: wilc1000: change return type to 'void' for wilc_frame_register()

2018-09-25 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_frame_register(), as its return value is not used. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 6 ++ drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git

[PATCH v3 05/29] staging: wilc1000: change return type to 'void' for wilc_wfi_deinit_mon_interface()

2018-09-25 Thread Ajay Singh
Use 'void' return type for wilc_wfi_deinit_mon_interface(), as same value always return. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v3 03/29] staging: wilc1000: change return type to 'void' for lock init & deinit functions

2018-09-25 Thread Ajay Singh
Cleanup patch to use 'void' return type for wlan_deinit_locks() & wlan_init_locks(), as same value is return. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.

[PATCH v3 00/29] staging: wilc1000: avoid static variables and cleanup changes

2018-09-25 Thread Ajay Singh
- replaced previous patch with an improved version(refactor code) Changes since v1: Address Dan's comment for patch#29 - return the correct error for failure in the second iteration Ajay Singh (29): staging: wilc1000: change return type to 'void' for wilc_frame_register() staging

Re: [PATCH v2 28/29] staging: wilc1000: avoid spaces preferred around checkpatch issue

2018-09-20 Thread Ajay Singh
On Thu, 20 Sep 2018 02:57:21 -0700 Joe Perches wrote: > On Thu, 2018-09-20 at 11:53 +0530, Ajay Singh wrote: > > Cleanup patch to add extra spaces around the '/' to avoid the below > > checkpatch warning. > > > > 'spaces preferred around that '/' (ctx:VxV)' > &g

[PATCH v2 28/29] staging: wilc1000: avoid spaces preferred around checkpatch issue

2018-09-20 Thread Ajay Singh
Cleanup patch to add extra spaces around the '/' to avoid the below checkpatch warning. 'spaces preferred around that '/' (ctx:VxV)' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000

[PATCH v2 26/29] staging: wilc1000: remove unnecessary option used with ccflags-y in Makefile

2018-09-20 Thread Ajay Singh
Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in ccflag-y in Makefile. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index 5718bc4

[PATCH v2 29/29] staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()

2018-09-20 Thread Ajay Singh
Refactor wilc_netdev_init() to return the error code received from register_netdev() during the failure condition. Earlier discussion link [1]. https://www.spinics.net/lists/linux-wireless/msg177304.html Suggested-by: Claudiu Beznea Signed-off-by: Ajay Singh --- drivers/staging/wilc1000

[PATCH v2 27/29] staging: wilc1000: use usleep_range() in place of udelay()

2018-09-20 Thread Ajay Singh
Changes to avoid the below checkpatch warning: 'usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt;' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000

[PATCH v2 25/29] staging: wilc1000: remove wilc_debugfs.c file as its not used

2018-09-20 Thread Ajay Singh
Deleted wilc_debugfs.c file as it's not used. Earlier discussion link: [1]. https://www.spinics.net/lists/linux-wireless/msg176076.html Suggested-by: Greg KH Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 5 +- drivers/staging/wilc1000/wilc_debugfs.c | 115

[PATCH v2 24/29] staging: wilc1000: remove p2p related static variables to wilc_vif struct

2018-09-20 Thread Ajay Singh
Avoid use of static variable and move them as part of private data(wilc_priv) struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 2 + drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 60 +++ drivers/staging/wilc1000

[PATCH v2 20/29] staging: wilc1000: remove use of unnecessary 'wilc_connected_ssid' variable

2018-09-20 Thread Ajay Singh
'wilc_connected_ssid' actually used to store the BSSID information for connected BSSID. 'wilc_vif' already has 'bssid' variable to store the same information. So refactor code to remove 'wilc_connected_ssid' and instead used 'wilc_vif' struct 'bssid' element. Signed-off-by: Ajay Singh

[PATCH v2 09/29] staging: wilc1000: use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack()

2018-09-20 Thread Ajay Singh
Use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() as it always return value '1' and its not used by the caller. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c

[PATCH v2 23/29] staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()

2018-09-20 Thread 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 --- drivers/staging/wilc1000/wilc_sdio.c | 4 +--- drivers/staging/wilc1000/wilc_spi.c | 3 --- 2 files changed, 1 insertion(+), 6 deleti

[PATCH v2 21/29] staging: wilc1000: avoid use of 'g_sdio' static variable

2018-09-20 Thread Ajay Singh
Instead of using static variable 'g_sdio' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free during deinitialization. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 1 + drivers/staging/wilc1000/wilc_sdio.c | 54

[PATCH v2 18/29] staging: wilc1000: rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals'

2018-09-20 Thread Ajay Singh
Rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' as its more appropriate for structure to store the values of string configuration. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 14 +++--- drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++-- 2 files changed

[PATCH v2 15/29] staging: wilc1000: remove unused wid from cfg struct

2018-09-20 Thread Ajay Singh
-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 107 --- 1 file changed, 107 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index 2c463a3..541251b 100644 --- a/drivers/staging/wilc1000

[PATCH v2 17/29] staging: wilc1000: refactor code to avoid static variables for config parameters

2018-09-20 Thread Ajay Singh
Refactor the code in wilc_wlan_cfg.c file to avoid the use of static variables. Move the static variables as part of wilc struct and also dynamically allocating memory for keeping those variables. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 12 +- drivers

[PATCH v2 13/29] staging: wilc1000: changes 'val' type to u8 in wilc_cfg_byte struct

2018-09-20 Thread Ajay Singh
Use the correct datatype for storing the byte value in 'wilc_cfg_byte' struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000

[PATCH v2 16/29] staging: wilc1000: refactor code to remove 'mac_status' from 'wilc_mac_cfg' struct

2018-09-20 Thread Ajay Singh
Refactor the code by removing use of 'mac_status' from 'wilc_mac_cfg' and only have the string type configuration values in 'wilc_mac_cfg' struct. Now fetch the value 'WID_STATUS' configuration from 'g_cfg_byte' array. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c

[PATCH v2 11/29] staging: wilc1000: refactor wilc_wlan_parse_info_frame() function

2018-09-20 Thread Ajay Singh
Return 'void' from wilc_wlan_parse_info_frame() as same constant value is returned always. Also removed the 'size' from input parameter as its not used in the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 12 1 file changed, 4 insertions(+), 8

[PATCH v2 12/29] staging: wilc1000: set default value of cfg response type in wilc_wlan_cfg_indicate_rx()

2018-09-20 Thread Ajay Singh
Handle the setting of default value for 'wilc_cfg_rsp' type for all cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this value to know the type of the received message. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 3 +-- 1 file changed, 1 insertion

[PATCH v2 19/29] staging: wilc1000: avoid the use of 'hif_driver_comp' completion variable

2018-09-20 Thread Ajay Singh
Instead of using extra completion variable to handle the sync call now using msg->is_sync flag to handle the sync call. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 23 +++ drivers/staging/wilc1000/host_interface.h |

[PATCH v2 14/29] staging: wilc1000: remove unused wid type values

2018-09-20 Thread Ajay Singh
Cleanup patch to remove the wid type not used in the code. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index b81a73b..ce2066b

[PATCH v2 22/29] staging: wilc1000: avoid use of 'g_spi' static variable

2018-09-20 Thread Ajay 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 --- drivers/staging/wilc1000/wilc_spi.c | 58 +++-- 1 file

[PATCH v2 10/29] staging: wilc1000: change return type to 'void' for wilc_wlan_cfg_indicate_rx()

2018-09-20 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_wlan_cfg_indicate_rx(), as its return value is not used in caller. The value set in 'rsp' argument is used to get the success status. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 8 ++-- drivers/staging/wilc1000

[PATCH v2 07/29] staging: wilc1000: use 'void' return for wilc_wlan_txq_add_to_head()

2018-09-20 Thread Ajay Singh
Use 'void' return for wilc_wlan_txq_add_to_head() as its always return '0' value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000

[PATCH v2 08/29] staging: wilc1000: change return type to 'void' tcp ack filter functions

2018-09-20 Thread Ajay Singh
Use 'void' return type for below functions as they always return '0' and their return value is not used by caller. add_tcp_pending_ack() update_tcp_session() add_tcp_pending_ack() Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 15 ++- 1 file changed, 6

[PATCH v2 05/29] staging: wilc1000: change return type to 'void' for wilc_wfi_deinit_mon_interface()

2018-09-20 Thread Ajay Singh
Use 'void' return type for wilc_wfi_deinit_mon_interface(), as same value always return. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v2 04/29] staging: wilc1000: change return type to 'void' for wilc_deinit_host_int()

2018-09-20 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_deinit_host_int(), as its return value is not used in caller. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 2 files changed, 2 insertions(+), 4

[PATCH v2 06/29] staging: wilc1000: use 'void' return type for host_int_get_assoc_res_info()

2018-09-20 Thread Ajay Singh
Change return type to 'void' for host_int_get_assoc_res_info() as its return value is not used. 'rcvd_assoc_resp_info_len' parameter value is used to know the status. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 11 +-- 1 file changed, 5 insertions(+), 6

[PATCH v2 03/29] staging: wilc1000: change return type to 'void' for lock init & deinit functions

2018-09-20 Thread Ajay Singh
Cleanup patch to use 'void' return type for wlan_deinit_locks() & wlan_init_locks(), as same value is return. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.

[PATCH v2 01/29] staging: wilc1000: change return type to 'void' for wilc_frame_register()

2018-09-20 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_frame_register(), as its return value is not used. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 6 ++ drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git

[PATCH v2 02/29] staging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid()

2018-09-20 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_wlan_set_bssid(), as its always returns the same value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 4 +--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions

[PATCH v2 00/29] staging: wilc1000: avoid static variables and cleanup changes

2018-09-20 Thread Ajay Singh
- return the correct error for failure in the second iteration. Ajay Singh (29): staging: wilc1000: change return type to 'void' for wilc_frame_register() staging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid() staging: wilc1000: change return type to 'void' for lock

Re: [PATCH 29/29] staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()

2018-09-19 Thread Ajay Singh
Hi Dan, Thanks your reviewing the patch. On Wed, 19 Sep 2018 12:41:32 +0300 Dan Carpenter wrote: > I was waiting for you to send this like a spider waits for flies. You > fell directly into my trap. Mwuahahahahaha. Oops!!! I missed seeing it coming :) > >

[PATCH 29/29] staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()

2018-09-19 Thread Ajay Singh
Modified wilc_netdev_init() to return the error code received from register_netdev() during the failure condition. Earlier discussion link [1]. https://www.spinics.net/lists/linux-wireless/msg177304.html Suggested-by: Claudiu Beznea Signed-off-by: Ajay Singh --- drivers/staging/wilc1000

[PATCH 28/29] staging: wilc1000: avoid spaces preferred around checkpatch issue

2018-09-19 Thread Ajay Singh
Cleanup patch to add extra spaces around the '/' to avoid the below checkpatch warning. 'spaces preferred around that '/' (ctx:VxV)' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000

[PATCH 27/29] staging: wilc1000: use usleep_range() in place of udelay()

2018-09-19 Thread Ajay Singh
Changes to avoid the below checkpatch warning: 'usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt;' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000

[PATCH 20/29] staging: wilc1000: remove use of unnecessary 'wilc_connected_ssid' variable

2018-09-19 Thread Ajay Singh
'wilc_connected_ssid' actually used to store the BSSID information for connected BSSID. 'wilc_vif' already has 'bssid' variable to store the same information. So refactor code to remove 'wilc_connected_ssid' and instead used 'wilc_vif' struct 'bssid' element. Signed-off-by: Ajay Singh

[PATCH 26/29] staging: wilc1000: remove unnecessary option used with ccflags-y in Makefile

2018-09-19 Thread Ajay Singh
Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in ccflag-y in Makefile. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index 5718bc4

  1   2   3   4   5   6   7   8   >