OSDN Git Service
Christopher Wiley [Mon, 26 Sep 2016 22:58:18 +0000 (22:58 +0000)]
Merge "Add AIDL method to retrieve network interface name" am:
ced07e8491
am:
dc4ff8114c
Change-Id: I5122a025a958124cc2452293a9f83f8913f9f9b8
Christopher Wiley [Mon, 26 Sep 2016 22:53:19 +0000 (22:53 +0000)]
Merge "Add AIDL method to retrieve network interface name"
am:
ced07e8491
Change-Id: I9f5f9bad8e9aa616e273a322d0d285b185ab3dd1
Treehugger Robot [Mon, 26 Sep 2016 22:44:09 +0000 (22:44 +0000)]
Merge "Add AIDL method to retrieve network interface name"
Christopher Wiley [Mon, 26 Sep 2016 17:21:16 +0000 (10:21 -0700)]
Add AIDL method to retrieve network interface name
This is necessary to watch for interface up/down events
in SoftApManager.
Bug:
31337216
Test: unit/integration tests pass
Test: upcoming integration tests use this method
Change-Id: I7d246b83058bd3d68970f3f72eeeb834d7dba309
Ningyuan Wang [Mon, 26 Sep 2016 16:24:31 +0000 (16:24 +0000)]
Wrap NLMSG_ERROR handling into |SendMessageAndGetSingleResponse| am:
f4bed1cc39
am:
bf1b67e210
Change-Id: Ibac15f0c21deae2f99ce4ec7d5e514a987759ee3
Ningyuan Wang [Mon, 26 Sep 2016 16:22:10 +0000 (16:22 +0000)]
Wrap NLMSG_ERROR handling into |SendMessageAndGetSingleResponse|
am:
f4bed1cc39
Change-Id: I65bcd96370b84443d2e37b55d77fda41d251fbaa
Ningyuan Wang [Tue, 20 Sep 2016 20:37:10 +0000 (13:37 -0700)]
Wrap NLMSG_ERROR handling into |SendMessageAndGetSingleResponse|
This also fixes a typo.
Bug:
31111084
Test: compile, unit tests, manual tests
Change-Id: I802487deedc219a6ad1ed78ea1a6b94e876e4d67
Ningyuan Wang [Wed, 21 Sep 2016 15:05:01 +0000 (15:05 +0000)]
Merge "Support signal poll for wificond" am:
5abb163c9f
am:
a3fa0eb48e
Change-Id: Icb4b9797e64a215cb52e007a6c17b18ac65fa27d
Ningyuan Wang [Wed, 21 Sep 2016 15:02:31 +0000 (15:02 +0000)]
Merge "Support signal poll for wificond"
am:
5abb163c9f
Change-Id: I13bd13802a8b13a01a27d82dfe191755b232e4f5
Ningyuan Wang [Wed, 21 Sep 2016 14:54:37 +0000 (14:54 +0000)]
Merge "Support signal poll for wificond"
Josh Gao [Wed, 21 Sep 2016 01:10:15 +0000 (01:10 +0000)]
Merge "Rename base::unique_fd::clear to base::unique_fd::reset." am:
ef84b9296e
am:
d147a5b683
Change-Id: I8549f63fc0e6bd371d6edb58756c22a695f63c57
Josh Gao [Wed, 21 Sep 2016 01:07:32 +0000 (01:07 +0000)]
Merge "Rename base::unique_fd::clear to base::unique_fd::reset."
am:
ef84b9296e
Change-Id: I2ccda2b5861fd7a2801ba9eb81e966cbcfcd4666
Josh Gao [Wed, 21 Sep 2016 01:03:06 +0000 (01:03 +0000)]
Merge "Rename base::unique_fd::clear to base::unique_fd::reset."
Ningyuan Wang [Tue, 20 Sep 2016 21:50:58 +0000 (21:50 +0000)]
Add getMacAddress() to wificond binder interface am:
cc77f636f4
am:
e393743f4e
Change-Id: I5a089505d7a65a5d7afeb990f8f171f0cbb0a6ce
Ningyuan Wang [Tue, 20 Sep 2016 21:50:48 +0000 (21:50 +0000)]
Merge "Add bool field |associated| to ScanResult class" am:
12bfcf9bb3
am:
ad0f6f4be6
Change-Id: I060544402dc5d51db671c3bf8ab9c0b330bcd645
Ningyuan Wang [Tue, 20 Sep 2016 21:50:37 +0000 (21:50 +0000)]
Notify scan aborted events am:
c9566b1dc5
am:
bba5bcde7b
Change-Id: Ib2497a4acaa6fb1e111a4e4e36ca535289e9e388
Ningyuan Wang [Tue, 20 Sep 2016 21:45:31 +0000 (21:45 +0000)]
Add getMacAddress() to wificond binder interface
am:
cc77f636f4
Change-Id: Id109422dd756fae49b281dbf8ee17e12eed2eefe
Ningyuan Wang [Tue, 20 Sep 2016 21:45:21 +0000 (21:45 +0000)]
Merge "Add bool field |associated| to ScanResult class"
am:
12bfcf9bb3
Change-Id: Ide8cc70e6ae8ec7df31cfd27719633c810d09ee9
Ningyuan Wang [Tue, 20 Sep 2016 21:45:06 +0000 (21:45 +0000)]
Notify scan aborted events
am:
c9566b1dc5
Change-Id: I4e9340e637b529edcd38d86f14743c8f928a9db9
Josh Gao [Tue, 20 Sep 2016 21:44:02 +0000 (14:44 -0700)]
Rename base::unique_fd::clear to base::unique_fd::reset.
Change-Id: Ie9e55628cb7baa062325c55af37732aedcebf244
Test: TreeHugger
Ningyuan Wang [Fri, 16 Sep 2016 22:39:41 +0000 (15:39 -0700)]
Support signal poll for wificond
This adds the NL80211 implementation as well as the binder interface for
signal polling function.
In order to accommodate the existing usage of java framework, this also
returns the parameter link speed(transmission rate in Mbps).
Bug:
30978872
Test: compile, manual tests
Change-Id: I69ca8e0e2dbe52f57f1a5ad19b2cacc940f2a91a
Ningyuan Wang [Wed, 14 Sep 2016 20:47:38 +0000 (13:47 -0700)]
Add getMacAddress() to wificond binder interface
Bug:
31042306
Test: compile, integration test
Change-Id: Ic8b510aa761b4e79bf903f2d90af680b7cb5ca24
Treehugger Robot [Tue, 20 Sep 2016 21:28:08 +0000 (21:28 +0000)]
Merge "Add bool field |associated| to ScanResult class"
Ningyuan Wang [Tue, 20 Sep 2016 18:00:11 +0000 (11:00 -0700)]
Notify scan aborted events
Bug:
31495091
Test: compile, manual tests
Change-Id: I94c50f44449bd1f0c7c445775434a34d5ca7390a
Ningyuan Wang [Tue, 20 Sep 2016 17:41:30 +0000 (10:41 -0700)]
Add bool field |associated| to ScanResult class
Once we have the knowledge if this BSS is associated or not,
we can update our local cache of connection frequency.
wificond can provide this cached frequency upon polling instead of
sending a costly NL80211_CMD_GET_SURVEY message.
Bug:
31595463
Test: compile, manual test
Change-Id: Ic0188a82da4643e9a9c3c6751b5863b1797a732e
Ningyuan Wang [Mon, 19 Sep 2016 17:39:55 +0000 (17:39 +0000)]
Support fetching packet counters for wificond am:
a12253e46c
am:
b04e955e16
Change-Id: I315610705b2d62093642a20e00abaebd82cfa1c6
Ningyuan Wang [Mon, 19 Sep 2016 17:36:54 +0000 (17:36 +0000)]
Support fetching packet counters for wificond
am:
a12253e46c
Change-Id: Ibd67b45d41da194bbb4b160872fbfb80c246ea7e
Ningyuan Wang [Thu, 15 Sep 2016 17:53:07 +0000 (10:53 -0700)]
Support fetching packet counters for wificond
BUG=
30978872
TEST=compile, manual tests
Change-Id: Ifa0dd9ce794a1cdb6da7e357d6873992091e3ea0
Ningyuan Wang [Fri, 16 Sep 2016 00:01:04 +0000 (00:01 +0000)]
Merge "Add 'get interfaces' to wificond Binder interface." am:
4e7a07d580
am:
b2de52e555
Change-Id: I1d65e76f60c5b8802a6cc335aa600bc1f0dd00c2
Ningyuan Wang [Thu, 15 Sep 2016 23:59:03 +0000 (23:59 +0000)]
Merge "Add 'get interfaces' to wificond Binder interface."
am:
4e7a07d580
Change-Id: Ifcff8af9880f5f2761777ad7fbda38d3c2ef637a
Treehugger Robot [Thu, 15 Sep 2016 23:55:09 +0000 (23:55 +0000)]
Merge "Add 'get interfaces' to wificond Binder interface."
Ningyuan Wang [Thu, 15 Sep 2016 23:53:33 +0000 (23:53 +0000)]
Merge "Handle 0 nla_len for DebugLog()" am:
96b5919172
am:
5c20508090
Change-Id: If79e558c01edeb8e12b49173023eeeac4ea8b0fe
Ningyuan Wang [Thu, 15 Sep 2016 23:51:02 +0000 (23:51 +0000)]
Merge "Handle 0 nla_len for DebugLog()"
am:
96b5919172
Change-Id: I6961a4151a934757fb3c2eeec2c76f2760398600
Treehugger Robot [Thu, 15 Sep 2016 23:43:12 +0000 (23:43 +0000)]
Merge "Handle 0 nla_len for DebugLog()"
Ningyuan Wang [Mon, 12 Sep 2016 17:49:45 +0000 (10:49 -0700)]
Add 'get interfaces' to wificond Binder interface.
This also adds the missing 'override' to enableSupplicant() and
disableSupplicant().
BUG=
31430211
TEST=compile, manual tests
Change-Id: I23db45a41d1dcbf5d3294b50e94961eb2de6bf4a
Ningyuan Wang [Thu, 15 Sep 2016 19:41:51 +0000 (19:41 +0000)]
Add a nl80211 helper function to get band info and scan capabilities am:
e9a13390cb
am:
5e24556e6e
Change-Id: I0046ec3694afd29c5f33a0b32402c6eb3ff50dfc
Ningyuan Wang [Thu, 15 Sep 2016 19:39:52 +0000 (19:39 +0000)]
Add a nl80211 helper function to get band info and scan capabilities
am:
e9a13390cb
Change-Id: I5dcd28a119216a2dd0dcae75764fb5db14176456
Ningyuan Wang [Mon, 12 Sep 2016 23:33:31 +0000 (16:33 -0700)]
Add a nl80211 helper function to get band info and scan capabilities
This also fixes a few lines of logging.
BUG=
31458138
BUG=
31429695
TEST=compile, manual tests
Change-Id: I309d9ce82eb80e79a97149bd16e1caf5e13d674b
Ningyuan Wang [Tue, 13 Sep 2016 22:20:01 +0000 (15:20 -0700)]
Handle 0 nla_len for DebugLog()
This fixes the infinite loop caused by 0 nla_len.
This also fixes a typo.
BUG=None
TEST=compile, manual tests
Change-Id: I903d5d3f179a96f1105e0d66f26b59d473996dfe
Ningyuan Wang [Mon, 12 Sep 2016 23:55:50 +0000 (23:55 +0000)]
Merge "Broadcast interface changes through binder" am:
4086519433
am:
f341c268dd
Change-Id: I1e3e75a996c2efb4130e9bdd18ba5e3fdf3eb156
Ningyuan Wang [Mon, 12 Sep 2016 23:52:52 +0000 (23:52 +0000)]
Merge "Broadcast interface changes through binder"
am:
4086519433
Change-Id: I69e95b893a89926a2f855bbe66a899b7a66f7272
Ningyuan Wang [Mon, 12 Sep 2016 23:47:29 +0000 (23:47 +0000)]
Merge "Broadcast interface changes through binder"
Ningyuan Wang [Mon, 12 Sep 2016 21:37:30 +0000 (21:37 +0000)]
Merge "Retrieve list of attributes from a nested attribute" am:
fc3c67a237
am:
7452dcd4c3
Change-Id: Ie52036b44e153a1070d6abce87b026d6dbd994e0
Ningyuan Wang [Mon, 12 Sep 2016 21:35:00 +0000 (21:35 +0000)]
Merge "Retrieve list of attributes from a nested attribute"
am:
fc3c67a237
Change-Id: I447559a6faa4a53a54ff9457453fd3779a948155
Ningyuan Wang [Mon, 12 Sep 2016 21:23:05 +0000 (21:23 +0000)]
Merge "Retrieve list of attributes from a nested attribute"
Ningyuan Wang [Fri, 9 Sep 2016 20:15:37 +0000 (13:15 -0700)]
Broadcast interface changes through binder
This broadcasts interface ready/towndown events after we
create/remove an interface.
BUG=
31349441
TEST=compile, unit tests
Change-Id: I8d4f20ddb82db1bb53d12f3feeb06d4e761be689
Christopher Wiley [Sat, 10 Sep 2016 00:52:00 +0000 (00:52 +0000)]
Merge "Make failure to take ownership of firmware path fatal" am:
47d4d3437d
am:
00cb4dcaee
Change-Id: I5a2a206b3768f900c90a54e0e681e3280890b8b4
Christopher Wiley [Sat, 10 Sep 2016 00:48:30 +0000 (00:48 +0000)]
Merge "Make failure to take ownership of firmware path fatal"
am:
47d4d3437d
Change-Id: Ib69c5a183725614ce7b9e9c17dd7df9938c476a7
Treehugger Robot [Sat, 10 Sep 2016 00:33:09 +0000 (00:33 +0000)]
Merge "Make failure to take ownership of firmware path fatal"
Ningyuan Wang [Fri, 9 Sep 2016 22:35:05 +0000 (22:35 +0000)]
Add binder interface for registering/unregistering interface changes am:
dea7ebe307
am:
faf95f77f2
Change-Id: I65b894d1d44743fe5f921e1c5bf1c10f13434b28
Ningyuan Wang [Fri, 9 Sep 2016 22:32:35 +0000 (22:32 +0000)]
Add binder interface for registering/unregistering interface changes
am:
dea7ebe307
Change-Id: I1650a2ee1443f9141f5e828a1057917c3b4ee482
Ningyuan Wang [Fri, 9 Sep 2016 17:31:17 +0000 (10:31 -0700)]
Add binder interface for registering/unregistering interface changes
BUG=
31349441
TEST=compile, unit tests
Change-Id: I0fa00ecdeec46246875f7de2479dab1470d102e5
Christopher Wiley [Fri, 9 Sep 2016 20:29:44 +0000 (13:29 -0700)]
Make failure to take ownership of firmware path fatal
Bug:
31225859
Test: Can connect to wifi networks after this change.
Test: unit, integration tests pass
Change-Id: I79a2657d0a6898dc6db581b4c10d98adcb907bb1
Ningyuan Wang [Fri, 9 Sep 2016 00:22:45 +0000 (00:22 +0000)]
Merge "Add capability field to wificond scan result" am:
5811a5ac46
am:
23baf302a5
Change-Id: I048c6f8823345a38a198b4374a450c952b639115
Ningyuan Wang [Fri, 9 Sep 2016 00:20:15 +0000 (00:20 +0000)]
Merge "Add capability field to wificond scan result"
am:
5811a5ac46
Change-Id: Ie7b537ee9a22cc98c8aecbf2857abe804c174f45
Ningyuan Wang [Fri, 9 Sep 2016 00:13:13 +0000 (00:13 +0000)]
Merge "Add capability field to wificond scan result"
Ningyuan Wang [Tue, 6 Sep 2016 18:48:15 +0000 (11:48 -0700)]
Retrieve list of attributes from a nested attribute
This adds helper functions to retrieve a list of attribute
values or nested attributes from a nested attribute.
This helps us get all sub-attributes in one pass.
BUG=
30901326
TEST=compile, unit tests, manual tests
Change-Id: I3f9090b65f8e08c2a2643b35ec6db3340e1effd2
Ningyuan Wang [Thu, 8 Sep 2016 22:09:36 +0000 (22:09 +0000)]
Merge "Return on invalid attribute length for DebugLog()" am:
3a6630a841
am:
6f103e177f
Change-Id: I8b230b1594e110801026bcec5d7a658b388b55ff
Ningyuan Wang [Thu, 8 Sep 2016 22:07:06 +0000 (22:07 +0000)]
Merge "Return on invalid attribute length for DebugLog()"
am:
3a6630a841
Change-Id: Ic12580c71f01853bfd9fcc590e5b3e0112e89354
Ningyuan Wang [Thu, 8 Sep 2016 22:01:21 +0000 (22:01 +0000)]
Merge "Return on invalid attribute length for DebugLog()"
Ningyuan Wang [Tue, 6 Sep 2016 21:52:55 +0000 (14:52 -0700)]
Return on invalid attribute length for DebugLog()
This fixes the case where |nla_len| is invalid and it causes
an infinite loop.
BUG=None
TEST=compile, manual tests
Change-Id: Ica24355618b144337a5731d57a57202c031472a5
Ningyuan Wang [Thu, 8 Sep 2016 21:49:06 +0000 (21:49 +0000)]
Merge "Use wrapper functions to simplify message response handling" am:
2a48fa9794
am:
7ba21d504f
Change-Id: I65b70843c73540c3d94f31c7f1226032cf1d2a76
Ningyuan Wang [Wed, 31 Aug 2016 20:31:36 +0000 (13:31 -0700)]
Add capability field to wificond scan result
BUG=
31157181
TEST=compile and manual test
Change-Id: I8c7cef6334a49eedd1060da6d417e771ed049916
Ningyuan Wang [Thu, 8 Sep 2016 21:46:35 +0000 (21:46 +0000)]
Merge "Use wrapper functions to simplify message response handling"
am:
2a48fa9794
Change-Id: I4134c1d7d28a28a8151e8d1e6a5ab4ea0564a461
Treehugger Robot [Thu, 8 Sep 2016 21:37:02 +0000 (21:37 +0000)]
Merge "Use wrapper functions to simplify message response handling"
Ningyuan Wang [Wed, 7 Sep 2016 21:23:32 +0000 (21:23 +0000)]
Fix looper unit tests am:
26e1a4b76b
am:
e8973c613e
Change-Id: I6292d897b3fef95ed66874af553003c9db1f3d11
Ningyuan Wang [Wed, 7 Sep 2016 21:21:02 +0000 (21:21 +0000)]
Fix looper unit tests
am:
26e1a4b76b
Change-Id: Id619b67116a42e7729c1eff77df3cbbc71873371
Ningyuan Wang [Tue, 6 Sep 2016 22:17:52 +0000 (15:17 -0700)]
Fix looper unit tests
|LooperBackedEventLoopStopWatchFdTest| sometimes fails because the
read_result has no initial value.
This patch fixes it and also gives initial value to all boolean
variables for readability.
BUG=None
TEST=unittests
Change-Id: I35c179b64fc262ebbe76469546d6c0158d125485
Dmitry Shmidt [Thu, 1 Sep 2016 00:36:35 +0000 (00:36 +0000)]
Merge "Do not assert crash if FW_PATH can not be owned" am:
5dcc50802a
am:
0b8e3cb5ce
Change-Id: Ica53fa0392e61ac7d36a0da469a9748ebaa133cf
Dmitry Shmidt [Thu, 1 Sep 2016 00:33:03 +0000 (00:33 +0000)]
Merge "Do not assert crash if FW_PATH can not be owned"
am:
5dcc50802a
Change-Id: I27368ca57d5dc2033514f3a5f12da89c330a1fea
Dmitry Shmidt [Thu, 1 Sep 2016 00:24:36 +0000 (00:24 +0000)]
Merge "Do not assert crash if FW_PATH can not be owned"
Ningyuan Wang [Wed, 31 Aug 2016 23:35:09 +0000 (23:35 +0000)]
Fix logging of GetInterfaceInfo() and GetWiphyIndex() am:
3b89469905
am:
fd02c4e09a
Change-Id: Idc27fcec2bdd144b74e1c20096d76ed2d5c77d74
Ningyuan Wang [Wed, 31 Aug 2016 23:32:12 +0000 (23:32 +0000)]
Fix logging of GetInterfaceInfo() and GetWiphyIndex()
am:
3b89469905
Change-Id: I64d49229aa935a71eff0019577ccfcc95e2185a0
Dmitry Shmidt [Wed, 31 Aug 2016 23:21:40 +0000 (16:21 -0700)]
Do not assert crash if FW_PATH can not be owned
Bug:
29220405
Change-Id: Ia344193d22070c22d106ee948e9bc9735dcc7a3c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Ningyuan Wang [Wed, 31 Aug 2016 20:34:00 +0000 (13:34 -0700)]
Use wrapper functions to simplify message response handling
BUG=
31111084
TEST=compile, unittests
Change-Id: I220719f94f768cd8dd9f3711347d3c399389fba0
Ningyuan Wang [Wed, 31 Aug 2016 20:29:16 +0000 (13:29 -0700)]
Fix logging of GetInterfaceInfo() and GetWiphyIndex()
CleanUpSystemState() calls GetWiphyIndex() to mark down
any existing interfaces.
It should not be an ERROR if we find no wiphy/interface
at this time.
BUG=None
TEST=compile
Change-Id: I64c1f81625c4964b5ed8c501bd6f761cde883495
The Android Automerger [Mon, 29 Aug 2016 23:08:54 +0000 (23:08 +0000)]
Merge branch 'stage-aosp-master' into nyc-dev-plus-aosp
Ningyuan Wang [Fri, 26 Aug 2016 22:47:29 +0000 (15:47 -0700)]
Do not report error if no ssid is found in IE
BUG=None
TEST=compile
Change-Id: I71b441728687faf167d417e50255322143c17f80
Ningyuan Wang [Fri, 26 Aug 2016 21:20:53 +0000 (21:20 +0000)]
Merge "Add wrapper functions of SendPacketAndGetResponses"
Ningyuan Wang [Thu, 25 Aug 2016 23:45:05 +0000 (16:45 -0700)]
Add wrapper functions of SendPacketAndGetResponses
This can help simplify the existing code of handling netlink
responses.
BUG=
31111084
TEST=compile
Change-Id: I9a48ddb9af805c59c2733b7c1e2413b3f049edda
Ningyuan Wang [Thu, 25 Aug 2016 22:47:23 +0000 (15:47 -0700)]
Add function StartScheduledScan()
This function starts scans repeatedly.
This is expected to be used to request Pno scans.
BUG=
31067130
TEST=compile and manual tests
Change-Id: I6f0e0bc999197e84a8c6130c068204b305e71d2f
TreeHugger Robot [Fri, 26 Aug 2016 20:46:54 +0000 (20:46 +0000)]
Merge "Add function StopScheduledScan()"
TreeHugger Robot [Fri, 26 Aug 2016 20:32:44 +0000 (20:32 +0000)]
Merge "Tear down system state on wificond startup"
Ningyuan Wang [Thu, 25 Aug 2016 20:48:07 +0000 (13:48 -0700)]
Add DebugLog() to NL80211NestedAttr
BUG=None
TEST=compile, manual test
Change-Id: Id2dd18f937f6f9798723555f78c3f3e72b2440a8
Ningyuan Wang [Wed, 24 Aug 2016 22:17:14 +0000 (15:17 -0700)]
Add function StopScheduledScan()
BUG=
31067130
TEST=compile and manual tests
Change-Id: I81bccf991314ff9eb478e98d5c5db17d0561587a
Christopher Wiley [Tue, 23 Aug 2016 20:48:21 +0000 (13:48 -0700)]
Tear down system state on wificond startup
Test: Added an integration test
Bug:
29620309
Change-Id: Ibf378dda9b6ca2dfa29cca3071d967a3e4f6b036
Christopher Wiley [Tue, 23 Aug 2016 17:56:06 +0000 (10:56 -0700)]
Use mockable supplicant delegate
This allows us to mock interactions with supplicant in unit tests.
Bug:
29620309
Test: unit/integration tests pass
Change-Id: I1526c90ffa9822a4d7dcabe5752676bfc61d6965
Christopher Wiley [Mon, 22 Aug 2016 17:24:22 +0000 (10:24 -0700)]
Drop privileges and become wifi user during startup
Bug:
29870863
Test: Unit and integration tests pass
Change-Id: I939ad488eb3ad17cb2c166298e720f7d7b368f57
Christopher Wiley [Tue, 23 Aug 2016 00:42:58 +0000 (17:42 -0700)]
Set AP interfaces down after stopping hostapd
This cleans up after we unceremoniously kill hostapd with SIGKILL.
It also guarantees that we don't continue beaconing after the death
of hostapd.
Test: Unit and integration tests pass
Bug:
31023120
Change-Id: I6a363bfdab81ea24a25d6a86a42ff4ccc99556dd
Roshan Pius [Tue, 23 Aug 2016 18:26:51 +0000 (11:26 -0700)]
Fetch the mac address in GetInterfaceNameAndIndex
Rename the |GetInterfaceNameAndIndex| function to
|GetInterfaceInfo| and fetch the mac address assigned to the interface
along with the other info being fetched.
BUG:
31038272
TEST: Modified existing tests
TEST: Manual tests on bullhead to see if the correct mac address is
fetched.
Change-Id: I89c11e2227ef9bdf90dfd681df09d8b8116cd53f
Ningyuan Wang [Fri, 19 Aug 2016 21:06:56 +0000 (14:06 -0700)]
Get rid of NL80211Packet copying
This CL removes all NL80211Packet copying by introducing the use of
unique_ptr on NL80211Packet objects.
The copy constructor is not explicitly deleted because it helps write
readable unit tests.
BUG=
30901326
TEST=compile, unit tests, manual tests
Change-Id: I8dc9b42cacc3e929aa720abbd8ff0a3862b33bd3
TreeHugger Robot [Fri, 19 Aug 2016 21:40:47 +0000 (21:40 +0000)]
Merge changes I502fb470,I5bb0d98c
* changes:
Monitor scan results for current client interface
Add helper functions to get and parse scan results
Ningyuan Wang [Fri, 19 Aug 2016 18:32:06 +0000 (18:32 +0000)]
Merge "Pass packet by reference to reduce copy operations"
Ningyuan Wang [Fri, 19 Aug 2016 18:32:06 +0000 (18:32 +0000)]
Merge "Add a copy counters for netlink packet debugging"
Ningyuan Wang [Thu, 18 Aug 2016 22:26:15 +0000 (15:26 -0700)]
Monitor scan results for current client interface
This CL includes the following changes:
1. Add functions which can subscribe and unsubscribe scan results
notification in ScanUtils, so we don't need to expose a NetlinkManager
object to ClientInterfaceImpl.
2. ClientInterfaceImpl subscribes the scan results when it is
initialized. It unsubscribes the scan results when it is destroyed.
3. ClientInterfaceImpl requests scan results objects using ScanUtils.
In later CLs these objects are supposed to be sent to java framework
through binder.
4. Add corresponding mock classes and unit tests adjustment for the
changes above.
This CL won't enable the scan results monitoring unless we uncomment
SubscribeToEvents() in NetlinkManager::Start().
BUG=
30896985
TEST=compile, unit tests, manual tests
Manual test:
1. Uncomment SubscribeToEvents() in NetlinkManager::Start().
2. Call ScanResult::DebugLog() in ClientInterfaceImpl::
OnScanResultsReady().
After 1 and 2 we can see detail scan results in wificond logs.
Change-Id: I502fb4704ffce4dd2bf8de8d0d5d9293b2b43d9a
Ningyuan Wang [Wed, 17 Aug 2016 17:22:46 +0000 (10:22 -0700)]
Add helper functions to get and parse scan results
GetScanResult() is used for request the newest scan results from kernel.
ParseScanResult() is used for converting scan result packet to a scan
result object.
This CL also moves all the scanning helper functions to a new file.
BUG=
30896985
TEST=manual tests
TEST=unit tests
Change-Id: I5bb0d98cb62daf9cc02da31a7cdf42f0c9fff16c
Ningyuan Wang [Wed, 17 Aug 2016 21:32:26 +0000 (14:32 -0700)]
Pass packet by reference to reduce copy operations
With this change, along with ag/
1333902 the copy counter is
reduced from 14 to 5, for the entire booting process.
BUG=
30901326
TEST=unit tests
Change-Id: Ie7f46b6ca1663a00d1703d567b2de35259bfd13a
TreeHugger Robot [Thu, 18 Aug 2016 17:21:55 +0000 (17:21 +0000)]
Merge "Add the ability to start/stop supplicant to wificond"
Ningyuan Wang [Wed, 17 Aug 2016 22:13:02 +0000 (15:13 -0700)]
Add a copy counters for netlink packet debugging
Copy operation of NL80211Packet copies the entire buffer. This
costs a lot resouces. We should avoid it as much as we can.
This CL adds a static variable in NL80211Packet tracking the number
of copy operations, as well as another counter tracking the bytes of
we copied. This help us debug wificond netlink performance issues.
BUG=
30901326
TEST=manual tests
Change-Id: I5be04ff977b5ffd7340a98d435a5703b0b79be28
TreeHugger Robot [Thu, 18 Aug 2016 16:29:30 +0000 (16:29 +0000)]
Merge "Add function for triggering scan"