Commit Graph

2099 Commits

Author SHA1 Message Date
Ajay Singh
5751e4f164 staging: wilc1000: remove TODO item for comments and code style
Remove below item from TODO as these changes were included as part of
previous submitted patch series.

'rework comments and function headers(also coding style)'

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:15:32 +02:00
Ajay Singh
2345ef30ea staging: wilc1000: replace ISWILC1000() macro with inline function
Cleanup patch to avoid below checkpatch issue by replacing the macro
with inline function.

Macro argument 'id' may be better as '(id)' to avoid precedence issues.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:15:32 +02:00
Ajay Singh
e61c7a1caa staging: wilc1000: added Microchip copyright notice header
Cleanup the copyright notice header from the WILC1000 files.
Replace copyright header of 'Atmel' & 'NewportMedia' with 'Microchip & its
subsidiaries'. Also added the same copyright notice header for all
wilc1000 driver source and header files.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:15:32 +02:00
Ajay Singh
3f285135bc staging: wilc1000: fix compilation warning for ARCH PowerPC
Fix below warning reported for PowerPC arch compilation

include/uapi/linux/byteorder/big_endian.h:95:37: warning: passing
argument 1 of '__swab32s' makes pointer from integer without a cast
[-Wint-conversion]

Fixes: 02211edc9a ("staging: wilc1000: fix endianness warnings reported by sparse")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 21:31:47 +02:00
Ajay Singh
02211edc9a staging: wilc1000: fix endianness warnings reported by sparse
This patch fixes the sparse warnings by making use of le32_to_cpus() &
cpu_to_le32s() conversion API's.
Remove the unnecessary byte-order conversion in
wilc_wlan_parse_response_frame() as the data is copied using individual
byte operation.

Also added the byte-order conversion for 'header' in
wilc_wfi_monitor_rx() & wilc_wfi_p2p_rx() as received in LE byte-order.

The link [1] contains the details of discussion related to this patch.

[1]. https://patchwork.kernel.org/patch/10436791/

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:41:37 +02:00
Ajay Singh
41203a451b staging: wilc1000: use 'u16' data type for config id parameter
Cleanup patch to use the correct data type 'u16' for keeping the WID
value in 'wilc_cfg_word' & 'wilc_cfg_str' structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:41:37 +02:00
Ajay Singh
7878abdec9 staging: wilc1000: refactor wilc_wlan_handle_isr_ext to avoid goto statement
Refactor wilc_wlan_handle_isr_ext() to avoid the use of the goto label.
Also avoid the unnecessary NULL check for 'wilc->rx_buffer' and
calling wilc_wlan_handle_rxq() only after wilc_wlan_rxq_add() call.
The link [1] contains details for discussion related to this changes.

[1]. https://patchwork.kernel.org/patch/10533601/

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:41:37 +02:00
Ajay Singh
49328076f6 staging: wilc1000: rename 'rcvd_ch_cnt' element in 'user_scan_req' struct
Cleanup patch to use shorter name for 'rcvd_ch_cnt' to 'ch_cnt' to avoid
line over 80 character issue reported by checkpatch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:35:05 +02:00
Ajay Singh
97ed6d34e3 staging: wilc1000: added comments for 'hif_cs' mutex lock
Added comments for 'hif_cs' mutex to avoid checkpatch.pl reported
issues.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:35:05 +02:00
Ajay Singh
a120adb8b6 staging: wilc1000: modified debug log messages description
Cleanup patch to update the debug logs message to provide correct
information. Also added the function name tag for same description log
to help identify the place from where log was captured.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:35:05 +02:00
Ajay Singh
f131bbe556 staging: wilc1000: remove unnecessary comments and comments description
Cleanup patch to remove the unnecessary comments and commented code.
Also updated description for few of comments.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:35:05 +02:00
Ajay Singh
9abc44ba4e staging: wilc1000: fix TODO to compile spi and sdio components in single module
Changes to compile module component along with SPI and SDIO module.
Previously 'wilc1000.ko' used to generate along with wilc-spi.ko or
wilc1000-sdio.ko module. After these changes only wilc1000-spi.ko or
wilc1000-sdio.ko modules are required for SPI and SDIO respectively.
These changes are done to address below TODO item.

