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

[Task] Compute MediaType for wireless ifaces in Device Information TLV #1060

Conversation

mariomaz
Copy link
Collaborator

Compute MediaType for wireless ifaces in Device Information TLV of Topology Response message.

Copy link
Collaborator

@rmelotte rmelotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

@tomereli tomereli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One major comment - reading radio info should only be done by the BWL backend. We read from hostapd whatever we can, and supplement what's missing with the nl80211_client.
It makes the code easier to maintain and allows us to completely remove the dummy implmentation for the nl80211_client which I think is redundant now that we have the nl80211_client member in the BWL backend base class .

So, I suggest to update refresh_radio_info to read the missing values using the nl80211_client and use it eventually in the backhaul manager by parsing the m_radio_info_map.

@mariomaz mariomaz force-pushed the feature/compute-media-type-for-wireless-ifaces-in_device-information-tlv branch from 752ad5d to ba1d2b1 Compare April 3, 2020 17:50
@mariomaz mariomaz force-pushed the feature/compute-media-type-for-wireless-ifaces-in_device-information-tlv branch 2 times, most recently from 9a2de3a to 8d2f1b9 Compare April 6, 2020 09:34
@mariomaz mariomaz added the ready for merge PR is ready to be merged (automatically) label Apr 6, 2020
mariomaz added 10 commits April 6, 2020 12:28
Compiling autogenerated code fails if there is a field of an enum type
from a different namespace. Reason is namespace is being trimmed off
when computing enum size.

To fix the problem, call sizeof() with fully qualified type name.

Signed-off-by: Mario Maz <[email protected]>
Add new fields frequency_band and max_bandwidth to struct sNodeHostap
so they can be sent from ap_manager_thread to slave_thread inside
ACTION_APMANAGER_JOINED_NOTIFICATION.

Add those fields to message cACTION_BACKHAUL_ENABLE too so they can be
sent from slave_thread to backhaul_manager.

backhaul_manager stores those fields into m_radio_info_map to later
compute MediaType as per IEEE Std 1905.1, Table 6-12—Media type
(intfType).

Signed-off-by: Mario Maz <[email protected]>
IEEE 802.11ax is not included in Table 6-12—Media type (intfType) in
the IEEE 1905.1a standard.

WiFi6 is specified to use 0x0108 in R2

Signed-off-by: Mario Maz <[email protected]>
Add method to compute maximum supported bandwidth by all the channels
in the band.

This value is required to compute MediaType.

Signed-off-by: Mario Maz <[email protected]>
Add new fields frequency band and maximum supported bandwidth to
RadioInfo struct.

Use nl80211_client::get_radio_info() to fill in the values for such
new fields when getting radio info.

Signed-off-by: Mario Maz <[email protected]>
…ager

Reading radio info should only be done by the BWL backend. We read from
hostapd whatever we can, and supplement what's missing with the
nl80211_client.

Backhaul manager needs frequency band and max bandwidth values to
compute MediaType. These values must be sent from ap_manager_thread to
slave_thread inside cACTION_APMANAGER_JOINED_NOTIFICATION and then to
backhaul_manager inside cACTION_BACKHAUL_ENABLE where are saved into
m_radio_info_map.

Signed-off-by: Mario Maz <[email protected]>
Complete the get_media_type() method to compute MediaType field for
IEEE_802_11 interfaces, according to Table 6-12—Media type (intfType)
found in IEEE 1905.1 standard.

Signed-off-by: Mario Maz <[email protected]>
…nformation TLV

Use get_media_type() method to compute the MediaType field for wireless
interfaces included in the DeviceInformation TLV of the Topology
Response message.

Signed-off-by: Mario Maz <[email protected]>
eMediaTypeGroup is defined as the MSB of the eMediaType, according to
Table 6-12—Media type (intfType) found in IEEE 1905.1a standard.

Instead of using minimum and maximum values of eMediaType to check for
wireless interfaces, use the value of eMediaTypeGroup.

Resulting code is easier to maintain and while we are at it, we also
include the newly created IEEE_802_11AX value.

Signed-off-by: Mario Maz <[email protected]>
@mariomaz mariomaz force-pushed the feature/compute-media-type-for-wireless-ifaces-in_device-information-tlv branch from 8d2f1b9 to e6cd537 Compare April 6, 2020 10:28
@mergify mergify bot merged commit 244c14a into master Apr 6, 2020
@mergify mergify bot deleted the feature/compute-media-type-for-wireless-ifaces-in_device-information-tlv branch April 6, 2020 10:43
@mergify mergify bot removed the ready for merge PR is ready to be merged (automatically) label Apr 6, 2020
@mariomaz mariomaz linked an issue Apr 8, 2020 that may be closed by this pull request
2 tasks
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.

[TASK] Add Device Information TLV to Topology Response message
3 participants