chromiumos/platform/wimax_manager.git
12 months agoAdd protobuf header dependencies to .o, .pic.o and .pie.o targets. 53/66053/2 master
Ben Chan [Fri, 16 Aug 2013 05:35:07 +0000 (22:35 -0700)]
Add protobuf header dependencies to .o, .pic.o and .pie.o targets.

This CL ensures that protobuf header files are always generated before
.o, .pic.o and .pie.o are built.

BUG=chromium:274194
TEST=Tested the following:
1. Run "make -np wimax-manager testrunner" to verify that .o, .pic.o,
   and .pie.o targets depend on the corresponding .o.depends target,
   which depends on the generated protobuf headers.
2. Build and run unit tests.

Change-Id: Iffad18def2169ea7b1a2e650d255f842fb49e080
Reviewed-on: https://gerrit.chromium.org/gerrit/66053
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
13 months agoAllow debugd to get WiMAX manager DBus properties. 94/62594/2 factory-4455.B factory-pit-4471.B firmware-pit-4482.B release-R30-4537.B stabilize-4443.B stabilize-4512.B
Ben Chan [Thu, 18 Jul 2013 23:12:57 +0000 (16:12 -0700)]
Allow debugd to get WiMAX manager DBus properties.

BUG=chrome-os-partner:21109
TEST=Tested the following:
1. Build and run unit tests.
2. Verify the output of the command below on a daisy with WiMAX:

     dbus-send --system --print-reply --dest=org.chromium.debugd \
        /org/chromium/debugd org.chromium.debugd.GetWiMaxStatus

Change-Id: Ia594a1772698c0e3253c3e2dc161dd4f88f89c4f
Reviewed-on: https://gerrit.chromium.org/gerrit/62594
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
14 months agoRemove unnecessary call to the deprecated g_thread_init(). 80/59680/2 factory-pit-4390.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B release-R29-4319.B
Ben Chan [Sat, 22 Jun 2013 12:33:55 +0000 (05:33 -0700)]
Remove unnecessary call to the deprecated g_thread_init().

g_thread_init() has been deprecated since glib 2.32. This CL removes the
unnecessary call to g_thread_init(), so that we can later migrate to
glib 2.34.

BUG=chromium:253025
TEST=Tested the following:
1. Build and run unit tests.
2. Run network_WiMaxSmoke test.

Change-Id: I724179977aaf8a1eb24529c9e02a1ef6fee26e96
Reviewed-on: https://gerrit.chromium.org/gerrit/59680
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

15 months agoMigrate from GMainLoop to base::MessageLoop. 26/50026/5 factory-4128.B factory-4290.B factory-pit-4280.B factory-spring-4131.B factory-spring-4262.B release-R28-4100.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-spring-4100.53.B toolchainB
Ben Chan [Thu, 2 May 2013 07:15:11 +0000 (00:15 -0700)]
Migrate from GMainLoop to base::MessageLoop.

This CL adds an EventDispatcher class, which is based on
base::MessageLoop, to replace GMainLoop for event handling in WiMAX
manager.

BUG=chrome-os-partner:19198
TEST=Tested the following:
1. Build and run unit tests.
2. Test WiMAX connectivity on daisy.

Change-Id: Ieca9d170a9e4e51557df6803e6167649ba338526
Reviewed-on: https://gerrit.chromium.org/gerrit/50026
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
15 months agoSpecify network operator specific EAP settings via config file. 85/49585/7
Ben Chan [Thu, 25 Apr 2013 23:37:40 +0000 (16:37 -0700)]
Specify network operator specific EAP settings via config file.

This CL changes WiMAX manager to extract EAP parameters for various
WiMAX network operators via a config file.

BUG=chromium:235743
TEST=Tested the following:
1. Build and run unit tests.
2. Test WiMAX connectivity on lumpy.
CQ-DEPEND=Ica186a17fef61b5a013ba0fdd43cacb0b6540567

Change-Id: I5d3518652855f924cbc01cf5c86b9827a48a3846
Reviewed-on: https://gerrit.chromium.org/gerrit/49585
Commit-Queue: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
16 months agoAdd support for network operator configuration. 90/49290/8 stabilize-4068.0.B
Ben Chan [Thu, 25 Apr 2013 23:23:20 +0000 (16:23 -0700)]
Add support for network operator configuration.

This CL adds support for network operator configuration in WiMAX manager
via a config file based on the text format of protocol buffers.

BUG=chromium:235743
TEST=Build and run unit tests.

Change-Id: Icee5c3192ebe8b9dac865add30525fc37aed7d14
Reviewed-on: https://gerrit.chromium.org/gerrit/49290
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>

16 months agoAllow Driver and Device objects to access Manager object. 89/49289/3
Ben Chan [Thu, 25 Apr 2013 23:54:39 +0000 (16:54 -0700)]
Allow Driver and Device objects to access Manager object.

This CL propagates the Manager object to Driver and Device objects,
which allows a Driver or Device object to access configuration
parameters via the Manager object.

BUG=chromium:235743
TEST=Build and run unit tests.

Change-Id: I783a734d7620c62d8afbf258f9089be155a2f731
Reviewed-on: https://gerrit.chromium.org/gerrit/49289
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

16 months agoFix namespace comments. 27/49227/2
Ben Chan [Thu, 25 Apr 2013 06:09:56 +0000 (23:09 -0700)]
Fix namespace comments.

BUG=none
TEST=Build and run unit tests.

Change-Id: Id00eb6d4379ae5dbf6669fa2c8aae3c242b17731
Reviewed-on: https://gerrit.chromium.org/gerrit/49227
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
16 months agoRemove gflags linkage. 51/48151/2 stabilize-4008.0.B stabilize-4035.0.B
Ben Chan [Sat, 13 Apr 2013 22:10:14 +0000 (15:10 -0700)]
Remove gflags linkage.

The gflags linkage is no longer necessary due to the previous commit
"Use base::CommandLine instead gflags for parsing command line."
(4872d8eea11baa782b543fb0da578d2a07b16c15).

BUG=none
TEST=Tested the following:
1. Build and run unit tests.
2. Test WiMAX connectivity on lumpy.

Change-Id: I995ed5976002c9312a7cae8bb704209901a33700
Reviewed-on: https://gerrit.chromium.org/gerrit/48151
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
16 months agoFix '-Wbind-to-temporary-copy' compiler warning with clang. 48/48148/2
Ben Chan [Mon, 15 Apr 2013 20:20:24 +0000 (13:20 -0700)]
Fix '-Wbind-to-temporary-copy' compiler warning with clang.

BUG=chromium:231432
TEST=`FEATURES="test" CFLAGS="-clang" emerge-lumpy wimax_manager`

Change-Id: I3d098719ffcd7c7c2aa7444e24b177264d66931f
Reviewed-on: https://gerrit.chromium.org/gerrit/48148
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
18 months agoUse base::FilePath instead of FilePath. 01/43401/3 factory-spring-3842.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B release-R27-3912.B stabilize-3881.0.B stabilize-3912.79.B toolchainA
Ben Chan [Fri, 15 Feb 2013 19:29:47 +0000 (11:29 -0800)]
Use base::FilePath instead of FilePath.

FilePath is moved into the base namespace in libchrome-180609.

BUG=chromium-os:38952
TEST=`FEATURES=test emerge-lumpy wimax_manager`

Change-Id: I0a03b5767874d26970cd545be67e9a038e19300d
Reviewed-on: https://gerrit.chromium.org/gerrit/43401
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
18 months agoUpdate to build against libchrome-180609. 43/43343/3
Ben Chan [Thu, 14 Feb 2013 23:22:28 +0000 (15:22 -0800)]
Update to build against libchrome-180609.

This CL updates code to handle the following change in
libchrome-180609:
- ScopedVector::reset() is renamed to ScopedVector::clear()

BUG=chromium-os:38952
TEST=`FEATURES=test emerge-lumpy wimax_manager`
CQ-DEPEND=I846c72ab6b6a5d737f2290f45fed6fce8bcef3bd

Change-Id: I613f9ca308bb0ace1d10b8edbbf635bc41b74a4f
Reviewed-on: https://gerrit.chromium.org/gerrit/43343
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
18 months agowimax_manager: Updating common.mk to ToT to enable profiling 87/42787/3 release-R26-3701.B stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-bluetooth-smart toolchain-3701.42.B
Ryan Harrison [Wed, 6 Feb 2013 21:41:19 +0000 (16:41 -0500)]
wimax_manager: Updating common.mk to ToT to enable profiling

This update replaces the current common.mk used in this project with the newest
version. This will allow all of the common.mk based projects to be on the same
version for debugging and enables profiling support.

BUG=chromium-os:37854
TEST=Exectuted the following commands to confirm the build works:
     MODE=profiling cros_workon_make --board=link
     MODE=profiling cros_workon_make --board=link --test
     cros_workon_make --board=link
     cros_workon_make --board=link --test
     Repeated these with emerge-link, USE=profiling, and
     FEATURES=test as need.
     For the emerge command with profiling and testing enable, confirmed the
     appropriate coverage files were created in /usr/share/profiling/...

Change-Id: I41480c08df100637366276320c1661d2aa3e5d54
Reviewed-on: https://gerrit.chromium.org/gerrit/42787
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Tested-by: Ryan Harrison <rharrison@chromium.org>
18 months agoPass suspend delay description to power manager. 38/41938/4 stabilize-3658.0.0
Daniel Erat [Thu, 24 Jan 2013 18:25:33 +0000 (10:25 -0800)]
Pass suspend delay description to power manager.

This passes a short human-readable string ("wimax-manager")
to powerd when registering a suspend delay to aid in
debugging.

BUG=chromium-os:36980
TEST=confirmed that description appears in powerd log
CQ-DEPEND=I661570a23b42f3fba892671edc730ffe5584f35a

Change-Id: Id81a3f8ba22bbbb91c4c2099d3202eccb3678c1a
Reviewed-on: https://gerrit.chromium.org/gerrit/41938
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>

20 months agoUpdate suspend delay code. 79/39679/3 factory-3536.B
Daniel Erat [Wed, 12 Dec 2012 16:05:09 +0000 (08:05 -0800)]
Update suspend delay code.

This updates wimax_manager to use new suspend delay code in
the power manager that uses protocol buffers and uses D-Bus
method calls to confirm suspend-readiness instead of
signals.

BUG=chromium-os:36980
TEST=unit tests pass, also manual: watched /var/log/messages
     and /var/log/power_manager/powerd.LATEST and confirmed
     that wimax_manager successfully registers a suspend
     delay at startup, unregisters the delay at shutdown,
     and that powerd defers suspending until wimax_manager
     has confirmed that it's ready
CQ-DEPEND=I4e94a6693b3e9d67d4b5e8bd190ee6e67ababa99
CQ-DEPEND=Ia333b97d7d4f0eec1696e966769dc34f9f240083

Change-Id: I8285aa0aa2131f8717a1a1c6fdda5d467e02228d
Reviewed-on: https://gerrit.chromium.org/gerrit/39679
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
20 months agoRemove workaround for spinlock recursion bug in GDM72xx driver. 78/39178/2 release-R25-3428.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize2 toolchain-3428.65.B
Ben Chan [Tue, 4 Dec 2012 05:30:49 +0000 (21:30 -0800)]
Remove workaround for spinlock recursion bug in GDM72xx driver.

BUG=chrome-os-partner:16555
TEST=Tested the following:
1. Build and run unit tests.
2. Run WiMAX suspend/resume stress test.

Change-Id: Iec9cb1061be39bb8f88ba09bf9f455512d9ab0e1
Reviewed-on: https://gerrit.chromium.org/gerrit/39178
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
21 months agoRe-enable internal network scan done by GCT SDK. 10/38410/2
Ben Chan [Tue, 20 Nov 2012 19:58:53 +0000 (11:58 -0800)]
Re-enable internal network scan done by GCT SDK.

Instead of disabling the internal network scan done by GCT SDK, which
leads to unexpected consequences, this CL sets and aligns the internal
network scan done by GCT SDK with the periodically network scan done by
the WiMAX manager.

BUG=chrome-os-partner:16298
TEST=Tested the following:
1. Build and run unit tests.
2. Verify that WiMAX manager can reconnect to the network after:
   - disconnecting the device from the network
   - disabling and re-enabling the device
   - the system goes through a suspend/resume cycle
3. Monitor /sys/bus/usb/devices/1-2.1/{active,connected}_duration
   when the system is on battery and verify that active_duration
   stays constant for about 7-8s in every 10s.

Change-Id: I67345f1dae8886d6c9ddb8312b95fedc0856b25f
Reviewed-on: https://gerrit.chromium.org/gerrit/38410
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
21 months agoMake restoring of status update interval more robust. 42/38342/4
Ben Chan [Mon, 19 Nov 2012 21:25:04 +0000 (13:25 -0800)]
Make restoring of status update interval more robust.

This CL makes restoring of the status update interval more robust under
certain scenarios:
- The device is disabled while it is connecting to a network;
- The device fails to connect to a network without going through the
  transition to the 'connecting' state.

BUG=chrome-os-partner:16284
TEST=Tested the following:
1. Build and run unit tests.
2. Verify that the status update interval is restored properly in above
   scenarios.

Change-Id: Ie827dfb17005483429a7ee6ea430852554ab5759
Reviewed-on: https://gerrit.chromium.org/gerrit/38342
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

21 months agoSchedule an initial network scan shortly after the device is enabled. 43/38343/3
Ben Chan [Tue, 20 Nov 2012 00:02:03 +0000 (16:02 -0800)]
Schedule an initial network scan shortly after the device is enabled.

BUG=chrome-os-partner:10179
TEST=Tested the following:
1. Build and run unit tests.
2. Verify that any available WiMAX network is shown shortly after the
   device resumes from suspend or is re-enabled after being disabled.

