Commit graph

22 commits

Author SHA1 Message Date
Pawel Lebioda 89fa037b82 staging: bcm: add missing blank lines after declarations
Fix "Missing blank line after declaration" warnings reported by
checkpatch.pl.

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 12:20:37 -07:00
Daeseok Youn 87755c0b3a staging: bcm: use kzalloc instead of kmalloc/memset
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:52:21 +09:00
Gokulnath A b3a53885b2 staging: bcm: line over 80 characters in InterfaceDld.c
Fixed all the line over 80 characters warning found by
checkpatch.pl script.

Signed-off-by: Gokulnath A <Gokulnath.Avanashilingam@in.bosch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-18 16:24:17 -08:00
Gokulnath A 8f5157bf37 staging:bcm: Removed developer debug prints in InterfaceDld.c
Removed the developer debug prints BCM_DEBUG_PRINT()
as per the TODO list, also removed braces for the
if-statement to match coding style

Signed-off-by: Gokulnath A <Gokulnath.Avanashilingam@in.bosch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-18 16:24:17 -08:00
Lisa Nguyen 2fef7e13c8 staging: bcm: Remove unnecessary pointer casting
Some void pointers can be assigned to other
pointer variables in functions without casting.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29 17:03:40 -07:00
Lisa Nguyen f70c8a91cd staging: bcm: Replace FALSE with false
Replace user-defined type FALSE with C defined false keyword.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-28 14:13:46 -07:00
Dan Carpenter 2c5270ac80 Staging: bcm: potential forever loop verifying firmware
There is an ioctl() to write data to the firmware.  After the data
is written, it reads the databack from the firmware and compares
against what the user wanted to write and prints an error message
if it doesn't match.

The problem is that verify process has a forever loop if the
firmware size is not a multiple of 4.  I've fixed it by replacing
the bcm compare function with memcmp().

I have chopped out some debugging code in the process.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:15:32 -07:00
Kevin McKinney c81823340a Staging: bcm: Remove typedef for _TARGET_PARAMS and call directly.
This patch removes typedef for _TARGET_PARAMS, and changes
the name of the struct to bcm_target_params. In addition,
any calls to struct "stTargetParams, TARGET_PARAMS,
*PTARGET_PARAMS, STARGETPARAMS,  or *PSTARGETPARAMS are
changed to call directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 10:54:01 -08:00
Kevin McKinney d6861cfef2 Staging: bcm: Remove typedef for _S_INTERFACE_ADAPTER and call directly.
This patch removes typedef for
_S_INTERFACE_ADAPTER, changes the
name of the struct to bcm_interface_adapter.
In addition, any calls to typedefs
S_INTERFACE_ADAPTER, or *PS_INTERFACE_ADAPTER
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-02 11:36:46 -07:00
Kevin McKinney 2979460d7a Staging: bcm: Remove typedef for _MINI_ADAPTER and call directly.
This patch removes typedef for _MINI_ADAPTER, changes the
name of the struct from _MINI_ADAPTER to bcm_mini_adapter.
In addition, any calls to the following typedefs
"MINI_ADAPTER, *PMINI_ADAPTER" are changed to call
the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 21:09:22 -07:00
Kevin McKinney 7a27a2ccf8 Staging: bcm: Remove typedef for FirmwareInfo and call directly.
This patch removes typedef for FirmwareInfo,
changes the name from Firmwareinfo to
bcm_firmware_info. In addition, any calls to
the following typedefs "PFIRMWARE_INFO,
FIRMWARE_INFO" are changed to call the struct
directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 21:06:35 -07:00
Kevin McKinney 41c7b7c0fa Staging: bcm: Fix information leak in ioctl: IOCTL_BCM_REGISTER_READ_PRIVATE, IOCTL_BCM_EEPROM_REGISTER_READ
This patch fixes an information leak in ioctl
IOCTL_BCM_REGISTER_READ_PRIVATE and
IOCTL_BCM_EEPROM_REGISTER_READ when determining
the number of bytes to copy to user space.  Function,
usb_control_msg, returns the correct number of
bytes from the hardware.  Instead of using
this value, we were using a value derived from
user space. In this case, this value could be more
than the hardware allocated.  Therefore, this
patch copies the proper number of bytes from
the hardware, and uses this value as the maximum
number of bytes for user space.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:11:58 -08:00
Kevin McKinney a86581829f Staging: bcm: Fix three initialization errors in InterfaceDld.c
This patch fixes three initialization errors.
One is an incorrect initialization of a static
variable. The other two are incorrect
initializations in an if statement. These
errors were found by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:16:34 +02:00
Kevin McKinney a5e4b81e27 Staging: bcm: Fix coding style issues in InterfaceDld.c
This patch fixes multiple coding style issues in file,
InterfaceDld.c, found by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:16:34 +02:00
Marcos Paulo de Souza 43664e14a0 drivers/staging/bcm/InterfaceDld.c: Fix checkpatch warnings
In the source file there are a lot of warnings. I will send it in parts to be more easy to
review. All the changes in this file its just alignment, and things like that.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:43:43 -07:00
Jesper Juhl 3701befc44 Staging, bcm: Remove unnecessary casts of void ptr returning alloc function return values
Here's a patch against a copy of linux-next that I just cloned.

Don't pointlessly cast pointers returned by allocation functions that
return void pointers which are implicitly converted.
For drivers/staging/bcm/

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-10 16:28:31 -08:00
Stephen Hemminger 3644c1a2f1 beceem: remove dead code
Remove commented out with '#if 0'

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 09:54:43 -04:00
Stephen Hemminger 082e889b47 beceem: remove OS wrapper library
Use native kernel functions for kmalloc/kfree directly

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 09:35:21 -04:00
Stephen Hemminger 91d29ee1a8 beceem: remove ifdef's
There were a lot of ifdef's for driver options which have no
configuration options.  Choose the current value and remove the
ifdef.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29 20:43:28 -07:00
Dan Carpenter ef5d205645 Staging: bcm: return -EFAULT on copy_to_user() errors
bcm/InterfaceDld.c had a couple places which returned the number of
bytes remaining instead of -EFAULT.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:29:56 -07:00
Arnd Bergmann 44a17eff84 staging/bcm: add sparse annotations
This marks up the code where sparse complains in most cases.
Most of the changes are in the ioctl handling code, which
gets __user annotations, finding one unchecked user access.

The rest is mostly about marking functions static when they
are only used in one file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-05 08:50:15 -07:00
Stephen Hemminger f8942e07a3 staging: Beeceem USB Wimax driver
The Sprint 4G network uses a Wimax dongle with Beecem
chipset. The driver is typical of out of tree drivers, but
maybe useful for people, and the hardware is readily available.

Here is a staging ready version (i.e warts and all)

0. Started with Rel_5.2.7.3P1_USB from Sprint4GDeveloperPack-1.1
1. Consolidated files in staging
2. Remove Dos cr/lf
3. Remove unnecessary ioctl from usbbcm_fops

Applied patches that were in the developer pack, surprising
there were ones for 2.6.35 already.

This is compile tested only, see TODO for what still needs
to be done.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:15:06 -07:00