| Commit message (Collapse) | Author | Age |
|
|
|
| |
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>
|
|
|
|
| |
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>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
They make it harder to check correctness of MIB requests. For instance,
STATION_ID_OFFSET doesn't show that it's an offset in struct
mib_mac_mgmt, so it's not obvious if priv->mib_buf.type is set to
MIB_MAC_MGMT correctly.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
Don't assume that there are just two settings, "long" and "short".
Provide textual description in the output of "iwpriv get_preamble" in
the same format as in ipw2100 and ipw2200.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
Rename all iwpriv calls to start with "get" or "set" for consistency.
Eliminate gap in the ioctl numbers.
Rename "intl_roaming" to "intl_scan", because it's really affects
scanning only.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Never use __FILE__, as it prints full path to the driver, which is
rarely needed. Use DRIVER_NAME instead.
Replace all occurrences of info() with printk() calls. Ensure that the
messages are properly formatted and use the netdevice name if possible.
Print MAC address, firmware version and regulatory domain after the
device is registered, so we can provide the device name.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Calculate the pipe numbers on startup and keep them in at76_priv instead
of keeping the endpoint numbers. Pipe numbers don't change.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use rotating buffer pool in mac2str() and hex2str(). This makes it
unnecessary to allocate any buffers for either function, and also allows
to use mac2str() more than once in the same expression. Move mac2str()
and hex2str() closer together.
Replace hex2str() with mac2str() where appropriate. For other hex2str()
calls, always use "-" separator to improve readability. Check buffer
length in hex2str().
Reformat some expressions along the way.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Scheduling is done in process context, so it can be avoided. Merge
at76_work_start_ibss() into at76_start_ibss().
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
| |
This reduces driver's dependency on USB internals.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move all firmware related data from struct at76_priv to struct fwentry.
Move struct fwentry to the header file. Share the firmware data between
devices.
Never load firmware version or anything else into firmwares[], as one
broken device can mess it for others. Use temporary structures instead.
Change at76_load_internal_fw() and at76_load_external_fw() not to
require struct at76_priv, which is allocated as part of the network
device. at76_disconnect() should check if priv is allocated.
Don't use priv->istate to track the firmware loading, as it's done in a
predictable consecutive manner now. No state machine is needed at this
point. There should be no priv at all before the firmware is loaded.
Until the device is fully initialized, priv->istate should be INIT.
Don't use mutexes during firmware download for the same reason. In
fact, they were used incorrectly since priv is not the same during
internal and external firmware download.
Parse firmware immediately after loading in a new function
at76_load_firmware() replacing at76_parse_fw() and parts of
at76_probe().
Don't access udev before usb_get_dev() is called and be careful to call
usb_put_dev() for all errors.
Improve error handling and diagnostics in the affected code.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
This should be implemented by the userspace. No other Linux driver does
that. The expected behavior is that the driver stays on the same
channel while in monitor mode.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
| |
While at that, improve the affected comments.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
at76_start_scan was both a function and a structure. Use "req" in the
structure names to indicate that they are requests.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Timers are justified if they are scheduled in the interrupt context or
if they are modified. Neither is the case.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
| |
at76_probe() is run in the process context and doesn't need to delay the
firmware download. Rescheduling doesn't guarantee the execution order,
so it's better to make the order predictable. It also makes it possible
to handle errors in the firmware download.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
| |
Semaphores are overkill for simple locking.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a structure to describe the firmware header. Don't pass any
arguments fpr output, just pass the pointer to the private data. Move
some debugging output there to avoid code duplication.
Parse firmware even if it doesn't need to be loaded. Keep firmware
version information in the private data. It's still re-read from the
card, but now we have a valid version earlier.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Mark all of them as const and remove the size from hw_rates.
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
| |
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
|
| |
at76_defer_event() is too large and unmanageable. Use separate work
queues for every task. This is a formal split with minimal formating
and comment changes. Many layers of indirection can and should be
eliminated later. Timers should be combined into delayed works.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
|
| |
Remove support for bare 802.11 and prism headers. Remove private ioctl
"monitor", it's obsolete. Only provide data available for the specific
packet. Don't pass any average stats.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
It's not supported in the hardware, so it shouldn't be in the software.
It's not a feature required for Linux inclusion.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
|
|
|
|
|
|
| |
Don't rely on the order of fields. Specify indices explicitly. Use
shorter names for the handlers and for corresponding ioctl numbers.
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>
|
|
|
|
| |
this allows us to get rid of dbg_uc() and #undef dbg
|
|
|
|
| |
AT76C503 macros
|
|
|
|
|
|
|
|
|
|
| |
* rename PM_* constants
* drop superflous parameter from set_pm_mode
* get rid of dev->pm_beacon_period
* reset pm_mode to off in ad-hoc and monitor mode (actually allow to turn of PM at all)
* set pm capabilities in iw_handler_get_range()
* iw_handler_set_range(): reject timeouts values, they're unsupported
* drop pm_period and pm_mode module parameters
|
|
|
|
| |
at76c503a structure
|
|
|
|
| |
variables
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate all local definitions for management frames. Use Linux
structures instead. Use struct ieee80211_info_element for information
elements in management frames.
Use min_t() instead of min() in the affected code when casts are already
present or would be needed.
Signed-off-by: Pavel Roskin <proski@gnu.org>
|