GitHub/moto-9609/android_kernel_motorola_exynos9610.git
9 years agoStaging: rtl8192u: ieee80211: added missing blank lines
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:08 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: added missing blank lines

This patch resolves the following checkpatch warnings:
  - WARNING: Missing a blank line after declarations

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: ieee80211: removed unnecessary braces
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:07 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: removed unnecessary braces

This patch fixes the following checkpatch warning:
  - WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: ieee80211: corrected block comments
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:06 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: corrected block comments

This patch reformats some block comments in order to
match the Linux kernel coding style.

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: ieee80211: corrected indent
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:05 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: corrected indent

This patch corrects the indentation in five instances in the
ieee80211_crypt_tkip.c file.

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: ieee80211: added missing spaces after if
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:04 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: added missing spaces after if

This patch fixes the following checkpatch error:
  - ERROR: space required before the open parenthesis '('

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: ieee80211: added missing space around '='
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:03 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: added missing space around '='

This patch fixes the following checkpatch error:
  - ERROR: spaces required around that '='

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: ieee80211: fixed position of else statements
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:02 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: fixed position of else statements

This patch fixes the following checkpatch error:
  - ERROR: else should follow close brace '}'

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: ieee80211: fixed open brace positions
Kurt Kanzenbach [Wed, 28 Oct 2015 13:01:01 +0000 (14:01 +0100)]
Staging: rtl8192u: ieee80211: fixed open brace positions

This patch fixes the following checkpatch error:
  - ERROR: that open brace { should be on the previous line

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: ipath: Remove unneeded vairable.
Muhammad Falak R Wani [Wed, 28 Oct 2015 13:04:55 +0000 (18:34 +0530)]
staging: rdma: ipath: Remove unneeded vairable.

Remove unneeded variable ret, directly return 0.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset function
Ivan Safonov [Tue, 27 Oct 2015 15:31:10 +0000 (22:31 +0700)]
staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset function

This variable used only once in the beginning of the function,
it can be removed.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCn...
Ivan Safonov [Tue, 27 Oct 2015 15:31:10 +0000 (22:31 +0700)]
staging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset function

hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] frequent in this function, so it replaced by the power_level_offset new variable.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.c
Ivan Safonov [Tue, 27 Oct 2015 15:30:32 +0000 (22:30 +0700)]
staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.c

This is checkpatch fixes for hal/bb_cfg.c file: Avoid CamelCase.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two parts
Ivan Safonov [Tue, 27 Oct 2015 15:29:11 +0000 (22:29 +0700)]
staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two parts

This is checkpatch fixes for hal/bb_cfg.c file:
line over 80 characters.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: checkpatch fixes: alignment should match open parenthesis
Ivan Safonov [Tue, 27 Oct 2015 15:28:19 +0000 (22:28 +0700)]
staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesis

This is checkpatch fixes for hal/bb_cfg.c file:
alignment should match open parenthesis.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.c
Ivan Safonov [Tue, 27 Oct 2015 15:27:26 +0000 (22:27 +0700)]
staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.c

This is checkpatch fixes for hal/bb_cfg.c file:
unnecessary parentheses around <expr>.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in hal/bb_cfg.c
Ivan Safonov [Tue, 27 Oct 2015 15:26:57 +0000 (22:26 +0700)]
staging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in hal/bb_cfg.c

This is checkpatch fixes for hal/bb_cfg.c file:
spaces preferred around that '|'.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: operator = replaced by += in loop increment
Ivan Safonov [Tue, 27 Oct 2015 15:26:00 +0000 (22:26 +0700)]
staging: rtl8188eu: operator = replaced by += in loop increment

x = x + a and x += a equivalen, but second preferably.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: occurrence of the 5 GHz code marked
Ivan Safonov [Tue, 27 Oct 2015 15:25:39 +0000 (22:25 +0700)]
staging: rtl8188eu: occurrence of the 5 GHz code marked

Channel numbers greater than 14 are used here, which are possible only
for the 5 GHz frequency.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: increment placed into for loop header
Ivan Safonov [Tue, 27 Oct 2015 15:24:24 +0000 (22:24 +0700)]
staging: rtl8188eu: increment placed into for loop header

The increment at the end of the cycle, and it can be placed in the loop header.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ie
Ivan Safonov [Tue, 27 Oct 2015 15:23:57 +0000 (22:23 +0700)]
staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ie

