Commit Graph

10 Commits

Author SHA1 Message Date
Yongrong Wang 976c4173f0 rpmsg_ping.c: fix msg data memset length
The range of memset exceeds the size of the buffer

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang 4b77dd03db rpmsg_ping.c: change msg cmd type for more compatible
Use bit mask method to represent the command, because it's more
convenient to express multiple characteristics simultaneously.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang 1cf97ac4d0 rpmsg_ping.c: improve log level to LOG_EMERG
Usually rpmsg ping logs are needed during testing,
but too many other module logs can easily overwrite it,
so improve the rpmsg ping log level, later we can setlogmask to
a higher log level to mask other modules' logs.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang b96ad59d69 rpmsg_ping.c: change check data to fluctuation value
We can found the error happend packet more accurately based
on the data value.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Bowen Wang 064eb5fd35 rpmsg services: should release the tx buffer when rpmsg_send_nocopy failed
Otherwise, the tx buffer will be discarded and can no longer be obtained

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 18:26:39 +08:00
liaoao 58c9c23765 rpmsg_ping:only sleep when ping->sleep is larger than 0
To avoid call sleep when sleep <= 0

Signed-off-by: liaoao <liaoao@xiaomi.com>
2024-09-14 17:34:52 +08:00
Yongrong Wang e359c661d8 rpmsg ping: fix rpmsg_ping_ept_cb rpmsg send length
The rpmsg ping response length should not include the data length.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-09-14 17:34:52 +08:00
Xiang Xiao 42dad89211 rpmsg/ping: Replace UINT_MAX with CLOCK_MAX
since clock_t may map to either 32-bit or 64-bit integer type,
UINT_MAX may not be the maximum value of clock_t.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-16 22:16:31 +02:00
Yanfeng Liu b258680949 rpmsg/rpmsg_ping: tenative fix for build issue
rpmsg_ping.c is blocking CI checks for RPTUN related patches like #11673.
this patch simply fix the compilation issue of rpmsg_ping.c:

- line 191: overflow conversion from "long unsigned int" to "unsigned int"
- line 226: "sendlen" used uninitialized

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-08 12:38:21 -03:00
wangyongrong ce832c6377 rptun_ping: Strip rptun_ping out of rptun and rename to rpmsg_ping
It should be possible to use ping without rptun being enabled, so striped rptun_ping out of rptun and rename to rpmsg_ping.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-30 04:08:59 -08:00