0

I am analysing Android JellyBean 4.3 source code.I could find the varialbe p2p_supported in HAL layer for Wi-Fi Direct support. In the below code snippet from wifi_ath.c

int wifi_start_supplicant(int p2p_supported) {

if (p2p_supported) 
  {
    strcpy(supplicant_name, P2P_SUPPLICANT_NAME);
    strcpy(supplicant_prop_name, P2P_PROP_NAME);  // for P2P support
    .......................
   }
    else {
    strcpy(supplicant_name, SUPPLICANT_NAME);
    strcpy(supplicant_prop_name, SUPP_PROP_NAME); //for station support
       }

The values of the macros are:

P2P_SUPPLICANT_NAME = p2p_supplicant ,P2P_PROP_NAME= init.svc.p2p_supplicant
SUPPLICANT_NAME=wpa_supplicant ,SUPP_PROP_NAME=init.svc.wpa_supplicant

Even while connecting in station mode the if part is getting executed and I could not make the WiFi up. Where in the code exactly p2p_supported variable is enabled and disabled so that both the P2P and Wi-Fi works smoothly?

Infinite Recursion
  • 6,511
  • 28
  • 39
  • 51

1 Answers1

0

From Jelly Bean(4.1) you only need to turn WiFi on to use WiFi Direct functionality, though using both together depends upon whether your chip supports it.(For that see this SO question)

Community
  • 1
  • 1
nikhil_vyas
  • 513
  • 5
  • 16