Commit graph

548398 commits

Author SHA1 Message Date
Hugo Camboulive bdddc22f07 staging: iio: adc: fix comment block coding style issue
This patch to ad7746.c makes the comment block end with a */
on a separate line.

Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 08:31:07 +01:00
Ioana Ciornei 877cdf9115 staging: iio: resolver: replace iio_device_register by devm_iio_device_register
Use devm_iio_device_register instead of iio_device_register when the remove
function is only used to call iio_device_unregister in order to ease the error path.
Since resource managed functions implicitly call unregister at driver detach also remove
iio_device_unregister

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 08:31:07 +01:00
Ioana Ciornei 86727e30d1 staging: iio: light: use devm_iio_device_register instead iio_device_register
Replace iio_device_register with resource managed devm_iio_device_register in order
to ease the error path. Also delete the remove function since there is no need after
this change.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 08:31:07 +01:00
Ioana Ciornei 252fb58ceb staging: iio: cdc: use devm_iio_device_register instead iio_device_register
Replace iio_device_register with resource managed devm_iio_device_register in order
to ease the error path. Also delete de remove function since there is no need after
this change.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 08:31:07 +01:00
Maciek Borzecki a305cf3162 staging: wlan-ng: prism2sta: replace memcmp with ether_addr_equal
Replace memcmp() with ether_addr_equal(). In every location where the
replacement was done, the addresses accessed are
__aligned(2). Structures accessed either stack or heap allocated, no
direct memory casts to possibly unaligned structs are used.

Involved structures:

typedef struct hfa384x_authenticateStation_data {
	u8 address[ETH_ALEN];   /* 0 offset */
	...
} __packed hfa384x_authenticateStation_data_t;

struct prism2sta_authlist {
	unsigned int cnt;
	u8 addr[WLAN_AUTH_MAX][ETH_ALEN]; /* 4 bytes offset,
					     addresses start
					     at u16 boundary */
	u8 assoc[WLAN_AUTH_MAX];
};

struct prism2sta_accesslist {
	unsigned int modify;
	unsigned int cnt;
	u8 addr[WLAN_ACCESS_MAX][ETH_ALEN]; /* 8 bytes offset,
					       multiple of u16 */
	...
	u8 addr1[WLAN_ACCESS_MAX][ETH_ALEN]; /* starts at u32 boundary,
						struct not packed */
};

typedef struct hfa384x_AssocStatus {
	u16 assocstatus;
	u8 sta_addr[ETH_ALEN];    /* 2 bytes offset,
				     struct is packed */
	u8 old_ap_addr[ETH_ALEN]; /* 8 bytes offset */
	...
} __packed hfa384x_AssocStatus_t;

The patch resolves the following checkpatch warnings:

  WARNING: Prefer ether_addr_equal() or ether_addr_equal_unaligned()
           over memcmp()

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 08:27:48 +01:00
Chaehyun Lim 866a2c247f staging: wilc1000: rename u8CurrChannel
This patch replaces u8CurrChannel with curr_channel to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim dd739ea517 staging: wilc1000: set_channel: rename s32Error
This patch replaces s32Error with result to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 7584019e57 staging: wilc1000: set_channel: fix data type of s32Error
This patch changes data type of s32Error variable from s32 to int
because return type of this function is int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 9a4598316e staging: wilc1000: set_channel: remove blank line after open brace
This patch removes blank line after open brace '{' found by
checkpatch.pl