This patch replaces while loop with for loop, because the initial condition and the increment clearly and briefly defined for this loop.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: unused MIN macro removed
Ivan Safonov [Tue, 27 Oct 2015 15:23:14 +0000 (22:23 +0700)]
staging: rtl8188eu: unused MIN macro removed

This patch removes unused MIN macro from include/rtw_security.h.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros...
Ivan Safonov [Tue, 27 Oct 2015 15:23:14 +0000 (22:23 +0700)]
staging: rtl8188eu: unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros removed

This patch removes unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros
from include/basic_types.h.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: unused SUCCESS and FAIL macros removed
Ivan Safonov [Tue, 27 Oct 2015 15:21:28 +0000 (22:21 +0700)]
staging: rtl8188eu: unused SUCCESS and FAIL macros removed

This patch removes unused SUCCESS and FAIL macros in include/basic_types.h.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: abs kernel macro used in simularity_compare function
Ivan Safonov [Tue, 27 Oct 2015 15:20:28 +0000 (22:20 +0700)]
staging: rtl8188eu: abs kernel macro used in simularity_compare function

abs macro is useful for determining the difference between the two integers.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro
Ivan Safonov [Tue, 27 Oct 2015 15:19:50 +0000 (22:19 +0700)]
staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro

min_t macro better conveys the meaning of the code.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro
Ivan Safonov [Tue, 27 Oct 2015 15:18:10 +0000 (22:18 +0700)]
staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro

min_t macro better conveys the meaning of the code.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macro
Ivan Safonov [Tue, 27 Oct 2015 15:16:25 +0000 (22:16 +0700)]
staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macro

min (or max) kernel macro better conveys the meaning of the code.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: clamp kernel macro used in proc_get_rx_signal
Ivan Safonov [Tue, 27 Oct 2015 15:15:31 +0000 (22:15 +0700)]
staging: rtl8188eu: clamp kernel macro used in proc_get_rx_signal

To limit the range of integers there is clamp macro.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro
Ivan Safonov [Tue, 27 Oct 2015 15:13:57 +0000 (22:13 +0700)]
staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro

ARRAY_SIZE shorter and more difficult to create bugs.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers:staging:wlan_ng Fix no space is necessary after a cast
Bogicevic Sasa [Tue, 27 Oct 2015 11:24:28 +0000 (12:24 +0100)]
drivers:staging:wlan_ng Fix no space is necessary after a cast

This fixes "No space is necessary after a cast" messages from
checkpatch.pl

Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: board: Set PM domain before probe
Tomeu Vizoso [Tue, 27 Oct 2015 14:27:26 +0000 (15:27 +0100)]
staging: board: Set PM domain before probe

PM domains shouldn't be modified after a device is probed, so set it
before device registration to be sure of that.

In the future the PM domain pointer will be set through a setter that
will WARN if the device has been probed already.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: implement commands on AO subdevice
Ian Abbott [Tue, 27 Oct 2015 16:59:25 +0000 (16:59 +0000)]
staging: comedi: comedi_test: implement commands on AO subdevice

Implement COMEDI asynchronous commands on the fake analog output
subdevice.  This is useful for testing asynchronous commands in the
"write" direction when no real hardware is available.

A normal kernel timer is used to drive the command.  The new timer
expiry function `waveform_ao_timer()` handles whole "scans" at a time
according to the number of scan period that have elapsed since the last
scan.  Data for each channel in the scan is written to the internal
loopback array `devpriv->ao_loopbacks[]` and can be read back on the
analog input channels.  However, if several scan periods are outstanding
in the timer expiry function, only the latest available scan data is
written to the loopback array in order to save processing time.  The
expiry function also checks for underrun conditions, and checks for
normal termination of the asynchronous command when a "stop" scan count
is reached.

After the command is tested by `waveform_ao_cmdtest()` and set up by
`waveform_ao_cmd()`, it is not started until an internal trigger
function `waveform_ao_inttrig_start()` is called as a result of the user
performing an `INSN_INTTRIG` instruction on the subdevice.  The command
is stopped when the "cancel" handler `waveform_ao_cancel()` is called.
This may be due to the command terminating due to completion or an
error, or as a result of the user cancelling the command.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: rename waveform_ai_interrupt()
Ian Abbott [Tue, 27 Oct 2015 16:59:24 +0000 (16:59 +0000)]
staging: comedi: comedi_test: rename waveform_ai_interrupt()

