diff options
author | Irfan Sheriff <isheriff@google.com> | 2010-06-11 14:43:14 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2010-06-11 14:43:14 -0700 |
commit | afadc8b4e15d94b6a4ac7dc8ad3cdcde45836f45 (patch) | |
tree | e6eb7beaa93a2b2c2108cbea74e400e1a3a50f44 | |
parent | 9f8cc518e14c7a34bc52da712afbf02d84585f67 (diff) | |
download | frameworks_base-afadc8b4e15d94b6a4ac7dc8ad3cdcde45836f45.zip frameworks_base-afadc8b4e15d94b6a4ac7dc8ad3cdcde45836f45.tar.gz frameworks_base-afadc8b4e15d94b6a4ac7dc8ad3cdcde45836f45.tar.bz2 |
Dont persist config on failure
If soft AP bring up does not go through successfully,
dont persist the config. This has the benefit of recovering
from the case where things fail on "=" and "," for SSID since
the IOCTL parsing in driver on broadcom cannot handle it
at this time.
Change-Id: Iaa60fd05972db434500753dcb59092995dab07b1
-rw-r--r-- | services/java/com/android/server/WifiService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java index 8d6ad93..46a68ac 100644 --- a/services/java/com/android/server/WifiService.java +++ b/services/java/com/android/server/WifiService.java @@ -679,9 +679,9 @@ public class WifiService extends IWifiManager.Stub { /* Configuration changed on a running access point */ if(enable && (wifiConfig != null)) { try { - persistApConfiguration(wifiConfig); nwService.setAccessPoint(wifiConfig, mWifiStateTracker.getInterfaceName(), SOFTAP_IFACE); + persistApConfiguration(wifiConfig); return true; } catch(Exception e) { Slog.e(TAG, "Exception in nwService during AP restart"); @@ -717,7 +717,6 @@ public class WifiService extends IWifiManager.Stub { wifiConfig.SSID = mContext.getString(R.string.wifi_tether_configure_ssid_default); wifiConfig.allowedKeyManagement.set(KeyMgmt.NONE); } - persistApConfiguration(wifiConfig); if (!mWifiStateTracker.loadDriver()) { Slog.e(TAG, "Failed to load Wi-Fi driver for AP mode"); @@ -734,6 +733,8 @@ public class WifiService extends IWifiManager.Stub { return false; } + persistApConfiguration(wifiConfig); + } else { try { |