OSDN Git Service

wifi: Do not use prefix for p2p commands
authorDmitry Shmidt <dimitrysh@google.com>
Wed, 14 Aug 2013 19:59:23 +0000 (12:59 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Wed, 14 Aug 2013 23:00:48 +0000 (16:00 -0700)
Bug: 9298955

Change-Id: I73dab83d133ab3a79cdf804764ba0583a6c9af7f
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wifi/java/android/net/wifi/WifiNative.java

index 0359076..4723cc1 100644 (file)
@@ -82,8 +82,13 @@ public class WifiNative {
 
     public WifiNative(String interfaceName) {
         mInterfaceName = interfaceName;
-        mInterfacePrefix = "IFNAME=" + interfaceName + " ";
         mTAG = "WifiNative-" + interfaceName;
+        if (!interfaceName.equals("p2p0")) {
+            mInterfacePrefix = "IFNAME=" + interfaceName + " ";
+        } else {
+            // commands for p2p0 interface don't need prefix
+            mInterfacePrefix = "";
+        }
     }
 
     public boolean connectToSupplicant() {