当前位置: 首页 > news >正文

高通平台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接口

http://www.dtcms.com/a/349900.html

相关文章:

  • KubeBlocks for Redis的5种网络模式
  • Linux文件归档工具tar
  • 基于SpringBoot+Vue的社区二手交易系统(WebSocket实时通讯、Echarts图形化分析、协同过滤算法)
  • 3-3〔OSCP ◈ 研记〕❘ WEB应用攻击▸WEB应用安全评估工具
  • nacos管理配置
  • Go语言内存管理深度解析:堆栈分配与逃逸分析的艺术
  • 深度学习篇---ResNet家族
  • Matlab高光谱遥感、数据处理与混合像元分解实践技术应用
  • Mysql系列--8、索引
  • Kubernetes部署MySQL主从复制
  • PyTorch中 nn.Linear详解和实战示例
  • Java全栈开发实战:从基础到微服务的深度探索
  • [Python]库Pandas应用总结
  • PE嵌入式签名检测方法
  • 阿里开源Vivid-VR:AI视频修复新标杆,解锁内容创作新可能
  • AR远程协助:能源电力行业智能化革新
  • 一键编译安装zabbix(centos)
  • Spark面试题
  • HTTP 协议与TCP 的其他机制
  • excel 破解工作表密码
  • Python之Flask快速入门
  • Redis类型之List
  • 自然语言处理——07 BERT、ELMO、GTP系列模型
  • lesson46-1:Linux 常用指令全解析:从基础操作到高效应用
  • Docker:常用命令、以及设置别名
  • 数据挖掘 6.1 其他降维方法(不是很重要)
  • 聊聊负载均衡架构
  • 关于窗口关闭释放内存,主窗口下的子窗口关闭释放不用等到主窗口关闭>setAttribute(Qt::WA_DeleteOnClose);而且无需手动释放
  • 【Python】QT(PySide2、PyQt5):列表视图、模型、自定义委托
  • 【芯片后端设计的灵魂:Placement的作用与重要性】