Commit Graph

562356 Commits

Author SHA1 Message Date
H Hartley Sweeten 14b93bb6bb staging: comedi: adv_pci_dio: separate out PCI-1760 support
The PCI-1760 is board unique. It uses an outgoing/incoming mailbox
programming sequence to access the hardware. The other boards supported
by this driver use simple register mapping. Including support for the
PCI-1760 in this driver just makes it harder to understand.

Separate out the PCI-1760 support into a new driver, adv_pci1760.

Clean up the new driver. The original code had a bunch of CamelCase and
other checkpatch.pl issues.

The code used to access the outgoing/incoming mailboxes was also a bit
awkward with the passing of the arrays for the outgoing and incoming
mailbox bytes. Replace them with two new functions that send a command
and return the feedback data from the command based on the programming
flow chart in the datasheet for the PCI-1760.

The new adv_pci1760 driver also fixes the incomplete timer subdevice.
This subdevice is actually the 2 PWM outputs so the subdevice type
has been changed to COMEDI_SUBD_PWM.

The counter subdevice support was not complete in the original code.
They are also a bit strange since they are up counters connected to
each of the digital inputs. For now that subdevice has been disabled
(COMEDI_SUBD_UNUSED).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:54:24 -08:00
Mario J. Rugiero 7cf8e59e54 staging: wilc1000: replace 'ptr > 0' check by 'ptr' check.
This silences a sparse warning about incompatible comparisons, while making the
intent of the check a bit clearer.

Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:49:10 -08:00
Masanari Iida 6b05fcc9c6 staging: wilc1000: Fix typo in wilc_msgqueue.h
This patch fix some spelling typo in wilc_msgqueue.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:48:26 -08:00
Bogicevic Sasa f6e0e2a564 drivers:staging:wilc1000 Fix all comparison to NULL could be written ...
This fixes all "comparison to NULL could be written like ..."

Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:47:28 -08:00
Chandra S Gorentla ff5d40a4d3 staging: wilc1000: Remove 'if' statement, which is always false
- 'if' which is always false is removed
- variable associated with this 'if' is deleted

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:47:27 -08:00
Glen Lee cc28e4bf6e staging: wilc1000: fix a bug when unload driver
kernel crashes when load and unload driver several times. I used git bisect to
track down and found that removing NULL setting caused the panic.
This reverts only related codes of the patch(a4ab1ade75).

Fixes: a4ab1ade75 ("staging: wilc1000: replace drvHandler and hWFIDrv with hif_drv")
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:45:59 -08:00
Leo Kim c8751ad7d2 staging: wilc1000: Handle_SetMulticastFilter(): fixes right shifting more than type allows
This patch fixes the warning reported by smatch.
 - Handle_SetMulticastFilter() warn: right shifting more than type allows

That is unnecessary action of boolean type. just assign 0.

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 9edaa5f3c2 staging: wilc1000: change if with else if
The if statement should be else if since it is part of whole if condition.

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 b0b9f3e4d2 staging: wilc1000: Handle_AddBASession: remove unused function
This patch removes unused a function Handle_AddBASession.
And, removes the relation define.

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 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
Glen Lee 6f72ed75e5 staging: wilc1000: fix rmmod failure
This patch fixes rmmod failure. wilc->firmware needs to be set to NULL because
it is used again to check firmware is released when module exit.

Fixes: 8b8ad7bc90 ("staging: wilc1000: rename wilc_firmware in the struct wilc")
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
Glen Lee c2ba8b2bc2 staging: wilc1000: return linux error value
Return proper linux error value -ETIMEDOUT instead of -1.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:36:16 -08:00
Glen Lee 604f6e2dae staging: wilc1000: remove unused variable
wilc_sdio_func is not used anymore so just delete it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:36:16 -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
Glen Lee 825b966f9e staging: wilc1000: use wilc instead of wilc_dev and remove wilc_dev
This patch changes wilc_dev with wilc in the function call
wilc_wlan_get_num_conn_ifcs, and remove wilc_dev and it's related codes.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee d36ec22d1d staging: wilc1000: wilc_dbg: remove wilc
This patch remove parameter struct wilc since it is not used and also wilc_dev
will be removed.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee d40c99c74c staging: wilc1000: wilc_wlan_cfg_get: pass struct wilc
This patch passes the struct wilc to the function and use it instead of
global variable wilc_dev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee 89758e13b8 staging: wilc1000: wilc_wlan_cfg_set: pass struct wilc
This patch pass struct wilc to the function and use it instead of global
variable wilc_dev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee ec62e6d1ec staging: wilc1000: wilc_send_config_pkt: pass struct wilc
This patch passes struct wilc to wilc_send_config_pkt. The function
wilc_wlan_cfg_set and wilc_wlan_cfg_get function will get wilc to replace
wilc_dev with it.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee b82d940db0 staging: wilc1000: add struct wilc to host_if_drv
This patch adds struct wilc to host_if_dev and assign wilc to use driver's
primary structure in host_if_dev.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee f8598aaa21 staging: wilc1000: wilc_spi_write_read: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
global variable wilc_dev, and pass wilc to the function as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee 1b8d17a0c9 staging: wilc1000: wilc_spi_read: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
global variable wilc_dev, and pass wilc to the functions as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee 643b2e4262 staging: wilc1000: wilc_spi_write: pass struct wilc
This patch add new function parameter struct wilc and use it instead of
wilc_dev, and pass wilc to the function as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00
Glen Lee 9b410fe82f staging: wilc1000: wilc_sdio_cmd53: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
global variable wilc_dev and pass wilc to the function as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-18 14:30:50 -08:00