OSDN Git Service

tomoyo/tomoyo-test1.git
5 years agostaging: rtl8192u: Replace function rtl8192_rx_enable()
Nishka Dasgupta [Mon, 1 Jul 2019 09:15:52 +0000 (14:45 +0530)]
staging: rtl8192u: Replace function rtl8192_rx_enable()

Remove function rtl8192_rx_enable as all it does is call
rtl8192_rx_initiate.
Rename rtl8192_rx_initiate to rtl8192_rx_enable and change its type from
static to non-static to maintain compatibility with call sites of
rtl8192_rx_enable.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091552.12696-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodrivers/staging/rtl8192u: style nonstyled comments
Christian Müller [Mon, 1 Jul 2019 08:27:07 +0000 (10:27 +0200)]
drivers/staging/rtl8192u: style nonstyled comments

The coding-styles.rst states, that multiline comments should
allways contain a leading "*" in each line.
For multiline comments in general they

/*
 * should look
 * like this.
 */

For multiline comments in either net/ or drivers/net/ however,
they should

/* omit
 * the first
 * empty line.
 */

Since this file is part of a networking driver, the goal for it would
be to reside in drivers/net/ one day.

This patch changes comments, that were in neither form of the two listed
above, to have the style that is specified for drivers/net/.

Signed-off-by: Christian Müller <muellerch-privat@web.de>
Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
Link: https://lore.kernel.org/r/20190701082707.25198-2-muellerch-privat@web.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodrivers/staging/rtl8192u: drop first comment line
Christian Müller [Mon, 1 Jul 2019 08:27:06 +0000 (10:27 +0200)]
drivers/staging/rtl8192u: drop first comment line

As stated in coding-styles.rst multiline comments should be structured in a way,
that the actual comment starts on the second line of the commented portion. E.g:

/*
 * Multiline comments
 * should look like
 * this.
 */

However, there is an exception to files in drivers/net/ and net/, where
multiline comments are prefered to look like this:

/* Mutliline comments for
 * drivers/net/ should look
 * like this.
 */

The comments in this file initially looked like the first example.
But since this file is part of a networking driver and thus should
be moved to drivers/net/ one day, this patch adjusts the comments
such that they are fitting to the style imposed for drivers/net/.

Signed-off-by: Christian Müller <muellerch-privat@web.de>
Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
Link: https://lore.kernel.org/r/20190701082707.25198-1-muellerch-privat@web.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-dts: add support for second network interface
NeilBrown [Mon, 1 Jul 2019 00:43:07 +0000 (10:43 +1000)]
staging: mt7621-dts: add support for second network interface

The mt7621 has two network interfaces, one that connects to an
internal switch, and one that can connect to either that switch
or an external phy, or possibly an internal phy.

The Gnubee-PC2 has an external phy for use with the second interface.

This patch add some support for the second interface to mt7621.dtsi
and add a gbpc2.dts which makes use of this.  This allows the second
interface to be used.

I don't fully understand how to configure this interface - the
documentation is thin - so there could well be room for improvement
here.

Signed-off-by: NeilBrown <neil@brown.name>
Link: https://lore.kernel.org/r/156194178766.1430.12784163026696670896.stgit@noble.brown
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-dts: update sdhci config.
NeilBrown [Mon, 1 Jul 2019 00:43:07 +0000 (10:43 +1000)]
staging: mt7621-dts: update sdhci config.

The mtk-sd driver has been updated to support
the IP in the mt7621, so update our configuration
to work with it.

Signed-off-by: NeilBrown <neil@brown.name>
Link: https://lore.kernel.org/r/156194178761.1430.1625105851941268306.stgit@noble.brown
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: mite: Replace function mite_request_channel_in_range()
Nishka Dasgupta [Mon, 1 Jul 2019 07:00:25 +0000 (12:30 +0530)]
staging: comedi: mite: Replace function mite_request_channel_in_range()

Remove function mite_request_channel_in_range as all it does is call
__mite_request_channel.
Rename __mite_request_channel to mite_request_channel_in_range and
change its type from static to non-static to maintain compatibility with
call sites.
Change only remaining call site of __mite_request_channel to call
mite_request_channel_in_range_instead.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20190701070025.3838-3-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: amplc_dio200: Remove function gat_sce()
Nishka Dasgupta [Mon, 1 Jul 2019 07:00:24 +0000 (12:30 +0530)]
staging: comedi: amplc_dio200: Remove function gat_sce()

Remove function gat_sce as all it does is call clk_gat_sce.
Modify call sites of the former to call the latter directly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20190701070025.3838-2-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: amplc_dio200: Remove function clk_sce()
Nishka Dasgupta [Mon, 1 Jul 2019 07:00:23 +0000 (12:30 +0530)]
staging: comedi: amplc_dio200: Remove function clk_sce()

Remove function clk_sce as all it does is call clk_gat_sce.
Modify call site of clk_sce to call clk_gat_sce instead.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20190701070025.3838-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: remove data sanity check
Christian Gromm [Mon, 1 Jul 2019 13:49:33 +0000 (15:49 +0200)]
staging: most: remove data sanity check

This patch removes the data check in the set_cfg_* functions, because
the modules infacing the hardware (usb, i2c, ...) already have it.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1561988973-301-1-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: android: ion: Remove file ion_chunk_heap.c
Nishka Dasgupta [Wed, 3 Jul 2019 08:18:42 +0000 (13:48 +0530)]
staging: android: ion: Remove file ion_chunk_heap.c

