summaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2018-04-25staging: visornic: fix visornic_xmit()'s return typeLuc Van Oostenryck1-1/+1
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wlan-ng: fix p80211knetdev_hard_start_xmit()'s return typeLuc Van Oostenryck1-2/+2
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging/wilc1000: fix wilc_mac_xmit()'s return typeLuc Van Oostenryck2-2/+2
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: updated TODO listAjay Singh1-8/+0
Removed the items from WILC1000 TODO list, which are already addressed to keep it updated. The removed items are already taken care by previously submitted patches. 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-04-25staging: wilc1000: remove registering of ndo_do_ioctl callbackAjay Singh1-63/+0
Remove registering of ndo_do_ioctl in wilc_netdev_ops structure. As RSSI information is already avaliable through cfg80211, so remove the IOCTL call use to fetch the same information. Wext support is not present in the driver. Its also done to address the TODO list item mentioned below: "use wext-core handling instead of private SIOCSIWPRIV implementation" 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-04-25staging: wilc1000: rename pu32InactiveTime to avoid camelCase issueAjay Singh1-1/+1
Avoid camelCase issues found by checkpatch.pl script. 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-04-25staging: wilc1000: remove the use of goto label in wilc_spi_clear_int_ext()Ajay Singh1-4/+4
Remove goto label '_fail_' used in wilc_spi_clear_int_ext(), to avoid the label name starting with '_'. 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-04-25staging: wilc1000: rename goto labels starting with '_' in wilc1000_wlan_init()Ajay Singh1-13/+13
Rename goto labels starting with '_' in wilc1000_wlan_init() 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-04-25staging: wilc1000: rename goto label '_fail_' linux naming convensionAjay Singh3-96/+96
Rename '_fail_' goto label to have name 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-04-25staging: wilc1000: remove the use of goto label in wilc_init()Ajay Singh1-11/+8
Added direct return in wilc_init() instead of goto label. Changes are done to avoid the use of '_' in label 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-04-25staging: wilc1000: remove goto label '_done_' in handle_listen_state_expired()Ajay Singh1-2/+1
Remove the use of goto label '_done_' in handle_listen_state_expired(). Changes are done to avoid the use of '_' in label 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-04-25staging: wilc1000: remove the use of goto label in wilc_spi_read_int()Ajay Singh1-2/+1
In wilc_spi_read_int() remove the use of goto label '_fail_'. Changes are done to avoid the use of '_' in label 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-04-25staging: wilc1000: remove the use of goto label in wilc_spi_read_size()Ajay Singh1-2/+1
In wilc_spi_read_size() remove the use of goto label '_fail_'. Changes are done to avoid the use of '_' in label 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-04-25staging: wilc1000: remove the use of goto label in spi_cmd_complete()Ajay Singh1-5/+2
In spi_cmd_complete() remove the use of goto label '_error_'. Changes were done to avoid the use of '_' in label 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-04-25staging: wilc1000: remove multiple define for mac connect and disconnectAjay Singh1-3/+0
Cleanup patch to have commonly used macro in common header file to avoid same defination in mulitple file. Removed MAC_CONNECTED & MAC_DISCONNECTED macro from coreconfigurator.h header. 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-04-25staging: wilc1000: remove multiple define used for MAX_SSID_LENAjay Singh1-1/+0
Cleanup patch to have commonly used macro in common header file to avoid same defination in mulitple file. Removed MAX_SSID_LEN macro from coreconfigurator.h header as its already defined in wilc_wlan_if.h. 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-04-25staging: wilc1000: remove unused macros in wilc moduleAjay Singh6-26/+0
Cleanup patch to remove the macros which are defined by not used. Below mentioned macros are removed: SCAN_DONE SCAN_EVENT_DONE_ABORTED WILC_WFI_RX_INTR WILC_WFI_TX_INTR WILC_WFI_TIMEOUT WILC_WFI_DWELL_PASSIVE WILC_WFI_DWELL_ACTIVE MAX_SURVEY_RESULT_FRAG_SIZE SURVEY_RESULT_LENGTH NUM_BASIC_SWITCHES NUM_FHSS_SWITCHES NUM_11N_BASIC_SWITCHES NUM_11N_HUT_SWITCHES BA_SESSION_DEFAULT_BUFFER_SIZE BA_SESSION_DEFAULT_TIMEOUT BLOCK_ACK_REQ_SIZE 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-04-25staging: wilc1000: added identifiers name in function definationsAjay Singh1-13/+13
Fix identifier names required for functions definition issues reported by checkpatch.pl script. 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-04-25staging: wilc1000: rename WID_LOGTerminal_Switch to avoid camelCaseAjay Singh1-1/+1
Fix 'Avoid camelCase' issue found by checkpatch.pl script. 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-04-25staging: wilc1000: fix line over 80 chars in change_station()Ajay Singh1-4/+4
Fix 'line over 80 chars' issue found by checkpatch.pl script. 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-04-25staging: wilc1000: use sizeof(variable) for memory allocated to store key infoAjay Singh1-4/+4
Changes to fix below checkpatch reported issues. CHECK: Prefer kmalloc(sizeof(*priv->wilc_gtk[idx])...) over kmalloc(sizeof(struct wilc_wfi_key)...) CHECK: Prefer kmalloc(sizeof(*priv->wilc_ptk[idx])...) over kmalloc(sizeof(struct wilc_wfi_key)...) 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-04-25staging: wilc1000: handle error condition in add_key() and remove auth_type ↵Ajay Singh1-24/+28
variable Added the code to return correct error code in add_key() and also removed 'auth_type' variable. Now passing diretly to function instead of using the 'auth_type' variable. 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-04-25staging: wilc1000: refactor add_key() to avoid duplicated codeAjay Singh1-41/+23
Cleanup fixes by removing the duplicated code in actor add_key(). 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-04-25staging: wilc1000: remove inner block {} and resetting of mode variableAjay Singh1-23/+20
Cleanup fixes to remove the uncessary inner block { /* */ } and setting of 'mode' variable. 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-04-25staging: wilc1000: split add_key() to avoid line over 80 charsAjay Singh1-44/+64
Cleanup changes to fix 'line over 80 chars' issue found by checkpatch.pl script by spliting the function. Also make use of kzalloc() instead kmalloc(). 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-04-25staging: wilc1000: rename variable using datatype in their name in add_key()Ajay Singh1-16/+16
Cleanup changes to use variable name 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-04-25staging: wilc1000: rename WILC_WFI_wep_key & WILC_WFI_wep_key_lenAjay Singh2-17/+17
Cleanup patch to use lower case for variable name 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-04-25staging: wilc1000: remove line over 80 char warning in few functionsAjay Singh1-4/+8
Remove 'line over 80 characters' issues found by checkpatch.pl script for following functions. disconnect() del_pmksa() wilc_create_wiphy() del_pmksa() Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: remove unused 'struct add_key_params'Ajay Singh1-6/+0
Cleanup patch to remove unused struct data structure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: remove line over 80 char in cfg_connect_result()Ajay Singh1-12/+22
Fix 'line over 80 characters' issues reported by checkpatch.pl script in cfg_connect_result(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: fix line over 80 char issue in clear_shadow_scan()Ajay Singh1-10/+11
Remove 'line over 80 char' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: rename hAgingTimer to avoid camelCase issueAjay Singh1-5/+5
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: refactor mgmt_tx to fix line over 80 charsAjay Singh1-76/+108
Refactor mgmt_tx() to fix line over 80 characters issue. Split the function to avoid the checkpatch.pl warning. Returning the same error code in case of memory allocation failure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: rename WILC_WFI_p2p_rx & s32Freq to avoid camelCaseAjay Singh3-11/+11
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: refactor WILC_WFI_p2p_rx() to avoid line over 80 charAjay Singh1-63/+82
Fix 'line over 80 characters' issue found by checkpatch.pl script. Refactor and split the function to avoid the checkpatch reported issues. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: remove line over 80 char warnings in set_wiphy_params()Ajay Singh1-4/+4
Fix 'line over 80 character' issue reported by checkpatch.pl script in set_wiphy_params(). Directly used the 'wiphy' pointer received as function argument instead of using 'priv->dev->ieee80211_ptr->wiphy'. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: removed unused static variables for gtk and ptk informationAjay Singh1-80/+0
Removed the unnecessary static variables used to store gtk and ptk information. Key data stored in the params was never access using these variables. Variables given below are removed g_add_gtk_key_params; g_key_gtk_params; g_add_ptk_key_params; g_key_ptk_params; g_key_wep_params; g_ptk_keys_saved; g_gtk_keys_saved; g_wep_keys_saved; Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: wilc1000: refactor scan() to free kmalloc memory on failure casesAjay Singh1-16/+46
Added changes to free the allocated memory in scan() for error condition. Also added 'NULL' check validation before accessing allocated memory. Copied the SSID information in consecutive slots to avoid inbetween holes while filling into array. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: refactor hostif_sme_set_pmksa functionSergio Paracuellos1-8/+6
This commits refactor a bit hostif_sme_set_pmksa function: - avoid one level indentation changing if condition. - use ether_addr_copy to copy bssid addresses. - move 'i' initialization to declaration place. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: use ether_addr_copy in hostif_sme_multicast_setSergio Paracuellos1-1/+1
Use ether_addr_copy to copy ethernet addresses in function hostif_sme_multicast_set instead of memcpy. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: use ether_addr_equal in hostif_data_requestSergio Paracuellos1-1/+1
Use ether_addr_equal to compare addresses in ether_addr_equal function instead of comparing using memcmp. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: use ether_addr_equal in hostif_data_indicationSergio Paracuellos1-1/+1
Instead of comparing ethernet address using memcmp in function hostif_data_indication use ether_addr_equal function created for this function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: use ether_addr_copy in hostif_mib_get_confirmSergio Paracuellos1-9/+2
This commit improves readability changing custom ethernet addresses copies in favour of using ether_addr_copy() function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: use ether_addr_copy() instead of custom copySergio Paracuellos1-8/+1
In order to achieve ethernet address copies, ether_addr_copy() function exists. So just use it and avoid the byte by byte copy. This increase readability. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: remove duplicated ks_wlan_handler_def declarationSergio Paracuellos1-3/+0
This declaration is declared twice so just remove this one because the other one is the one which contains static struct initializers. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: remove WPS definition conditional codeSergio Paracuellos3-25/+0
WPS definition was defined by default in ks_wlan.h header file. So it makes no sense to have conditional preprocessor stuff along the code about this. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: fix line exceding 80 characters in ks_wlan_get_rangeSergio Paracuellos1-1/+2
Avoid very long if condition just changing its style. This makes checkpatch script not complains about this line. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: refactor ks_wlan_get_mode functionSergio Paracuellos1-11/+2
Avoid the use of switch-case block which is not necessary at all and just use a ternary operator to achieve this. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: refactor ks_wlan_set_mode functionSergio Paracuellos1-17/+6
Most cases which are being handled in the switch-case of ks_wlan_set_mode function are just returning EINVAL. Avoid the use of switch-case stament and just use a simple if to handle those. This decrease LOC as well as improves readability. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: remove some duplicated definitions in ks_wlan_net.cSergio Paracuellos1-6/+0
This definitions are in linux/wireless.h header so it is not necessary at all to have this compatibility stuff duplicated here. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>