Commit Graph

219 Commits

Author SHA1 Message Date
Glen Lee 1006b5c71c staging: wilc1000: remove duplicate netdev
There are two net_device pointer which is the same because two structures
are merged into wilc_vif in previous patch. Remove wilc_netdev and change
with ndev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee 1f435d2ef4 staging: wilc1000: change vif to pointer to refence real private data
vif of struct has it's own memory which is not necessary because we have
allocated vif from netdev_priv.
Change vif to pointer type and assign vif which is netdev private data.
Change it's operator on related codes as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Glen Lee a4cac48101 staging: wilc1000: move perInterface_wlan_t to wilc_vif
perInterface_wlan_t and wilc_vif are all about interface control informations.
We will combine those two structures and maintain as one network interface
control information.
Move all the members of perInterface_wlan_t to wilc_vif and remove the
structure. Rename perInterace_wlan_t to wilc_vif and rename variable name nic
to vif which is proper name for it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:21:09 -08:00
Leo Kim 369a1d3bd3 staging: wilc1000: replace explicit NULL comparisons with !
This patch replace explicit NULL comparison with ! operator to simplify code.
Reported by checkpatch.pl for Comparison to NULL could be written !XXX" or "XXX".

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:20:04 -08:00
Leo Kim da537229b6 staging: wilc1000: fixes blank lines aren't necessary brace
This patch fixes the checks reported by checkpatch.pl
for Blank lines aren't necessary after an open brace '{' and
Blank lines aren't necessary before a close brace '}'.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:40:57 -08:00
Leo Kim a89f7c551a staging: wilc1000: wilc_wfi_cfgoperations.c: remove over-commenting
There are over-commenting in the wilc_wfi_cfgoperations.c file and most of them
are not helpful to explain what the code does and generate 80 ending
line over warnings. So, all of comments are removed in this patch and the
comments will later be added if necessary with the preferred Linux style.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:40:57 -08:00
Leo Kim 0b8bea1cac staging: wilc1000: rename pstrNetworkInfo in get_rssi_avg function
This patch renames pstrNetworkInfo to network_info that is
first argument of get_rssi_avg function to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim bdd3460f77 staging: wilc1000: rename pJoinParams in CfgScanResult function
This patch renames pJoinParams to join_params that is
fourth argument of CfgScanResult function to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 30cd10c466 staging: wilc1000: rename pUserVoid in CfgScanResult function
This patch renames pUserVoid to user_void that is
third argument of CfgScanResult function to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 0551a72e69 staging: wilc1000: rename pstrNetworkInfo in CfgScanResult function
This patch renames pstrNetworkInfo to network_info that is
second argument of CfgScanResult function to avoid camelcase.
And, remove the relation comment.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 1a4c8ce784 staging: wilc1000: rename enuScanEvent in CfgScanResult function
This patch renames enuScanEvent to scan_event that is
first argument of CfgScanResult function to avoid camelcase.
And, remove the relation comment.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 5c4cf0dda6 staging: wilc1000: rename pUserVoid in add_network_to_shadow function
This patch renames pUserVoid to user_void that is
second argument of add_network_to_shadow function to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 157814f07d staging: wilc1000: rename pUserVoid in is_network_in_shadow function
This patch renames pUserVoid to user_void that is
second argument of is_network_in_shadow function to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 5e51d8ba0b staging: wilc1000: update_scan_time: remove unused argument
This patch removes pUserVoid that is first argument of
update_scan_time function because it is not used in this function.
Remove argument in the function call also.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 12b0138b2a staging: wilc1000: reset_shadow_found: remove unused argument
This patch removes pUserVoid that is first argument of
reset_shadow_found function because it is not used in this function.
Remove argument in the function call also.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim c6f5e3a67b staging: wilc1000: rename s32Freq variable
This patch renames s32Freq variable to freq to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim ce3b1b5a85 staging: wilc1000: rename pstrNetworkInfo variable
This patch renames pstrNetworkInfo variable to network_info
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 48ee7bad3e staging: wilc1000: rename bDirectScan in refresh_scan function
This patch renames bDirectScan to direct_scan that is
third argument of refresh_scan function to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 84df0e6d71 staging: wilc1000: rename pUserVoid in refresh_scan function
This patch renames pUserVoid to user_void that is
first argument of refresh_scan function to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim d14991afe0 staging: wilc1000: clear_shadow_scan: remove unused argument
This patch removes pUserVoid that is first argument of
clear_shadow_scan function because it is not used in this function.
Remove argument in the function call also.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim e554a30552 staging: wilc1000: rename wilc_connected_SSID variable
This patch renames wilc_connected_SSID variable to wilc_connected_ssid
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 7e872df9cd staging: wilc1000: rename duringIP_TIME variable
This patch renames duringIP_TIME variable to during_ip_time
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim a25d51860c staging: wilc1000: rename bWilc_ie variable
This patch renames bWilc_ie variable to wilc_ie to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 8668594a96 staging: wilc1000: rename u8P2P_vendorspec variable
This patch renames u8P2P_vendorspec variable to p2p_vendor_spec
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim b84a3ac427 staging: wilc1000: rename u8P2Precvrandom variable
This patch renames u8P2Precvrandom variable to p2p_recv_random
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 583d972cf7 staging: wilc1000: rename u8P2Plocalrandom variable
This patch renames u8P2Plocalrandom variable to p2p_local_random
to avoid camelcase.
And, remove the relation comment.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 881eb5d812 staging: wilc1000: rename u8P2P_oui variable
This patch renames u8P2P_oui variable to p2p_oui to avoid camelcase.
And, remove the relation comment.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 0bd8274fb8 staging: wilc1000: rename u8WLANChannel variable
This patch renames u8WLANChannel variable to wlan_channel to avoid camelcase.
And, remove the relation comment.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 8d48b5bab6 staging: wilc1000: rename WILC_WFI_rates variable
This patch renames WILC_WFI_rates variable to ieee80211_bitrates
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 2736f476ae staging: wilc1000: rename WILC_WFI_2ghz_channels variable
This patch renames WILC_WFI_2ghz_channels variable to ieee80211_2ghz_channels
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim f1ab117db8 staging: wilc1000: rename astrLastScannedNtwrksShadow variable
This patch renames astrLastScannedNtwrksShadow variable to last_scanned_shadow
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Leo Kim 771fbae49b staging: wilc1000: rename u32LastScannedNtwrksCountShadow variable
This patch renames u32LastScannedNtwrksCountShadow variable to last_scanned_cnt
to avoid camelcase.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:34:41 -08:00
Arnd Bergmann 2e7d5377f6 staging/wilc1000: use device pointer for phy creation
wilc_create_wiphy tries to get a pointer to a device from the
global wilc_sdio_func variable. This is a layering violation
and we can use the wilc_dev->dev pointer instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann 15162fbc78 staging/wilc1000: avoid static definitions in header
The wilc_wfi_cfgoperations.h header defines the ieee80211_txrx_stypes
and cipher_suites variables that are only used in wilc_wfi_cfgoperations.c
and should not be shared in a header file.