`waveform_ai_interrupt()` is a timer expiry function used to generate
fake waveform data for an analog input subdevice.  Rename it to
`waveform_ai_timer()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: handle partial scans in timer routine
Ian Abbott [Tue, 27 Oct 2015 16:59:23 +0000 (16:59 +0000)]
staging: comedi: comedi_test: handle partial scans in timer routine

For asynchronous command handling on the analog input subdevice, a
kernel timer routine is used to generate the fake waveform data.  A
"scan" consists of a number of conversions separated in time by a
conversion period.  Successive scans are separated in time by a scan
period, which is at least the conversion period multiplied by the number
of conversions per scan.  Currently, the timer routine does not generate
any data until the end of a scan period, generating whole scans of data
at a time.  Change it to generate data at the end of each conversion
period, with an extra delay after the final conversion in each scan if
necessary.  Use new member `ai_convert_time` in the private data
structure `struct waveform_private` to keep track of when the next
conversion is due.  This replaces the old member `ai_last_scan_time`
which kept track of the time of the previous scan.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: allow read-back of AO channels
Ian Abbott [Tue, 27 Oct 2015 16:59:22 +0000 (16:59 +0000)]
staging: comedi: comedi_test: allow read-back of AO channels

COMEDI drivers often allow the last value written to a channel on an
analog output subdevice to be read back via the "insn_read" handler.
The "comedi_test" driver does not currently support that.  It is a bit
special because it loops back the last values written to the channel on
the analog output subdevice to be read back via corresponding channels
on the analog input subdevice.  The "insn_read" handler for the analog
input subdevice is `waveform_ai_insn_read()`.  Set that as the
"insn_read" handler for the analog output subdevice as well.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: use unsigned short for loopback values
Ian Abbott [Tue, 27 Oct 2015 16:59:21 +0000 (16:59 +0000)]
staging: comedi: comedi_test: use unsigned short for loopback values

The last sample values written to the AO subdevice channels by its
"insn_write" handler `waveform_ao_insn_write()` are stored in the member
array `ao_loopbacks[]` in the device private data `struct
waveform_private`.  They can be read back via the "insn_read" handler of
the AI subdevice `waveform_ai_insn_read()`.  As the stored sample values
are only 16 bits wide, change the type of the `ao_loopbacks[]` member to
`unsigned short` to save some space.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: make timer rate similar to scan rate
Ian Abbott [Tue, 27 Oct 2015 16:59:20 +0000 (16:59 +0000)]
staging: comedi: comedi_test: make timer rate similar to scan rate

The asynchronous command handling for the analog input subdevice uses a
kernel timer which expires approximately `HZ` times a second.  However,
it only needs to do anything after each scan period.  Set the timer to
expire just after the next scan period.

Although the timer expiry function `waveform_ai_interrupt()` uses
precise time values to generate the fake waveforms used to generate the
data, those time values are constructed in a precise sequence, and do
not depend on the time the timer expiry function is actually called.  So
the timer expiry rate does not have to be very precise.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: rename waveform members
Ian Abbott [Tue, 27 Oct 2015 16:59:19 +0000 (16:59 +0000)]
staging: comedi: comedi_test: rename waveform members

Rename the members `struct waveform_private` associated with fake
waveform generation.  The affected members are `uvolt_amplitude` -->
`wf_amplitude` (the amplitude of the waveform), `usec_period` -->
`wf_period` (the period of the waveform), and `usec_current` -->
`wf_current` (the current time within a waveform period).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: rename members for AI commands
Ian Abbott [Tue, 27 Oct 2015 16:59:18 +0000 (16:59 +0000)]
staging: comedi: comedi_test: rename members for AI commands

Rename the members of `struct waveform_private` that are used to handle
AI commands, apart from those members used to control fake waveform
generation.  The renames are `timer` --> `ai_timer`, `scan_period` -->
`ai_scan_period`, and `convert_period` --> `ai_convert_period`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: simplify time since last AI scan
Ian Abbott [Tue, 27 Oct 2015 16:59:17 +0000 (16:59 +0000)]
staging: comedi: comedi_test: simplify time since last AI scan

The private data structure `struct waveform_private` currently uses
member `last` to remember the time of the last timer interrupt, and the
member `usec_remainder` to keep track of how far into a simulated scan
the interrupt occurred.  Replace these with a single new member
`ai_last_scan_time` that records the time of the last scan.  This
simplifies the calculation of the number of scans to simulate in the
timer routine, `waveform_ai_interrupt()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: use unsigned int for waveform timing
Ian Abbott [Tue, 27 Oct 2015 16:59:16 +0000 (16:59 +0000)]
staging: comedi: comedi_test: use unsigned int for waveform timing

