summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm
Commit message (Collapse)AuthorAgeFilesLines
...
| * | beceem: fix character device ioctlStephen Hemminger2010-11-015-552/+282Star
| | | | | | | | | | | | | | | | | | | | | Sparse caught several places where ioctl interface was incorrectly using user memory. Fix all the ioctl cases for casting and __user annotation. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: fix printf format stringsStephen Hemminger2010-11-011-5/+5
| | | | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: reserve one queue for bit-bucketStephen Hemminger2010-11-012-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This preserves the semantics of the original driver (unclassified packets are dropped), but does it in a clean way; and fixes crash when packet is sent to offline device. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove dead codeStephen Hemminger2010-11-0115-822/+1Star
| | | | | | | | | | | | | | | | | | Remove commented out with '#if 0' Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: support multiple queuesStephen Hemminger2010-11-015-101/+72Star
| | | | | | | | | | | | | | | | | | | | | | | | Current kernels have multi-queue support which can be used by this device. This has the advantage that a single type of traffic will not block other types. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: get rid of unnecessary inline usageStephen Hemminger2010-11-015-44/+20Star
| | | | | | | | | | | | | | | | | | | | | Many routines were tagged with inline_ but GCC does a better job of deciding this. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: fold unregister_netdevice into AdapterFreeStephen Hemminger2010-11-013-12/+1Star
| | | | | | | | | | | | | | | | | | The function unregister_netdevice only called unregister_netdev. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove ARP spoofingStephen Hemminger2010-11-014-107/+7Star
| | | | | | | | | | | | | | | | | | | | | Linux support NOARP flag, so the whole Arp spoofing routines are not needed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: print better message on bad ioctlStephen Hemminger2010-11-011-4/+2Star
| | | | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove indirection to Adapter structureStephen Hemminger2010-11-018-77/+43Star
| | | | | | | | | | | | | | | | | | Allocate Adapter structure as part of network device. Signed-off-by: Stephen Hemminber <shemminger@vyatta.com>
| * | beceem: Add proper carrier and link managementStephen Hemminger2010-11-013-4/+2Star
| | | | | | | | | | | | | | | | | | | | | Start with carrier off. Don't track up/down status in driver private flag. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: reduce transmit queue lenStephen Hemminger2010-11-012-3/+3
| | | | | | | | | | | | | | | | | | Reduce transmit queue length to avoid excess buffering Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove dead codeStephen Hemminger2010-11-012-50/+0Star
| | | | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: add ethtool supportStephen Hemminger2010-11-011-1/+46
| | | | | | | | | | | | | | | | | | This adds basic ethtool support to get driver info and settings Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: make transmit thread interruptibleStephen Hemminger2010-11-011-134/+61Star
| | | | | | | | | | | | | | | | | | | | | Kernel complains loudly if thread does long uninterruptible sleep. Also, dont wake up every 10ms even if no data present (wastes power). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: name threads with device nameStephen Hemminger2010-11-011-2/+4
| | | | | | | | | | | | | | | | | | This is the convention used by Intel Wimax Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove OS wrapper libraryStephen Hemminger2010-11-0119-339/+180Star
| | | | | | | | | | | | | | | | | | Use native kernel functions for kmalloc/kfree directly Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: use kernel print_hex_dump functionStephen Hemminger2010-11-013-58/+8Star
| | | | | | | | | | | | | | | | | | No longer need special hex dump routine Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: cleanup network device setupStephen Hemminger2010-10-301-38/+35Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change how network device is setup: * set pointer to device object so sysfs has eth0/device symlink * set network device type * eliminate all the compatiablity with older kernels. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: get rid of OS dependent data structureStephen Hemminger2010-10-306-56/+23Star
| | | | | | | | | | | | | | | | | | | | | | | | The only part of this structure still used was the network device stats, and in recent kernel these are available in network device itself. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: eliminate dead codeStephen Hemminger2010-10-305-105/+0Star
| | | | | | | | | | | | | | | | | | Get rid of empty header file and unused declarations Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: eliminate network registered state variableStephen Hemminger2010-10-302-28/+7Star
| | | | | | | | | | | | | | | | | | Just use presence of pointer Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove bogus network device notifierStephen Hemminger2010-10-304-67/+1Star
| | | | | | | | | | | | | | | | | | | | | Network device should not be messing with refcounts directly. See Documentation/networking/netdevices.txt Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: cleanup debug level infrastructureStephen Hemminger2010-10-303-71/+61Star
| | | | | | | | | | | | | | | | | | | | | Add module parameter to control debug level and do code cleanup The whole debug stuff should eventually be removed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: eliminate unused USB stubsStephen Hemminger2010-10-301-13/+0Star
| | | | | | | | | | | | | | | | | | USB layer does not require these reset function stubs Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove version ifdef'sStephen Hemminger2010-10-301-30/+1Star
| | | | | | | | | | | | | | | | | | Remove code to support older kernel API's Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
| * | beceem: remove ifdef'sStephen Hemminger2010-10-3018-690/+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>
| * | beceem: add module informationStephen Hemminger2010-10-302-20/+18Star
| | | | | | | | | | | | | | | | | | | | | | | | Add description and version information to the driver. Make USB device table exported as alias so device will be autoloaded. Get rid of useless noise message on boot. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
* | | Merge branch 'usb-next' into musb-mergeGreg Kroah-Hartman2010-12-161-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * usb-next: (132 commits) USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added usb: gadget: f_ncm.c added usb: gadget: u_ether: prepare for NCM usb: pch_udc: Fix setup transfers with data out usb: pch_udc: Fix compile error, warnings and checkpatch warnings usb: add ab8500 usb transceiver driver USB: gadget: Implement runtime PM for MSM bus glue driver USB: gadget: Implement runtime PM for ci13xxx gadget USB: gadget: Add USB controller driver for MSM SoC USB: gadget: Introduce ci13xxx_udc_driver struct USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc USB: gadget: Separate out PCI bus code from ci13xxx_udc ...
| * | USB: fix leftover references to udev->autosuspend_delayAlan Stern2010-11-171-1/+1
| |/ | | | | | | | | | | | | | | | | This patch (as1436) takes care of leftover references to udev->autosuspend_delay that didn't get removed during the earlier conversion to the runtime-PM autosuspend API. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* / Staging: bcm: use get_user() to access user pointersDan Carpenter2010-11-091-17/+32
|/ | | | | | | | | | | | | | | | This fixes some places that dereference user pointers directly instead of using get_user(). Please especially check my changes to IOCTL_BCM_GET_CURRENT_STATUS. The original code modified the struct which "arg" was pointing to. I think this was a bug in the original code and that we only wanted to write to the OutputBuffer. Also with the original code you could read as much memory as you wanted so I had to put a cap on OutputLength. The only value of OutputLength that makes sense is sizeof(LINK_STATE) so now if OutputLength is not sizeof(LINK_STATE) it returns -EINVAL. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: fix up network device reference countingGreg Kroah-Hartman2010-10-281-6/+4Star
| | | | | | | | | | The way network devices are reference counted does not include poking around in the reference count itself. This breaks when the reference count is changed to be a different type. Fix the driver to do the proper function calls instead. Cc: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: silence off by one warningDan Carpenter2010-10-082-4/+2Star
| | | | | | | | | | | | "status" is used as an index into the Adapter->PackInfo[] array, which has NO_OF_QUEUES elements. This code actually works OK. The SearchSfid() function always returns a valid index or it returns NO_OF_QUEUES + 1. But it looks sloppy and it makes the static checkers complain. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: remove unneeded NULL checkDan Carpenter2010-10-081-5/+0Star
| | | | | | | | | | | | The error handling here is wrong. If psIntfAdapter were NULL then we would have a NULL dereference in the debug output on the error path. But this function is only called from usbbcm_device_probe() when psIntfAdapter is non-NULL. Since the check isn't needed and I removed it instead of fixing it. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: return -EFAULT on copy_to_user() errorsDan Carpenter2010-10-081-1/+2
| | | | | | | | 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>
* Staging: bcm: dereferencing before checkingDan Carpenter2010-10-081-6/+5Star
| | | | | | | | I moved the check to see if "Adapter" was null in front of the dereference. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: mocro expansion bugDan Carpenter2010-10-081-1/+1
| | | | | | | | | | | | | The WIMAX_MAX_MTU macro is used in drivers/staging/bcm/CmHost.c like this: if (Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize < WIMAX_MAX_MTU * 8) The multiplication by eight has precedence over the addition so the macro needs parenthesis to work. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: make major and minor signedDan Carpenter2010-10-081-2/+2
| | | | | | | We assume that major is signed in register_control_device_interface(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: return -EFAULT on copy_to_user() failuresDan Carpenter2010-10-081-24/+44
| | | | | | | | There were a number of places in the bcm_char_ioctl() which returned the number of bytes remaining to be copied instead of returning -EFAULT. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: bcm: Makefile: replace the use of <module>-objs with <module>-yTracey Dent2010-10-081-1/+1
| | | | | | | Changed <module>-objs to <module>-y in Makefile. Signed-off-by: Tracey Dent <tdent48227@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/bcm: add sparse annotationsArnd Bergmann2010-10-0519-161/+160Star
| | | | | | | | | | | | 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>
* staging/bcm: fix most build warningsArnd Bergmann2010-10-059-31/+32
| | | | | | | | | This removes all warnings I get on a 64 bit build except for those that look unfixable, where we convert a pointer to a 32 bit integer and change its byte order! Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: make new character devices nonseekableArnd Bergmann2010-10-052-0/+6
| | | | | | | | | | | | | As a preparation for changing the default behaviour of llseek to no_llseek, every file_operations structure should have a .llseek operation. There are three new instances in staging now, which can all be changed into no_llseek explicitly since the devices do not need to seek. Add nonseekable_open where appropriate, to prevent pread/pwrite as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Use static const char * const where possibleJoe Perches2010-09-161-2/+3
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/bcm: fix build for CONFIG_PM not enabledRandy Dunlap2010-09-161-0/+2
| | | | | | | | | Handle build case of CONFIG_PM not being enabled. drivers/staging/bcm/InterfaceInit.c:280: error: 'struct usb_device' has no member named 'autosuspend_delay' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/bcm: fix printk format warningsRandy Dunlap2010-09-162-12/+12
| | | | | | | | | | | | | | Fix lots of printk format warnings in bcm. Here is a sample of them: drivers/staging/bcm/CmHost.c:1955: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int' drivers/staging/bcm/CmHost.c:1955: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int' drivers/staging/bcm/CmHost.c:1955: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int' drivers/staging/bcm/LeakyBucket.c:85: warning: format '%d' expects type 'int', but argument 4 has type 'long int' drivers/staging/bcm/LeakyBucket.c:85: warning: format '%d' expects type 'int', but argument 3 has type 'long int' drivers/staging/bcm/LeakyBucket.c:85: warning: format '%d' expects type 'int', but argument 4 has type 'long int' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Beeceem USB Wimax driverStephen Hemminger2010-09-0961-0/+27603
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>