Commit Graph

1761 Commits

Author SHA1 Message Date
Chaehyun Lim 8f9d9e0041 staging: wilc1000: change handle_get_ip_address's return type to void
When handle_get_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 14:05:59 -07:00
Sudip Mukherjee 853adce6fd staging: wilc1000: remove unused variables
These variables were havnig the pointer returned by wiphy_priv() but
they were never used.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:06:51 -07:00
Claudiu Beznea 245b431b76 Staging: wilc1000: Freed memory in case of error
This patch frees memory allocated inside wilc_wlan_txq_add_cfg_pkt()
in case wilc_wlan_txq_add_to_head() fails.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:06:51 -07:00
Chaehyun Lim 8958f5811c staging: wilc1000: rename result in handle_set_ip_address
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:04:55 -07:00
Chaehyun Lim cd7293ef39 staging: wilc1000: change data type of result in handle_set_ip_address
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:04:55 -07:00
Chaehyun Lim fc6138b6cf staging: wilc1000: change handle_set_ip_address's return type to void
When handle_set_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:04:55 -07:00
Chaehyun Lim 14f3b086fc staging: wilc1000: rename result in handle_set_operation_mode
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:03:39 -07:00
Chaehyun Lim 197b053d9c staging: wilc1000: change data type of result in handle_set_operation_mode
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:03:39 -07:00
Chaehyun Lim b093d4fe60 staging: wilc1000: change handle_set_operation_mode's return type to void
When handle_set_operation_mode is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:03:39 -07:00
Chaehyun Lim fdcc285b77 staging: wilc1000: rename result in handle_set_wfi_drv_handler
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() function are used as result,
others are used as ret. It will be changed as ret in all handle_*()
function to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:03:39 -07:00
Chaehyun Lim d22002338f staging: wilc1000: change data type of result in handle_set_wfi_drv_handler
This patch changes data type of result variable from s32 to int.
result is used to get return value from wilc_send_config_pkt that has
return type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:03:39 -07:00
Chaehyun Lim 62a0d45af6 staging: wilc1000: change handle_set_wfi_drv_handler's return type to void
When handle_set_wfi_drv_handler is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:03:39 -07:00
Chaehyun Lim 12915c51e9 staging: wilc1000: change return type of ret variable in handle_get_tx_pwr
This patch changes return type of ret variable from s32 to int.
ret has return value from wilc_send_config_pkt that has return type of
int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:03:39 -07:00
Chaehyun Lim 31aab0e0ab staging: wilc1000: remove unused hif_drv in wilc_add_beacon
This patch removes unused hif_drv in wilc_add_beacon.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim d5dc940289 staging: wilc1000: remove unused hif_drv in wilc_del_beacon
This patch removes unused hif_drv in wilc_del_beacon.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim 4965c4dcdd staging: wilc1000: remove unused hif_drv in wilc_set_pmkid_info
This patch removes unused hif_drv in wilc_set_pmkid_info.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim 11d9e460cc staging: wilc1000: remove unused hif_drv in host_int_get_assoc_res_info
This patch removes unused hif_drv in host_int_get_assoc_res_info.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim a61c42319b staging: wilc1000: remove unused hif_drv in wilc_set_mac_chnl_num
This patch removes unused hif_drv in wilc_set_mac_chnl_num.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim 1f4b12f089 staging: wilc1000: remove unused hif_drv in wilc_remain_on_channel
This patch removes unused hif_drv in wilc_remain_on_channel.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim b0474e9eb9 staging: wilc1000: remove unused hif_drv in wilc_add_station
This patch removes unused hif_drv in wilc_add_station.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim d5db441435 staging: wilc1000: remove unused hif_drv in wilc_del_station
This patch removes unused hif_drv in wilc_del_station.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim d9a90eea69 staging: wilc1000: remove unused hif_drv in wilc_del_allstation
This patch removes unused hif_drv in wilc_del_allstation.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim f2b01d04e8 staging: wilc1000: remove unused hif_drv in wilc_edit_station
This patch removes unused hif_drv in wilc_edit_station.
There is no need to checku null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim 3cf996d428 staging: wilc1000: remove unused hif_drv in wilc_set_power_mgmt
This patch removes unused hif_drv in wilc_set_power_mgmt.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim 8bf4d84dca staging: wilc1000: remove unused hif_drv in wilc_setup_multicast_filter
This patch removes unused hif_drv in wilc_setup_multicast_filter.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim cc1aa4c8e9 staging: wilc1000: remove unused hif_drv in wilc_setup_ipaddress
This patch removes unused hif_drv in wilc_setup_ipaddress.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim 3de8fbac6a staging: wilc1000: remove unused hif_drv in host_int_get_ipaddress
This patch removes unused hif_drv in host_int_get_ipaddress.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:02:04 -07:00
Chaehyun Lim 2f27ad12ab staging: wilc1000: rename pu8Buffer in handle_scan
This patch renames pu8Buffer to buffer to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Chaehyun Lim 87b16cbf17 staging: wilc1000: rename u32WidsCount in handle_scan
This patch renames u32WidsCount to index to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Chaehyun Lim bbff83dbb7 staging: wilc1000: rename strWIDList in handle_scan
This patch renames strWIDList to wid_list to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Chaehyun Lim 34b107eded staging: wilc1000: rename pstrHostIFscanAttr in handle_scan
This patch renames pstrHostIFscanAttr to scan_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Chaehyun Lim ba7eac31a1 staging: wilc1000: rename Handle_Scan
This patch renames Handle_Scan to handle_scan to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Chaehyun Lim 03f00ac788 staging: wilc1000: remove block scope braces and fix indentation
This patch removes unnecessary block scope braces and fix indentation of
the codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Chaehyun Lim 4aa3387bc2 staging: wilc1000: move Handle_ScanDone function declaration
Handle_ScanDone function declaration is moved to front of
host_interface.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Chaehyun Lim 960efe0f89 staging: wilc1000: rename goto label in handle_cfg_param
This patch changes goto label from ERRORHANDLER to unlock.
unlock is a more meaningful name than ERRORHANDLER.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:00:52 -07:00
Leo Kim b0f1836fad staging: wilc1000: adds a check routine when performed del_key()
This patch is adds a check routine when performed del_key().
We was find this situation while test the 'rmmod sdio'.
That is received inform a .del_key cmd from cfg80211.
If is not exist wep keys, must be ignore a wilc_remove_wep_key() function.
Thus, adds a check routine that key length of wep.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Leo Kim 8006109ba0 staging: wilc1000: adds a cfg80211_disconnected() function
This patch is adds a cfg80211_disconnected() when connection is lost already.
We was find this situation while test the 'rmmod sdio'.
SDIO remove function are include both remove mac_close and unregister net_device.
That is received one more a disconnect cmd from cfg80211.
Driver was already performed disconnect.
If wilc->close value was set to true, adds a call to cfg80211_disconnected().

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Leo Kim 3f626cf4a8 staging: wilc1000: add set to null after release firmware
This patch add set to null after release firmware.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Leo Kim a2c28de5c0 staging: wilc1000: removes unnecessary test code
This patch removes unnecessary test code that mac address hardcoding setting.
This test code is support to old firmware.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Leo Kim 11a54b3f99 staging: wilc1000: txq_thread_started: replaces a semaphore with a completion
This patch replaces a semaphore(txq_thread_started) with a completion.
Struct semaphore txq_thread_started is used to signal completion of txq thread.
It is better to use completion than semaphore for this case.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Leo Kim 01c7cee913 staging: wilc1000: removes duplicate del_timer_sync
This patch removes del_timer_sync(&periodic_rssi) which was
already performed this action.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Leo Kim 27e1f13964 staging: wilc1000: changes logic when happened mq_send fail
This patch changes logic when happened mq_send fail.
The check as a result value that mq_send fail.
But, regardless of the result value then perform a semaphore up.
That is an occur that semaphore locking.
Add to 'else' routine and move to 'else' position a semaphore up.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Johannes Berg 57fbcce37b cfg80211: remove enum ieee80211_band
This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-04-12 15:56:15 +02:00
Chaehyun Lim 086620978b staging: wilc1000: use mutex instead of struct semaphore hSemScanReq
This patch replaces struct semaphore hSemScanReq with struct mutex
scan_req_lock. It is better to use mutex than semaphore.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chaehyun Lim 589c667d8a staging: wilc1000: remove unused struct semaphore SemHandleUpdateStats
struct semaphore SemHandleUpdateStats is defined but never used in this
driver, so just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chaehyun Lim c975f9dd10 staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get_val
This patch changes data type of wid argument in wilc_wlan_cfg_get_val
from u32 to u16. It is better to change data type of wid because wid has
one of enum WID_T that is data type of u16. And, there is no need to use
u16 type casting when calling wilc_wlan_cfg_get_wid_value function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chaehyun Lim 7db699dbe5 staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get
This patch changes data type of wid argument in wilc_wlan_cfg_get from
u32 to u16. It is better to change data type of wid because wid has one
of enum WID_T that is data type of u16. And, there is no need to use u16
type casting when calling wilc_wlan_cfg_get_wid function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chaehyun Lim 70011f5f2c staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_set
This patch changes data type of wid argument in wilc_wlan_cfg_set from
u32 to u16. It is better to change data type of wid because wid has one of
enum WID_T that is data type of u16. And, there is no need to use u16
type casting when calling wilc_wlan_cfg_set_wid function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Leo Kim 8dc5fb4e0e staging: wilc1000: removes unused local variable
This patch removes unused local variable.
This variable is operation definition that back off from sending packets
for some time.
However, that has been deleted operation code.
That is removes all relative code.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 847109fc0f staging: wilc1000: removes define USE_TX_BACKOFF_DELAY_IF_NO_BUFFERS
This patch removes define USE_TX_BACKOFF_DELAY_IF_NO_BUFFERS and
use it's feature codes.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 7632d9b1a0 staging: wilc1000: removes unused define
This patch removes unused define.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim fa63394152 staging: wilc1000: replaces memcmp with ether_addr_equal_unaligned
This patch replaces memcmp with ether_addr_equal_unaligned.
Warning reported by checkpatch.pl
 - Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim e944ad751f staging: wilc1000: removes unused debug flags