Change-Id: I210422bac416c809153aa4e88fb98e6cd6f32eac
Reviewed-on: https://gerrit.chromium.org/gerrit/38343
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
21 months agoDisable internal network scan done by GCT SDK. 18/38218/4
Ben Chan [Fri, 16 Nov 2012 20:15:39 +0000 (12:15 -0800)]
Disable internal network scan done by GCT SDK.

BUG=chrome-os-partner:16248
TEST=Tested the following:
1. Build and run unit tests.
2. Verify that WiMAX manager still scans and reports available networks
   periodically.

Change-Id: I218f4871597910ba1fd4432220a43aa3e2793c1c
Reviewed-on: https://gerrit.chromium.org/gerrit/38218
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

21 months agoCancel any pending connect timeout when disabling the device. 90/38090/2
Ben Chan [Thu, 15 Nov 2012 03:38:59 +0000 (19:38 -0800)]
Cancel any pending connect timeout when disabling the device.

BUG=chromium-os:36392
TEST=Run suspend stress test.

Change-Id: I95bc10bf03a35c5c7a45d235789d4b8536637e86
Reviewed-on: https://gerrit.chromium.org/gerrit/38090
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
21 months agoAdjust status update interval based on connection state. 46/37846/3
Ben Chan [Mon, 12 Nov 2012 19:32:50 +0000 (11:32 -0800)]
Adjust status update interval based on connection state.

BUG=chrome-os-partner:16124
TEST=Tested the following with the system on AC and battery:
1. Manually connect to a WiMAX manager.
2. Observe from syslog that WiMAX manager updates the status update
   interval to 1 second when making the connection and restores the
   interval to the original value after the connection succeeds or
   fail.

Change-Id: I1008dab8dceca1b6557090b79cb4313387d755cc
Reviewed-on: https://gerrit.chromium.org/gerrit/37846
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
21 months agoSet up a timeout when connecting to a network.
Ben Chan [Thu, 8 Nov 2012 06:38:47 +0000 (22:38 -0800)]
Set up a timeout when connecting to a network.

BUG=chrome-os-partner:15753
TEST=Tested the following:
1. Connect to a WiMAX network and verify that the device stays connected
   after 60 seconds.
2. Manually shorten the connect timeout to 1 second and verify that the
   connection attempt times out.

Change-Id: I7b9389b1455afbe3abe56f57c4dffd0d0e259792
Reviewed-on: https://gerrit.chromium.org/gerrit/37620
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
21 months agoRefine signal strength computation based on both RSSI and CINR.
Ben Chan [Fri, 2 Nov 2012 08:11:38 +0000 (01:11 -0700)]
Refine signal strength computation based on both RSSI and CINR.

BUG=chrome-os-partner:11186
TEST=Build and run unit tests.

Change-Id: I0cda81647b6b3299837c9ff7298e6646a13369c6
Reviewed-on: https://gerrit.chromium.org/gerrit/37194
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
21 months agoIncrease device scan delay after resuming from suspend.
Ben Chan [Wed, 31 Oct 2012 16:21:55 +0000 (09:21 -0700)]
Increase device scan delay after resuming from suspend.

BUG=chrome-os-partner:15370
TEST=Verify that the WiMAX device is properly detected by WiMAX manager
after the system resumes from suspend.

Change-Id: Ia31f453e70ead0bb29a73ffdfb41d28575313ff6
Reviewed-on: https://gerrit.chromium.org/gerrit/37025
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

21 months agoMake network scan and status update interval adjustable over DBus.
Ben Chan [Thu, 25 Oct 2012 02:04:28 +0000 (19:04 -0700)]
Make network scan and status update interval adjustable over DBus.

BUG=chromium-os:35854
TEST=Tested adjusting network scan and status update interval via:

    dbus-send --system --dest=org.chromium.WiMaxManager \
        /org/chromium/WiMaxManager/Device/wm0 \
        org.freedesktop.DBus.Properties.Set \
        string:org.chromium.WiMaxManager.Device \
        string:NetworkScanInterval \
        variant:uint32:5

    dbus-send --system --dest=org.chromium.WiMaxManager \
        /org/chromium/WiMaxManager/Device/wm0 \
        org.freedesktop.DBus.Properties.Set \
        string:org.chromium.WiMaxManager.Device \
        string:StatusUpdateInterval \
        variant:uint32:5

Change-Id: I40ccf8844e0a771eb613f11d5cc679416dd81d41
Reviewed-on: https://gerrit.chromium.org/gerrit/36889
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
22 months agoHandle power manager canceling suspend without notification.
Ben Chan [Thu, 25 Oct 2012 06:45:45 +0000 (23:45 -0700)]
Handle power manager canceling suspend without notification.

BUG=chrome-os-partner:15645
TEST=Verifed that WiMAX manager properly resumes the WiMAX device when
power manager cancels suspend.

