Skip to content

Commit

Permalink
os/board/rtl8730e: Modify TX retry count API
Browse files Browse the repository at this point in the history
- Modify implementation for obtaining WiFi TX Retry count
- Add a counter to break out from while loop to prevent stuck in infinite loop
  • Loading branch information
LiuZhuo-Realtek committed Feb 4, 2025
1 parent 2e8dd8e commit 67a966d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Binary file modified build/tools/amebasmart/gnu_utility/km0_km4_app.bin
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* == "version" + "Realtek git version" + "compile date" + "compile time" == */

== version f71f367333 2025/02/03-16:19:02 ==
1. Modify implementation for obtaining TX Retry count

== version d70af7fe9f 2025/01/23-16:06:03 ==
1. Add condition to check TizenRT status before printing IPC error logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ unsigned int wifi_get_tx_retry(int idx)
ALIGNMTO(CACHE_LINE_SIZE) u8 flag[CACHE_LINE_ALIGMENT(64)];
ALIGNMTO(CACHE_LINE_SIZE) u32 tx_retry_cnt[16];
IPC_MSG_STRUCT ipc_req_msg __attribute__((aligned(64)));
u32 try_cnt = 50000;//wait 100ms
ipc_req_msg.msg_type = IPC_USER_POINT;
ipc_req_msg.msg = (u32)tx_retry_cnt;
ipc_req_msg.msg_len = sizeof(tx_retry_cnt);
Expand All @@ -1098,12 +1099,18 @@ unsigned int wifi_get_tx_retry(int idx)
DCache_Clean((u32)tx_retry_cnt, sizeof(tx_retry_cnt));
ipc_send_message(IPC_AP_TO_LP, IPC_A2L_WIFI_FW_INFO, &ipc_req_msg);

while (1) {
while (try_cnt) {
DCache_Invalidate((u32)flag, sizeof(flag));
try_cnt --;
DelayUs(2);
if (flag[0]) {
break;
}
}
if (try_cnt == 0) {
RTW_API_INFO("Cannot get TX retry\n");
return 0;
}
DCache_Invalidate((u32)tx_retry_cnt, sizeof(tx_retry_cnt));
/* Retry count will be at index 1 */
return tx_retry_cnt[1];
Expand Down

0 comments on commit 67a966d

Please sign in to comment.