aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-11-01beceem: module initializationStephen Hemminger5-154/+75
Get rid of boot messages and put in correct place. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: add network device message level controlStephen Hemminger5-31/+67
Provide standard interface to control verbosity of debug messages Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: change format of debug messageStephen Hemminger1-2/+2
Statistic point is now u32 (like it has to be). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: clean up adapter structureStephen Hemminger1-29/+25
Remove dead fields, change fields that only have true/false to boolean; and rearrange to save space. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: create class on module installationStephen Hemminger2-48/+28
First step to supporting multiple devices, create device class when module is initialized. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: convert to kernel coding styleStephen Hemminger1-30/+27
Change indentation etc, to conform to acceptable kernel style Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove useless debug function entry messagesStephen Hemminger1-4/+0
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove problematic debug print messagesStephen Hemminger1-7/+0
Not worth bothering to change printf format of messages which are basically noise. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove unnecessary usb classStephen Hemminger2-63/+2
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: fix character device ioctlStephen Hemminger5-552/+282
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>
2010-11-01beceem: fix printf format stringsStephen Hemminger1-5/+5
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: reserve one queue for bit-bucketStephen Hemminger2-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>
2010-11-01beceem: remove dead codeStephen Hemminger15-822/+1
Remove commented out with '#if 0' Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: support multiple queuesStephen Hemminger5-101/+72
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>
2010-11-01beceem: get rid of unnecessary inline usageStephen Hemminger5-44/+20
Many routines were tagged with inline_ but GCC does a better job of deciding this. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: fold unregister_netdevice into AdapterFreeStephen Hemminger3-12/+1
The function unregister_netdevice only called unregister_netdev. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove ARP spoofingStephen Hemminger4-107/+7
Linux support NOARP flag, so the whole Arp spoofing routines are not needed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: print better message on bad ioctlStephen Hemminger1-4/+2
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove indirection to Adapter structureStephen Hemminger8-77/+43
Allocate Adapter structure as part of network device. Signed-off-by: Stephen Hemminber <shemminger@vyatta.com>
2010-11-01beceem: Add proper carrier and link managementStephen Hemminger3-4/+2
Start with carrier off. Don't track up/down status in driver private flag. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: reduce transmit queue lenStephen Hemminger2-3/+3
Reduce transmit queue length to avoid excess buffering Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove dead codeStephen Hemminger2-50/+0
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: add ethtool supportStephen Hemminger1-1/+46
This adds basic ethtool support to get driver info and settings Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: make transmit thread interruptibleStephen Hemminger1-134/+61
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>
2010-11-01beceem: name threads with device nameStephen Hemminger1-2/+4
This is the convention used by Intel Wimax Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove OS wrapper libraryStephen Hemminger19-339/+180
Use native kernel functions for kmalloc/kfree directly Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: use kernel print_hex_dump functionStephen Hemminger3-58/+8
No longer need special hex dump routine Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29beceem: cleanup network device setupStephen Hemminger1-38/+35
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>
2010-10-29beceem: get rid of OS dependent data structureStephen Hemminger6-56/+23
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>
2010-10-29beceem: eliminate dead codeStephen Hemminger5-105/+0
Get rid of empty header file and unused declarations Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29beceem: eliminate network registered state variableStephen Hemminger2-28/+7
Just use presence of pointer Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29beceem: remove bogus network device notifierStephen Hemminger4-67/+1
Network device should not be messing with refcounts directly. See Documentation/networking/netdevices.txt Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29beceem: cleanup debug level infrastructureStephen Hemminger3-71/+61
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>
2010-10-29beceem: eliminate unused USB stubsStephen Hemminger1-13/+0
USB layer does not require these reset function stubs Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29beceem: remove version ifdef'sStephen Hemminger1-30/+1
Remove code to support older kernel API's Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29beceem: remove ifdef'sStephen Hemminger18-690/+0
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-29beceem: add module informationStephen Hemminger2-20/+18
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>
2010-10-28Staging: bcm: fix up network device reference countingGreg Kroah-Hartman1-6/+4
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>
2010-10-08Staging: bcm: silence off by one warningDan Carpenter2-4/+2
"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>
2010-10-08Staging: bcm: remove unneeded NULL checkDan Carpenter1-5/+0
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>
2010-10-08Staging: bcm: return -EFAULT on copy_to_user() errorsDan Carpenter1-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>
2010-10-08Staging: bcm: dereferencing before checkingDan Carpenter1-6/+5
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>
2010-10-08Staging: bcm: mocro expansion bugDan Carpenter1-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>
2010-10-08Staging: bcm: make major and minor signedDan Carpenter1-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>
2010-10-08Staging: bcm: return -EFAULT on copy_to_user() failuresDan Carpenter1-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>
2010-10-08Staging: bcm: Makefile: replace the use of <module>-objs with <module>-yTracey Dent1-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>
2010-10-05staging/bcm: add sparse annotationsArnd Bergmann19-161/+160
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-05staging/bcm: fix most build warningsArnd Bergmann9-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>
2010-10-05staging: make new character devices nonseekableArnd Bergmann2-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>
2010-09-16staging: Use static const char * const where possibleJoe Perches1-2/+3
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>