Use `unsigned int` instead of `unsigned long` to hold the period of the
fake waveform generator and the current time within each waveform.  The
waveform period will be no more than `INT_MAX` and the current time
within the waveform (prior to the modulo operation to bring it actually
within the waveform period) will be no more than `INT_MAX + UINT_MAX /
1000`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: move modulo operations for waveform
Ian Abbott [Tue, 27 Oct 2015 16:59:15 +0000 (16:59 +0000)]
staging: comedi: comedi_test: move modulo operations for waveform

The fake waveform generator functions, `fake_sawtooth()` and
`fake_squarewave()`, called from `fake_waveform()`, have a
`current_time` parameter which is the time since the start of a waveform
period.  The parameter value may be greater than the waveform period so
they do a modulo operation to bring it into range.  Do the modulo
operations outside the functions in `waveform_ai_interrupt()` so that
the waveform generator functions always get a `current_time` parameter
less than the waveform period and do not have to do the modulo operation
themselves.  Also, only do the modulo operations when the time since the
start of a waveform exceeds the waveform period.  Usually, several
samples are produced in each waveform period and modulo operations are
typically more expensive than a simple comparison.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: support scan_begin_src == TRIG_FOLLOW
Ian Abbott [Tue, 27 Oct 2015 16:59:14 +0000 (16:59 +0000)]
staging: comedi: comedi_test: support scan_begin_src == TRIG_FOLLOW

It is quite common for COMEDI subdevices that support commands to
support setting `scan_begin_src` to `TRIG_FOLLOW`.  This means the next
scan begins once all conversions in the current scan are complete.
Support the following timing combinations for the AI subdevice:

  scan_begin_src == TRIG_TIMER && convert_src == TRIG_TIMER
  scan_begin_src == TRIG_TIMER && convert_src == TRIG_NOW
  scan_begin_src == TRIG_FOLLOW && convert_src == TRIG_TIMER

The actual scan period in microseconds is stored in the `scan_period`
member of the private data structure `struct waveform_private`.  An
`unsigned int` is still wide enough, because the conversion period is no
more than `UINT_MAX / 1000` microseconds and the number of conversions
is no more than 16 (`N_CHANS * 2`).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: limit maximum convert_arg
Ian Abbott [Tue, 27 Oct 2015 16:59:13 +0000 (16:59 +0000)]
staging: comedi: comedi_test: limit maximum convert_arg

When testing the parameters for setting up an asynchronous command on
the AI subdevice, limit the maximum conversion period
(`cmd->convert_arg`) so that the number of conversions in a scan
(`cmd->scan_end_arg`, same as `cmd->chanlist_len`) multiplied by the
conversion period fits within an `unsigned int`, as that is used to
limit the minimum scan period (`cmd->scan_begin_arg`).

Also ensure rounding of the conversion period and scan period to the
nearest microsecond both fit in an `unsigned int`.  Do all this in stage
4 ("fix up any arguments") of the command testing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: remove nano_per_micro
Ian Abbott [Tue, 27 Oct 2015 16:59:12 +0000 (16:59 +0000)]
staging: comedi: comedi_test: remove nano_per_micro

The `static const int nano_per_micro` variable is set to 1000, the
number of nanoseconds in a microsecond.  Remove it and use the
`NSEC_PER_USEC` macro from <linux/time.h> instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: saturate fake waveform values
Ian Abbott [Tue, 27 Oct 2015 16:59:11 +0000 (16:59 +0000)]
staging: comedi: comedi_test: saturate fake waveform values

While an asynchronous command is running on the analog input subdevice,
fake waveform generators are connected to each channel to provide the
input voltages that are converted to sample value.  Channel 0 is
connected to a sawtooth generator, channel 1 is connected to a
squarewave generator, and the remaining channels are connected to a
flatline generator.  The non-flatline generators share the same
amplitude (in microvolts) and period (in microseconds) which are
configured when the COMEDI device is attached.  All waveforms are
centered around 0 microvolts and the non-flatline waveforms go between
-amplitude and +amplitude.

