Skip to content
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

os/board/rtl8730e/src: update ip addr hook for pm #6631

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zhongnuo-tang
Copy link
Contributor

@zhongnuo-tang zhongnuo-tang commented Jan 16, 2025

This PR consists of two commits

  1. add debug log to print IPC dir and channel
  2. modify hook for PMU_WLAN_DEVICE to fix Host Unknown API(0)!

1. fix Host Unknown API(0)! error when CA32 PG is blocked by PMU_WLAN_DEVICE
2. busy-wait to ensure previous IPC request is handled before send another IPC request to update ip addr
3. only request to update ip addr when there is a changed in ip addr.
@zhongnuo-tang zhongnuo-tang changed the title os/board/rtl8730e/src: update ip addr update hook for pm os/board/rtl8730e/src: update ip addr hook for pm Jan 16, 2025

u8 *new_addr = LwIP_GetIP(0);
for (i = 0; i < 4; i++) {
if (inic_ipc_old_ip_addr[i] != new_addr[i]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use memcmp?

DCache_Invalidate((u32)&g_host_ipc_api_request_info, sizeof(inic_ipc_host_request_message));
if (g_host_ipc_api_request_info.API_ID != IPC_WIFI_API_PROCESS_DONE) {
rtw_mdelay_os(1);
cnt = (cnt + 1) % 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets define some macro instead of hardcoding values

DCache_Invalidate((u32)&g_host_ipc_api_request_info, sizeof(inic_ipc_host_request_message));
if (g_host_ipc_api_request_info.API_ID != IPC_WIFI_API_PROCESS_DONE) {
try_cnt --;
DelayUs(2);
Copy link
Contributor

Choose a reason for hiding this comment

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

Some are using Delayxxx, some are rtw_xxdelay_os, how about standardise those using same interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants