Skip to content

drivers: wifi: siwx91x: Add support for link mode query #93253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion drivers/wifi/siwx91x/siwx91x_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ int siwx91x_status(const struct device *dev, struct wifi_iface_status *status)
if (FIELD_GET(SIWX91X_INTERFACE_MASK, interface) == SL_WIFI_CLIENT_INTERFACE) {
sl_wifi_operational_statistics_t operational_statistics = { };

status->link_mode = WIFI_LINK_MODE_UNKNOWN;
/* The Wiseconnect wireless_mode values match the values expected by
* Zephyr's link_mode, even though the enum type differs.
*/
status->link_mode = wlan_info.wireless_mode;
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you need to convert the value? If by chance the values used by Wiseconnect and by Zephyr are the same, you need to mention that in a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the values are the same. I'll add a comment.
Also, should it be explicitly typecasted?

status->iface_mode = WIFI_MODE_INFRA;
status->channel = wlan_info.channel_number;
status->twt_capable = true;
Expand Down
Loading