Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

[BUG] bwl: missing channels when using nl80211_client::get_radio_info #1053

Merged
merged 2 commits into from
Apr 6, 2020

Conversation

mariomaz
Copy link
Collaborator

See #1046

mariomaz added 2 commits April 6, 2020 10:42
The radio_info struct returned by get_radio_info was not correct:
- The resulting array of supported channels contained a few incorrect
values.
- The channel list contains channels with irregular bandwidths (channel
36 with bandwidth 160 etc.).
- And some of the channels that should be supported were not stored in
the channel list.
- DFS channels are not present even though they are supported.

To fix the problem, NL80211_CMD_GET_WIPHY command has to be executed
with NLM_F_DUMP flag and NL80211_ATTR_SPLIT_WIPHY_DUMP flag attribute
has to be added to request message. This is the way `iw` command line
tool works. After these changes, response is returned as a series of
multipart messages.

Signed-off-by: Mario Maz <[email protected]>
Message handling function returns bool. It can return false, but that
does not necessarily mean that an error has occurred, specially when
message received is one of the parts in a series of multi part messages.
Anyway, there couldn't be much we can do in send_receive_msg on error.
Therefore, there is no need to check return value and log an error if
handling function returns false. It is the responsibility of the
handling function to deal with and log such errors.

Change type of msg_handle function from bool to void.

Remove error log messages when it is not actually an error condition.

Signed-off-by: Mario Maz <[email protected]>
@mariomaz mariomaz force-pushed the bugfix/nl80211_client_impl-get_radio_info branch from daa02ff to 29ecf8c Compare April 6, 2020 08:43
@mariomaz mariomaz added the ready for merge PR is ready to be merged (automatically) label Apr 6, 2020
@mergify mergify bot merged commit 9bd01d1 into master Apr 6, 2020
@mergify mergify bot deleted the bugfix/nl80211_client_impl-get_radio_info branch April 6, 2020 08:55
@mergify mergify bot removed the ready for merge PR is ready to be merged (automatically) label Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] bwl: missing channels when using nl80211_client::get_radio_info
3 participants