Commit Graph

341 Commits

Author SHA1 Message Date
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
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
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 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
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
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
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
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
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 40bbaac724 staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes unnecessary log messages.
And, it adds a 'break' statement in accordance with the switch-case rule.

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 64d3546a34 staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes unnecessary log messages and relate 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 a1b56a4c50 staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes the unnecessary log messages which is used with
the HOSTAPD_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
Leo Kim 396fa30e4b staging: wilc1000: removes potential null dereference
This patch removes the error reported by smatch.
 - wilc_wfi_cfgoperations.c:674 scan() error:
   potential null dereference 'strHiddenNetwork.net_info'.  (kmalloc returns null)

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
Bhumika Goyal 5bc32160c5 Staging: wilc1000: Remove unused function WILC_WFI_update_stats
This patch removes the function WILC_WFI_update_stats as it is not used
anywhere in the kernel. Also remove its declaration from the header
file. Grepped to find the occurences.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:43:48 -08:00
Janani Ravichandran 8459af6acf staging: wilc1000: Rearrange statement to respect 80 char limit
Split statement across multiple lines as the line modified is over 80
chars in length.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:00:07 -08:00
Janani Ravichandran 3e758b2788 staging: wilc1000: Use kmalloc_array instead of kmalloc
Use kmalloc_array instead of kmalloc for arrays to prevent integer
overflows.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:00:07 -08:00
Eva Rachel Retuya 6c2ab2398b staging: wilc1000: remove spaces around '->'
Delete the space around '->' as it is prohibited and breaks the code.
Checkpatch found this issue.

ERROR: spaces prohibited around that '->'

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:53:56 -08:00
Eva Rachel Retuya d38f5ba482 staging: wilc1000: Remove initialization of static variables
Address the following checkpatch errors:
* ERROR: do not initialise statics to false
* ERROR: do not initialise statics to 0x00

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15 18:24:07 -08:00
Alison Schofield 4375cad941 staging: wilc1000: wilc_wfi_cfgoperations: remove cast on void pointers
Remove cast on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Dan Carpenter d99ee289b4 staging: wilc1000: fix mgmt_tx()
There was a missing curly brace so this function returns failure instead
of succeeding.