It is possible for the waveforms to swing outside the input range of the
channels to which they are connected.  When that happens, the sample
values resulting from simulated A-to-D conversion will wrap around due
to integer overflow.  Prevent that by clamping the sample values that
would go out of range.  This is closer to how a real hardware device
would behave (assuming the input voltage is not high enough to damage
the hardware!).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: reformat multi-line comments
Ian Abbott [Tue, 27 Oct 2015 16:59:10 +0000 (16:59 +0000)]
staging: comedi: comedi_test: reformat multi-line comments

Use the preferred style for multi-line comments.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: remove exclusive wait_queue
Christian Gromm [Wed, 28 Oct 2015 14:14:35 +0000 (15:14 +0100)]
staging: most: remove exclusive wait_queue

This patch removes the unnecessary wait_queue that has exclusively been
used for the poll function and its poll_table. Instead, an already
existing one is used.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: hdm-dim2: use min_t()
Christian Gromm [Wed, 28 Oct 2015 14:49:15 +0000 (15:49 +0100)]
staging: most: hdm-dim2: use min_t()

This patch replaces the usage of min() by min_t().

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: add bracket on all branches of the if/else
Ioana Ciornei [Wed, 28 Oct 2015 23:01:55 +0000 (01:01 +0200)]
staging: iio: accel: add bracket on all branches of the if/else

This patch adds brackets on all of the conditional branches in
order to follow the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: place logical operators on the previous line
Ioana Ciornei [Wed, 28 Oct 2015 23:01:54 +0000 (01:01 +0200)]
staging: iio: accel: place logical operators on the previous line

This patch moves the logical operators on the previous line in order
to follow the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: remove unwanted blank lines
Ioana Ciornei [Wed, 28 Oct 2015 23:01:53 +0000 (01:01 +0200)]
staging: iio: accel: remove unwanted blank lines

This patch removes unwanted blank lines in order to follow
the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: fix block comments alignment
Ioana Ciornei [Wed, 28 Oct 2015 23:01:52 +0000 (01:01 +0200)]
staging: iio: accel: fix block comments alignment

This patch properly aligns the block comment in order
to follow the linux coding style convetions.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: add blank lines after function definitions
Ioana Ciornei [Wed, 28 Oct 2015 23:01:51 +0000 (01:01 +0200)]
staging: iio: accel: add blank lines after function definitions

This patch add blank lines after functions definitions in
order to follow the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: change uint8_t to u8
Ioana Ciornei [Wed, 28 Oct 2015 23:01:50 +0000 (01:01 +0200)]
staging: iio: accel: change uint8_t to u8

This patch changes uint8_t type to preferred kernel
type u8 in order to follow the linux coding style
conventions.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: properly align function arguments
Ioana Ciornei [Wed, 28 Oct 2015 23:01:49 +0000 (01:01 +0200)]
staging: iio: accel: properly align function arguments

This patch properly aligns the function arguments or
its parameters in order to match the open bracket.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: accel: add spaces aroung binary operators
Ioana Ciornei [Wed, 28 Oct 2015 23:01:48 +0000 (01:01 +0200)]
staging: iio: accel: add spaces aroung binary operators

This patch adds spaces around binary operators such as '*',
'/', '+' in order to improve readability.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: Prefer eth_broadcast_addr over memset()
Punit Vara [Wed, 28 Oct 2015 20:23:30 +0000 (01:53 +0530)]
Staging: wilc1000: Prefer eth_broadcast_addr over memset()

This patch is to the host_interface.c that fixes up following
warning by checkpatch:

-prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix line over 80 characters
Chaehyun Lim [Tue, 27 Oct 2015 23:19:28 +0000 (08:19 +0900)]
staging: wilc1000: fix line over 80 characters

This patch fixes line over 80 characters found by checkpatch.

WARNING: line over 80 characters
FILE: drivers/staging/wilc1000/host_interface.h:424:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: replace kmalloc/memcpy with kmemdup
Chaehyun Lim [Tue, 27 Oct 2015 23:19:27 +0000 (08:19 +0900)]
staging: wilc1000: replace kmalloc/memcpy with kmemdup

This patch replaces kmalloc followed by memcpy with kmemdup.
It is also added error checking to return -ENOMEM when kmemdup is
failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename tenuAuth_type in host_int_add_wep_key_bss_ap
Chaehyun Lim [Tue, 27 Oct 2015 23:19:26 +0000 (08:19 +0900)]
staging: wilc1000: rename tenuAuth_type in host_int_add_wep_key_bss_ap