This patch removes unused debug flags.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 5510730d5f staging: wilc1000: removes unused dead codes
This patch removes unused dead codes that define custom feature.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 340a84ff96 staging: wilc1000: replaces frame_type with type of struct frame_reg
This patch replaces frame_type with type of struct frame_reg.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 89febb21c4 staging: wilc1000: replaces g_struct_frame_reg with frame_reg
This patch replaces g_struct_frame_reg with frame_reg.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim c92a869e61 staging: wilc1000: removes typedef of struct struct_frame_reg
This patch removes typedef of struct struct_frame_reg.
Renames the struct_frame_reg to frame_reg as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 6d11c5517f staging: wilc1000: wilc_frame_register: removes unused hif_drv
This patch removes unused hif_drv of wilc_frame_register function.
It's perform an unnecessary null check and debug print log.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 58e7003f53 staging: wilc1000: removes WIRELESS_EXT
This patch removes WIRELESS_EXT.
Does not used the WIRELESS_EXT define.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Chaehyun Lim 2bb02584cd staging: wilc1000: use completion instead of struct semaphore hif_sema_driver
struct semaphore hif_sema_driver is used to signal completion of host
interface message. This patch replaces struct semaphore hif_sema_driver
with struct completion hif_driver_comp. It is better to use completion
than semaphore for this case.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Chaehyun Lim 04dd9a4211 staging: wilc1000: use completion instead of struct semaphore hif_sema_thread
struct semaphore hif_sema_thread is used to signal completion of host
interface thread. This patch replaces struct semaphore hif_sema_thread
with struct completion hif_thread_comp. It is better to use completion
than semaphore for this case.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Anchal Jain add0f9fefe staging: wilc1000: Remove camel case in variable names.
Remove a problem detect by checkpatch.pl
CHECK: Avoid CamelCase: <srcAdd>

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Chaehyun Lim 896802a8e2 staging: wilc1000: use mutex instead of struct semaphore hif_sema_deinit
This patch replaces struct semaphore hif_sema_deinit with struct mutex
hif_deinit_lock. It is better to use mutex because mutex gives better
performance than semaphore.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Roger H. Newell b59958ee90 staging: wilc1000: Replaced comparison to NULL statements
This patch corrects checks generated by checkpatch.pl by
replacing comparison to null statements with equivalent
statements in the form "x" or "!x"

Signed-off-by: Roger H. Newell <newell.roger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Roger H. Newell d5e27e8b83 staging: wilc1000: Removed braces from single block statements
This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.

Signed-ff-by: Roger H. Newell <newell.roger@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Alison Schofield 702962f33b staging: wilc1000: replace sem_test_key_block with a completion
Semaphore sem_test_key_block is used to signal completion of its
    host interface message. Since the thread locking this semaphore will
    have to wait, completions are the preferred mechanism and will offer
    a performance improvement.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Alison Schofield 96adbd276e staging: wilc1000: replace sem_test_disconn_block with a completion
Semaphore sem_test_disconn_block is used to signal completion of its
host interface message. Since the thread locking this semaphore will
have to wait, completions are the preferred mechanism and will offer
a performance improvement.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Alison Schofield 7c8a3dcac8 staging: wilc1000: replace semaphore sem_get_rssi with a completion
Semaphore sem_get_rssi is used to signal completion of its host
interface message. Since the thread locking this semaphore will have
to wait, completions are the preferred mechanism and will offer a
performance improvement.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Alison Schofield e0c1496fcf staging: wilc1000: replace semaphore sem_inactive_time with a completion
Semaphore sem_inactive_time is used to signal completion of its host
interface message. Since the thread locking this semaphore will have
to wait, completions are the preferred mechanism and will offer a
performance improvement.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Anchal Jain 1b7c69e84b staging: wilc1000: Fix lines over 80 characters
Break lines so that they do not exceed 80
characters. Problem found using checkpatch.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Anchal Jain a5c3f8db43 staging: wilc1000: else is not generally useful after a break or return
Remove else after a break. Because else is
generally not useful after a break or return.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Chaehyun Lim 613eaa39d6 staging: wilc1000: use completion instead of struct semaphore hif_sema_wait_response
This patch replaces struct semaphore hif_sema_wait_response with struct
completion hif_wait_response. In case of struct hif_sema_wait_response,
it better to use completion than semaphore.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 88253ab8e6 staging: wilc1000: removes an unnecessary if-condition
This patch removes an unnecessary if-condition.
Regardless of an if-condition is performed unconditionally '_end_' statement.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 5c6021da1c staging: wilc1000: removes goto definitions from wilc_wlan_firmware_download
This patch removes goto definitions from wilc_wlan_firmware_download function.
Goto '_fail_1' feature is error return.
It returns error type directly without result variable replacement as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 90fd4cc5d2 staging: wilc1000: changes an ambiguous debug messages
This patches changes an ambiguous debug messages.
The device types are both SDIO or SPI.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim ba7504730b staging: wilc1000: removes duplicate wilc variable setting
This patches removes duplicate wilc variable setting.
This value has already been set to wl variable previously.
Replace wilc with wl as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 2dfad49a8f staging: wilc1000: removes duplicate vif variable setting
This patches removes duplicate vif variable setting.
This value has already been set previously.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 9635d33830 staging: wilc1000: wilc_spi.c: removes debug print log
This patches removes unnecessary debug print logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 6422ea03f3 staging: wilc1000: removes function 'init_tcp_tracking()'
This patch removes function 'init_tcp_tracking()'.
The function is an unnecessary return.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Colin Ian King f54e994c29 staging: wilc1000: fix a couple of memory leaks
The ENOMEM error return paths are not free'ing allocated memory
resulting in a memory leak of allocated structures. Perform the
required kfree to fix the memory leaks.

