Use namespace tool from kernel scripts to identify dead code and
functions that should be static.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Eliminate global variable in transmit path
The Leader can be on the stack, and get rid of unnecessary timeval.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
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>
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>
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>
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>
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>
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>
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>
Network device should not be messing with refcounts directly.
See Documentation/networking/netdevices.txt
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
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>
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>
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>
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>
"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>
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>
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>
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>
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>
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>