2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 10:13:57 +08:00
Commit Graph

2041 Commits

Author SHA1 Message Date
Adham Abozaeid
979eb0c96b staging: wilc1000: Avoid overriding rates_no while parsing ies element.
Commit d4b4aaba51 ("staging: wilc1000: fix line over 80 characters in
host_int_parse_join_bss_param()") introduced a bug by not keeping the
rates_no value while parsing ies elements.
It also increments auth_total_cnt as a pointer instead of its reference.

This commit fixes the bug by passing reference to rates_no to
host_int_parse_join_bss_param() and by incrementing reference of
auth_total_cnt

Fixes: d4b4aaba51 (staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param())
Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25 18:45:47 +02:00
Colin Ian King
a9a45c19af staging: wilc1000: fix spelling mistake: "Preamle" -> "Preamble"
Trivial fix to spelling mistake in netdev_err error message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25 18:44:13 +02:00
Ajay Singh
49bf665801 staging: wilc1000: refactor host_int_parse_assoc_resp_info() to remove unused code
Remove 'connect_resp_info' structure as most of its elements are not used.

Modified wilc_parse_assoc_resp_info() to directly parse and fill value
in connect_info structure variable. Remove use of 'assoc_resp_len' variable.
get_assoc_resp_cap_info() & get_asoc_id() functions are remove as its
not used anymore.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:49 +02:00
Ajay Singh
b2f86aa18f staging: wilc1000: remove s8idxarray to avoid datatype in variable name
Cleanup patch to have variable names as per linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:49 +02:00
Ajay Singh
aaf5df9d0c staging: wilc1000: remove unused 'lock' varible in 'wilc_priv' structure
Cleanup patch to remove the unused variable from 'wilc_priv' structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:49 +02:00
Ajay Singh
1275022a10 staging: wilc1000: added comments for mutex and spinlock_t
Added comments for mutex and spinlock_t to avoid checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:49 +02:00
Ajay Singh
c7ceac21e7 staging: wilc1000: remove 'flag' argument from wilc_mac_indicate()
Remove 'flag' function parameter in wilc_mac_indicate() as only one
condition was handled using that parameter. Also removed unnecessary
call to wilc_mac_indicate() as no operation was performed in that
function call.
After above changes below macros are not required anymore.
WILC_MAC_INDICATE_STATUS	0x1
WILC_MAC_INDICATE_SCAN		0x2

This changes also helped in resolving the line over 80 chars issue
found by checkatpch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:49 +02:00
Ajay Singh
2e530e2836 staging: wilc1000: added #define for setting radiotap header
Added new macro to resolve below checkpatch issues in linux_mon.

"Lines should not end with a '('"

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:49 +02:00
Ajay Singh
65ebccebb8 staging: wilc1000: fix line over 80 chars in wilc_sdio struct
Fix line over 80 chars issue found by checkpatch.pl script by placing
the comment message above the macro preprocessor.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
977febc9cf staging: wilc1000: refactor del_station() to avoid parenthesis misalignment
Refactor the code to fix open parenthesis alignment issue reported by
checkpatch.pl script in del_station().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
2cfcc2fc1b staging: wilc1000: rename u8security to avoid datatype in variable name
Cleanup patch to avoid use of datatype in variable name to follow as
per linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
2b26ae0095 staging: wilc1000: fix line over 80 chars issue in connect()
Fix line over 80 characters in connect() by using temporary variables.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
0142ca35d0 staging: wilc1000: fix line over 80 chars in scan()
Fix line over 80 characters issues found by checkpatch.pl script with
the help of local variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
36fef228ed staging: wilc1000: fix line over 80 characters in add_key()
Fix line over 80 character issue found by checkpatch.pl script in
add_key().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
9d48bfaec6 staging: wilc1000: fix line over 80 chars in wilc_create_wiphy() declaration
Fix line over 80 characters issue found by checkpatch.pl script in
function declaration.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
783cfc8bd3 staging: wilc1000: fix line over 80 chars in get_station()
Fix line over 80 characters issue in get_station().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
31c61cd7b4 staging: wilc1000: fix line over 80 chars in wilc_wfi_cfg_tx_vendor_spec()
Fix line over 80 characters issues reported by checkpatch.pl script in
wilc_wfi_cfg_tx_vendor_spec() by using temporary variable. Simplified
'if else' condition with 'if'.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
4d03c3d51b staging: wilc1000: fix line over 80 charas in wilc_wfi_remain_on_channel_expired()
Refactor wilc_wfi_remain_on_channel_expired() to avoid line over 80
character issue reported by checkpatch.pl script. Also assigned value in the
variable at the time of declaration.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
7ca6ba24c3 staging: wilc1000: use kmemdup instead of kmalloc in add_network_to_shadow()
Use kmemdup instead of kmalloc & memcpy in add_network_to_shadow(). Also
added  code to set 'ies_len' to zero in case of memory allocation
failure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
30300a1cbd staging: wilc1000: fix line over 80 chars in add_network_to_shadow()
Fix line over 80 characters issue reported by checkpatch in
add_network_to_shadow() by using temporary variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
50fdf8142d staging: wilc1000: rename clear_duringIP() to avoid camelCase issue
Rename clear_duringIP() function to avoid camelCase issue reported by
checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
151c8b920c staging: wilc1000: use kmalloc(sizeof(*mgmt_tx)...) in mgmt_tx()
Fix below checkpatch issue found in mgmt_tx()

Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct
p2p_mgmt_data)...)

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
c0a7882312 staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc()
Fix below reported checkpatch issues in wilc_wfi_cfg_alloc().
kzalloc(sizeof(*wdev)...) over kzalloc(sizeof(struct wireless_dev)

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:48 +02:00
Ajay Singh
3f27ec8733 staging: wilc1000: fix line over 80 chars in linux_mon
Fix line over 80 char issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
b3706d0ff3 staging: wilc1000: replace kmalloc with kmemdup() in handle_connect_timeout()
Instead of kmalloc and memcpy use kmemdup in handle_connect_timeout().
Also return -ENOMEM incase of failure to allocate the memory.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
9aef8233ef staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info()
Fix line over 80 characters issue in host_int_parse_assoc_resp_info() by
using shorter name for the local variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
d4b4aaba51 staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param()
Split host_int_parse_join_bss_param() to avoid the line over 80
character issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
8d4279c7ee staging: wilc1000: fix line over 80 chars issue in host_int_handle_disconnect()
Fix line over 80 char issue in host_int_handle_disconnect() by using
temp variable to hold the 'wilc_connect_result' function pointer.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
08268f110b staging: wilc1000: fix line over 80 characters issue in handle_connect()
Fix line over 80 character issue found by checkpatch.pl script by
aligning the input argument in function call.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
f44cf0ee4a staging: wilc1000: fix line over 80 chars in handle_key()
Fix checkpatch reported issue of line over 80 char in handle_key().
Introduced new functions by spliting existing function to address the
checkpatch issue.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
43103ed0c2 staging: wilc1000: remove 'ret' variable in handle_key()
Remove the use of unnecessary 'ret' variable and use existing 'result'
variable to hold the status. Also changed type of 'result' from s32 to
int to confirm with the function return type.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:04:47 +02:00
Ajay Singh
bcafa651d3 staging: wilc1000: added complete() call for error scenario in handle_key()
During memory allocation failure in handle_key() the complete() was not
called for comp_test_key_block event. So now added the code to call
complete() for event during error scenario.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:03:46 +02:00
Nathan Chancellor
1cbe5fe261 staging: wilc1000: Remove unnecessary array index check
This statment triggers GCC's -Wtype-limit since key_index is an
unsigned integer so it cannot be less than zero.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:11:23 -07:00
Nathan Chancellor
7aa48d37ae staging: wilc1000: Remove useless function
GCC warns that 'wid' is unused in wilc_remove_key and it's correct; the
variable is only local. Get rid of the function (since it just returns
zero) and shuffle the remaining code into one if statement.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:11:23 -07:00
Nathan Chancellor
17521b1a1e staging: wilc1000: Remove unused variables
GCC warns these variables are all set but never used so remove them.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:11:23 -07:00
Ajay Singh
7f907bf69d staging: wilc1000: rename WILC_WFI_band_2ghz variable to avoid mixedcase
Rename 'WILC_WFI_band_2ghz' to avoid mixedcase for variable name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:36 -07:00
Ajay Singh
e78775bc90 staging: wilc1000: rename 'during_ip_time' macro to have uppercase name for macro
Rename 'during_ip_time' to 'DURING_IP_TIME_OUT' to have uppercase letter
for macros(#define).

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:36 -07:00
Ajay Singh
130608a86e staging: wilc1000: use is_broadcast_ether_addr check for broadcast address
Make use of is_broadcast_ether_addr() to check if mac address is broadcast
address. Remove static 'broadcast', as its not needed after use of
is_broadcast_ether_addr().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:36 -07:00
Ajay Singh
25a757b781 staging: wilc1000: move macro after the #include file in wilc_wfi_netdevice
Cleanup patch to organize macro in a file together after #include
statements.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:36 -07:00
Ajay Singh
880e404e8f staging: wilc1000: remove unnecessary header file inclusion for wilc
Remove the unnecessary file inclusion in the source code. Also follow
the convension to first include the system header then project specific
header files.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:36 -07:00
Ajay Singh
2d7b523193 staging: wilc1000: remove unnecessary static function defination in wilc_spi
Cleanup patch to remove the unnecessary code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
1c1dfdfee2 staging: wilc1000: remove unused macros in host_interface
Cleanup patch to remove the unused macro mentioned below. Also move
macro up along with other macro declaration.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
9572bf9bfc staging: wilc1000: remove the use of cur_byte variable in functions
Instead of using the intermediate variable to hold the value, now directly
using the allocated variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
228d0422bb staging: wilc1000: remove static variable 'del_beacon' and null check
Using local variable instead of static varible 'del_beacon'. Also removed
the unnecessary 'if' check in handle_del_beacon().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
30324405ba staging: wilc1000: rename WILC_WFI_deinit_mon_interface to avoid uppercase for function name
Changes to avoid the use of uppercase for function name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
e5bf9759bd staging: wilc1000: rename WILC_WFI_init_mon_interface to avoid uppercase in function name
Changes to avoid the use of uppercase for function name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
9f30c48348 staging: wilc1000: rename WILC_WFI_mon_xmit to avoid uppercase for function name
Changes to avoid the use of uppercase for function name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
73d359a08b staging: wilc1000: rename WILC_WFI_mon_priv to avoid uppercase for struct name
Cleanup patch to avoid 'struct' name with uppercase letters.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
436d918ae3 staging: wilc1000: rename WILC_WFI_monitor_rx to avoid uppercase for function name
Cleanup patch to follow names as per linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00
Ajay Singh
06ec2c9309 staging: wilc1000: remove unnecessary file and function header comments
Cleanup patch to remove the unnecessary comments used for file and functions
header.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03 13:56:35 -07:00