Issue discovered with static analysis using CoverityScan

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-22 22:27:36 -04:00
Leo Kim 8827bd88ef staging: wilc1000: fixed kernel panic when firmware is not started
This patch fixed the problems caused by if firmware is not started.
That is why, in nl80211 put current TX power in interface info.
If firmware is not started, this function(get_tx_power) does not work.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-22 22:22:13 -04:00
Anchal Jain e27604efde staging: wilc1000: Possible unnecessary 'out of memory' message
Remove unnnecessary debug message.
Problem detected by checkpatch.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Chaehyun Lim 1f12f14807 staging: wilc1000: use mutex instead of semaphore sem_cfg_values
This patch replaces struct semaphore sem_cfg_values with struct mutex
cfg_values_lock. It is better to use mutex than semaphore.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Chaehyun Lim 9bad1d0a5a staging: wilc1000: use switch statement instead of multiple if statement
It is more readable than multiple if-else statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Chaehyun Lim 9e58c36c77 staging: wilc1000: remove unnecessary comments
This patch removes unnecessary comments because enum cfg_cmd_type
shows each command type without it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Chaehyun Lim 7cc386e9de staging: wilc1000: add enum cfg_type_cmd
This patch adds a new enum cfg_type_cmd to change hard-coded command
type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Chaehyun Lim 76e6121c90 staging: wilc1000: rename hardwareProductVersion in struct wilc_mac_cfg
This patch renames hardwareProductVersion to hw_product_version to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Chaehyun Lim e9d24b9e88 staging: wilc1000: remove commented codes
This patch removes commented codes in struct wilc_cfg_str.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Chaehyun Lim 7902451cb9 staging: wilc1000: use TAG_PARAM_OFFSET define
TAG_PARAM_OFFSET is defined at top of this file so that it is used
to simplify codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Anchal Jain 63f803518c staging: wilc1000: Remove a whitespace before parenthesis
Remove a whitespace before parenthesis "("

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Chaehyun Lim b1d296b3fd staging: wilc1000: remove typedef from enum tenuConnectSts
This patch removes typedef from enum tenuConnectSts and renames it to
connect_status to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:52:13 -08:00
Chaehyun Lim 09db529cb5 staging: wilc1000: remove unused define
This patch removes INFINITE_SLEEP_TIME that is not used in the driver,
so just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:52:13 -08:00
Chaehyun Lim fc17eaa1ed staging: wilc1000: remove typedef from sdio_cmd53_t
This patch removes typedef from struct sdio_cmd53_t and renames it to
sdio_cmd53.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:52:13 -08:00
Chaehyun Lim c44e80bc6a staging: wilc1000: remove unnecessary comment codes
This patch removes unnecessary comment code in struct sdio_cmd53_t.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:52:13 -08:00
Chaehyun Lim a91632fac9 staging: wilc1000: remove typedef from struct sdio_cmd52_t
This patch removes typedef from struct sdio_cmd52_t and renames it to
sdio_cmd52.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:52:13 -08:00
Amitoj Kaur Chawla 5a9ff74d8e staging: wilc1000: wilc_wlan: Remove wrapper function
Remove is_tcp_ack_filter() which only returns the value of boolean
variable `enabled` by replacing the only call site with the variable
`enabled` itself.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:42:32 -08:00
Tony Cho 0d413ba46e staging: wilc1000: wilc_wlan_if.h: remove unused functions
This patch removes the unused functions anymore related to the configuration
of the bus interface clock speed.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:41:45 -08:00
Bhaktipriya Shridhar bc63f50cbb staging: wilc1000: Removed unused variables
Variables pcgroup_encrypt_val,pccipher_group,pcwpa_version,
hold different values at different stages of the execution of
connect(), however they are not being used anywhere.
Hence, the unused variables have been removed.