This moves over all that data into the .c file, and also moves all
the macro definitions from the file that are also not needed here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann 491880eb47 staging/wilc1000: move extern declarations to headers
'extern' declarations belong into a header file rather than
a .c file, to ensure that the definition matches the declaration.

This moves all declarations into a header file that seems
most appropriate for it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann 0e1af73dde staging/wilc1000: use proper naming for global symbols
There are many global symbols in the wilc1000 driver, some of them
with names like "DEBUG_LEVEL" or "probe" that are not acceptable
for globals in the linux kernel as they may easily conflict with other
(equally broken) drivers.

This renames all the globals that do not already start with
wilc or a variation of that to start with wilc_ and to follow
the usual naming conventions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann 1608c4034e staging/wilc1000: make symbols static if possible
All symbols that are only referenced in the file that defines
them can be declared 'static' to avoid namespace pollution,
to produce better object code, and to make the source more
readable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Arnd Bergmann 5f550d9307 staging/wilc1000: remove unused functions
A number of symbols in the wilc1000 driver are completely unused
and can be removed.
This includes two variables that are only written but not read.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:19:20 -08:00
Leo Kim b9e04aa648 staging: wilc1000: rename Enable_TCP_ACK_Filter function
This patch rename the Enable_TCP_ACK_Filter function to enable_tcp_ack_filter
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim 2ad8c47d5c staging: wilc1000: rename Set_machw_change_vir_if function
This patch rename Set_machw_change_vir_if function to set_machw_change_vir_if
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim f66dee7bfd staging: wilc1000: rename pBSSID of function linux_wlan_set_bssid
This patch renames pBSSID of function linux_wlan_set_bssid to bssid
to avoid CamelCase naming convention.
Also, prototype linux_wlan_set_bssid in wilc_wfi_cfgoperations.c is moved to
wilc_wfi_netdevice.h.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Glen Lee 65c8adcfd8 staging: wilc1000: linux_wlan_get_firmware: change argument p_nic with dev
This patch changes argument perInterface_wlan_t *p_nic with struct net_device
*dev and use netdev private data nic and it's member wilc instead of
g_linux_wlan.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Glen Lee 829c477fd4 staging: wilc1000: wilc_wlan_txq_add_mgmt_pkt: add new argument dev
This patch adds new argument struct net_device *dev and pass argument
struct net_device to the function.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim 67ab64e44c staging: wilc1000: rename u16FlagsSet of struct add_sta_param
This patch renames u16FlagsSet of struct add_sta_param to flags_set
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim f676e17a71 staging: wilc1000: rename u16FlagsMask of struct add_sta_param
This patch renames u16FlagsMask of struct add_sta_param to flags_mask
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim a486baff71 staging: wilc1000: rename u8ASELCap of struct add_sta_param
This patch renames u8ASELCap of struct add_sta_param to ht_ante_sel
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim 74fe73cf08 staging: wilc1000: rename u32TxBeamformingCap of struct add_sta_param
This patch renames u32TxBeamformingCap of struct add_sta_param to ht_tx_bf_cap
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim 223741d71e staging: wilc1000: rename u16HTExtParams of struct add_sta_param
This patch renames u16HTExtParams of struct add_sta_param to ht_ext_params
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim 5ebbf4f748 staging: wilc1000: rename au8SuppMCsSet of struct add_sta_param
This patch renames au8SuppMCsSet of struct add_sta_param to ht_supp_mcs_set
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Leo Kim fba1f2d221 staging: wilc1000: rename u8AmpduParams of struct add_sta_param
This patch renames u8AmpduParams of struct add_sta_param to ht_ampdu_params
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00