高通平台wifi--p2p issue

需求:

p2p: check p2p instance in all asynchronized callbacks

If cancelConnect is not called, the scan retry callback would be called several times. If P2P is disabled in this period,these asynchronized callbacks would access de-initialized p2p instance and result in native crash.

code:

复制代码
  1. ------------------- wpa_supplicant/hidl/1.2/p2p_iface.cpp --------------------

  2. index 0a6b657d..fd9ce0dc 100644

  3. @@ -225,7 +225,7 @@ int joinScanReq(

  4. size_t ielen;

  5. unsigned int bands;

  6. - if (!wpa_s->global->p2p) {

  7. + if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {

  8. wpa_printf(MSG_ERROR,

  9. "P2P: P2P interface is gone, cancel join scan");

  10. return -ENXIO;

  11. @@ -1634,7 +1634,7 @@ SupplicantStatus P2pIface::addGroup_1_2Internal(

  12. int vht = wpa_s->conf->p2p_go_vht;

  13. int ht40 = wpa_s->conf->p2p_go_ht40 || vht;

  14. - if (wpa_s->global->p2p == NULL) {

  15. + if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {

  16. return {SupplicantStatusCode::FAILURE_IFACE_DISABLED, ""};

  17. }

  18. @@ -1691,6 +1691,9 @@ SupplicantStatus P2pIface::addGroup_1_2Internal(

  19. pending_join_scan_callback =

  20. [wpa_s, ssid, freq]() {

  21. + if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {

  22. + return;

  23. + }

  24. int ret = joinScanReq(wpa_s, ssid, freq);

  25. // for BUSY case, the scan might be occupied by WiFi.

  26. // Do not give up immediately, but try again later.

  27. @@ -1707,7 +1710,7 @@ SupplicantStatus P2pIface::addGroup_1_2Internal(

  28. };

  29. pending_scan_res_join_callback = [wpa_s, ssid, passphrase, peer_address, this]() {

  30. - if (wpa_s->global->p2p_disabled) {

  31. + if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {

  32. return;

  33. }

解释:

p2p_iface.cpp是守护wpa_supplicant的hidl接口

相关推荐
风清扬_jd7 小时前
libtorrent-rasterbar-2.0.11编译说明
c++·windows·p2p
csdn_aspnet20 小时前
在 ASP.NET Core 中实现 Cookie 身份验证
后端·asp.net·.netcore·cookie
csdn_aspnet2 天前
如何在 ASP.NET Core Identity 中实现用户身份验证
后端·asp.net·.net core·identity
csdn_aspnet2 天前
.NET 10 中的 ASP.NET Core Identity — 从“登录页面”到生产级安全
asp.net·.net core·identity·.net10
云草桑2 天前
.net AI开发04 第八章 引入RAG知识库与文档管理核心能力及事件总线
数据库·人工智能·microsoft·c#·asp.net·.net·rag
Remember_9934 天前
网络编程套接字深度解析:从理论到实践的完整指南
网络·算法·http·https·udp·哈希算法·p2p
June bug6 天前
(#字符串处理)判断字符串是否为有效IPv4地址
服务器·网络·p2p
henujolly6 天前
区块链p2p
服务器·区块链·p2p
贾修行8 天前
IIS 作为反向代理:为 ASP.NET Core Kestrel 应用保驾护航
后端·iis·asp.net·反向代理·arr·url 重写规则
William_cl8 天前
C# ASP.NET强类型视图:让 UI 数据交互告别 “猜谜游戏“
ui·c#·asp.net