Change-Id: I572b381aace831ad928a42ace860f0700b1f9d1d
Reviewed-on: https://gerrit.chromium.org/gerrit/36539
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
22 months agoIncrease granularity of logging via verbose logging.
Ben Chan [Fri, 19 Oct 2012 06:27:38 +0000 (23:27 -0700)]
Increase granularity of logging via verbose logging.

This CL replaces several LOG(INFO) with VLOG(1) and changes the default
logging level to LOG(INFO).

BUG=chromium-os:35491
TEST=Tested the following:
1. Build and run unit tests.
2. Verify that wimax-manager uses logging level 0 by default.
3. Test different logging levels via the --log-level switch.

Change-Id: Iaa87527941fa7e20fa050e043df71ed7dc719214
Reviewed-on: https://gerrit.chromium.org/gerrit/36045
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
22 months agoUse base::CommandLine instead gflags for parsing command line.
Ben Chan [Fri, 19 Oct 2012 04:45:15 +0000 (21:45 -0700)]
Use base::CommandLine instead gflags for parsing command line.

BUG=chromium-os:35491
TEST=Tested the following:
1. Build and run unit tests.
2. Verify wimax-manager is launched properly by upstart.
3. Verify different command line switches:
     wimax-manager --help
     wimax-manager --foreground
     wimax-manager --foreground --log-level=0

Change-Id: I4893996fc3dcd1637b643f268658410f261e5b98
Reviewed-on: https://gerrit.chromium.org/gerrit/36040
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
22 months agoDelay device scan after resuming from suspend.
Ben Chan [Tue, 16 Oct 2012 08:16:47 +0000 (01:16 -0700)]
Delay device scan after resuming from suspend.

BUG=chrome-os-partner:15370
TEST=Verify that the WiMAX device is properly detected by WiMAX manager
after the system resumes from suspend.

Change-Id: I6f5d97aca32c3f554ae64227d0521c1f756f2f3a
Reviewed-on: https://gerrit.chromium.org/gerrit/35749
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
22 months agoOpen GdmDevice before exposing it to DBus to trigger MAC address update.
Ben Chan [Thu, 11 Oct 2012 06:42:02 +0000 (23:42 -0700)]
Open GdmDevice before exposing it to DBus to trigger MAC address update.

BUG=chrome-os-partner:10674
TEST=Tested with corresponding changes in shill and verified that shill
obtains the correct MAC address of the WiMAX device the system resumes
from suspend.

Change-Id: Ifa3d597a14ed5c7a67a95cdec5bec194fa4687dd
Reviewed-on: https://gerrit.chromium.org/gerrit/35255
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
23 months agoTemporary workaround to select EAP-TLS for testing purpose. factory-2914.B factory-2985.B factory-2993.B factory-3004.B
Ben Chan [Tue, 5 Jun 2012 00:21:37 +0000 (17:21 -0700)]
Temporary workaround to select EAP-TLS for testing purpose.

BUG=chrome-os-partner:10977
TEST=Connect to a WiMAX network using EAP-TLS.

Change-Id: I133ebbdbb7bf18ac5aaac96f21781a1099e67247
Reviewed-on: https://gerrit.chromium.org/gerrit/33039
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
2 years agoClear network list when device is disabled. factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B firmware-butterfly-2788.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-stout-2817.B
Ben Chan [Tue, 3 Jul 2012 05:01:23 +0000 (22:01 -0700)]
Clear network list when device is disabled.

BUG=chrome-os-partner:10870
TEST=Verify that there is no connect failures after re-enabling device.

Change-Id: Id62a22f99c86b02f05d92a7bbd4b562aa7bb2685
Reviewed-on: https://gerrit.chromium.org/gerrit/26652
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoShorten interval between device scans and reduce duration of retries. factory-2460.B factory-2475.B
Ben Chan [Tue, 12 Jun 2012 05:11:31 +0000 (22:11 -0700)]
Shorten interval between device scans and reduce duration of retries.

This CL modifies Manager to shorten the interval between device scans at
initialization or after resuming from suspend mode. That helps improve
the auto-connect performance. It also reduces the duration of retries as
the previous value is much longer than needed.

BUG=chrome-os-partner:10179
TEST=Observe interval between device scans and number of retries.

Change-Id: If31192a926f3d76ea583706b03a813312d2e02d2
Reviewed-on: https://gerrit.chromium.org/gerrit/25068
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoInvalidate non-existing DBus proxy for power manager.
Ben Chan [Mon, 11 Jun 2012 17:28:29 +0000 (10:28 -0700)]
Invalidate non-existing DBus proxy for power manager.

Upon observing an org.freedesktop.DBus.NameHasOwner signal, invalidate
the DBus proxy of the old power manager instance to avoid calling
UnregisterSuspendDelay on a non-existing instance.