This patch changes tenuAuth_type to auth_type that is sixth argument of
this function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename u8mode in host_int_add_wep_key_bss_ap
Chaehyun Lim [Tue, 27 Oct 2015 23:19:25 +0000 (08:19 +0900)]
staging: wilc1000: rename u8mode in host_int_add_wep_key_bss_ap

This patch changes u8mode to mode that is fifth argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename u8Keyidx in host_int_add_wep_key_bss_ap
Chaehyun Lim [Tue, 27 Oct 2015 23:19:24 +0000 (08:19 +0900)]
staging: wilc1000: rename u8Keyidx in host_int_add_wep_key_bss_ap

This patch changes u8Keyidx to index that is fourth argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename u8WepKeylen in host_int_add_wep_key_bss_ap
Chaehyun Lim [Tue, 27 Oct 2015 23:19:23 +0000 (08:19 +0900)]
staging: wilc1000: rename u8WepKeylen in host_int_add_wep_key_bss_ap

This patch changes u8WepKeylen to len that is third argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_ap
Chaehyun Lim [Tue, 27 Oct 2015 23:19:22 +0000 (08:19 +0900)]
staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_ap

This patch changes pu8WepKey to key that is second argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: replace u8 with int.
Chaehyun Lim [Tue, 27 Oct 2015 23:19:21 +0000 (08:19 +0900)]
staging: wilc1000: replace u8 with int.

This patch changes data type of variable i from u8 to int.
It is used as index of an array to print its content. It's better
to use as data type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix parameter name of function declaration
Chaehyun Lim [Tue, 27 Oct 2015 23:19:20 +0000 (08:19 +0900)]
staging: wilc1000: fix parameter name of function declaration

This patch changes struct host_if_drv of host_int_add_wep_key_bss_ap
function declaration from hWFIDrv to hif_drv.
With this change, first parameter name of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix return type of host_int_add_wep_key_bss_ap
Chaehyun Lim [Tue, 27 Oct 2015 23:19:19 +0000 (08:19 +0900)]
staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap

This patch changes return type of host_int_add_wep_key_bss_ap from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix line over 80 characters
Chaehyun Lim [Tue, 27 Oct 2015 11:40:38 +0000 (20:40 +0900)]
staging: wilc1000: fix line over 80 characters

This patch fixes line over 80 characters found by checkpatch.

WARNING: line over 80 characters
FILE: drivers/staging/wilc1000/host_interface.h:408:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: replace kmalloc/memcpy with kmemdup
Chaehyun Lim [Tue, 27 Oct 2015 11:40:37 +0000 (20:40 +0900)]
staging: wilc1000: replace kmalloc/memcpy with kmemdup

This patch replaces kmalloc followed by memcpy with kmemdup.
It is also added error checking of kmemdup.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename u8Keyidx in host_int_add_wep_key_bss_sta
Chaehyun Lim [Tue, 27 Oct 2015 11:40:36 +0000 (20:40 +0900)]
staging: wilc1000: rename u8Keyidx in host_int_add_wep_key_bss_sta

This patch changes u8Keyidx to index that is fourth argument of
host_int_add_wep_key_bss_sta to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename u8WepKeylen in host_int_add_wep_key_bss_sta
Chaehyun Lim [Tue, 27 Oct 2015 11:40:35 +0000 (20:40 +0900)]
staging: wilc1000: rename u8WepKeylen in host_int_add_wep_key_bss_sta

This patch changes u8WepKeylen to len that is third argument of
host_int_add_wep_key_bss_sta to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_sta
Chaehyun Lim [Tue, 27 Oct 2015 11:40:34 +0000 (20:40 +0900)]
staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_sta

This patch changes pu8WepKey to key that is second argument of
host_int_add_wep_key_bss_sta to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix parameter name of function declaration
Chaehyun Lim [Tue, 27 Oct 2015 11:40:33 +0000 (20:40 +0900)]
staging: wilc1000: fix parameter name of function declaration

This patch changes struct host_if_drv of host_int_add_wep_key_bss_sta
function declaration from hWFIDrv to hif_drv.
With this change, first parameter name of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix return type of host_int_add_wep_key_bss_sta
Chaehyun Lim [Tue, 27 Oct 2015 11:40:32 +0000 (20:40 +0900)]
staging: wilc1000: fix return type of host_int_add_wep_key_bss_sta

