summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm/InterfaceMisc.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: bcm: add missing blank lines after declarationsPawel Lebioda2014-07-091-0/+1
| | | | | | | | 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>
* Staging: bcm: InterfaceMisc.c: Outsourced doubled error checkingMatthias Beyer2014-07-091-38/+31Star
| | | | | Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: bcm: Shortened linesMatthias Beyer2014-07-091-31/+67
| | | | | | | | | | | 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>
* staging: bcm: Replace FALSE with falseLisa Nguyen2013-10-281-4/+4
| | | | | | | 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>
* staging: bcm: InterfaceMisc.c: fixed styling issue in casting (foo*)->(foo *)Avinash Kumar2013-09-171-1/+1
| | | | | | | 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>
* Staging: bcm: Remove typedef for _S_INTERFACE_ADAPTER and call directly.Kevin McKinney2012-11-021-8/+8
| | | | | | | | | | | | 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>
* Staging: bcm: Remove null dereference from InterfaceWRM.Kevin McKinney2012-10-191-3/+1Star
| | | | | | | | | 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>
* Staging: bcm: Remove null dereference from InterfaceRDM.Kevin McKinney2012-10-191-3/+1Star
| | | | | | | | | 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>
* Staging: bcm: Remove unneeded do while loop in InterfaceWRM.Kevin McKinney2012-10-191-19/+12Star
| | | | | | | | | | | | | | 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>
* Staging: bcm: Remove unneeded do while loop in InterfaceRDM.Kevin McKinney2012-10-191-19/+12Star
| | | | | | | | | | | | | | 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>
* Staging: bcm: Rename VOID to void in InterfaceMisc.cKevin McKinney2012-10-191-2/+2
| | | | | | | | 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>
* Staging: bcm: Change the style of comparing structures to null in ↵Kevin McKinney2012-10-191-3/+3
| | | | | | | | | | | | | 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>
* Staging: bcm: Rename PVOID to void * in InterfaceMisc.cKevin McKinney2012-10-191-6/+6
| | | | | | | | 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>
* Staging: bcm: Rename USHORT to unsigned short in InterfaceMisc.cKevin McKinney2012-10-191-2/+2
| | | | | | | | 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>
* Staging: bcm: Rename UINT to unsigned int in InterfaceMisc.cKevin McKinney2012-10-191-5/+5
| | | | | | | | 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>
* Staging: bcm: Rename INT to int in InterfaceMisc.cKevin McKinney2012-10-191-10/+10
| | | | | | | | 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>
* Staging: bcm: Remove typedef for _MINI_ADAPTER and call directly.Kevin McKinney2012-06-051-1/+1
| | | | | | | | | | | 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>
* Staging: bcm: Fix information leak in ioctl: ↵Kevin McKinney2011-11-271-13/+11Star
| | | | | | | | | | | | | | | | | | | | | 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>
* Staging: bcm: Fix coding style issues in InterfaceMisc.cKevin McKinney2011-10-111-166/+138Star
| | | | | | | | 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>
* Staging: bcm: signedness bug in StoreSFParam()Dan Carpenter2010-11-161-1/+1
| | | | | | | | | | 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>
* beceem: module initializationStephen Hemminger2010-11-011-13/+1Star
| | | | | | Get rid of boot messages and put in correct place. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
* beceem: remove indirection to Adapter structureStephen Hemminger2010-11-011-11/+0Star
| | | | | | Allocate Adapter structure as part of network device. Signed-off-by: Stephen Hemminber <shemminger@vyatta.com>
* beceem: remove ifdef'sStephen Hemminger2010-10-301-2/+0Star
| | | | | | | | 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>
* staging: Beeceem USB Wimax driverStephen Hemminger2010-09-091-0/+290
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>