BUG=chrome-os-partner:10380
TEST=Verify that wimax-manager does not call UnregisterSuspendDelay on
non-existing power manager instance.

Change-Id: I000c46f739e7ba174e95cc5d9b7b4d5e3704cfb6
Reviewed-on: https://gerrit.chromium.org/gerrit/25009
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoRe-register suspend delay when power manager restarts.
Ben Chan [Mon, 11 Jun 2012 05:53:31 +0000 (22:53 -0700)]
Re-register suspend delay when power manager restarts.

This CL modifies WiMAX manager to call org.freedesktop.DBus.NameHasOwner
to check if powerd is running before registering a suspend delay at
initialization, and also recreate the power manager proxy and
re-register a suspend delay when powerd restarts by monitoring the
org.freedesktop.DBus.NameOwnerChanged signal emitted by DBus.

BUG=chrome-os-partner:10380
TEST=wimax-manager properly registers/re-registers a suspend delay when:
1. wimax-manager starts before powerd.
2. powerd starts wimax-manager.
3. powerd restarts.

Change-Id: Ic0f3ab5e692dd9f3f9ec2967035f9e41ad3cb392
Reviewed-on: https://gerrit.chromium.org/gerrit/24985
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoHandle Connect call when device is in connecting or connected state.
Ben Chan [Fri, 8 Jun 2012 05:46:02 +0000 (22:46 -0700)]
Handle Connect call when device is in connecting or connected state.

This CL modifies GdmDevice::Connect to handle the situations when the
device is already in connecting or connected state due to previous call
to Connect:
- If the same network identifier and user identity are used, do nothing.
- If a different network identifier or user identity is used, disconnect
  from the current network before connecting using the new connection
  profile.

BUG=chrome-os-partner:10014
TEST=Verify that WiMAX manager behaves correctly under above situations.

Change-Id: I9522a8618d14323fde49e0f29e15e49a9aaa09f2
Reviewed-on: https://gerrit.chromium.org/gerrit/24853
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoReport updated CINR and RSSI values on Network interface.
Ben Chan [Tue, 5 Jun 2012 06:35:34 +0000 (23:35 -0700)]
Report updated CINR and RSSI values on Network interface.

BUG=chrome-os-partner:10170
TEST=Monitor CINR/RSSI values before and after connected to a network.

Change-Id: I206627398654f016bb145748b0b2f310cf5d3d12
Reviewed-on: https://gerrit.chromium.org/gerrit/24483
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoHandle system power state changes.
Ben Chan [Mon, 4 Jun 2012 05:07:45 +0000 (22:07 -0700)]
Handle system power state changes.

By communicating with the power manager daemon and observing power state
change signals over DBus, the WiMAX manager registers a suspend delay
such that it can properly release existing devices before the system
goes into suspend mode, and rescan devices after the system resumes from
suspend.

BUG=chrome-os-partner:9832
TEST=Observe WiMAX device status changes during suspend/resume cycle.

Change-Id: I89d2fed7cbaf2c2704ebe3252c1ac50f5b84076d
Reviewed-on: https://gerrit.chromium.org/gerrit/24371
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoReport decoded CINR and RSSI values for Device interface. factory-2394.B
Ben Chan [Sat, 2 Jun 2012 05:20:50 +0000 (22:20 -0700)]
Report decoded CINR and RSSI values for Device interface.

BUG=chrome-os-partner:10005
TEST=Observe updates of CINR and RSSI in Device properties over DBus.

Change-Id: Ieac3809fa64eda9c232c4cf010657d12c4ad0982
Reviewed-on: https://gerrit.chromium.org/gerrit/24349
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoRemove unnecessary linking of zlib.
Ben Chan [Fri, 1 Jun 2012 04:25:50 +0000 (21:25 -0700)]
Remove unnecessary linking of zlib.

BUG=chrome-os-partner:10131
TEST=emerge-lumpy wimax_manager

Change-Id: Ie29227be04997d7dfd7a9b840b5bf1145b3e139a
Reviewed-on: https://gerrit.chromium.org/gerrit/24284
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoAdd additional DBus properties to Device interface.
Ben Chan [Thu, 31 May 2012 07:44:37 +0000 (00:44 -0700)]
Add additional DBus properties to Device interface.

This CL adds the following DBus properties to the Device interface:
- MAC address
- Base station ID
- RF Frequency
- CINRs
- RSSIs

BUG=chrome-os-partner:10005
TEST=Observe updates of Device properties over DBus.

Change-Id: Ib5d9d3673714260f5d42015437132e82165860ef
Reviewed-on: https://gerrit.chromium.org/gerrit/24180
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoPeriodically check for device status changes.
Ben Chan [Tue, 29 May 2012 21:22:53 +0000 (14:22 -0700)]
Periodically check for device status changes.