This patch changes return type of host_int_add_wep_key_bss_sta from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function
as well as data type of result variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: wilc_wfi_cfgoperations: Remove irrelevant wrapper function
Shivani Bhardwaj [Wed, 28 Oct 2015 19:00:01 +0000 (00:30 +0530)]
Staging: wilc1000: wilc_wfi_cfgoperations: Remove irrelevant wrapper function

Remove the wrapper function WILC_WFI_add_wilcvendorspec() and replace
its call with memcpy().

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: coreconfigurator: Remove trailing whitespace
Shivani Bhardwaj [Tue, 27 Oct 2015 17:28:06 +0000 (22:58 +0530)]
Staging: wilc1000: coreconfigurator: Remove trailing whitespace

In block comments, trailing whitespaces should be removed.
Fix checkpatch ERROR: trailing whitespace

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename u8RemainOnChan_pendingreq of struct host_if_drv
Leo Kim [Wed, 28 Oct 2015 06:59:36 +0000 (15:59 +0900)]
staging: wilc1000: rename u8RemainOnChan_pendingreq of struct host_if_drv

This patch renames u8RemainOnChan_pendingreq of struct host_if_drv to
remain_on_ch_pending 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>
9 years agostaging: wilc1000: rename strHostIfRemainOnChan of struct host_if_drv
Leo Kim [Wed, 28 Oct 2015 06:59:35 +0000 (15:59 +0900)]
staging: wilc1000: rename strHostIfRemainOnChan of struct host_if_drv

This patch renames strHostIfRemainOnChan of struct host_if_drv to remain_on_ch
to avoid CamelCase naming convention.
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>
9 years agostaging: wilc1000: rename strWILC_UsrConnReq of struct host_if_drv
Leo Kim [Wed, 28 Oct 2015 06:59:34 +0000 (15:59 +0900)]
staging: wilc1000: rename strWILC_UsrConnReq of struct host_if_drv

This patch renames strWILC_UsrConnReq of struct host_if_drv to usr_conn_req
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>
9 years agostaging: wilc1000: rename strWILC_UsrScanReq of struct host_if_drv
Leo Kim [Wed, 28 Oct 2015 06:59:33 +0000 (15:59 +0900)]
staging: wilc1000: rename strWILC_UsrScanReq of struct host_if_drv

This patch renames strWILC_UsrScanReq of struct host_if_drv to usr_scan_req
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>
9 years agostaging: wilc1000: rename u8MacAddress of struct get_mac_addr
Leo Kim [Wed, 28 Oct 2015 06:59:32 +0000 (15:59 +0900)]
staging: wilc1000: rename u8MacAddress of struct get_mac_addr

This patch renames u8MacAddress of struct get_mac_addr to mac_addr
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>
9 years agostaging: wilc1000: rename u8MacAddress of struct set_mac_addr
Leo Kim [Wed, 28 Oct 2015 06:59:31 +0000 (15:59 +0900)]
staging: wilc1000: rename u8MacAddress of struct set_mac_addr

This patch renames u8MacAddress of struct set_mac_addr to mac_addr
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>
9 years agostaging: wilc1000: rename u32Mode of struct op_mode
Leo Kim [Wed, 28 Oct 2015 06:59:30 +0000 (15:59 +0900)]
staging: wilc1000: rename u32Mode of struct op_mode

This patch renames u32Mode of struct op_mode to mode
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>
9 years agostaging: wilc1000: rename u32Address of struct drv_handler
Leo Kim [Wed, 28 Oct 2015 06:59:29 +0000 (15:59 +0900)]
staging: wilc1000: rename u32Address of struct drv_handler

This patch renames u32Address of struct drv_handler to handler
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>
9 years agostaging: wilc1000: rename variable strWID
Leo Kim [Wed, 28 Oct 2015 06:59:28 +0000 (15:59 +0900)]
staging: wilc1000: rename variable strWID

This patch renames variable strWID to wid
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>
9 years agostaging: wilc1000: rename au8StartTime of struct join_bss_param
Leo Kim [Wed, 28 Oct 2015 06:59:27 +0000 (15:59 +0900)]
staging: wilc1000: rename au8StartTime of struct join_bss_param