This was done using Coccinelle.

@@ type T; identifier i; constant c; @@
-T i;
<... when != i
-i = c;
...>

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:41:45 -08:00
Rehas Sachdeva 6e4d1a8d7d staging: wilc1000: Remove unnecessary 'else'
This patch removes the checkpatch.pl warning:
else is not generally useful after a break or return

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:41:45 -08:00
Alison Schofield ac4cf190fc staging: wilc1000: remove code for HOST_IF_MSG_SET_MAC_ADDRESS
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:40:04 -08:00
Alison Schofield 05cb0ed75b staging: wilc1000: remove code for HOST_IF_MSG_Q_IDLE
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:40:04 -08:00
Alison Schofield 6c2ea94661 staging: wilc1000: remove code for HOST_IF_MSG_FLUSH_CONNECT
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:40:04 -08:00
Alison Schofield 895eb6a9fd staging: wilc1000: remove code for HOST_IF_GET_LINKSPEED
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, the #define, and the link_speed var.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:40:04 -08:00
Alison Schofield 34b68e1247 staging: wilc1000: remove code for HOST_IF_MSG_GET_CHNL
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, the #define, and the channel var.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:40:04 -08:00
Alison Schofield 91dd941996 staging: wilc1000: remove code for HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS
The function that sent this message id was previously removed.
Finish the cleanup by removing the call to the message handler,
the message handler, and the #define.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:31:42 -08:00
Chaehyun Lim 90f209daa4 staging: wilc1000: rename u16reason in disconnect_info
This patch renames u16reason to reason to remove u16 prefix. There is no
need to use prefix to show data type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim bb76df5a44 staging: wilc1000: rename struct tstrDisconnectNotifInfo
This patch renames struct tstrDisconnectNotifInfo to disconnect_info to
avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 134b4cf2d5 staging: wilc1000: rename u16ConnectStatus in struct connect_info
This patch renames u16ConnectStatus to status to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 3e7477c240 staging: wilc1000: rename u16RespIEsLen in struct connect_info
This patch renames u16RespIEsLen to resp_ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 61e1326ff6 staging: wilc1000: rename pu8RespIEs in struct connect_info
This patch renames pu8RespIEs to resp_ies to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 4607f9ccbb staging: wilc1000: rename ReqIEsLen in struct connec_info
This patch renames ReqIEsLen to req_ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 4ff4857076 staging: wilc1000: rename pu8ReqIEs in struct connect_info
This patch renames pu8ReqIEs to req_ies to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim d4a24e082b staging: wilc1000: rename au8bssid in struct connect_info
This patch renames au8bssid to bssid to remove au8 prefix in struct
connect_info. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 3b0437e18a staging: wilc1000: rename struct tstrConnectInfo
This patch renames struct tstrConnectInfo to connect_info to avoid
camelcase and removes typedef.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Bhaktipriya Shridhar 0c9e21d397 staging: wilc1000: Remove useless return variables
This patch removes unnecessary return variables and compresses the
return logic.
The coccinelle script that finds and fixes this issue is:

@@ type T; identifier i,f; constant C; @@
- T i;
...when != i
when strict
( return -C;
|
- i =
+ return
f(...);
- return i;
)

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:41 -08:00
Tony Cho 4b1e380bdb staging: wilc1000: wilc_wlan.c: remove multiple blank line
This patch removes the multiple blank line reported by checkpatch.pl.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:41 -08:00
Tony Cho 06f3e89332 staging: wilc1000: wilc_wlan.c: remove unnecessary blank lines
This patch removes unnecessary blank lines found by checkpatch.pl.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:41 -08:00
Leo Kim 79f7dfa549 staging: wilc1000: Revert "staging: wilc1000: remove spaces around '->'"
This reverts commit 6c2ab2398b ("staging: wilc1000: remove spaces around '->'").
It had applied from a incorrectly commit a1b56a4c50
("staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages").

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:05 -08:00
Leo Kim eed9e5439f staging: wilc1000: removes unnecessary retry 3 times
This patch removes unnecessary retry 3 times and related variable.
Actually the retry 3 times sentence, don't retry at all.
Repeats conditions are that until read a chip-id and written a register.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:05 -08:00
Chaehyun Lim cdc6cd28ed staging: wilc1000: handle_cfg_param: remove unnecessary whitespace
This patch removes unnecessary whitespace before a quoted newline found
by checkpatch
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 940d43d93d staging: wilc1000: handle_cfg_param: fix line over 80 characters
This patch fixes line over 80 characters found by checkpatch
WARNING: line over 80 characters

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim ae9106aa28 staging: wilc1000: handle_cfg_param: fix logical continuations
This patch fixes logical continuations found by checkpatch
CHECK: Logical continuations should be on the previous line

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 44a4db1d35 staging: wilc1000: handle_cfg_param: rename wid_cnt
wid_cnt variable is used as indicating array index of struct wid_list.
This patch renames wid_cnt to i that makes more readability.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 2746ca0866 staging: wilc1000: handle_cfg_param: change data type of wid_cnt
This patch changes data type of wid_cnt from u8 to int.
This variable uses array index of struct wid_list so that it is better
to use int type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim a5f0fb5cab staging: wilc1000: handle_cfg_param: remove wrapper struct cfg_param_attr
This struct just wrap struct cfg_param_val. There is no other member
except struct cfg_param_val.
This patch remove struct cfg_param_attr, then struct cfg_param_val is
renamed to struct cfg_param_attr.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chaehyun Lim 3027eafdf8 staging: wilc1000: handle_set_mac_address: fix missing blank line after declaration
commit 31cc9885e7 ("staging: wilc1000: handle_set_mac_address: use kmemdup")
introduces a new checkpatch warning, so this patch fixes it.

