summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000
AgeCommit message (Collapse)Author
2019-03-10staging: wilc1000: fix to set correct value for 'vif_num'Ajay Singh
commit dda037057a572f5c82ac2499eb4e6fb17600ba3e upstream. 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: <stable@vger.kernel.org> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-09staging: wilc1000: fix missing read_write setting when reading dataColin Ian King
commit c58eef061dda7d843dcc0ad6fea7e597d4c377c0 upstream. Currently the cmd.read_write setting is not initialized so it contains garbage from the stack. Fix this by setting it to 0 to indicate a read is required. Detected by CoverityScan, CID#1357925 ("Uninitialized scalar variable") Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: stable <stable@vger.kernel.org> Acked-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27staging: wilc1000: revert "fix TODO to compile spi and sdio components in ↵Arnd Bergmann
single module" The TODO item named "make spi and sdio components coexist in one build" was apparently addressed a long time ago, but never removed from the TODO file. However, the new patch that tries to address it actually makes it worse again by duplicating the common parts of the driver into two separate modules rather than sharing them. This also introduces a build regression when one of the two is built-in while the other is a loadable module: drivers/staging/wilc1000/wilc_debugfs.o:(.data+0x10): undefined reference to `__this_module' Reverting the patch makes it build again. I'm leaving the TODO file modification though, as there is nothing left to do for this item. A related problem however still seems to exist: one still cannot have multiple concurrent instances of wilc1000 devices present in the system, as there are lots of shared global variables such as host_interface.c:static struct wilc_vif *periodic_rssi_vif; wilc_sdio.c:static struct wilc_sdio g_sdio; wilc_wlan.c:static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP; wilc_wlan.c:static u32 pending_acks; wilc_wfi_cfgoperations.c:int wilc_connecting; In order to have multiple instances working (sdio, spi, or mixed), all such variables need to be dynamically allocated per instance and stored in 'struct wilc' or one of the structures referenced by it. Fixes: 9abc44ba4e2f ("staging: wilc1000: fix TODO to compile spi and sdio components in single module") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05staging: wilc1000: remove TODO item for comments and code styleAjay Singh
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-05staging: wilc1000: replace ISWILC1000() macro with inline functionAjay Singh
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-05staging: wilc1000: added Microchip copyright notice headerAjay Singh
Cleanup the copyright notice header from the WILC1000 files. Replace copyright header of 'Atmel' & 'NewportMedia' with 'Microchip & its subsidiaries'. Also added the same copyright notice header for all wilc1000 driver source and header files. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging: wilc1000: fix compilation warning for ARCH PowerPCAjay Singh
Fix below warning reported for PowerPC arch compilation include/uapi/linux/byteorder/big_endian.h:95:37: warning: passing argument 1 of '__swab32s' makes pointer from integer without a cast [-Wint-conversion] Fixes: 02211edc9a1f ("staging: wilc1000: fix endianness warnings reported by sparse") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging: wilc1000: fix endianness warnings reported by sparseAjay Singh
This patch fixes the sparse warnings by making use of le32_to_cpus() & cpu_to_le32s() conversion API's. Remove the unnecessary byte-order conversion in wilc_wlan_parse_response_frame() as the data is copied using individual byte operation. Also added the byte-order conversion for 'header' in wilc_wfi_monitor_rx() & wilc_wfi_p2p_rx() as received in LE byte-order. The link [1] contains the details of discussion related to this patch. [1]. https://patchwork.kernel.org/patch/10436791/ Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging: wilc1000: use 'u16' data type for config id parameterAjay Singh
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-02staging: wilc1000: refactor wilc_wlan_handle_isr_ext to avoid goto statementAjay Singh
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-02staging: wilc1000: rename 'rcvd_ch_cnt' element in 'user_scan_req' structAjay Singh
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-02staging: wilc1000: added comments for 'hif_cs' mutex lockAjay Singh
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-02staging: wilc1000: modified debug log messages descriptionAjay Singh
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-02staging: wilc1000: remove unnecessary comments and comments descriptionAjay Singh
Cleanup patch to remove the unnecessary comments and commented code. Also updated description for few of comments. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02staging: wilc1000: fix TODO to compile spi and sdio components in single moduleAjay Singh
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-07-24staging: wilc1000: use descriptor-based interface for GPIOAjay Singh
Now making use of descriptor-based interface instead of integer-based interface for IRQ GPIO. Added device tree binding reference for WILC SDIO and SPI interface module. Also moved the code to free gpio descriptor in module remove as the reference was fetched in probe function. Updated the TODO file Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24staging: wilc1000: change compatible string from atmel to microchipAjay Singh
Use 'microchip' in compatible string instead of 'atmel', also replace '_' with '-' before the module. Remove 'wilc1000' prefix from device table name. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24staging: wilc1000: rename variable from 'gpio' to 'gpio_irq'Ajay Singh
Rename from 'gpio' to 'gpio_irq', so its inlcude the information about the purpose of GPIO. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24staging: wilc1000: remove gpio parameter from wilc_netdev_init()Ajay Singh
Instead of passing the gpio as parameter to wilc_netdev_init() now setting its value after finishing wilc_netdev_init() call. Avoided passing of extra parameter to wilc_netdev_init(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21staging: wilc1000: move variable assignment along with its declarationAjay Singh
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-21staging: wilc1000: remove unnecessary 'NULL' check from cfg80211_ops callbacksAjay Singh
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-21staging: wilc1000: use 'int' inplace of 's32' date typeAjay Singh
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-21staging: wilc1000: avoid setting default value for variable at declarationAjay Singh
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-21staging: wilc1000: avoid forward declaration of host_int_parse_join_bss_param()Ajay Singh
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-21staging: wilc1000: avoid host_int_get_assoc_res_info() forward declarationAjay Singh
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-21staging: wilc1000: avoid forward declaration for handle_scan_done()Ajay Singh
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-21staging: wilc1000: remove unnecessary type used for wid idAjay Singh
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-21staging: wilc1000: use single space before opening brances '{'Ajay Singh
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-21staging: wilc1000: remove unnecessary blank line between variable declarationAjay Singh
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-21staging: wilc1000: use lowercase for 'IFC_UP' struct element nameAjay Singh
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-21staging: wilc1000: remove the mutliple #define used for same macroAjay Singh
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-21staging: wilc1000: removed unused element from wilc_cfg_frame structAjay Singh
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-21staging: wilc1000: remove unnecessary elements from 'wilc_priv' structAjay Singh
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-21staging: wilc1000: remove unused elements in 'wilc' structAjay Singh
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-21staging: wilc1000: rename enum AUTHTYPE to use lowercaseAjay Singh
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-21staging: wilc1000: rename enum SITESURVEY to use lowercaseAjay Singh
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-21staging: wilc1000: rename enum CURRENT_TXRATE to use lowercaseAjay Singh
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-21staging: wilc1000: rename goto to avoid leading '_' in label nameAjay Singh
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-21staging: wilc1000: remove extra enums defined for ieee80211_eidAjay Singh
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-21staging: wilc1000: remove extra enum defined for data ratesAjay Singh
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-21staging: wilc1000: remove enum connect_status instead use ieee80211_statuscodeAjay Singh
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-21staging: wilc1000: remove unused enum declarationAjay Singh
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-06staging: wilc1000: fix static checker warning to unlock mutex in wilc_deinit()Ajay Singh
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: ff52a57a7a42 ("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-06-28staging: use BIT_ULL for NL80211_STA_INFO_* attribute typesOmer Efrat
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-28staging: wilc1000: updated TODO fileAjay Singh
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-28staging: wilc1000: avoid use of static variable 'rssi'Ajay Singh
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-28staging: wilc1000: avoid use of static variable 'inactive_time'Ajay Singh
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-28staging: wilc1000: handle freeing of 'key' & 'seq' data in wilc_add_rx_gtk()Ajay Singh
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-28staging: wilc1000: handle freeing of key data in wilc_add_ptk()Ajay Singh
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-28staging: wilc1000: handle freeing of key data in wep add keyAjay Singh
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>