Remove file ion_chunk_heap.c as its functions and definitions are not
used anywhere else.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Link: https://lore.kernel.org/r/20190703081842.22872-2-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: android: ion: Remove file ion_carveout_heap.c
Nishka Dasgupta [Wed, 3 Jul 2019 08:18:41 +0000 (13:48 +0530)]
staging: android: ion: Remove file ion_carveout_heap.c

Remove file ion_carveout_heap.c as its functions and definitions are not
used anywhere.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Link: https://lore.kernel.org/r/20190703081842.22872-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: fix LZ4 limited bounced page mis-reuse
Gao Xiang [Wed, 3 Jul 2019 06:52:09 +0000 (14:52 +0800)]
staging: erofs: fix LZ4 limited bounced page mis-reuse

Like all lz77-based algrithms, lz4 has a dynamically populated
("sliding window") dictionary and the maximum lookback distance
is 65535. Therefore the number of bounced pages could be limited
by erofs based on this property.

However, just now we observed some lz4 sequences in the extreme
case cannot be decompressed correctly after this feature is enabled,
the root causes after analysis are clear as follows:
1) max bounced pages should be 17 rather than 16 pages;
2) considering the following case, the broken implementation
   could reuse unsafely in advance (in other words, reuse it
   less than a safe distance),
   0 1 2 ... 16 17 18 ... 33 34
   b             p  b         b
   note that the bounce page that we are concerned was allocated
   at 0, and it reused at 18 since page 17 exists, but it mis-reused
   at 34 in advance again, which causes decompress failure.

This patch resolves the issue by introducing a bitmap to mark
whether the page in the same position of last round is a bounced
page or not, and a micro stack data structure to store all
available bounced pages.

Fixes: 7fc45dbc938a ("staging: erofs: introduce generic decompression backend")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: drop useless softdep statement
Jean Delvare [Mon, 1 Jul 2019 15:06:38 +0000 (17:06 +0200)]
staging: kpc2000: drop useless softdep statement

The i2c-dev module is for access to I2C buses from user-space.
Kernel drivers do not care about its presence.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Matt Sickler <Matt.Sickler@daktronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMerge tag 'iio-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Mon, 1 Jul 2019 08:58:13 +0000 (10:58 +0200)]
Merge tag 'iio-for-5.3b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of IIO device support, features, cleanups and minor fixes for 5.3.

A few bits for the counters subsystem mixed in here as well.
There are some late breaking fixes as well, which aren't so urgent
they can't wait for the merge window.

New Device Support
adf4371
  - New driver + bindings.
  - Support the adf4372 PLL. Mostly ID and bindings.
* ad8366 (note includes rework of driver needed to allow support for these).
  - Support the ADL5240 variable gain amplifier (VGA).
  - Support the ADA4961 digital gain amplifier (DGA).
* dps310
  - New driver, in several parts from different authors for this temp
    and pressure sensor.
  - Includes errata workaround for a temperature reading issue.
* stk3310
  - Support the stk3335, mostly ID.

Features and cleanups
* core
  - drop error handling on debugfs registration.
  - harden by making sure we don't overrun iio_chan_info_postfix.
* docs
  - convert remaining docs to rst. At somepoint we'll fit these few
    into the main IIO docs.
  - improve sampling_frequency_available docs but explaining the
    range form.
* ad_sigma_delta
  - Drop a pointless goto.
* ad2s1210
  - Drop pointless platform data null check seeing as we don't actually
    use platform data anymore.
* ad7124
  - Relax limitation on channel numbers to allow pseudo different channels.
  - Support control of whether the input is buffered via DT.
  - Use dynamic allocation for channel configuration to make it easier
    to support new devices.
  - YAML binding conversion.
* ad7150
  - Comment tidy up.
  - Consistent and simple if (ret) handling of i2c errors.
  - FIELD_GET and GENMASK.
  - Ternary rather than !!(condition) for readability.
  - Use macros to avoid repetition of channel definitions.
* ad7606
  - Add software channel config (rather that pin controlled)
  - Refactor to simplify addition of new part in future.
* ad7746
  - of_deivce_id table.
* ad7780
  - MAINTAINERS entry
  - YAML DT bindings.
* ad8366
  - Stop using core mlock in favour of well scoped local lock.
  - SPDX + copyright date update.
* ad9834
  - of_device_id table
adf4371
  - Add support for output stage muting before lock on has occured.
* adis library
  - MAINTAINERS entry to reflect that this now Alexandru's problem ;)
* adis162xx:
  - Fix a slightly incorrect set of comments and print statements on
    minimum supported voltage.
* adis16203
  - of_device_id table.
* adis16240
  - Add of_device_id table (in two parts as first patch only used it for
    MODULE_DEVICE_TABLE.)
* adt7316-spi
  - of_device_id table
* adxl372
  - YAML DT binding conversion.
  - Cleanup use of buffer callback functions (precursor to core rework).
* bh1710
  - Simplify getting the i2c adapter from the client.
* dht11
  - Mote to newer GPIO consumer interface.
* kxcjk-1013.c
  - Add binding for sensor in display of some ultrabooks after userspace
    tools updated for it not be a problem to report two similar sensors.
* imx7d
  - drop unused variables.
  - white space
  - define instead of variable for clock frequency that is fixed.
  - drop pointless error message.
* messon_saradc
  - SPDX
* sps30
  - MAINTAINERS entry
  - YAML binding conversion.
* st_accel
  - Tidy up ordering in various buffer related callbacks. This is
    part of a long running effort to simplify the core code.
* stm32-dfsdm:
  - Manage the resolution cleanly in triggerd modes.
  - Add fast mode support which allows more flexible filter choices.
  - Add a comment on the reason for a 16 bit record when technically
    not 'required'.
