-
Notifications
You must be signed in to change notification settings - Fork 32
Send standard NL80211 commands using DWPAL #782
Comments
Answer is that it is OK to add implementation in DWPAL. Once it is there, we should port it back to Intel so we can get it in the next prplWrt upgrade. |
@mariomaz please implement what you need to support this in DWPAL, create a PR to our gitlab fork which updates dwpal_6x-uci-1.0.0.1.tar.bz2 in https://git.prpl.dev/prplmesh/iwlwav/blob/iwlwav-19.07/dl/dwpal_6x-uci-1.0.0.1.tar.bz2 and https://git.prpl.dev/prplmesh/iwlwav/blob/iwlwav-19.07/dwpal-6x-uci/Makefile. |
@mariomaz you are using an older dwpal version than INTEL's repositories so apparently you would need to implement it. dwpal_driver_nl_msg_get() already supports non-vendor commands. I checked the code and you can use NL80211_CMD_GET_SCAN implementation as reference (see dwpal_driver_nl_scan_dump). you have 2 options:
|
This is a summary of the work done so far regarding this issue. After reviewing the code of DWPAL and exploring different alternatives to include support for standard NL80211 commands into DWPAL, there exist reasonable doubts about the suitability of this approach. To overcome drawbacks found, another solution is proposed that does not involve the modification of DWPAL. The final goal is to obtain capabilities and metrics from a WiFi interface. To accomplish this task, NL80211_CMD_GET_WIPHY and NL80211_CMD_GET_STATION commands must be used. Provided solution should be easily extendable to send other standard NL80211 commands in the future. First of all we tried to send these commands using function base_wlan_hal_dwpal::dwpal_nl_cmd_get() in BWL, which in turn calls dwpal_driver_nl_cmd_send() in DWPAL. However, currently DWPAL supports NL80211_CMD_VENDOR only and thus it had to be extended to support standard commands too. Two options were suggested by Alex Kanter to add support for standard commands to DWPAL:
Drawbacks of option 1:
Drawbacks of option 2:
Drawbacks of options 1 and 2:
Even if there were no drawbacks, if support for standard commands was added to DWPAL, then such support would be available to the DWPAL version of BWL only (i.e.: RAX40). Such support should then be added to the NL80211 version of BWL too, ending up with duplicated code. Support for every new command from now on should be added twice. And worst of all: DWPAL is out of the prplMesh GIT repository. Because we need support for standard NL80211 commands, that support can be added out of DWPAL so it will be available to all devices. Moreover, we already have one implementation to start with and it is C++ (see base_wlan_hal_nl80211::send_nl80211_msg). We could move it to a common place like BWL and use it from wherever is needed. We could create a netlink_socket base class and a nl80211_socket derived class, so we could support other netlink commands too (apart from nl80211). Note: while reviewing DWPAL code, some other bugs and nitpicks where found:
should be replaced with
Such code pattern is repeated in several places in dwpal_cli.
|
It has finally been decided that we should not implement support for the generic nl80211 commands in DWPAL, so this issue is being closed. |
See "Feature/add support for nl80211 standard commands to BWL #900" |
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the Topology Response message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the Topology Response message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the Topology Response message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the Topology Response message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
We need support for nl80211 standard commands for things such as obtaining link metrics or device capabilities. In "Send standard NL80211 commands using DWPAL #782" we firstly evaluated the convenience of adding such support in DWPAL and then in BWL. As a result of such evaluation we concluded that DWPAL was not the most suitable place to add such support. Reason is that NL80211 standard commands are not exclusive of devices where DWPAL is used and support is also required for other flavors of the BWL library. Then we decided to add support for standard commands into the BWL library, but shared to all flavors, not only for the DWPAL version. A proposal was made to include support for NL80211 standard commands in the NL80211 classes, then derive BWL DWPAL from BWL NL80211 and override everything except the standard commands. This proposal was not finally implemented to "favor composition instead of inheritance". Instead of inheritance, a nl8011_client interface and a factory for objects of classes implementing such interface have been defined. BWL DWPAL, BWL nl80211 and whatever other part of the application can all be users of the nl80211_client factory, create an instance of a class implementing the nl80211_client interface and use it to send NL80211 standard commands. Although I prefer to inject the dependencies to facilitate unit-testing (if we ever had to), so most probably BWL DWPAL and BWL nl80211 classes that send NL80211 standard commands will have a nl80211_client parameter in their constructor instead of calling the factory. Another goal of this design is that it can be easily extended to send NETLINK_ROUTE commands (probably with a netlink_route_client). Maybe we should move all these classes from BWL to BPL because they are not intended for WiFi only. Created C++ wrappers around libnl and libnl-genl to facilitate sending NL80211 commands through a NL80211 netlink socket. Classes have been created in bwl/shared so NL80211 standard commands will be available to all flavours of the BWL library (except the Dummy one). Public include files have been created in bwl/include. Created a C++ interface with the list of commands available. Create two implementations, one to actually send those commands to the WiFi driver and a fake one for the Dummy implementation of the BWL library. Created a factory class in each BWL implementation to create instances of the NL80211 client. This factory will be used both from within the BWL library or from outside. Add NL80211_CMD_GET_STATION command implementation as an example of how standard commands are to be implemented. Once this design had been validated, the rest of standard commands will be added. Also we will do a code refactoring to use the new classes and eliminate duplicated code. Signed-off-by: Mario Maz <[email protected]>
We need support for nl80211 standard commands for things such as obtaining link metrics or device capabilities. In "Send standard NL80211 commands using DWPAL #782" we firstly evaluated the convenience of adding such support in DWPAL and then in BWL. As a result of such evaluation we concluded that DWPAL was not the most suitable place to add such support. Reason is that NL80211 standard commands are not exclusive of devices where DWPAL is used and support is also required for other flavors of the BWL library. Then we decided to add support for standard commands into the BWL library, but shared to all flavors, not only for the DWPAL version. A proposal was made to include support for NL80211 standard commands in the NL80211 classes, then derive BWL DWPAL from BWL NL80211 and override everything except the standard commands. This proposal was not finally implemented to "favor composition instead of inheritance". Instead of inheritance, a nl8011_client interface and a factory for objects of classes implementing such interface have been defined. BWL DWPAL, BWL nl80211 and whatever other part of the application can all be users of the nl80211_client factory, create an instance of a class implementing the nl80211_client interface and use it to send NL80211 standard commands. Although I prefer to inject the dependencies to facilitate unit-testing (if we ever had to), so most probably BWL DWPAL and BWL nl80211 classes that send NL80211 standard commands will have a nl80211_client parameter in their constructor instead of calling the factory. Another goal of this design is that it can be easily extended to send NETLINK_ROUTE commands (probably with a netlink_route_client). Maybe we should move all these classes from BWL to BPL because they are not intended for WiFi only. Created C++ wrappers around libnl and libnl-genl to facilitate sending NL80211 commands through a NL80211 netlink socket. Classes have been created in bwl/shared so NL80211 standard commands will be available to all flavours of the BWL library (except the Dummy one). Public include files have been created in bwl/include. Created a C++ interface with the list of commands available. Create two implementations, one to actually send those commands to the WiFi driver and a fake one for the Dummy implementation of the BWL library. Created a factory class in each BWL implementation to create instances of the NL80211 client. This factory will be used both from within the BWL library or from outside. Add NL80211_CMD_GET_STATION command implementation as an example of how standard commands are to be implemented. Once this design had been validated, the rest of standard commands will be added. Also we will do a code refactoring to use the new classes and eliminate duplicated code. Signed-off-by: Mario Maz <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the TOPOLOGY RESPONSE message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
We need support for nl80211 standard commands for things such as obtaining link metrics or device capabilities. In "Send standard NL80211 commands using DWPAL #782" we firstly evaluated the convenience of adding such support in DWPAL and then in BWL. As a result of such evaluation we concluded that DWPAL was not the most suitable place to add such support. Reason is that NL80211 standard commands are not exclusive of devices where DWPAL is used and support is also required for other flavors of the BWL library. Then we decided to add support for standard commands into the BWL library, but shared to all flavors, not only for the DWPAL version. A proposal was made to include support for NL80211 standard commands in the NL80211 classes, then derive BWL DWPAL from BWL NL80211 and override everything except the standard commands. This proposal was not finally implemented to "favor composition instead of inheritance". Instead of inheritance, a nl8011_client interface and a factory for objects of classes implementing such interface have been defined. BWL DWPAL, BWL nl80211 and whatever other part of the application can all be users of the nl80211_client factory, create an instance of a class implementing the nl80211_client interface and use it to send NL80211 standard commands. Although I prefer to inject the dependencies to facilitate unit-testing (if we ever had to), so most probably BWL DWPAL and BWL nl80211 classes that send NL80211 standard commands will have a nl80211_client parameter in their constructor instead of calling the factory. Another goal of this design is that it can be easily extended to send NETLINK_ROUTE commands (probably with a netlink_route_client). Maybe we should move all these classes from BWL to BPL because they are not intended for WiFi only. Created C++ wrappers around libnl and libnl-genl to facilitate sending NL80211 commands through a NL80211 netlink socket. Classes have been created in bwl/shared so NL80211 standard commands will be available to all flavours of the BWL library (except the Dummy one). Public include files have been created in bwl/include. Created a C++ interface with the list of commands available. Create two implementations, one to actually send those commands to the WiFi driver and a fake one for the Dummy implementation of the BWL library. Created a factory class in each BWL implementation to create instances of the NL80211 client. This factory will be used both from within the BWL library or from outside. Add NL80211_CMD_GET_STATION command implementation as an example of how standard commands are to be implemented. Once this design had been validated, the rest of standard commands will be added. Also we will do a code refactoring to use the new classes and eliminate duplicated code. Signed-off-by: Mario Maz <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the TOPOLOGY RESPONSE message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the TOPOLOGY RESPONSE message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the TOPOLOGY RESPONSE message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the TOPOLOGY RESPONSE message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the TOPOLOGY RESPONSE message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
The controller needs to be able to add and remove the radio node from its database based on the data that is coming from the TOPOLOGY RESPONSE message. Add dummy data on the wireless fronthaul interfaces in the tlvDeviceInformation which is in the Topology Response message. The reason that it is dummy values is that this is something that cannot be done at this moment because the MediaType field must be computed with information obtained through NL80211_CMD_GET_WIPHY command of DWPAL, which is currently not supported. See "Send standard NL80211 commands using DWPAL #782 The filled band data is based on the information we have about the band but it is not accurate. The fields ap_channel_bandwidth, ap_channel_center_frequency_index1 and ap_channel_center_frequency_index2 we could get (the bw for sure, the others not so sure), but it not worth it since it will require to create more internal messaging which will be deleted after moving to a unified Agent (#435). Signed-off-by: Moran Shoeg <[email protected]>
From the description of the problem by @mariomaz :
In order to obtain AP VT/VHT/HE capabilities using Netlink and DWPAL we should be sending command NL80211_CMD_GET_WIPHY (as in ap_wlan_hal_nl80211::read_supported_channels).
However, this is something we cannot do as method base_wlan_hal_dwpal::dwpal_nl_cmd_get can be used to send NL80211_CMD_VENDOR command only. This method is internally calling dwpal_driver_nl_cmd_send(), using NL80211_CMD_VENDOR and given sub-command. We should then create another but similar method to call dwpal_driver_nl_cmd_send() with NL80211_CMD_GET_WIPHY instead. However, dwpal_driver_nl_cmd_send() implementation in prplWrt only supports NL80211_CMD_VENDOR command:
The text was updated successfully, but these errors were encountered: