-
Notifications
You must be signed in to change notification settings - Fork 32
[Task] Compute MediaType for wireless ifaces in Device Information TLV #1060
[Task] Compute MediaType for wireless ifaces in Device Information TLV #1060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
agent/src/beerocks/slave/backhaul_manager/backhaul_manager_thread.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
.
agent/src/beerocks/slave/backhaul_manager/backhaul_manager_thread.cpp
Outdated
Show resolved
Hide resolved
agent/src/beerocks/slave/backhaul_manager/backhaul_manager_thread.cpp
Outdated
Show resolved
Hide resolved
752ad5d
to
ba1d2b1
Compare
9a2de3a
to
8d2f1b9
Compare
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]>
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]>
8d2f1b9
to
e6cd537
Compare
Compute MediaType for wireless ifaces in Device Information TLV of Topology Response message.