The signal strength (RSSI) field is stored as a list of
uint8_t attributes in the kernel.
Bug: 68335251
Test: Ensured radio chain info is present on crosshatch scan results.
Test: ./system/connectivity/wificond/runtests.sh
Change-Id: Ic11fca82e78d066ad0bf18fabad5162b5a834b81
The libc version of nl80211.h is in sync with stable kernel version
supported by Android. This inhibits us from using any new upstream
nl80211 APIs, until the oldest supported Android kernel includes
those APIs. So keep a local copy of the nl80211.h inside wificond's
source tree. This header file need to be manually updated from the latest
Pixel kernel tree for new features. Since the nl80211 command set itself is
backward compatible, these new features should silently fail on devices
runnning older kernels.
The current nl80211.h file was picked from `p-dev-msm-bluecross-4.9`
kernel branch.
Bug: 72709703
Test: wificond compiles with the new headers.
Test: Device boots up and connects to wifi networks.
Test: Will send for regression tests along with the incoming DBS changes.
Change-Id: I0621c78747d4bcca8e1dd198209f86f8ebb802bb
This adds BaseNL80211Attr::Merge() and NL80211Packet::
GetAllAttributes(). These functions are useful for merging
attributes across different netlink packets.
This also adds the corresponding unit tests and fixes a existing
typo.
Bug: 36899490
Test: compile, unit tests
Change-Id: Ie53b0e088aee7aab80cf9b06b2f0e822c0062a3d
Fix the following warnings:
system/connectivity/wificond/net/netlink_manager.cpp:189:54: warning:
Assigned value is garbage or undefined
[clang-analyzer-core.uninitialized.Assign]
system/connectivity/wificond/tests/nl80211_attribute_unittest.cpp:280:22:
warning: The left operand of '==' is a garbage value
[clang-analyzer-core.UndefinedBinaryOperatorResult]
system/connectivity/wificond/tests/nl80211_attribute_unittest.cpp:281:22:
warning: The left operand of '==' is a garbage value
[clang-analyzer-core.UndefinedBinaryOperatorResult]
system/connectivity/wificond/tests/nl80211_attribute_unittest.cpp:282:22:
warning: The left operand of '==' is a garbage value
[clang-analyzer-core.UndefinedBinaryOperatorResult]
Bug: b/27101951
Test:Warnings are gone.
Change-Id: Ice4e7cd9954953affbd2e34d5c85b3e96a2756a1
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
This CL includes the following changes:
1.
Improve the interface design of NL80211Attribute classes.
Add a function GetAttributeValue() to NL80211NestedAttr class.
2.
Support more types of nl80211 attributes. This includes all
size of interger types, string, flag, and raw buffer.
3.
Guarantee payload size alignment by padding 0s.
4.
Support FLAG attribute by adding a function AddAttribute(int id).
We don't instanciate any flag attribute because it has no payload.
5.
Add corresponding unit tests.
BUG=29454786
TEST=compile
TEST=run unittests
Change-Id: I3653a3babfc1df5dde42eecf4410fd636d26b956
This CL includes the following changes:
1. Initial design for NL80211Attribute classes.
2. Unittests verifying the functions of NL80211Attribute
classes. This also shows how these internal interfaces
are going to be used.
BUG=29454786
TEST=compile
TEST=run unittests
Change-Id: I52f07f9a45d5966a7787c591c5f90dc1bf55ecf8