* st_lsm6dsx
  - Embed device name in the sensor_settings struct as i3c doesn't
    have a convenient name field to use for this.
* xilinx-adc
  - Relax constraints on supported platforms to reflect that this
    can used with FPGAs on PCIe cards and hence many architectures.
* counters/ftm-quaddec
  - Fix some formatting io MODULE_AUTHOR
  - MAINTAINERS entry

Fixes
* tools
  - fix incorrect handling of 32 bit channels.
* sca3000
  - Potential endian bug that is unlikely to bite anyone (be64 host
    seems unlikely for this old part).
* stm32-adc
  - Add vdda-supply. On some boards it needs to be turned on to supply
    the ADC.  DT bindings included.
* stm32-dfsdm
  - Fix output resolution to work with filter orders other than 3.
  - Fix output datatype as it's signed and previously claimed not to be.

* tag 'iio-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (68 commits)
  iio: iio-utils: Fix possible incorrect mask calculation
  iio: frequency: adf4371: Add support for output stage mute
  dt-bindings: iio: frequency: Add ADF4372 PLL documentation
  iio: frequency: adf4371: Add support for ADF4372 PLL
  dt-bindings: iio: adc: Add buffered input property
  Convert AD7124 bindings documentation to YAML format.
  iio: adc: ad7124: Shift to dynamic allocation for channel configuration
  iio: adc: ad7124: Add buffered input support
  iio: adc: ad7124: Remove input number limitation
  MAINTAINERS: add ADIS IMU driver library entry
  iio: adis162xx: fix low-power docs & reports
  counter/ftm-quaddec: Add missing '>' in MODULE_AUTHOR
  iio: core: no need to check return value of debugfs_create functions
  docs: iio: convert to ReST
  iio: adc: stm32-adc: add missing vdda-supply
  dt-bindings: iio: adc: stm32: add missing vdda supply
  iio: adc: stm32-dfsdm: add comment for 16 bits record
  iio: adc: stm32-dfsdm: add fast mode support
  iio: adc: stm32-dfsdm: manage data resolution in trigger mode
  iio: adc: stm32-dfsdm: fix data type
  ...

