【WIFI】修改本地设备WIFI名失败,蓝牙正常

从logcat分析显示“Setup P2P interface”失败:

04-16 19:35:11.431  1481  1481 I wpa_supplicant: Use /vendor/etc/wifi/p2p_supplicant_overlay.conf, read ok.

04-16 19:35:11.432  1481  1481 E wpa_supplicant: Could not read interface p2p0 flags: No such device

04-16 19:35:11.432  1481  1481 I wpa_supplicant: nl80211: Driver does not support authentication/association or connect commands

04-16 19:35:11.432  1481  1481 I wpa_supplicant: nl80211: deinit ifname=p2p0 disabled_11b_rates=0

04-16 19:35:11.432  1481  1481 E wpa_supplicant: Setup P2P interface: No such device

04-16 19:35:11.432  1481  1481 E wpa_supplicant: p2p0: Failed to initialize driver interface

04-16 19:35:11.435   407   499 E SupplicantP2pIfaceHal: Failed to get ISupplicantIface 1

04-16 19:35:11.435   407   499 E SupplicantP2pIfaceHal: initSupplicantP2pIface got null iface 

04-16 19:35:11.435   407   499 E WifiP2pNative: Failed to setup P2p iface in supplicant

追踪代码发现SupplicantP2pIface失败,ifconfig -a 检测 p2p0 interface确实没有。

使用CONFIG_USE_P2P0=y打开p2p0接口后wlan0不能使用,厂商对此也没有回复。只能自己默默排查。最终发现HAL使用P2P接口错误。正确修改如下:

--- a/hardware/broadcom/wlan/bcmdhd/wifi_hal/common.h
+++ b/hardware/broadcom/wlan/bcmdhd/wifi_hal/common.h
@@ -242,6 +242,7 @@ enum {
        BROADCOM_WIFI,
        SSV_WIFI,
        RK912_WIFI,
+       AIC_WIFI,
 };

 wifi_error wifi_register_handler(wifi_handle handle, int cmd, nl_recvmsg_msg_cb_t func, void *arg);
diff --git a/hardware/interfaces/wifi/1.4/default/wifi_chip.cpp b/hardware/interfaces/wifi/1.4/default/wifi_chip.cpp
index 44cc907608..cbbb4254b0 100755
--- a/hardware/interfaces/wifi/1.4/default/wifi_chip.cpp
+++ b/hardware/interfaces/wifi/1.4/default/wifi_chip.cpp
@@ -119,7 +119,7 @@ std::string getP2pIfaceName() {
            if (wifi_type[0] == 0) {
            check_wifi_chip_type_string(wifi_type);
     }
-    if (0 == strncmp(wifi_type, "AP", 2)) {
+    if (0 == strncmp(wifi_type, "AP", 2) || 0 == strncmp(wifi_type, "AIC", 3)) {
                property_set("vendor.wifi.direct.interface", "p2p-dev-wlan0");
                property_get("wifi.direct.interface", buffer.data(), "p2p-dev-wlan0");
     } else {
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值