- make SPI and SDIO components coexist in one build

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:35:05 +02:00
Ajay Singh
367b955907 staging: wilc1000: use descriptor-based interface for GPIO
Now making use of descriptor-based interface instead of integer-based
interface for IRQ GPIO.
Added device tree binding reference for WILC SDIO and SPI interface
module. Also moved the code to free gpio descriptor in module remove
as the reference was fetched in probe function.
Updated the TODO file

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 13:52:32 +02:00
Ajay Singh
8dfaf8594e staging: wilc1000: change compatible string from atmel to microchip
Use 'microchip' in compatible string instead of 'atmel', also replace '_'
with '-' before the module. Remove 'wilc1000' prefix from device table
name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 13:52:32 +02:00
Ajay Singh
4b6cfa87b1 staging: wilc1000: rename variable from 'gpio' to 'gpio_irq'
Rename from 'gpio' to 'gpio_irq', so its inlcude the information about
the purpose of GPIO.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 13:52:32 +02:00
Ajay Singh
847794a1a7 staging: wilc1000: remove gpio parameter from wilc_netdev_init()
Instead of passing the gpio as parameter to wilc_netdev_init() now
setting its value after finishing wilc_netdev_init() call. Avoided
passing of extra parameter to wilc_netdev_init().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 13:52:32 +02:00
Ajay Singh
6bcba96e85 staging: wilc1000: move variable assignment along with its declaration
Cleanup patch to club the variable assignment along with the variable
declaration especially for private data.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
cd46d1b114 staging: wilc1000: remove unnecessary 'NULL' check from cfg80211_ops callbacks
Cleanup patch to remove the unnecessary 'NULL' check used in 'cfg80211_ops'
callback functions.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
82120ec7af staging: wilc1000: use 'int' inplace of 's32' date type
Cleanup patch to use 'int' instead of 's32' to have the same data type
based on its usage.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
d241877a1a staging: wilc1000: avoid setting default value for variable at declaration
Cleanup patch to avoid setting default value for local variables and
also clubbed similar variables together.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
448d078449 staging: wilc1000: avoid forward declaration of host_int_parse_join_bss_param()
Reorder the functions position in host interface to avoid forward
declaration of host_int_parse_join_bss_param().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
8bdc6bbc09 staging: wilc1000: avoid host_int_get_assoc_res_info() forward declaration
Reorder the function position in host interface to avoid forward
declaration of host_int_get_assoc_res_info().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
2653aade48 staging: wilc1000: avoid forward declaration for handle_scan_done()
Reorder the function position in host interface to avoid forward
declaration of handle_scan_done().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
674650fd64 staging: wilc1000: remove unnecessary type used for wid id
Cleanup patch to remove unnecessary typecast used while assigning the
WID ID.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
74cffafb66 staging: wilc1000: use single space before opening brances '{'
Cleanup patch to use single space instead of multiple space before the
'{'.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:48 +02:00
Ajay Singh
9542c441a7 staging: wilc1000: remove unnecessary blank line between variable declaration
Cleanup patch to remove the unnecessary blank line between variables
declaration inside the function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
742a48699e staging: wilc1000: use lowercase for 'IFC_UP' struct element name
Cleanup patch to use lowercase for structure element name to follow
linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
e3da5d9d25 staging: wilc1000: remove the mutliple #define used for same macro
Moved the same #define in common header file instead of having their
declartion in different files.

Below macros are moved to header file:
TCP_ACK_FILTER_LINK_SPEED_THRESH
DEFAULT_LINK_SPEED
GET_PKT_OFFSET

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
cf15e3dc8f staging: wilc1000: removed unused element from wilc_cfg_frame struct
Cleanup up patch to remove the unused structure elements in
'wilc_cfg_frame' struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
37d1a6dbb4 staging: wilc1000: remove unnecessary elements from 'wilc_priv' struct
Remove unused elements from 'wilc_priv' structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
9fdc7420f2 staging: wilc1000: remove unused elements in 'wilc' struct
Cleanup patch to remove unused elements from 'wilc' struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
ecba6b7477 staging: wilc1000: rename enum AUTHTYPE to use lowercase
Cleanup patch to rename enum AUTHTYPE to lowercase.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
90824b7cdf staging: wilc1000: rename enum SITESURVEY to use lowercase
Cleanup patch to have enum in lowercase as per linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
05b9eaa7fc staging: wilc1000: rename enum CURRENT_TXRATE to use lowercase
Cleanup patch to rename enums in lowercase to follow linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
18da9e4ad2 staging: wilc1000: rename goto to avoid leading '_' in label name
Cleanup patch to avoid use of leading '_' in goto label name. Also used
proper string for lable names.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
8c67e814fa staging: wilc1000: remove extra enums defined for ieee80211_eid
Cleanup patch to make use of existing enum 'ieee80211_eid' instead of
adding new enum in WILC for element ID's.

The below mapping is same to remove extra enum in WILC.

SUPP_RATES_IE   	-> WLAN_EID_SUPP_RATES
EXT_SUPP_RATES_IE	-> WLAN_EID_EXT_SUPP_RATES
HT_CAPABILITY_IE	-> WLAN_EID_HT_CAPABILITY
RSN_IE			-> WLAN_EID_RSN
WPA_IE			-> WLAN_EID_VENDOR_SPECIFIC
WMM_IE			-> WLAN_EID_VENDOR_SPECIFIC
P2P_IE			-> WLAN_EID_VENDOR_SPECIFIC

Also remove enum 'info_element_id' as its same as 'ieee80211_eid', below
the mapping of elements of enums which are used.