5 years agostaging: rtl8723bs: Remove rtw_btcoex_IsLpsOn()
Nishka Dasgupta [Mon, 1 Jul 2019 06:23:04 +0000 (11:53 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_IsLpsOn()

Remove function rtw_btcoex_IsLpsOn as all it does is call
hal_btcoex_IsLpsOn.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_SuspendNotify()
Nishka Dasgupta [Mon, 1 Jul 2019 06:23:03 +0000 (11:53 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_SuspendNotify()

Remove function rtw_btcoex_SuspendNotify as all it does is call
hal_btcoex_SuspendNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_SetManualControl()
Nishka Dasgupta [Mon, 1 Jul 2019 06:23:02 +0000 (11:53 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_SetManualControl()

Remove function rtw_btcoex_SetManualControl as all it does is call
hal_btcoex_SetManualControl.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_SpecialPacketNotify()
Nishka Dasgupta [Mon, 1 Jul 2019 06:23:01 +0000 (11:53 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_SpecialPacketNotify()

Remove function rtw_btcoex_SpecialPacketNotify as all it does is call
hal_btcoex_SpecialPacketNotify.
Modify call site accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_LpsNotify()
Nishka Dasgupta [Mon, 1 Jul 2019 06:23:00 +0000 (11:53 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_LpsNotify()

Remove function rtw_btcoex_LpsNotify as all it does is call
hal_btcoex_LpsNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_IpsNotify()
Nishka Dasgupta [Mon, 1 Jul 2019 06:22:59 +0000 (11:52 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_IpsNotify()

Remove function rtw_btcoex_IpsNotify as all it does is call
hal_btcoex_IpsNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_IQKNotify()
Nishka Dasgupta [Mon, 1 Jul 2019 06:22:58 +0000 (11:52 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_IQKNotify()

Remove function rtw_btcoex_IQKNotify as all it does is call
hal_btcoex_IQKNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_HAL_Initialize()
Nishka Dasgupta [Mon, 1 Jul 2019 06:22:57 +0000 (11:52 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_HAL_Initialize()

Remove function rtw_btcoex_HAL_Initialize as it does nothing except call
hal_btcoex_InitHwConfig.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_PowerOnSetting()
Nishka Dasgupta [Mon, 1 Jul 2019 06:22:56 +0000 (11:52 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_PowerOnSetting()

Remove function rtw_btcoex_PowerOnSetting as all it does is call
hal_btcoex_PowerOnSetting.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove function rtw_modular64()
Nishka Dasgupta [Mon, 1 Jul 2019 06:22:55 +0000 (11:52 +0530)]
staging: rtl8723bs: Remove function rtw_modular64()

Remove function rtw_modular64 as all it does is call do_div.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Replace function odm_SignalScaleMapping()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:35 +0000 (16:28 +0530)]
staging: rtl8723bs: Replace function odm_SignalScaleMapping()

Remove function odm_SignalScaleMapping as all it does is call
odm_SignalScaleMapping_92CSeries.
Rename odm_SignalScaleMapping_92CSeries to odm_SignalScaleMapping and
change its type from static to non-static to maintain compatibility with
call sites of odm_SignalScaleMapping.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_hal_networktype_to_raid()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:34 +0000 (16:28 +0530)]
staging: rtl8723bs: Remove rtw_hal_networktype_to_raid()

Change call sites of rtw_hal_networktype_to_raid to instead call
networktype_to_raid_ex as rtw_hal_networktype_to_raid does nothing
except call networktype_to_raid_ex.
Remove now-unused function rtw_hal_networktype_to_raid.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Change return type of networktype_to_raid_ex()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:33 +0000 (16:28 +0530)]
staging: rtl8723bs: Change return type of networktype_to_raid_ex()

Change return type of header file prototype of networktype_to_raid_ex
from unsigned char to u8 to match its actual definition and call site.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_hal_c2h_evt_read()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:32 +0000 (16:28 +0530)]
staging: rtl8723bs: Remove rtw_hal_c2h_evt_read()

Modify call sites of rtw_hal_c2h_evt_read to call c2h_evt_read_88xx
instead, as rtw_hal_c2h_evt_read does nothing except call
c2h_evt_read_88xx.
Remove function rtw_hal_c2h_evt_read as it is now not necessary.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Remove function clearinterrupt8723bsdio()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:31 +0000 (16:28 +0530)]
staging: rtl8723bs: hal: Remove function clearinterrupt8723bsdio()

Remove unused function clearinterrupt8723bsdio and associated ifdef.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove function wait_eeprom_cmd_done()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:30 +0000 (16:28 +0530)]
staging: rtl8723bs: core: Remove function wait_eeprom_cmd_done()

Remove unused function wait_eeprom_cmd_done.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Remove function PHY_CalculateBitShift()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:29 +0000 (16:28 +0530)]
staging: rtl8723bs: hal: Remove function PHY_CalculateBitShift()

Remove unused function PHY_CalculateBitShift.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Remove PHY_RFShadowRecorverFlagSetAll()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:28 +0000 (16:28 +0530)]
staging: rtl8723bs: hal: Remove PHY_RFShadowRecorverFlagSetAll()

Remove unused function PHY_RFShadowRecorverFlagSetAll.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Remove PHY_RFShadowRefresh()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:27 +0000 (16:28 +0530)]
staging: rtl8723bs: hal: Remove PHY_RFShadowRefresh()

Remove unused function PHY_RFShadowRefresh.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Replace function rtl8723b_set_rssi_cmd()
Nishka Dasgupta [Fri, 28 Jun 2019 10:58:26 +0000 (16:28 +0530)]
staging: rtl8723bs: hal: Replace function rtl8723b_set_rssi_cmd()

Remove function rtl8723b_set_rssi_cmd as all it does is call
rtl8723b_set_FwRssiSetting_cmd.
Rename rtl8723b_set_FwRssiSetting_cmd to rtl8723b_set_rssi_cmd and
change its type from static to non-static to maintain compatibility
with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_halinit: Remove set but unused varilable pHalData
Hariprasad Kelam [Thu, 27 Jun 2019 18:11:39 +0000 (23:41 +0530)]
staging: rtl8723bs: hal: sdio_halinit: Remove set but unused varilable pHalData

Remove set but unsed variable pHalData in below functions
_InitOperationMode, SetHwReg8723BS.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_rf6052: collect return status directly
Hariprasad Kelam [Wed, 26 Jun 2019 17:51:55 +0000 (23:21 +0530)]
staging: rtl8723bs: hal: rtl8723b_rf6052: collect return status directly

Remove variable rtStatus and return phy_RF6052_Config_ParaFile function
directly

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_hal_init: remove set but unused variable pHalData
Hariprasad Kelam [Wed, 26 Jun 2019 17:29:51 +0000 (22:59 +0530)]
staging: rtl8723bs: hal: rtl8723b_hal_init: remove set but unused variable pHalData

Remove set but unsed variable pHalData in hw_var_set_mlme_join
function

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_cmd: remove set but unused variable
Hariprasad Kelam [Wed, 26 Jun 2019 17:13:37 +0000 (22:43 +0530)]
staging: rtl8723bs: hal: rtl8723b_cmd: remove set but unused variable

Remove set but unsed variable pHalData in rtl8723b_set_FwRsvdPagePkt
function

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Replace function r8712_dequeue_cmd()
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:41 +0000 (11:39 +0530)]
staging: rtl8712: Replace function r8712_dequeue_cmd()

Remove function r8712_dequeue_cmd as all it does is call _dequeue_cmd.
Rename _dequeue_cmd to r8712_dequeue_cmd and change its type from static
to non-static to maintain compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Replace function r8712_enqueue_cmd()
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:40 +0000 (11:39 +0530)]
staging: rtl8712: Replace function r8712_enqueue_cmd()

Merge function _enqueue_cmd into function r8712_enqueue_cmd as
_enqueue_cmd is only called by r8712_enqueue_cmd, and then only once.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: r8712_xmit_resource_alloc(): Change return values
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:39 +0000 (11:39 +0530)]
staging: rtl8712: r8712_xmit_resource_alloc(): Change return values

Change call site of function r8712_xmit_resource_alloc to add a check
for its return value.
Change return values of r8712_xmit_resource_alloc from
_SUCCESS/_FAIL to 0/-ENOMEM.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: _r8712_init_sta_priv(): Change return values
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:38 +0000 (11:39 +0530)]
staging: rtl8712: _r8712_init_sta_priv(): Change return values

Add check for the return value of function _r8712_init_sta_priv at call
site.
Change return values of the function from _SUCCESS/_FAIL to 0/-ENOMEM
respectively.
Change return type of the function from u32 to int to enable return of
-ENOMEM.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: _r8712_free_sta_priv(): Change return type
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:37 +0000 (11:39 +0530)]
staging: rtl8712: _r8712_free_sta_priv(): Change return type

Change return type of function _r8712_free_sta_priv from u32 to void as
it always returns _SUCCESS and this return value is never used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: mp_start_test(): Change return values
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:36 +0000 (11:39 +0530)]
staging: rtl8712: mp_start_test(): Change return values

Change return values of function mp_start_test() from _SUCCESS/_FAIL to
0/-ENOMEM and modify call sites accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: r8712_parse_wpa2_ie(): Change return values
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:35 +0000 (11:39 +0530)]
staging: rtl8712: r8712_parse_wpa2_ie(): Change return values

Change return values of function r8712_parse_wpa2_ie from
_SUCCESS/_FAIL to 0/-EINVAL.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: r8712_parse_wpa_ie(): Change return values
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:34 +0000 (11:39 +0530)]
staging: rtl8712: r8712_parse_wpa_ie(): Change return values

Change return values of function r8712_parse_wpa_ie from _SUCCESS/_FAIL
to 0/-EINVAL. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Change return values of r8712_getrfreg_cmd()
Nishka Dasgupta [Wed, 26 Jun 2019 06:09:33 +0000 (11:39 +0530)]
staging: rtl8712: Change return values of r8712_getrfreg_cmd()

Change return values of r8712_getrfreg_cmd from _SUCCESS/_FAIL to
0/-ENOMEM respectively. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove needless 'break'
Fabian Krueger [Wed, 26 Jun 2019 07:35:26 +0000 (09:35 +0200)]
staging: kpc2000: remove needless 'break'

The unconditioned jump will prohibit to ever reach the break-statement.
Deleting this needless statement, the code becomes more understandable.

Signed-off-by: Fabian Krueger <fabian.krueger@fau.de>
Signed-off-by: Michael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: introduce __func__
Fabian Krueger [Wed, 26 Jun 2019 07:35:25 +0000 (09:35 +0200)]
staging: kpc2000: introduce __func__

Instead of using the function name hard coded as string, using __func__
and the '%s'-placeholder will always give the current name of the
function. When renaming a function, the debugging-messages won't have to
be rewritten.

Signed-off-by: Fabian Krueger <fabian.krueger@fau.de>
Signed-off-by: Michael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: introduce 'unsigned int'
Fabian Krueger [Wed, 26 Jun 2019 07:35:24 +0000 (09:35 +0200)]
staging: kpc2000: introduce 'unsigned int'

Replaced 'unsigned' with it's equivalent 'unsigned int' to reduce
confusion while reading the code.

Signed-off-by: Fabian Krueger <fabian.krueger@fau.de>
Signed-off-by: Michael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: introduce usage of __packed
Fabian Krueger [Wed, 26 Jun 2019 07:35:21 +0000 (09:35 +0200)]
staging: kpc2000: introduce usage of __packed

Replaced __attribute__((packed)) with __packed. Both ways of attributing
are equivalent, but being shorter, __packed should be preferred.
This refactoring makes the core more readable.

Signed-off-by: Fabian Krueger <fabian.krueger@fau.de>
Signed-off-by: Michael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: blank lines after declaration
Fabian Krueger [Wed, 26 Jun 2019 07:35:20 +0000 (09:35 +0200)]
staging: kpc2000: blank lines after declaration

After the declarations in a function, there should be a blank line, so
that the declaration part is visibly separated from the rest.
This refactoring makes the code more readable.

Signed-off-by: Fabian Krueger <fabian.krueger@fau.de>
Signed-off-by: Michael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: add line breaks
Fabian Krueger [Wed, 26 Jun 2019 07:35:19 +0000 (09:35 +0200)]
staging: kpc2000: add line breaks

To fix some checkpatch-warnings some lines of this module had to be
shortened so that they do not exceed 80 characters per line.
This refactoring makes the code more readable.

Signed-off-by: Fabian Krueger <fabian.krueger@fau.de>
Signed-off-by: Michael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192u: Remove function dm_backup_dynamic_mechanism_state()
Nishka Dasgupta [Wed, 26 Jun 2019 06:47:59 +0000 (12:17 +0530)]
staging: rtl8192u: Remove function dm_backup_dynamic_mechanism_state()

Remove unused function dm_backup_dynamic_mechanism_state.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192u: Change type of rtl8192_rx_initiate()
Nishka Dasgupta [Wed, 26 Jun 2019 06:47:58 +0000 (12:17 +0530)]
staging: rtl8192u: Change type of rtl8192_rx_initiate()

Change type of function rtl8192_rx_initiate from int to void as it
always returns 0 and this value is never used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: hal_btcoex: Remove unneeded variable PHalData
Hariprasad Kelam [Wed, 26 Jun 2019 02:42:20 +0000 (08:12 +0530)]
staging: rtl8723bs: hal: hal_btcoex: Remove unneeded variable PHalData

pHalData is not being used in halbtcoutsrc_LeaveLowPower. So remove the
same.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: hal_btcoex: Using comparison to true is error prone
Hariprasad Kelam [Wed, 26 Jun 2019 02:41:51 +0000 (08:11 +0530)]
staging: rtl8723bs: hal: hal_btcoex: Using comparison to true is error prone

fix below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Correct ctrl min/max/step/def to 64bit
Dave Stevenson [Sat, 29 Jun 2019 19:31:43 +0000 (21:31 +0200)]
staging: bcm2835-camera: Correct ctrl min/max/step/def to 64bit

The V4L2 control API was expanded to take 64 bit values in commit
0ba2aeb6dab (Apr 16 2014), but as this driver wasn't in the mainline
kernel at that point this was overlooked.

Update to use 64 bit values. This also fixes a couple of warnings
in 64 bit builds.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Set the field value within each buffer
Dave Stevenson [Sat, 29 Jun 2019 19:31:42 +0000 (21:31 +0200)]
staging: bcm2835-camera: Set the field value within each buffer

Fixes a v4l2-compliance failure
v4l2-test-buffers.cpp(415): g_field() == V4L2_FIELD_ANY

The driver only ever produces progresive frames, so field should
always be set to V4L2_FIELD_NONE.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS
Dave Stevenson [Sat, 29 Jun 2019 19:31:41 +0000 (21:31 +0200)]
staging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS

Fixes a v4l2-compliance failure when passed a buffer that is
too small.
queue_setup wasn't handling the case where *nplanes != 0, as
used from CREATE_BUFS and requiring the driver to sanity
check the provided buffer parameters. It was assuming that
it was always being used in the REQBUFS case where it provides
the buffer properties.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix stride on RGB3/BGR3 formats
Dave Stevenson [Sat, 29 Jun 2019 19:31:40 +0000 (21:31 +0200)]
staging: bcm2835-camera: Fix stride on RGB3/BGR3 formats

RGB3/BGR3 end up being 3 bytes per pixel, which meant that
the alignment code ended up trying to align using bitmasking
with a mask of 96.
That doesn't work, so switch to an arithmetic alignment for
those formats.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mmal-vchiq: Avoid use of bool in structures
Dave Stevenson [Sat, 29 Jun 2019 19:31:39 +0000 (21:31 +0200)]
staging: mmal-vchiq: Avoid use of bool in structures

Fixes up a checkpatch error "Avoid using bool structure members
because of possible alignment issues".

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Remove/amend some obsolete comments
Dave Stevenson [Sat, 29 Jun 2019 12:48:31 +0000 (14:48 +0200)]
staging: bcm2835-camera: Remove/amend some obsolete comments

Remove a todo which has been done.
Remove a template line that was redundant.
Make a comment clearer as to the non-obvious meaning of a field.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Correct V4L2_CID_COLORFX_CBCR behaviour
Dave Stevenson [Sat, 29 Jun 2019 12:48:30 +0000 (14:48 +0200)]
staging: bcm2835-camera: Correct V4L2_CID_COLORFX_CBCR behaviour

With V4L2_CID_COLORFX_CBCR calling ctrl_set_colfx it was incorrectly
assigning the colour values to the enable field of dev->colourfx
instead of the u and v fields.

Correct the assignments.

Reported as a Coverity issue
Detected by CoverityScan CID#1419711 ("Unused value")

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Use enums for max value in controls
Dave Stevenson [Sat, 29 Jun 2019 12:48:29 +0000 (14:48 +0200)]
staging: bcm2835-camera: Use enums for max value in controls

Controls of type MMAL_CONTROL_TYPE_STD_MENU call v4l2_ctrl_new_std_menu
with a max value and a mask. The max value is one of the defined
values for the control, however in the config array there are several
entries where raw numbers have been used instead. Replace these
with the appropriate enum.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix up mmal-parameters.h
Dave Stevenson [Sat, 29 Jun 2019 12:48:28 +0000 (14:48 +0200)]
staging: bcm2835-camera: Fix up mmal-parameters.h

Fixes up all the checkpatch error "line over 80 characters" in
mmal-parameters.h

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix multiple assignments should be avoided
Dave Stevenson [Sat, 29 Jun 2019 12:48:27 +0000 (14:48 +0200)]
staging: bcm2835-camera: Fix multiple assignments should be avoided

Clear checkpatch complaints of "multiple assignments should be avoided"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Unify header inclusion defines
Dave Stevenson [Sat, 29 Jun 2019 12:48:26 +0000 (14:48 +0200)]
staging: bcm2835-camera: Unify header inclusion defines

Most of the headers use ifndef FOO_H, whilst mmal-parameters.h
used ifndef __FOO_H.

Revise mmal-parameters.h to drop the underscores and make the
headers all consistent.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Add multiple inclusion protection to headers
Dave Stevenson [Sat, 29 Jun 2019 12:48:25 +0000 (14:48 +0200)]
staging: bcm2835-camera: Add multiple inclusion protection to headers

mmal-common.h and mmal-msg.h didn't have the normal
ifndef FOO / define FOO / endif protection to stop it being
included multiple times. Add it.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Set sequence number correctly
Dave Stevenson [Sat, 29 Jun 2019 12:48:24 +0000 (14:48 +0200)]
staging: bcm2835-camera: Set sequence number correctly

Set the sequence number in vb2_v4l2_buffer mainly so the
latest v4l2-ctl reports the frame rate correctly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Handle empty EOS buffers whilst streaming
Dave Stevenson [Sat, 29 Jun 2019 12:48:23 +0000 (14:48 +0200)]
staging: bcm2835-camera: Handle empty EOS buffers whilst streaming

The change to mapping V4L2 to MMAL buffers 1:1 didn't handle
the condition we get with raw pixel buffers (eg YUV and RGB)
direct from the camera's stills port. That sends the pixel buffer
and then an empty buffer with the EOS flag set. The EOS buffer
wasn't handled and returned an error up the stack.

Handle the condition correctly by returning it to the component
if streaming, or returning with an error if stopping streaming.

Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Remove check of the number of buffers supplied
Dave Stevenson [Sat, 29 Jun 2019 12:13:30 +0000 (14:13 +0200)]
staging: bcm2835-camera: Remove check of the number of buffers supplied

Before commit "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"
there was a need to ensure that there were sufficient buffers supplied from
the user to cover those being sent to the VPU (always 1).

Now the buffers are linked 1:1 between MMAL and V4L2,
therefore there is no need for that check, and indeed it is wrong
as there is no need to submit all the buffers before starting streaming.

Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Ensure all buffers are returned on disable
Dave Stevenson [Sat, 29 Jun 2019 12:13:29 +0000 (14:13 +0200)]
staging: bcm2835-camera: Ensure all buffers are returned on disable

With the recent change to match MMAL and V4L2 buffers there
is a need to wait for all MMAL buffers to be returned during
stop_streaming.

Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix open parenthesis alignment
Dave Stevenson [Sat, 29 Jun 2019 12:13:28 +0000 (14:13 +0200)]
staging: bcm2835-camera: Fix open parenthesis alignment

Fix checkpatch "Alignment should match open parenthesis"
errors.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix missing lines between items
Dave Stevenson [Sat, 29 Jun 2019 12:13:27 +0000 (14:13 +0200)]
staging: bcm2835-camera: Fix missing lines between items

Fix checkpatch errors for missing blank lines after variable
or structure declarations.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix brace style issues.
Dave Stevenson [Sat, 29 Jun 2019 12:13:26 +0000 (14:13 +0200)]
staging: bcm2835-camera: Fix brace style issues.

Fix mismatched or missing brace issues flagged by checkpatch.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix multiple line dereference errors
Dave Stevenson [Sat, 29 Jun 2019 12:13:25 +0000 (14:13 +0200)]
staging: bcm2835-camera: Fix multiple line dereference errors

Fix checkpatch errors "Avoid multiple line dereference"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Reduce length of enum names
Dave Stevenson [Sat, 29 Jun 2019 12:13:24 +0000 (14:13 +0200)]
staging: bcm2835-camera: Reduce length of enum names

We have numerous lines over 80 chars, or oddly split. Many
of these are due to using long enum names such as
MMAL_COMPONENT_CAMERA.
Reduce the length of these enum names.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix spacing around operators
Dave Stevenson [Sat, 29 Jun 2019 12:13:23 +0000 (14:13 +0200)]
staging: bcm2835-camera: Fix spacing around operators

Fix checkpatch warnings over spaces around operators.
Many were around operations that can be replaced with the
BIT(x) macro, so replace with that where appropriate.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Fix comment style violations.
Dave Stevenson [Sat, 29 Jun 2019 12:13:22 +0000 (14:13 +0200)]
staging: bcm2835-camera: Fix comment style violations.

Fix comment style violations in the header files.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Remove dead email addresses
Dave Stevenson [Sat, 29 Jun 2019 12:13:21 +0000 (14:13 +0200)]
staging: bcm2835-camera: Remove dead email addresses

None of the listed author email addresses were valid.
Keep list of authors and the companies they represented.
Update my email address.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Return early on errors
Dave Stevenson [Sat, 29 Jun 2019 12:13:20 +0000 (14:13 +0200)]
staging: bcm2835-camera: Return early on errors

Fix several instances where it is easier to return
early on error conditions than handle it as an else
clause. As requested by Mauro.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Correctly denote key frames in encoded data
Dave Stevenson [Sat, 29 Jun 2019 12:13:19 +0000 (14:13 +0200)]
staging: bcm2835-camera: Correctly denote key frames in encoded data

Forward MMAL key frame flags to the V4L2 buffers.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Do not bulk receive from service thread
Dave Stevenson [Sat, 29 Jun 2019 12:13:18 +0000 (14:13 +0200)]
staging: bcm2835-camera: Do not bulk receive from service thread

vchi_bulk_queue_receive will queue up to a default of 4
bulk receives on a connection before blocking.
If called from the VCHI service_callback thread, then
that thread is unable to service the VCHI_CALLBACK_BULK_RECEIVED
events that would enable the queue call to succeed.

Add a workqueue to schedule the call vchi_bulk_queue_receive
in an alternate context to avoid the lock up.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Replace spinlock protecting context_map with mutex
Dave Stevenson [Sat, 29 Jun 2019 12:13:17 +0000 (14:13 +0200)]
staging: bcm2835-camera: Replace spinlock protecting context_map with mutex

The commit "staging: bcm2835-camera: Replace open-coded idr with a struct idr."
replaced an internal implementation of an idr with the standard functions
and a spinlock. idr_alloc(GFP_KERNEL) can sleep whilst calling kmem_cache_alloc
to allocate the new node, but this is not valid whilst in an atomic context
due to the spinlock.

There is no need for this to be a spinlock as a standard mutex is
sufficient.

Fixes: 950fd867c635 ("staging: bcm2835-camera: Replace open-coded idr with a struct idr.")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Check the error for REPEAT_SEQ_HEADER
Dave Stevenson [Sat, 29 Jun 2019 12:13:16 +0000 (14:13 +0200)]
staging: bcm2835-camera: Check the error for REPEAT_SEQ_HEADER

When handling for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER was added
the firmware would reject the setting if H264 hadn't already been
selected. This was fixed in the firmware at that point, but to
enable backwards compatibility the returned error was ignored.

That was Dec 2013, so the chances of having a firmware that still
has that issue is so close to zero that the workaround can be
removed.

Link: https://github.com/raspberrypi/linux/pull/2782/
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging/rtl8188eu/os_dep: Remove unneeded variable ret
Hariprasad Kelam [Sat, 29 Jun 2019 18:26:50 +0000 (23:56 +0530)]
staging/rtl8188eu/os_dep: Remove unneeded variable ret

Below list of functions returns 0 in success and -EINVAL in failure. So
directly return 0 on Success.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: Remove declarations of unused functions
Nishka Dasgupta [Wed, 26 Jun 2019 06:50:57 +0000 (12:20 +0530)]
staging: rtl8188eu: Remove declarations of unused functions

Remove the declarations of the following unused functions from
rtw_eeprom.h:
- eeprom_write16
- eeprom_read16
- eeprom_read_sz
- read_eeprom_content
- read_eeprom_content_by_attrib.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: hal: Replace function ODM_TXPowerTrackingCheck()
Nishka Dasgupta [Wed, 26 Jun 2019 06:50:56 +0000 (12:20 +0530)]
staging: rtl8188eu: hal: Replace function ODM_TXPowerTrackingCheck()

Remove function ODM_TXPowerTrackingCheck as all it does is call
odm_TXPowerTrackingCheckCE.
Rename odm_TXPowerTrackingCheckCE to ODM_TXPowerTrackingCheck for
compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: hal: Replace function odm_TXPowerTrackingInit()
Nishka Dasgupta [Wed, 26 Jun 2019 06:50:55 +0000 (12:20 +0530)]
staging: rtl8188eu: hal: Replace function odm_TXPowerTrackingInit()

Remove function odm_TXPowerTrackingInit as all it does is call
odm_TXPowerTrackingThermalMeterInit.
Rename odm_TXPowerTrackingThermalMeterInit to odm_TXPowerTrackingInit
for compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: os_dep: Remove return variable
Nishka Dasgupta [Wed, 26 Jun 2019 06:50:54 +0000 (12:20 +0530)]
staging: rtl8188eu: os_dep: Remove return variable

Remove return variable as its value is not altered between
initialisation and return.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: netlogic: Change GFP_ATOMIC to GFP_KERNEL
Hariprasad Kelam [Sat, 29 Jun 2019 19:10:35 +0000 (00:40 +0530)]
staging: netlogic: Change GFP_ATOMIC to GFP_KERNEL

Below is data path of xlr_config_spill
xlr_net_probe
  -->xlr_config_fifo_spill_area
  --->xlr_config_spill

We can use GFP_KERNEL as this function is getting called from
xlr_net_probe and there are no locks.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rts5208: Simplify boolean expression to improve code style
Tobias Nießen [Wed, 26 Jun 2019 14:28:57 +0000 (16:28 +0200)]
staging: rts5208: Simplify boolean expression to improve code style

This bitwisen / boolean expression can be made more readable while
reducing the line lengths at the same time. This commit uses the
fact that

    a & (b | c) == (b | c)

evaluates to true if and only if

    (a & b) && (a & c)

is true. Since b and c are constants with relatively long names,
using the second form makes the code much more readable and shorter.

Signed-off-by: Tobias Nießen <tobias.niessen@stud.uni-hannover.de>
Signed-off-by: Sabrina Gaube <sabrina-gaube@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rts5208: Rewrite redundant if statement to improve code style
Tobias Nießen [Wed, 26 Jun 2019 14:28:56 +0000 (16:28 +0200)]
staging: rts5208: Rewrite redundant if statement to improve code style

This commit uses the fact that

    if (a) {
            if (b) {
                    ...
            }
    }

can instead be written as

    if (a && b) {
            ...
    }

without any change in behavior, allowing to decrease the indentation
of the contained code block and thus reducing the average line length.

Signed-off-by: Tobias Nießen <tobias.niessen@stud.uni-hannover.de>
Signed-off-by: Sabrina Gaube <sabrina-gaube@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: rename 'host_interface' source and header
Ajay Singh [Wed, 26 Jun 2019 12:41:06 +0000 (12:41 +0000)]
staging: wilc1000: rename 'host_interface' source and header

Rename 'host_interface' source and header file to include the 'wilc_'
prefix in its name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: remove extra argument passing to wilc_send_config_pkt()
Ajay Singh [Wed, 26 Jun 2019 12:41:04 +0000 (12:41 +0000)]
staging: wilc1000: remove extra argument passing to wilc_send_config_pkt()

Cleanup patch to remove the passing of driver handler, get the 'idx'
value inside the called function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct
Ajay Singh [Wed, 26 Jun 2019 12:41:01 +0000 (12:41 +0000)]
staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct

Remove use of 'src_addr' element in wilc_vif, as the same information
already copied to net_device->dev_addr.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: remove unnecessary loop to traverse vif interfaces
Ajay Singh [Wed, 26 Jun 2019 12:40:58 +0000 (12:40 +0000)]
staging: wilc1000: remove unnecessary loop to traverse vif interfaces

Cleanup patch to avoid loop to traverse the interfaces instead make use
of vif received from net_device priv data.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: remove use of driver_handler_id & ifc_id
Ajay Singh [Wed, 26 Jun 2019 12:40:55 +0000 (12:40 +0000)]
staging: wilc1000: remove use of driver_handler_id & ifc_id

Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to
identify the handler.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: added support to dynamically add/remove interfaces
Ajay Singh [Wed, 26 Jun 2019 12:40:52 +0000 (12:40 +0000)]
staging: wilc1000: added support to dynamically add/remove interfaces

Removed the use of two hardcoded interfaces and added support to
add/remove the network interfaces dynamically.
Now the driver will have single default interface with name 'wlan0' and
later other interface can be added from user space application e.g
using 'iw add' command.
Also taken care to maintain 'wilc_vif' as part of 'net_device'
private data and 'wilc' struct as 'wiphy' private data.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>