Add the EAP related fields for WiFi configuration.
-- added the EAP/802.1X related fields in WifiConfiguration for
supporting EAP/802.1X authentication.
-- hid the related fields for now.
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 1528ba3..5df88b2 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -1060,6 +1060,83 @@
break setVariables;
}
+ if ((config.eap != null) && !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.eapVarName,
+ config.eap)) {
+ if (DBG) {
+ Log.d(TAG, config.SSID + ": failed to set eap: "+
+ config.eap);
+ }
+ break setVariables;
+ }
+
+ if ((config.identity != null) && !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.identityVarName,
+ config.identity)) {
+ if (DBG) {
+ Log.d(TAG, config.SSID + ": failed to set identity: "+
+ config.identity);
+ }
+ break setVariables;
+ }
+
+ if ((config.anonymousIdentity != null) && !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.anonymousIdentityVarName,
+ config.anonymousIdentity)) {
+ if (DBG) {
+ Log.d(TAG, config.SSID + ": failed to set anonymousIdentity: "+
+ config.anonymousIdentity);
+ }
+ break setVariables;
+ }
+
+ if ((config.clientCert != null) && !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.clientCertVarName,
+ config.clientCert)) {
+ if (DBG) {
+ Log.d(TAG, config.SSID + ": failed to set clientCert: "+
+ config.clientCert);
+ }
+ break setVariables;
+ }
+
+ if ((config.caCert != null) && !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.caCertVarName,
+ config.caCert)) {
+ if (DBG) {
+ Log.d(TAG, config.SSID + ": failed to set caCert: "+
+ config.caCert);
+ }
+ break setVariables;
+ }
+
+ if ((config.privateKey != null) && !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.privateKeyVarName,
+ config.privateKey)) {
+ if (DBG) {
+ Log.d(TAG, config.SSID + ": failed to set privateKey: "+
+ config.privateKey);
+ }
+ break setVariables;
+ }
+
+ if ((config.privateKeyPasswd != null) && !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.privateKeyPasswdVarName,
+ config.privateKeyPasswd)) {
+ if (DBG) {
+ Log.d(TAG, config.SSID + ": failed to set privateKeyPasswd: "+
+ config.privateKeyPasswd);
+ }
+ break setVariables;
+ }
+
return netId;
}