| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
| |
It's way too big for a comment and doesn't belong to the source code.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
Stop badmouthing the implementations and follow the standard for 802.3
frames. Make it clear that if the ethernet header already exists, it
was done by the local hardware (i.e. it's not an encapsulation method).
Use eth_type_trans() to set skb->protocol.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Use more standard definitions for ethernet frames. Fix peeking beyond
the end of skb for pathologically short frames.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
Don't use double space as separator. Don't print hex data without
leading "0x", except in data dumps and MAC addresses. Add spaces in
expressions.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
| |
"mgmt, but not beacon" is wrong, as we handle more than just beacons.
Print full framectl, and tell the user it's framectl, not a "frame from
mars".
Use KERN_DEBUG for both messages, as there are many weird frames on the
air, and we don't want to pollute the console unnecessarily.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Otherwise, two devices could try to load and parse the same firmware at
the same time.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Printing line number can be misleading. Limit it to the messages that
are not unique throughout the code.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
Move shorter branches on top if they handle an error or just exit for
whatever reason. This way, the longer branches are not indented and
there are no distracting blocks around that code.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
Change the interface name. It's ethX now, not wlanX. Update iwpriv
names. Remove the section about module parameters, since they are gone
(except "debug", but it's also on the way out). iwconfig requires
"power" twice on the command line to enable power management and set
listen interval at once.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
| |
It's done later, immediately before submission.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
Pass the urb as data to the tasklet instead of priv. Remove some
paranoid sanity checks in at76_rx_tasklet().
Rename at76_submit_rx_urb() to at76_submit_read_urb() to avoid
confusion.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
It looked scary even considering that it was a purely debugging
function.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove a dubious optimization in the rx path. For short (shorter than
rx_copybreak, 200 bytes by default) unfragmented packets, a new, shorter
skb would be allocated, and the data would be copied into it, allowing
the original skb to be recycled for another incoming packet.
For a good memory allocator, allocating an skb of any size should not
depend on the skb size as long at it remains shorter than a page. At
least, the difference would be comparable to the price of copying the
data.
It's also likely that the newly allocated full-sized skb would actually
use the memory left by consumption of the previous skb. Using variable
size skbs could increase memory fragmentation and time to find another
full-sized skb when it's finally needed.
And last but not least, correctness and maintainability of the driver is
more important than a marginal speed increase in the code, especially if
no waiting for hardware is involved. Having two ways to do one thing
increases complexity of the driver and the risk of breakage.
Avoiding the optimization also allows to share more code between the
fragmented and non-fragmented cases.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
It's more standard than __FUNCTION__. Also fix some cases when the
function name is hardcoded in the debug messages.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
Remove an obsolete comment for at76_init_new_device(). There is no way
it can be run before the firmware is loaded. Write better comments for
at76_init_new_device() and at76_init_new_device().
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Make sure that the USB device won't be removed before all timers and
scheduled works are canceled.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
They were used inconsistently. Besides, they don't make the code more
readable.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Rename some functions and variables so that the internal and the
external download don't look so different.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
GFP_DMA forces allocation in the first 16M of memory, which is not
needed. USB buffers should be using GFP_KERNEL.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
All callers already ensure that onoff is equal to
priv->international_roaming, so the actual behavior is not affected.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
The site certificate on developer.berlios.de is self-signed, which
causes a browser warning. Plain http is just fine for publicly
available firmware.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
One reason is that it can be expected that some vendor kernels will
backport the Linux 2.6.22 skb API. Macros can safely mask the inline
functions used by the vendor kernel, whereas inline functions will
conflict and fail.
Another reason is that linux/skbuff.h doesn't need to be included from
compat.h anymore, which makes the compatibility code less intrusive.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is likely not the final approch, as the code handles several
different timeouts and may need to be split. Anyway, it would be easier
to split a single delayed work than a timer and a work.
When handling beacons, cancel the work first, as we want the timeout
handler to be deferred. The delayed workqueue API doesn't seem to
provide a nicer way to do it.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
| |
This function was missed earlier because it's always inlined.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Although that function is commented out, it would be better to make it
look like other functions. Remove "#if 1", it's confusing.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
It's more natural to use a common prefix, not suffix, for similar
functions.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
Try to make the code flow more linear. Handle easy cases early. This
avoids unnecessary identation and a complex tree structure of the code.
In at76_iw_handler_get_power(), an at76_dbg() call was supposed to cover
the "disabled" case but would not actually be called. Fix it.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
It's uncommon to see them in the kernel. Dereferencing a pointer has
priority over taking an address, and it's well known. Parentheses don't
make the code more readable if it looks differently from other drivers.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid multi-line comments before functions if a single line comment is
sufficient. Multi-line comments are better suited for larger blocks of
code.
Capitalize comments for functions. Remove some obsolete or wrong
comments.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
Decrease the delay to half second. It's enough to cover all requests
from one iwconfig command, and improves the response time.
Cancel the delayed work in at76_stop(). We don't need any restarts if
the interface is down.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
| |
An offset was substituted from a wrong macro.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Use min() where needed. Expand DFU_USB_SUCCESS. Rename "result" and
"status" to more traditional "ret".
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
There is no point in having that structure. Whatever was inside is
allocated and used individually now.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
Add "data" field to struct at76_command to avoid dubious code to access
data beyound the end of structure. Don't make handle 0-byte buffer as a
special case. Avoid extra indentation.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|