Fixes: 06fb9336ac ('staging: wilc1000: wilc_wfi_cfgoperations.c: replaces PRINT_ER with netdev_err')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00
Chris Park e3f16965c9 staging: wilc1000: remove unnecessary log message using GENERIC_DBG tag
This patch remove unnecessary log message using GENERIC_DBG tag.
Needed log messages has changed netdev_dbg from PRINT_D.
And removes variables that were used to log message.

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-07 17:34:58 -08:00
Leo Kim 17d2f2b36f staging: wilc1000: renames u64Tsf of connect_resp_info structure
This patch renames u64Tsf variable to tsf_hi.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim f2050a1896 staging: wilc1000: renames strRssi of connect_resp_info structure
This patch renames strRssi variable to str_rssi.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim cb64de7c36 staging: wilc1000: renames pJoinParams of connect_resp_info structure
This patch renames pJoinParams variable to join_params.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 390b6db00d staging: wilc1000: renames struct connect_resp_info variables
This patch renames to avoid camelcase changes follow are:
 - pu8IEs to ies
 - u16IEsLen to ies_len

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim a35d6e2ded staging: wilc1000: renames u8Found of connect_resp_info structure
This patch renames u8Found variable to found.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim d40207637a staging: wilc1000: renames bNewNetwork of connect_resp_info structure
This patch renames bNewNetwork variable to new_network.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 264d70f4de staging: wilc1000: renames struct connect_resp_info variables
This patch renames to avoid camelcase changes follow are:
 - u32TimeRcvdInScanCached to time_scan_cached
 - u32TimeRcvdInScan to time_scan

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 405a8c7864 staging: wilc1000: renames u8channel of connect_resp_info structure
This patch renames u8channel variable to ch.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim df340fdf01 staging: wilc1000: renames u8DtimPeriod of connect_resp_info structure
This patch renames u8DtimPeriod variable to dtim_period.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 4b313e915b staging: wilc1000: renames u16BeaconPeriod of connect_resp_info structure
This patch renames u16BeaconPeriod variable to beacon_period.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 38d3bb7878 staging: wilc1000: renames au8bssid of connect_resp_info structure
This patch renames au8bssid variable to bssid.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim a36e89e9bb staging: wilc1000: renames u8SsidLen of connect_resp_info structure
This patch renames u8SsidLen variable to ssid_len.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 2a3ff58a8a staging: wilc1000: renames au8ssid of connect_resp_info structure
This patch renames au8ssid variable to ssid.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim fa5e2d159f staging: wilc1000: renames u16CapInfo of connect_resp_info structure
This patch renames u16CapInfo variable to cap_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 5c23a29145 staging: wilc1000: renames s8rssi of connect_resp_info structure
This patch renames s8rssi variable to rssi.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 6b5180a084 staging: wilc1000: remove typedef from pstrNetworkInfo
This patch removes typedef from the struct pstrNetworkInfo and
renames it to network_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Chris Park c4f97526a0 staging: wilc1000: remove unused log message using the HOSTINF_DBG tag
This patch remove unused log message using the HOSTINF_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-07 17:34:58 -08:00
Chris Park 368949a7c0 staging: wilc1000: remove unused log message using the CORECONFIG_DBG tag
This patch remove unused log messages using the CORECONFIG_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-07 17:34:58 -08:00
Leo Kim 06fb9336ac staging: wilc1000: wilc_wfi_cfgoperations.c: replaces PRINT_ER with netdev_err
This patches replaces PRINT_ER with netdev_err.
Removes unnecessary debug logs as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Leo Kim 6750140dfc staging: wilc1000: renames u8IfIdx of wilc_vif structure
This patch renames u8IfIdx variable of wilc_vif structure to idx
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>
2016-02-07 17:34:58 -08:00
Leo Kim 48b28df99c staging: wilc1000: rename hWILCWFIDrv of wilc_priv structure
This patch renames hWILCWFIDrv pointer variable of wilc_priv structure
to hif_drv 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>
2016-02-07 17:34:58 -08:00
Glen Lee ec45048326 staging: wilc1000: fix WEP security bug
Station cannot connect to soft AP mode wilc when it is configured for WEP
security. This patch fixes it by setting the key index within the key value and
change the last else condition with DEFAULTKEY action case, and also do not use
WILC_WFI_wep_default index to set wep key id.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 7041879043 staging: wilc1000: add ops tx power in cfg80211
This patch implements set_tx_power and get_tx_power of cfg80211_ops.
In addition, Id of HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS is changed with 37.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 783d07c1bf staging: wilc1000: fix bug on p2p connection
In case of action frame, size -7 is correct, but in this case, size should be
used as it is.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee cba352a4c1 staging: wilc1000: disable power save when AP mode
This patch disables power save mode in case of AP mode.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee 430e640d6d staging: wilc1000: handle connecting error
If connection fails, wilc1000_connecting needs to be set false also and return
immediately because goto lable 'done' doesn't do anything. Remove lable 'done'
as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Glen Lee b330686595 staging: wilc1000: wilc_set_wfi_drv_handler: add mac index
Firmware supports sta/ap concurrency so mac index will be passed to wilc.
Remove wilc_set_wfi_drv_handler in scan and connect functions, and call
the function in ndo_open which is wilc_mac_open.
WID_SET_DRV_HANDLER value has been changed as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Sudip Mukherjee abb4f8addf staging: wilc1000: fix build failure
allmodconfig build of alpha, m68k, m32r, tilepro has failed with the
error:
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c: In function 'wilc_create_wiphy':
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2632:13:
	error: 'struct wiphy' has no member named 'wowlan'

Looking at other drivers wowlan can be only used when CONFIG_PM is
defined.

Fixes: 73584a40d7 ("staging: wilc1000: add ops resuem/suspend/wakeup in cfg80211")
Cc: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-06 22:03:18 -08:00
Glen Lee ee63230920 staging: wilc1000: call power save after changing mode
host_int_set_power_mgmt should be called after changing operation mode to
work properly. Move the function below host_int_set_operation_mode.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:25:40 -08:00
Glen Lee 86bff01b94 staging: wilc1000: change_virtual_intf: change codes for unified firmware
In previous patch, we use unified firmware on wilc, which means we do not need
to download firmware again to change virtual interfaces.
There are a lot of codes to change interface and they are needless now, so
remove them except wilc_set_operation_mode function which change the mode and
wilc_set_power_mgmt which control power save.
There will be unused functions and they will be removed in later patch.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:25:40 -08:00
Glen Lee ff35567923 staging: wilc1000: set proper bssid address
This patch changes index 0 to index of vif which is currently beging used
because AP mode can run on any interface.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:25:40 -08:00
Glen Lee ba615f1ef9 staging: wilc1000: set bssid with mode
This patch add new argument mode to wilc_wlan_set_bssid and define mode in
struct wilc_vif also. The mode is used by get_if_handler function to get proper
netdevice for each mode.
The get_if_handler is changed together. Remove invalid handle codes and
add mode condition to get netdevice for the mode.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:25:40 -08:00
Glen Lee e32737e9da staging: wilc1000: remove wilc_set_machw_change_vir_if
wilc_set_machw_change_vir_if is not used anymore since we use one unified
firmware. Instead, wilc_set_operation_mode is called when wilc_mac_open to
let the wilc use the proper firmware. Remove wilc_set_machw_change_vir_if
and it's functions calls.
In the later patch, mac index will be passed to wilc device.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:25:40 -08:00
Glen Lee 73584a40d7 staging: wilc1000: add ops resuem/suspend/wakeup in cfg80211
This patch adds ops resume, suspend and set_wakeup in cfg80211. Together with
previous patches, driver will support suspend/resume functionality.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:25:40 -08:00
Chaehyun Lim 40e05e86d5 staging: wilc1000: rename u8ssidnum in struct hidden_network
This patch renames u8ssidnum to n_ssids that is a member of struct
hidden_network. There is no need to use u8 prefix to show data type so
just rename it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:14:05 -08:00
Chaehyun Lim 245a18654f staging: wilc1000: rename pstrHiddenNetworkInfo in struct hidden_network
This patch renames pstrHiddenNetworkInfo to net_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:14:05 -08:00
Chaehyun Lim a2d4969bc9 staging: wilc1000: rename u8ssidlen in struct hidden_net_info
This patch renames u8ssidlen to ssid_len that is a member of
hidden_net_info. There is no need to use u8 prefix to show data type so
just rename it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:14:05 -08:00
Chaehyun Lim 8c6492aa90 staging: wilc1000: rename pu8ssid in struct hidden_net_info
This patch renames pu8ssid to ssid that is a member of struct
hidden_net_info. There is no need to use pu8 prefix to show data type so
just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:14:05 -08:00
Chaehyun Lim a5f9943cc0 staging: wilc1000: remove wilc_free_join_params
wilc_free_join_params call kfree. There is no need to use
wrapper function, so use kfree directly.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 15:08:06 -08:00
Glen Lee 31f0f697dd staging: wilc1000: wilc_set_wfi_drv_handler: pass vif index
Pass index of vif instead of hif_drv. wilc_get_vif_idx is used to get correct
index of vif.
In the handler function handle_set_wfi_drv_handler, use vif instead of hif_drv,
and use hif_drv_handler->handler instead of hif_drv when deinitialize wilc
device.

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 fbf5379bfc staging: wilc1000: remove argument hif_drv
In previous patch we add new argument vif which has hif_drv in it's member.
Therefore, no need to pass hif_drv in those functions. Remove argument
struct host_if_drv and use hif_drv of vif.

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 cf60106bfc staging: wilc1000: pass vif to hostIFthread
We will pass vif, which is currently being used as net_device, instead of
hif_dev. This is the first step to use index of vif to pass to the driver.
Add new argument vif to all the functions that send message to hostIFthread and
set vif to msg.vif. As a result, hostIfthread will get vif.
In later patch, we will remove drv of host_if_msg and use vif instead of 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
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