WARNING: Missing a blank line after declarations
FILE: drivers/staging/wilc1000/host_interface.c:430:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Amitoj Kaur Chawla 9676e84dfd staging: wilc1000: wilc_wfi_netdevice: Remove header files
Remove duplicate header files. Found using includecheck.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 12:03:22 -08:00
Amitoj Kaur Chawla 3075cc9f0e staging: wilc1000: Remove header file
Remove duplicate header file. Found using includecheck.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 12:03:22 -08:00
Anchal Jain 8779bf84ba staging: wilc1000: Check for quoted strings broken across lines
checkpatch warn about quoted strings split across lines.
So, convert multi-line string into a single line.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 12:02:22 -08:00
Chris Park 78285d0994 staging: wilc1000: removes linux_wlan_common.h file
This patch removes linux_wlan_common.h file and also removes the following
preprocessor at files that include it:
 - #include 'linux_wlan_common.h'

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Chris Park 38f11b8442 staging: wilc1000: remove useless define in linux_wlan_common.h file
This patch removes useless define in linux_wlan_common.h file

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Chris Park 50fa2ee820 staging: wilc1000: move MODALIS and GPIO_NUM define to wilc_wlan.h file
This patch moves MODALIS and GPIO_NUM define to wilc_wlan.h file.
MODALIS and GPIO_NUM define are used to two files (wilc_sdio.c,
wilc_spi.c), these files already include wilc_wlan.h file in common.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Chris Park a3f2965054 staging: wilc1000: move WILC_MULTICAST_TABLE_SIZE define to wilc_wlan_if.h file
This patch moves WILC_MULTICAST_TABLE_SIZE define to wilc_wlan_if.h file.
This define is used to three files(host_interface.c,host_interface.h,
linux_wlan.c) these files already include wilc_wlan_if.h file in common.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Leo Kim bda2b2fb4b staging: wilc1000: wilc_wlan_cfg_init: changes unused argument
This patch changes the argument of the wilc_wlan_cfg_init function,
wilc_debug to void type because wilc_debug function is not used any more.
In addition, finally removes wilc_debug and related variables.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Leo Kim 21ac321f71 staging: wilc1000: removes unnecessary variable of wilc_mac_cfg_t structure
This patch removes unnecessary variable of wilc_mac_cfg_t structure.
The variable is debug print function pointer.
Removes all what used this variable.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Leo Kim 7242eee14b staging: wilc1000: removes unnecessary wilc_debug print log
This patch removes unnecessary wilc_debug print log.
The print log was written when if condition fail.
The condition is chip-id check function.
Also, replaces this condition with normal function.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Leo Kim 7180d7dc21 staging: wilc1000: removes unnecessary wilc_debug print log
This patch removes unnecessary wilc_debug print log and the check routine.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Leo Kim e974b537c0 staging: wilc1000: replaces wilc_debug with netdev_err
This patches replaces wilc_debug with netdev_err.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Leo Kim eb4ede9d6b staging: wilc1000: removes wilc_dbg()
This patch removes wilc_dbg function because it's not any more.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:48:19 -08:00
Chris Park c09632ea4a staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE
This patch moves LINUX_RX_SIZE and LINUX_TX_SIZE to wilc_wlan.h file
because there are only used to wilc_wlan.c file.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park b331f15972 staging: wilc1000: moves to define values
This patch moves DEBUG, INFO, WRN and ERR values to wilc_debugfs.c file
because this is only used to wilc_debugfs.c file.
And, removes unnecessary WILC_DEBUGFS and else-case variables.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park d16a595b1d staging: wilc1000: removes usused PRINT_XX(region...)
This patch removes unused PRINT_XX(region...)
because already removed in used to region feature of whole wilc source.
Also, removes unnecessary related region extern variable.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park ade0fb4a66 staging: wilc1000: removes unused region feature
This patch removes unused region feature on debug message.
Also, removes the functions of related in this feature.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park 4ed9f7dc88 staging: wilc1000: wilc_wlan.c: removes unnecessary log messages
This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park d9766d52dc staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park 8e330c581e staging: wilc1000: linux_wlan.c: removes unnecessary log messages
This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park b92f9304a2 staging: wilc1000: host_interface.c: replace PRINT_ER with netdev_err
This patch replaces PRINT_ER with netdev_err.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park 77f3a71ffe staging: wilc1000: host_interface.c: removes unnecessary log messages
This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park 3b9d7dca8b staging: wilc1000: coreconfigurator.c: removes unnecessary log messages
This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park 6b8c30d836 staging: wilc1000: removes unused CFG80211_DBG tag
This patch removes unused CFG80211_DBG tag.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00