CHECK: Blank lines aren't necessary after an open brace '{'
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:664:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim a74cc6b8d8 staging: wilc1000: use int instead of int8_t
This patch replaces int8_t with int.
The int8_t should be int. It's used as an index into an array
or -1 for not found.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 5cc59d299f staging: wilc1000: use ARRAY_SIZE macro
This patch uses ARRAY_SIZE macro found by checkpatch.pl

WARNING: Prefer ARRAY_SIZE(wb)
drivers/staging/wilc1000/wilc_spi.c:400
drivers/staging/wilc1000/wilc_spi.c:402

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 30b2ba099c staging: wilc1000: remove unnecessary comment
This patch removes unnecessary comment.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:05:53 +02:00
Chaehyun Lim 0981ce2bba staging: wilc1000: remove #if 1 and #endif
This patch removes #if 1 and #endif, which is encapsulated
some codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:04:52 +02:00
Chaehyun Lim c2eda352d0 staging: wilc1000: fix indentation level
This patch removes unnecessary block braces and fix indentation.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:04:52 +02:00
Chaehyun Lim afcd8c5146 staging: wilc1000: remove if defined codes of USE_OLD_SPI_SW
This patch removes if defined codes of USE_OLD_SPI_SW.
This macro is deleted because it is commented out.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:04:52 +02:00
Chaehyun Lim 331d80c53b staging: wilc1000: remove commented codes
This patch removes commented codes that is not used in this driver.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:03:42 +02:00
Chaehyun Lim d3ad7f5788 staging: wilc1000: remove wilc_platform.h
This patch removes wilc_platform.h file that is not used anywhere.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:03:42 +02:00
Glen Lee 9cdf6e7bd3 staging: wilc1000: remove unused variable real_ndev
This patch removes unused variable real_ndev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee 814bc36807 staging: wilc1000: remove function pointer cfg_init
This patch removes function pointer cfg_init and call the function
wilc_wlan_cfg_init instead. Remove static from function declaration.
After removing cfg_init, the struct wilc_cfg_func_t is useless so just delete
it and it's related codes.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee 30f535a673 staging: wilc1000: remove function pointer rx_indicate
This patch removes function pointer rx_indicate and just call the function
wilc_wlan_cfg_indicate_rx instead. Remove static from the function
declration.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee 355cca2ab2 staging: wilc1000: remove function pointer cfg_wid_get_val
This patch removes cfg_wid_get_val and call the function
wilc_wlan_cfg_get_wid_value. Remove static from the function declaration.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee ec1b86bf6a staging: wilc1000: remove function pointer cfg_wid_get
Remove function pointer cfg_wid_get and call the function
wilc_wlan_cfg_get_wid instead. Remove static from the function declaration.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee 17e8f16554 staging: wilc1000: remove function pointer cfg_wid_set
This patch removes function pointer cfg_wid_set and call the function
wilc_wlan_cfg_set_wid instead. Remove static from the function declaration.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee 66482a5642 staging: wilc1000: Delete undefined DEBUG_MODE and it's related codes
This patch removes undefined DEBUG_MODE and it's related codes.
We won't use this at the moment.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee 28dedb8070 staging: wilc1000: wilc_wfi_netdevice.h: remove unused variables
This patch removes unused variable already_claim and hWILCWFIDrv_2.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Tony Cho fdf33a7697 staging: wilc1000: coreconfigurator.c: remove unused struct
This patch removes unused structure, tstrconfigPktInfo from the
coreconfigurator.c file.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Tony Cho 9dd2f7719d staging: wilc1000: remove typedef from enum
This patch removes typedef from enumerated types defined in
coreconfigurator.c file and also changes their names to avoid CamelCase
naming convention as shown:

- tenuBasicFrmType to basic_frame_type
- tenuFrmSubtype to sub_frame_type
- tenuInfoElemID to info_element_id

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 12:02:15 +02:00
Glen Lee c9d4834d94 staging: wilc1000: remove function pointer wlan_add_mgmt_to_tx_que
This patch removes function pointer wlan_add_mgmt_to_tx_que and just call
the function wilc_wlan_txq_add_mgmt_pkt.
Remove structure wilc_wlan_oup_t also because no members in it. Since
wilc_wlan_oup_t is deleted, it's variable, function parameters and related
codes are also deleted.
- deleted variables
gpstrWlanOps
oup
- modified functions
wilc1000_prepare_11b_core
wilc_wlan_init

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 894de36b1a staging: wilc1000: remove function pointer wlan_cfg_get_value
This patch removes function pointer wlan_cfg_get_value and just call
the function wilc_wlan_cfg_get_val. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 07056a8507 staging: wilc1000: remove function pointer wlan_cfg_get
This patch removes function pointer wlan_cfg_get and just call
the function wilc_wlan_cfg_get. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 1028e5a404 staging: wilc1000: remove function pointer wlan_cfg_set
This patch removes function pointer wlan_cfg_set and just call
the function wilc_wlan_cfg_set. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 1d4469c945 staging: wilc1000: delete define ACTION and PROBE_REQ
The define ACTION and PROBE_REQ are duplicate. They are aleady defined in
host_interface.h. Just delete it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee a17e2ec1ef staging: wilc1000: remove function pointer wlan_cleanup
This patch removes function pointer wlan_cleanup and just call the function
wilc_wlan_cleanup. Remove static from the function also.
After changing function pointer wlan_cleanup with wilc_wlan_cleanup,
the define wilc_wlan_deinit will be like folowing.

-define wilc_wlan_deinit(nic)  { wilc_wlan_cleanup(); }

The define is unnecessary so just call wilc_wlan_cleanup instead of
wilc_wlan_deinit() and remove the define also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 46ca80cd16 staging: wilc1000: remove function pointer wlan_handle_rx_isr
This patch removes function pointer wlan_handle_rx_isr and just call
the function wilc_handle_isr.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee f590c4ce17 staging: wilc1000: remove function pointer wlan_handle_tx_que
This patch removes function pointer wlan_handle_tx_que and just call
the function wilc_wlan_handle_txq. Remove static from the function also.
There is one function call wlan_handle_tx_que which does not have an argument
and return value. So put txq_count as argument and ret for return value.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 8fc84a6f64 staging: wilc1000: remove function pointer wlan_add_to_tx_que
This patch removes function pointer wlan_add_to_tx_que and just call
the function wilc_wlan_txq_add_net_pkt. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 8cec741e4a staging: wilc1000: remove function pointer wlan_stop
This patch removes function pointer wlan_stop and just call
the function wilc_wlan_stop. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee e42563bbb2 staging: wilc1000: remove function pointer wlan_start
This patch removes function pointer wlan_start and just call
the function wilc_wlan_start. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Glen Lee 63d7ab8efd staging: wilc1000: remove function pointer wlan_firmware_download
This patch removes function pointer wlan_firmware_download and just call
the function wilc_wlan_firmware_download. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:59:52 +02:00
Tony Cho 070d365c3d staging: wilc1000: rename strHostIfRemainOnChan
This patch renames strHostIfRemainOnChan to remain_on_ch to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:57:00 +02:00
Tony Cho c833b4748a staging: wilc1000: rename strHostIfBASessionInfo
This patch renames strHostIfBASessionInfo to session_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:57:00 +02:00
Tony Cho a584869521 staging: wilc1000: rename strHostIfGetMacAddress
This patch renames strHostIfGetMacAddress to get_mac_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:57:00 +02:00
Tony Cho 15326e281c staging: wilc1000: rename strHostIfSetMacAddress
This patch renames strHostIfSetMacAddress to set_mac_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:57:00 +02:00
Tony Cho 00c4630e3d staging: wilc1000: rename strHostIfSetOperationMode
This patch renames strHostIfSetOperationMode to mode to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:57:00 +02:00
Tony Cho a079cf4d5e staging: wilc1000: rename strHostIfSetMulti
This patch renames strHostIfSetMulti to multicast_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:57:00 +02:00
Tony Cho fb2d65ed73 staging: wilc1000: rename strHostIfSetIP
This patch renames strHostIfSetIP to ip_info to avoid CamelCase naming
convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:55:59 +02:00
Tony Cho 5e4377e6ec staging: wilc1000: rename strHostIfSetDrvHandler
This patch renames strHostIfSetDrvHandler to drv to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:55:59 +02:00
Tony Cho 66bac7f20c staging: wilc1000: rename strHostIfStaInactiveT
This patch renames strHostIfStaInactiveT to mac_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:55:59 +02:00
Tony Cho 49e1f81b1e staging: wilc1000: rename strPowerMgmtparam
This patch renames strPowerMgmtparam to pwr_mgmt_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:55:59 +02:00
Tony Cho df0e7839ab staging: wilc1000: remove struct timer_cb
This patch removes struct timer_cb which is not used.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:55:59 +02:00