Switching to UINT because that's what the rest of this codebase uses.
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Change the regsister/unregister routines to generate better
messages, and control arrival of new frames when USB device is
unplugged.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Serious bug in original code, if app reads 10 bytes but 20 byte msg
received memory would get overwritten.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Use standard network statistics variables and routines.
Transmit counters are per queue, and skb mapping is already in
skb and does not need to be recomputed. Move SearchVcId to only
place it is used.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Since classification and queue control are separate, allow
classification even if device is down now; this avoids races
on startup/shutdown.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
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>