Age | Commit message (Collapse) | Author |
|
Some generic netlink commands, e.g. `HWSIM_CMD_NEW_RADIO` might reply with
a bogus netlink error message containing a positive error code, leading
to an infinite loop in `uc_nl_request()`.
Gracefully deal with such occurrences by remapping the error code to
`NLE_RANGE` with a custom message.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Support new attributes that describe multiple radios belonging to a single
wiphy.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
For newly added attributes, the kernel prefers to no longer add a nesting
container attribute. Instead, an attribute with the element type is simply
added multiple times within the outer container.
Add support for this array style, which will be used in the pending wiphy
multi radio support.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Only one place needs access to another attribute from the tb array
(HE MCS rates). In order to make that access possible, add a flag to indicate
a second attribute dependency via auxdata.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
- The expected length was incorrect
- An incorrect MCS MAP index was accessed
- The maximum MCS index number were wrong
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The length constraint of 16 byte was incorrect, the attribute is 8 bytes
long; two bytes for the RX MCS set, two bytes for the highest RX rate,
two bytes for the TX MCS set and two bytes for the highest TX rate.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The attributes are arrays of 6 and 11 u8 values respectively.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
When compiling with optimizations, gcc reports:
.../nl80211.c: In function ‘uc_nl_convert_rta_vht_mcs’:
.../nl80211.c:1310:31: error: ‘max_idx’ may be used uninitialized [-Werror=maybe-uninitialized]
1310 | for (j = 0; j <= max_idx; j++)
| ~~^~~~~~~~~~
Slightly refactor the code to avoid this issue.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Get rid of most __APPLE__ guards by introducing a central platform.c unit
providing drop-in replacements for missing APIs.
Also move system signal definitions into the new platform file to be able
to share them with the upcoming debug library.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Useful for adding/removing interfaces
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Arguments stored in the registry need an extra reference
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
This is the last attribute, adapt .nattr to include it so it gets
parsed.
Signed-off-by: Andre Heider <a.heider@gmail.com>
|
|
Can be used to capture nl80211 messages in an event driven program
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
- add missing overflow check
- make array size dynamic
- set all bits if command id is not specified
- add helper function for filling command bits
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
Report the noise value as signed integer to calling ucode.
Reported-by: John Crispin <john@phrozen.org>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Suggested-by: John Crispin <john@phrozen.org>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This avoid triggering -Werror=unused-result compilation failures with
certain toolchains.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Parse integer literals as unsigned numeric values in order to be able
to represent the entire unsigned 64bit value range
- Stop parsing minus-prefixed integer literals as negative numbers but
treat them as separate minus operator followed by a positive integer
instead
- Only store unsigned numeric constants in bytecode
- Rework numeric comparison logic to be able to handle full 64bit
unsigned integers
- If possible, yield unsigned 64 bit results for additions
- Simplify numeric value conversion API
- Compile code with -fwrapv for defined signed overflow semantics
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The nl_recvmsgs() logic in uc_nl_request() incorrectly stopped reading
the socket before the netlink ACK message was handled for non-multipart
replies.
This caused subsequent requests to incorrectly receive the ACK of the
previous request, leading to a failure to receive the actual reply.
Fix this issue by continue reading the socket until either the finish
callback for multipart (dump) messages or the ack callback for non-
multipart messages was received.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Extract the wiphy index from the response message and use it to select
the item to merge the fragment information into.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|