diff options
author | Etan Cohen <etancohen@google.com> | 2017-07-13 06:44:17 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2017-07-14 12:58:20 -0700 |
commit | 3dd02f1e60b930f59d33c462aa2daefb4baf65e5 (patch) | |
tree | 930ae19e42f414957a8b4010a6d9116d108652dc /service | |
parent | eddf3faabf426d18b7d3dff187ec91fe6a96665d (diff) |
[AWARE] Restrict number of data interfaces and paths
Restrict the number of supported data-interfaces (NDIs) to 1 and
the number of data-paths (NDPs) per NDI to 1. Limit will be
removed (in steps) once framework support is added.
Bug: 63633579
Bug: 31940045
Test: TBD - fails, bug outstanding to partner
Change-Id: I3934b68b121f0d72b2ff4595653129c689183e64
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java | 8 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java index 82a3264ee..558274c8d 100644 --- a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java +++ b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java @@ -635,6 +635,14 @@ public class WifiAwareDataPathStateManager { + " - can't parse network specifier"); return false; } + + // TODO (b/63635780) support more then a single concurrent NDP + if (mNetworkRequestsCache.size() > 0) { + Log.e(TAG, "WifiAwareNetworkFactory.acceptRequest: request=" + request + + " - >1 concurrent NDPs aren't supported (yet)."); + return false; + } + mNetworkRequestsCache.put(networkSpecifier, nnri); return true; diff --git a/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java b/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java index 35773210b..6fdcc36c6 100644 --- a/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java +++ b/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java @@ -167,6 +167,11 @@ public class WifiAwareNativeCallback extends IWifiNanIfaceEventCallback.Stub imp capabilities.maxSubscribeInterfaceAddresses; frameworkCapabilities.supportedCipherSuites = capabilities.supportedCipherSuites; + // TODO (b/63635780, b/63635857): enable framework support of >1 NDI and >1 NDP per NDI + // Until then: force corresponding capabilities to 1. + frameworkCapabilities.maxNdiInterfaces = 1; + frameworkCapabilities.maxNdpSessions = 1; + mWifiAwareStateManager.onCapabilitiesUpdateResponse(id, frameworkCapabilities); } else { Log.e(TAG, "notifyCapabilitiesResponse: error code=" + status.status + " (" |