ITIM -> WLAN_EID_TIM
IDSPARMS -> WLAN_EID_DS_PARAMS

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
b69845eaef staging: wilc1000: remove extra enum defined for data rates
Cleanup patch to remove extra enum defined to handle data rates.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
d300da1850 staging: wilc1000: remove enum connect_status instead use ieee80211_statuscode
Cleanup patch to remove the use of enum 'connect_status' and instead use
predefined 'ieee80211_statuscode' for error code values.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
c3bfe9f186 staging: wilc1000: remove unused enum declaration
Cleanup patch to remove unused enums.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 09:04:47 +02:00
Ajay Singh
15c3381e3a staging: wilc1000: fix static checker warning to unlock mutex in wilc_deinit()
Fix for static checker warning inconsistent returns of
'hif_deinit_lock'(more details [1]).

"drivers/staging/wilc1000/host_interface.c:3390 wilc_deinit()
              warn: inconsistent returns 'hif_deinit_lock'."

Fixes: ff52a57a7a ("staging: wilc1000: move the allocation of cmd out
of wilc_enqueue_cmd()")

[1]. https://www.spinics.net/lists/linux-driver-devel/msg114216.html

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06 17:37:31 +02:00
Omer Efrat
5c6a5eb3aa staging: use BIT_ULL for NL80211_STA_INFO_* attribute types
The BIT macro uses unsigned long which some architectures handle as 32 bit
and therefore might cause macro's shift to overflow when used on a value
equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and afterwards).

Since 'filled' member in station_info changed to u64, BIT_ULL macro
should be used with all NL80211_STA_INFO_* attribute types instead of BIT
to prevent future possible bugs when one will use BIT macro for higher
attributes by mistake.

This commit cleans up all usages of BIT macro with the above field
in cfg80211 by changing it to BIT_ULL instead.

Signed-off-by: Omer Efrat <omer.efrat@tandemg.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 22:08:56 +09:00
Ajay Singh
5c6d0dbb02 staging: wilc1000: updated TODO file
Item [1] in TODO list is already addressed, so removed it from TODO file.

[1]. Move handling for each individual members of 'union message_body' out
into a separate 'struct work_struct' and completely remove the
multiplexerthat is currently part of host_if_work(), allowing movement
of the implementation of each message handler into the callsite of the
function that currently queues the 'host_if_msg'.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:52 +09:00
Ajay Singh
688a45ea20 staging: wilc1000: avoid use of static variable 'rssi'
Instead of static variable now allocating the data and passing to
handle_get_rssi() to fill the rssi information.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:52 +09:00
Ajay Singh
6566dc0416 staging: wilc1000: avoid use of static variable 'inactive_time'
Avoided the use of static variable 'inactive_time' and move it as part of
'sta_inactive_t' structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:51 +09:00
Ajay Singh
56b408e513 staging: wilc1000: handle freeing of 'key' & 'seq' data in wilc_add_rx_gtk()
Handle freeing of memory allocated to keep 'key' & 'seq' in wilc_add_rx_gtk().
Once completion event is received, free the memory allocated for
to avoid missing of free in work function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:51 +09:00
Ajay Singh
5b9be6713a staging: wilc1000: handle freeing of key data in wilc_add_ptk()
Handle freeing of memory allocated to store the 'key' in wilc_add_ptk()
function. Once work completion notification is received, free the
memory allocated to avoid missing of free in work function sepecially
for error scenario.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:51 +09:00
Ajay Singh
e6ea187b5b staging: wilc1000: handle freeing of key data in wep add key
Modified the code to free the allocated memory, used to store the key in
wilc_add_wep_key_bss_sta() and wilc_add_wep_key_bss_ap().
After work completion notification is received, free the
memory allocated to avoid missing of free in work function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:51 +09:00
Ajay Singh
c6a358d564 staging: wilc1000: rename wilc_enqueue_cmd() to wilc_enqueue_work()
Rename wilc_enqueue_cmd() to wilc_enqueue_work() because its used to
enqueue the work queue. Also removed the function header comment for
wilc_enqueue_cmd() as its not correct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:51 +09:00
Ajay Singh
708d96fb2a staging: wilc1000: remove 'hif_thread_comp' completions
Remove 'hif_thread_comp' completions as its not required after adding
completion event as part work data to handle each sync call.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:51 +09:00
Ajay Singh
5e6f8a8ae2 staging: wilc1000: added 'work_comp' completion as part of host_if_msg
Added 'work_comp' completion in 'host_if_msg'. It allows handling the
sync call to wait for sepecific completion event.
The commands can be run in sync way waiting for their specific
completion event.
Added is_sync flag in wilc_create_work_queue() to handle the sync call to
host interface.

After adding completion as part of host_if_msg now
below completion are not required
 comp_test_key_block;
 comp_test_disconn_block
 comp_get_rssi
 comp_inactive_time
 hif_wait_response

Modified wilc_get_statistics() API to handle get statistic in sync &
async way.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 21:55:51 +09:00