This patch renames au8StartTime of struct join_bss_param to start_time
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: host_interface: removes unused functions
Leo Kim [Wed, 28 Oct 2015 06:59:26 +0000 (15:59 +0900)]
staging: wilc1000: host_interface: removes unused functions

This patch removes unused functions at host_interface files.
 - host_int_send_join_leave_info_to_host
 - host_int_send_network_info_to_host

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>
9 years agostaging: wilc1000: fixes please don't use multiple blank lines
Leo Kim [Wed, 28 Oct 2015 06:59:25 +0000 (15:59 +0900)]
staging: wilc1000: fixes please don't use multiple blank lines

This patch fixes the checks reported by checkpatch.pl
for Please don't use multiple blank lines.

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>
9 years agostaging: wilc1000: fixes missing a blank line after declarations
Leo Kim [Wed, 28 Oct 2015 06:59:24 +0000 (15:59 +0900)]
staging: wilc1000: fixes missing a blank line after declarations

This patch fixes the warnings reported by checkpatch.pl
for Missing a blank line after declarations.

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>
9 years agostaging: wilc1000: fixes blank lines aren't necessary brace
Leo Kim [Wed, 28 Oct 2015 06:59:23 +0000 (15:59 +0900)]
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>
9 years agostaging: wilc1000: fixes braces {} are not necessary for single statement blocks
Leo Kim [Wed, 28 Oct 2015 06:59:22 +0000 (15:59 +0900)]
staging: wilc1000: fixes braces {} are not necessary for single statement blocks

This patch fixes the warnings reported by checkpatch.pl
for braces {} are not necessary for single statement blocks

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>
9 years agostaging: wilc1000: remove unnecessary parentheses around
Leo Kim [Wed, 28 Oct 2015 06:59:21 +0000 (15:59 +0900)]
staging: wilc1000: remove unnecessary parentheses around

This patch removes the checks reported by checkpatch.pl
for unnecessary parentheses around.

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>
9 years agostaging: wilc1000: change MAINTAINERS
Tony Cho [Wed, 28 Oct 2015 08:43:27 +0000 (17:43 +0900)]
staging: wilc1000: change MAINTAINERS

This patch removes Rachel Kim from the MAINTAINERS list because she
retires from her position and adds Austin shin as new MAINTAINER for
the Atmel wireless link controller: WILC1000 and WILC3000.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: wilc_msgqueue.c : remove goto statement
Leo Kim [Wed, 28 Oct 2015 06:27:21 +0000 (15:27 +0900)]
staging: wilc1000: wilc_msgqueue.c : remove goto statement

This patch removes goto statement and moves the spin lock position.
If a memory allocation fails, directly returns an error.
The spin lock actually protects the pHandle. Therefore, call spin lock just
before pHandle is used.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: tcp_process: add argument dev and use private data
Glen Lee [Tue, 27 Oct 2015 09:28:03 +0000 (18:28 +0900)]
staging: wilc1000: tcp_process: add argument dev and use private data

This patch adds new argument net_device and use netdev private data member
wilc instead of g_linux_wlan. Pass argument dev to the function as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: wilc_wlan_txq_add_net_pkt: add argument struct net_device
Glen Lee [Tue, 27 Oct 2015 09:28:02 +0000 (18:28 +0900)]
staging: wilc1000: wilc_wlan_txq_add_net_pkt: add argument struct net_device

This patch add new argument struct net_device *dev and pass net_device to
wilc_wlan_txq_add_net_pkt.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: mac_xmit: use netdev private wilc instead of g_linux_wlan
Glen Lee [Tue, 27 Oct 2015 09:28:01 +0000 (18:28 +0900)]
staging: wilc1000: mac_xmit: use netdev private wilc instead of g_linux_wlan

This patch uses netdev private data 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>
9 years agostaging: wilc1000: wilc_wlan_txq_get_next: add argument wilc
Glen Lee [Tue, 27 Oct 2015 09:28:00 +0000 (18:28 +0900)]
staging: wilc1000: wilc_wlan_txq_get_next: add argument wilc

This patch adds new argument struct wilc and use wilc instead of g_linux_wlan.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: wilc_wlan_rxq_add: add argument wilc and use it
Glen Lee [Tue, 27 Oct 2015 09:27:59 +0000 (18:27 +0900)]
staging: wilc1000: wilc_wlan_rxq_add: add argument wilc and use it

This patch adds new argument struct wilc and use it instead of g_linux_wlan.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>