1. 17 May, 2016 2 commits
    • Randy Pan's avatar
      WifiConnectivityManagerTest: exponential backoff periodic scan · b32b649c
      Randy Pan authored
      Add a couple of unit tests to cover the periodic scan exponential
      backoff feature.
      
      Extended MockAlarmManager class such that users can query a
      pending alarm's trigger time.
      
      Bug: 28750989
      Change-Id: I9520477180786fce2937e5fa87f790f60f12a3da
      b32b649c
    • Randy Pan's avatar
      Restrict connectivty periodic scan · ae9e0ef3
      Randy Pan authored
      When the phone screen is on, the periodic scan interval is setup
      in an exponential backoff fashion. Also, if the traffic is higher
      than certain threshold, perform scan on certain channels only
      instead of full band.
      
      Bug: 28627603
      Change-Id: I95b686d7835265d843edac7c005f661393ae5383
      ae9e0ef3
  2. 13 May, 2016 1 commit
  3. 10 May, 2016 3 commits
  4. 09 May, 2016 6 commits
  5. 06 May, 2016 5 commits
    • Randy Pan's avatar
      WifiConfigManager: clean up log message level · 646ee770
      Randy Pan authored
      Quite some logs should be debug message instead of error
      message.
      
      Bug: 28619076
      Change-Id: Iee06f57bab58aeca881068f0b4f36a0d5bbb3230
      Test: Wifi Unit Tests
      646ee770
    • Ningyuan Wang's avatar
      Fix string comparision and return value in try catch block · b2c2f85c
      Ningyuan Wang authored
      This CL uses value comparision instead of reference comparision
      for strings.
      This also removes returning value in finally block, otherwise
      exception may be suppressed.
      
      BUG=28605846
      TEST=compile
      TEST=runtest frameworks-wifi
      
      Change-Id: I6ace4d233d2b0af3627f75dfdb7dcec6a46b0092
      b2c2f85c
    • Roshan Pius's avatar
      SupplicantScanner: Truncate hidden network list · 362fad8e
      Roshan Pius authored
      Truncate the hidden network id list if it goes beyond wpa_supplicant's
      max value. wpa_supplicant has a hard coded value of 16 for the max
      number of networks that can be specified for each scan.
      
      There is currently no way to query this value from wpa_supplicant, so
      hardcoding this value in SupplicantScanner.
      
      BUG: 28632556
      Change-Id: I31a338b91c221c1686437b738894e13abb897474
      TEST: Compiles & unit-test passes
      362fad8e
    • Randy Pan's avatar
      WifiStateMachine: fix setTargetBssid() · 85c0f06d
      Randy Pan authored
      Always return when the current preferred BSSID is the same as
      the target one. This was done previously only if the DBG flag
      is set.
      
      While there, fixed the log message wording a bit.
      
      Bug: 28619076
      Tests: Wifi unit tests, manual connection & roaming tests
      Change-Id: I109b57d54b1bcaccb00a148b488244b7d9358907
      85c0f06d
    • Randy Pan's avatar
      Clear config BSSID after successful roaming · a4e4bd02
      Randy Pan authored
      Clear the config BSSID after roaming completed and before entering
      ConnectedState. Wifi chipset may roam from this point on and
      having the BSSID specified by QNS would cause the roam to fail
      and the device to disconnect.
      
      We used to rely on the fact that entering ObtainingIpState
      clears the config BSSID. But this assumption was broken by
      commit bcbc449d, which changed from transition
      to ObtainingIpState to ConnectedState.
      
      Bug: 28520770
      Test: Wifi unit tests, manual tests
      Change-Id: I09a2d5d1132ff597c63a324a24d13719be384603
      a4e4bd02
  6. 05 May, 2016 1 commit
  7. 04 May, 2016 12 commits
    • Roshan Pius's avatar
      WifiConnectivityManager: Unit tests for metrics · 1d7d6239
      Roshan Pius authored
      Add couple of unit-tests for metrics. Had to migrate the unit-tests to use
      mock alarm manager.
      
      BUG: 27479439
      BUG: 27704599
      BUG: 28480516
      Change-Id: I1424053c35799905612b37edeb679e7556568ca5
      TEST: Compiles & unit-test passes
      1d7d6239
    • Mukesh Agrawal's avatar
    • Roshan Pius's avatar
      WifiConnectivityManager: Increment metrics · bacd0dca
      Roshan Pius authored
      Make changes to increment the watchdog related metrics in
      WifiConnectivityManager.
      
      PS: Will need to add mock alarm manager to add unit-tests here. This is
      done in the next CL.
      
      BUG: 27479439
      BUG: 27704599
      Change-Id: I96e35e06d222056ec29488666619486a65746b38
      bacd0dca
    • mukesh agrawal's avatar
      wifi_hal_stub: add stubs for packet fate · b070203c
      mukesh agrawal authored
      If the vendor's Wifi HAL does not provide packet fate
      functions, then WifiServiceImpl (and hence, system server)
      will crash when WifiLogger calls packet fate functions.
      
      Fix this, by providing stub implementations. These will
      be automatically overriden by vendor-provided implementations.
      
      BUG=28565646
      TEST=manual
      
      Manual test:
      - repeat for angler and bullhead:
        - try to connect to WPA-2 network with wrong password
        $ adb shell dumpsys > /tmp/dumpsys
        - verify that dumpsys contains "Last failed connection fates"
        - verify that dumpsys shows Authentication messages
      - on bullhead
        - hack up HAL, so that packet fate functions are not registered
        $ adb logcat -d | grep 'Failed to start packet fate'
          -> should see matching lines
        (with the hacked up HAL, and without this patch, the call to
        startPktFateMonitoring() causes a SIGSEGV, instead of just a
        clean failure message)
      
      Change-Id: I86ce34784dea396f9e8741353395cab1ec6e0913
      b070203c
    • Mukesh Agrawal's avatar
      Merge changes Icaa91d9d,Ic930337a into nyc-dev · 855b3287
      Mukesh Agrawal authored
      * changes:
        WifiStateMachine: dynamically configure WifiHAL log level
        wifi service: abstract away access to SystemProperties
      855b3287
    • Mitchell Wills's avatar
    • Mitchell Wills's avatar
    • Glen Kuhne's avatar
    • Glen Kuhne's avatar
    • Mitchell Wills's avatar
      Add more details about what scan results were delivered to clients · 59298c7c
      Mitchell Wills authored
      Fixes: 28563549
      Change-Id: I445054af4b176c69a26af6fe340a6eb88cf06452
      59298c7c
    • mukesh agrawal's avatar
      WifiStateMachine: dynamically configure WifiHAL log level · 2617b7a7
      mukesh agrawal authored
      By default, VERBOSE level logging is disabled for native code.
      However, when debugging Wifi issues, we'll sometimes want to
      include VERBOSE level log messages from the HAL implementation.
      
      Update WifiStateMachine's verbose-debugging logic, to support
      this case.
      
      Note that VERBOSE level messages will not be compiled in
      on user builds. Nor will system server be permitted to change
      the logging level on user builds. For these reasons, the
      log level is only modified on non-user builds.
      
      BUG=27857554
      TEST=unit tests, manual
      
      Manual test (bullhead):
      - On userdebug build with 'Enable Wi-Fi Verbose Logging' set:
        $ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
        -> matching lines seen
        $ adb shell getprop | grep WifiHAL
        [log.tag.WifiHAL]: [V]
      - On userdebug build with 'Enable Wi-Fi Verbose Logging' unset:
        $ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
        -> NO matching lines
        $ adb shell getprop | grep WifiHAL
        [log.tag.WifiHAL]: [D]
      - On user build with 'Enable Wi-Fi Verbose Logging' set:
        $ adb logcat -d | grep 'V WifiHAL'
        -> NO matching lines
        $ adb shell getprop | grep WifiHAL
        -> NO matching lines
      
      Change-Id: Icaa91d9d1261a6cf5851d5ad9b0a6a25fd329344
      2617b7a7
    • mukesh agrawal's avatar
      wifi service: abstract away access to SystemProperties · f74a1cfd
      mukesh agrawal authored
      We want the ability to modify the value of a system property,
      so that we can dynamically change the logging level for WifiHAL.
      
      This ability depends on permissions that are not available to
      the test runner. For example, the process that is running the
      wifi service code needs the ability to connect to the
      |property_service| socket.
      
      To resolve the problem, we do the following:
      - add a PropertyService interface, which abstracts away access
        to SystemProperties
      - add PropertyService to the dependencies managed by WifiInjector
      - add SystemPropertyService, which routes property requests
        to android.os.SystemProperties
      - update WifiStateMachine, to access properties via PropertyService
      - update WifiStateMachineTest, to use a mock implementation of
        PropertyService
      
      BUG=27857554
      TEST=unit tests
      
      Change-Id: Ic930337a6a8f6a600ae7b4da2ca2eaf5c9e6c2cb
      f74a1cfd
  8. 03 May, 2016 4 commits
  9. 02 May, 2016 4 commits
  10. 30 Apr, 2016 1 commit
  11. 29 Apr, 2016 1 commit
    • Rebecca Silberstein's avatar
      WifiLastResortWatchdog: update config if not null · 91a8893f
      Rebecca Silberstein authored
      When new scan results are processed, networks already stored as the
      available networks may have updated configs passed in, but they may also
      have null configs.  The null configs should not be used to update the
      stored config.  Added a check to determine if the passed in config is
      not null before the update.
      
      In addition, debugging output also reported the value of
      HasEverConnected as false for networks with a null config.  This was
      updated to report null_config instead.
      
      Added tests covering config updates.
      Added tests for debugging output.
      
      BUG: 28451079
      Change-Id: Iff9888ab87c61619b2f865516eca22d87eb4f4b8
      91a8893f