This CL changes GdmDevice to periodically check for device status
changes and removes the device status polling in GdmDevice::Connect.

BUG=chrome-os-partner:10009
TEST=Tested the following:
1. Establish a WiMAX connection with incorrect credentials and verify
   that UI reports a connection failure.
2. Establish a WiMAX connection with correct credentials and verify
   that UI reports a successful connection.
3. Use dbus-monitor to verify that a DBus signal
   'org.chromium.WiMaxManager.Device.StatusChanged' is emitted after
   the device status changes.

Change-Id: If0038f44a4c78ebf9ca603c9ce5c1d2d4095d1f2
Reviewed-on: https://gerrit.chromium.org/gerrit/23950
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoRescan devices later if no device is detected during initialization. factory-2368.B
Ben Chan [Tue, 29 May 2012 08:01:13 +0000 (01:01 -0700)]
Rescan devices later if no device is detected during initialization.

BUG=chrome-os-partner:10000
TEST=Observed device rescans from syslog messages.

Change-Id: I2eaf155e0987a1a228faea23d0dfbc9369aeda2a
Reviewed-on: https://gerrit.chromium.org/gerrit/23872
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoCheck device status to confirm successful connection.
Ben Chan [Tue, 29 May 2012 06:17:25 +0000 (23:17 -0700)]
Check device status to confirm successful connection.

BUG=chrome-os-partner:10009
TEST=Tested the following:
1. Establish a WiMAX connection with incorrect credentials and verify
   that UI reports a connection failure.
2. Establish a WiMAX connection with correct credentials and verify
   that UI reports a successful connection.
3. Use dbus-monitor to verify that a DBus signal
   'org.chromium.WiMaxManager.Device.StatusChanged' is emitted after
   the device status changes.

Change-Id: I29dcfe4915e6f2559d022c60353aa12358ef5966
Reviewed-on: https://gerrit.chromium.org/gerrit/23864
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoSet up random anonymous identity when no value is given.
Ben Chan [Tue, 29 May 2012 02:11:49 +0000 (19:11 -0700)]
Set up random anonymous identity when no value is given.

BUG=chrome-os-partner:10006
TEST=Build and run unit tests.

Change-Id: I4a443aff28e3d3f5475b0f9c135b260253086fee
Reviewed-on: https://gerrit.chromium.org/gerrit/23863
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>

2 years agoRemove leftover lock file in upstart script.
Ben Chan [Tue, 29 May 2012 03:52:28 +0000 (20:52 -0700)]
Remove leftover lock file in upstart script.

BUG=chrome-os-partner:9999
TEST=Verify that wimax_manager upstart script removes leftover lock file.

Change-Id: I3672934a243e47e78c1481fb7d691b19b041dc55
Reviewed-on: https://gerrit.chromium.org/gerrit/23862
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>

2 years agoChange default EAP parameters for GdmDevice. factory-2268.16.B firmware-link-2348.B
Ben Chan [Thu, 24 May 2012 16:52:23 +0000 (09:52 -0700)]
Change default EAP parameters for GdmDevice.

BUG=none
TEST=Manually tested WiMAX connection.

Change-Id: I137ea8f87d6803b0d1a561eb67e9efb313b43f20
Reviewed-on: https://gerrit.chromium.org/gerrit/23525
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
2 years agoEmit NetworksChanged DBus signal only when a network is added or removed. factory-2338.B
Ben Chan [Mon, 21 May 2012 22:28:09 +0000 (15:28 -0700)]
Emit NetworksChanged DBus signal only when a network is added or removed.

BUG=chrome-os-partner:9782
TEST=None

Change-Id: I76750c1567cd77609d2c3ff38780d9679d82458f
Reviewed-on: https://gerrit.chromium.org/gerrit/23171
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
2 years agoEmit SignalStrengthChanged DBus signal when signal strength changes.
Ben Chan [Mon, 21 May 2012 18:12:08 +0000 (11:12 -0700)]
Emit SignalStrengthChanged DBus signal when signal strength changes.

This CL modifies NetworkDBusAdaptor::UpdateProperties to emit
Network.SignalStrengthChanged DBus signal when the value of signal
strength has changed.

BUG=chrome-os-partner:9831
TEST=Monitor SignalStrengthChanged signals when the signal strength changes.

Change-Id: I06e6921378640fda77dd2e16dfc3521fd86c358e
Reviewed-on: https://gerrit.chromium.org/gerrit/23136
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
2 years agoProvide Network.SignalStrengthChanged signal.
Darin Petkov [Mon, 21 May 2012 07:47:58 +0000 (09:47 +0200)]
Provide Network.SignalStrengthChanged signal.

Also, rename signal and method parameters to lower case for
consistency with other DBus services.

BUG=chrome-os-partner:9831
TEST=tested proxy bindings generation in shill

