Commit graph

24 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
Matthias Beyer
40e61d1279 Staging: bcm: InterfaceMisc.c: Outsourced doubled error checking
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08 16:22:30 -07:00
Matthias Beyer
8e7e2805ef Staging: bcm: Shortened lines
This patch fixes line lengths in the

    drivers/staging/bcm/InterfaceMisc.c

file.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08 16:22:30 -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
Avinash Kumar
51f085a3bc staging: bcm: InterfaceMisc.c: fixed styling issue in casting (foo*)->(foo *)
fixed styling issue in pointer typecast.

Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:43 -07: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
2807dbe1ce Staging: bcm: Remove null dereference from InterfaceWRM.
This patch removes a potential null dereference
from InterfaceMisc.c, function InterfaceWRM. This
error was reported by Smatch.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:24 -07:00
Kevin McKinney
68f7457d06 Staging: bcm: Remove null dereference from InterfaceRDM.
This patch removes a potential null dereference
from InterfaceMisc.c, function InterfaceRDM. This
error was reported by Smatch.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:23 -07:00
Kevin McKinney
1e2731eb50 Staging: bcm: Remove unneeded do while loop in InterfaceWRM.
This patch removes an unneeded do while loop which
sends a control message to bcm usb device. In this case,
the loop executes once because usRetries is
initialized to zero. After the first iteration
this variable will be 1. Therefore, the statement:
"usRetries < MAX_RDM_WRM_RETIRES" will evaluate to
false causing the do while statement to execute
once because MAX_RDM_WRM_RETIRES is equal to 1.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:23 -07:00
Kevin McKinney
7878626e14 Staging: bcm: Remove unneeded do while loop in InterfaceRDM.
This patch removes an unneeded do while loop which
sends a control message to bcm usb device. In this case,
the loop executes once because usRetries is
initialized to zero. After the first iteration
this variable will be 1. Therefore, the statement:
"usRetries < MAX_RDM_WRM_RETIRES" will evaluate to
false causing the do while statement to execute
once because MAX_RDM_WRM_RETIRES is equal to 1.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:23 -07:00
Kevin McKinney
f637035c68 Staging: bcm: Rename VOID to void in InterfaceMisc.c
This patch renames uppercase VOID to
void in InterfaceMisc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:23 -07:00
Kevin McKinney
de3615f46c Staging: bcm: Change the style of comparing structures to null in InterfaceMisc.c.
This patch changes the style of comparing
structures to null. Instead of this:
"if (foo == NULL) {" or "if (foo != NULL) {",
the new logic uses: "if (!foo) {" or
"if (foo) {".

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:23 -07:00
Kevin McKinney
5f997ee89a Staging: bcm: Rename PVOID to void * in InterfaceMisc.c
This patch renames uppercase PVOID to
"void *" in InterfaceMisc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:23 -07:00
Kevin McKinney
306a7acd2a Staging: bcm: Rename USHORT to unsigned short in InterfaceMisc.c
This patch renames uppercase USHORT to
unsigned short in InterfaceMisc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:22 -07:00
Kevin McKinney
021cbd755e Staging: bcm: Rename UINT to unsigned int in InterfaceMisc.c
This patch renames uppercase UINT to
unsigned int in InterfaceMisc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:22 -07:00
Kevin McKinney
ecbe90e143 Staging: bcm: Rename INT to int in InterfaceMisc.c
This patch renames uppercase INT to int
in InterfaceMisc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:42:22 -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
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
54ced00639 Staging: bcm: Fix coding style issues in InterfaceMisc.c
This patch cleans up several code style issues found
in InterfaceMisc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:58 -06:00
Dan Carpenter
f05321cca5 Staging: bcm: signedness bug in StoreSFParam()
wrm() returns negative error codes so "ret" needs to be signed here.
There was place where wrm() returned positive EACCES instead of
negative -EACCES so I fixed that as well.  Also a few checkpatch.pl
issues.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:31:50 -08:00
Stephen Hemminger
2d08748ae5 beceem: module initialization
Get rid of boot messages and put in correct place.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 12:14:01 -04:00
Stephen Hemminger
e614e28eac beceem: remove indirection to Adapter structure
Allocate Adapter structure as part of network device.

Signed-off-by: Stephen Hemminber <shemminger@vyatta.com>
2010-11-01 09:52:14 -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
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