Change-Id: If7c0543cc98bc39fba28e7465bcd6de974d8aa1f
Reviewed-on: https://gerrit.chromium.org/gerrit/23114
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>

2 years agoImplement periodic network scan and update.
Ben Chan [Mon, 21 May 2012 04:11:39 +0000 (21:11 -0700)]
Implement periodic network scan and update.

This CL modifies GdmDevice to periodically scan available networks and
update network properties. It also makes sure the Network and
NetworkDBusAdaptor objects are reused for an existing network with the
same network identifier.

BUG=chrome-os-partner:9782
TEST=Manually test on klang.

Change-Id: I4a73073b61799e8d1322f777a920b5d7324a81e5
Reviewed-on: https://gerrit.chromium.org/gerrit/23106
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoCalculate signal strength percentage based on RSSI.
Ben Chan [Sun, 20 May 2012 07:36:16 +0000 (00:36 -0700)]
Calculate signal strength percentage based on RSSI.

This CL adds a SignalStrength property to WiMaxManager.Network, which
provides the signal strength percentage calculated from the RSSI value.

BUG=chrome-os-partner:9831
TEST=Build and run unit tests.

Change-Id: I4ac6f81d7f656dd3d2b0c009ce2e7f56bf2e2185
Reviewed-on: https://gerrit.chromium.org/gerrit/23100
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
2 years agoImplement DBus API for connecting to a specific network with EAP parameters.
Ben Chan [Sat, 19 May 2012 22:10:12 +0000 (15:10 -0700)]
Implement DBus API for connecting to a specific network with EAP parameters.

This CL modifies the org.chromium.WiMaxManager.Device.Connect() DBus
method to take a network and custom parameters (for EAP credentials) as
input arguments.

BUG=chrome-os-partner:9830
TEST=Manually test connecting to a network using DBus API.

Change-Id: I53b487fae99af273cb32c38cf90c39421b5ceeb6
Reviewed-on: https://gerrit.chromium.org/gerrit/23097
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoImplement network scan and expose network properties over DBus.
Ben Chan [Thu, 17 May 2012 14:17:21 +0000 (07:17 -0700)]
Implement network scan and expose network properties over DBus.

This CL adds a ScanNetworks DBus method to the Device interface for
scanning available networks and a Network interface for exposing network
properties. It also adds a DBusAdaptable template class to remove some
boilerplate code for creating a DBus adaptor for a class.

BUG=chrome-os-partner:9782
TEST=Manually test on klang using dbus-send.

Change-Id: I97ce1351436afb3aeac0d2a48a8f51e1501e7466
Reviewed-on: https://gerrit.chromium.org/gerrit/22928
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoChange device object path format and clean up code.
Ben Chan [Wed, 16 May 2012 08:27:44 +0000 (01:27 -0700)]
Change device object path format and clean up code.

BUG=chrome-os-partner:9606
TEST=Manually test on klang

Change-Id: I7bcbc7ededa73e90365ad9fd64c9b72550b167a4
Reviewed-on: https://gerrit.chromium.org/gerrit/22799
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
2 years agoImplement manager and device DBus API.
Ben Chan [Sun, 13 May 2012 00:40:13 +0000 (17:40 -0700)]
Implement manager and device DBus API.

BUG=chrome-os-partner:9606
TEST=Manually test on klang

Change-Id: I58eb75b2d4149944d284c9f5c2967197b8ec0c8c
Reviewed-on: https://gerrit.chromium.org/gerrit/22577
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
2 years agoAdd skeleton code for manager and device DBus interface.
Ben Chan [Fri, 11 May 2012 07:21:39 +0000 (00:21 -0700)]
Add skeleton code for manager and device DBus interface.

BUG=chrome-os-partner:9598
TEST=Build and run unit tests.

Change-Id: I36d75b0fb8655c7d2bb4b864f41bd34b323709c1
Reviewed-on: https://gerrit.chromium.org/gerrit/22452
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoAdd main program, test runner and build files.
Ben Chan [Thu, 10 May 2012 17:57:10 +0000 (10:57 -0700)]
Add main program, test runner and build files.

BUG=chrome-os-partner:9598
TEST=Tested the following:
1. emerge-amd64-generic wimax_manager
2. FEATURES=test emerge-amd64-generic wimax_manager

Change-Id: I5615d0708f0452904721b631e8596579c0fd40c6
Reviewed-on: https://gerrit.chromium.org/gerrit/22384
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

2 years agoInitial commit.
Ben Chan [Thu, 10 May 2012 17:32:39 +0000 (10:32 -0700)]
Initial commit.

- Initialize the code repository for Chromium OS WiMAX Manager.
- Add LICENSE and OWNERS file.

BUG=chrome-os-partner:9598
TEST=none