summaryrefslogtreecommitdiff
path: root/system/stack/gap
AgeCommit message (Collapse)Author
2024-12-05Add missing flag of socket_settings_api William Escande
This CL is made for flag completeness, to make sure that with a flag disabled, there is no behavior change than without the feature Bug: 367419086 Test: m -j Flag: com.android.bluetooth.flags.socket_settings_api Change-Id: I147c90dec378abe2cbfc1a6815fd8df7193e10e6
2024-12-03Set the initial local credits to 0 for offload LE socket Jayden Kim
Bug: 342012881 Bug: 367419086 Test: m -j Change-Id: Ie2967885b07a2da27ee16027b894db65cfbf2f58
2024-12-03Add helper functions to get LE L2CAP channel and ACL handle information Jayden Kim
Bug: 342012881 Bug: 367419086 Test: m -j Change-Id: I5babc03bac5f7c7c3d6c5565dce044e96ac0154c
2024-10-30system/stack/gap: Fix -Wmissing-prototype errors Henri Chataing
Bug: 369381361 Test: m com.android.btservices Flag: EXEMPT, no logical change Change-Id: I5e5bab4f10e54d928fdae0dbe234f70fe4f5cbd9
2024-09-25Enforce -Wmissing-prototypes Henri Chataing
This lint check will raise an error if a function is implemented without a corresponding prototype declaration included in scope. The main use case will be to ensure mock functions do not become out of sync causing the original function to be linked instead. Because of the large amount of errors, this change suppresses errors in all locations, to be cleaned up gradually. Bug: 369381361 Test: m com.android.btservices Flag: EXEMPT, lint fixes Change-Id: I888b5e284e237d8a6e2864bdde55c0a7fc0c348d
2024-09-14Merge "Fix documentation and typos in gap_ble.cc" into main Treehugger Robot
2024-09-12Define tCONN_ID for GATT Connection ID Kyunglyul Hyun
Introduce tCONN_ID as a type for GATT connection IDs used internally by the native stack. Althogh this change itself doesn't do anything, this is a preparatory step for expanding tGATT_IF to uint16_t and tCONN_ID to uint32_t. Rust stack cleanup will follow in a subsequent CL. Flag: EXEMPT, mechanical refactor Bug: 273561907 Test: atest BluetoothInstrumentationTests Change-Id: I307fbb0815f3f3c31c80e75c12c4223237099adc
2024-09-12Fix documentation and typos in gap_ble.cc Kihong Seong
Bug: 365905341 Test: m com.android.btservices Flag: EXEMPT, changes to logs only Change-Id: I2de07cbe8c90a053550f7b02397959e91c8edd0c
2024-09-11[25/25] stack::l2cap encapsulate l2c_api.h Chris Manton
Bug: 343808590 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I73cdcd8ce5f46db78958782fd2568e2a3f126583
2024-09-10[17/25] stack::gap Use stack::l2cap::get_interface() Chris Manton
Bug: 343808590 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I23d7fb3ca3318cee3555d183c6392efa2c4e16e6
2024-08-31Add GAP interface to read class of device for LE devices Himanshu Rawat
Test: mmm packages/modules/Bluetooth Flag: EXEMPT no logical change Bug: 286334644 Change-Id: I522a2c0d62b596e89afee20ed5a6a55fd2e96bd5
2024-08-30stack::l2cap class enum-ify tL2CAP_CONN Chris Manton
Bug: 363111728 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I939f82f7d4d18e5419e14140057dfff6e09a6e7a
2024-08-09[1/24] Canonical form towards class enumification tBTM_STATUS Chris Manton
Prepare for class enum-ify tBTM_STATUS Bug: 358402071 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: Ia2b5b36c696476db8d4fefd59b83714e8d4b1d8b
2024-08-07mock: [60/63] Remove BTM_UseLeLink Chris Manton
Use get_btm_client_interface() instead Bug: 352129816 Test: m . Flag: EXEMPT, Test infrastructure Change-Id: Ic2f7bb9ed48bee4cd055d30fb5c9c5179bd3c61b
2024-07-19Merge "InitFlags: Remove unused includes" into main Myles Watson
2024-07-18InitFlags: Remove unused includes Myles Watson
Bug: 252902891 Test: mma -j32 Flag: EXEMPT, no logical change Change-Id: Ic67310fb798e3380089598ee96f20a03fc56d417
2024-07-16mock: [8/63] Remove BTM_BleSetPrefConnParams Chris Manton
Use get_btm_client_interface() instead Bug: 352129816 Test: m . Flag: EXEMPT, Test infrastructure Change-Id: I6610625b0d3a7e395a2c40fd07121d52d9cf7485
2024-07-07Format: apply clang rules William Escande
Restore SpacesBeforeTrailingComments to 2 to match current style Then run clang-format -i **/**.{c,h,cc,cpp,hpp} Then fix a bunch of typo (reported by gerrit) Then fix unnecessary multiline string Then fix whitespace for disabled clang format (reported by cpplint) This is no-op Bug: 311772251 Test: mmm packages/modules/Bluetooth Flag: Exempt Format only Change-Id: If135447803a40a2a07d4630ba2195e08ef8d250c
2024-06-19Streamline enum stack::l2cap::tL2CAP_DW_RESULT Chris Manton
Bug: 344992630 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I58c45c5c40e155e0e4c5b6bb3bc50333ca798037
2024-06-17Class-enumify stack::l2cap::tL2CAP_DW_RESULT Chris Manton
Bug: 344991872 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I925537804979745d42b47d081130817097322ba6
2024-06-17Use proper types stack::l2cap::tL2CAP_DW_RESULT Chris Manton
Bug: 344989901 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: Ic904eeea4b4a45c1fa8f1c2a99c14177847ea204
2024-06-10stack::l2cap: Remove duplicated API get_remote_cid Chris Manton
prefer L2CA_GetRemoteChannelId over L2CA_GetRemoteCid,L2CA_GetPeerChannelId Bug: 345276607 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I692cf4792631d0b81f4ce8aa57fcb441d7a71628
2024-06-05Merge changes I74142415,I48f35c12 into main Chris Manton
* changes: stack::l2cap: Properly name L2CA_Register2 => L2CA_RegisterWithSecurity stack::l2cap: Properly name L2CA_ConnectReq2 => L2CA_ConnectReqWithSecurity
2024-05-31stack::l2cap: Properly name L2CA_Register2 => L2CA_RegisterWithSecurity Chris Manton
Bug: 343941946 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I7414241506c78067200c94d27dc9fd1aad4ed062
2024-05-31stack::l2cap: Properly name L2CA_ConnectReq2 => L2CA_ConnectReqWithSecurity Chris Manton
Bug: 343941099 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: I48f35c123e9cd4ccfa26a2bd172720766778afef
2024-05-31system::stack: Comment out unused parameters Chris Manton
Bug: 344002694 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: Ieec3409f2d7e35b64cf1fbbcdf20158b81736ae3
2024-05-24stack::gatt Use nodiscard for API to ensure return values handled Chris Manton
Bug: 340342998 Test: m . Flag: EXEMPT, Logging Change Change-Id: Id87f47822fabc4fa0f21d34268d7dc10cf68de6c
2024-05-22Check read local name internal API return codes Chris Manton
Bug: 340961849 Test: m . Flag: EXEMPT, Logging Change Change-Id: Ie40ef2b76d4cdc0fc1632c2946f89d6f77a29b11
2024-05-18stack::l2cap [6/19] L2CA_GetPeerLECocConfig Chris Manton
Bug: 339732512 Test: m . Flag: EXEMPT, Logging Change Change-Id: I12d3de7a9748d13fc737a783708bde98c76d5760
2024-05-17stack::l2cap [4/19] L2CA_DisconnectReq Chris Manton
Bug: 339732512 Test: m . Flag: EXEMPT, Logging Change Change-Id: Idc4822540f314d793879c7ee5006ed0565ae70b6
2024-05-16stack::l2cap [3/19] L2CA_DisconnectLECocReq Chris Manton
Bug: 339732512 Test: m . Flag: EXEMPT, Logging Change Change-Id: I812b34e68a825a29e289c3ff397d93e1e2edb6c9
2024-04-25flags: Remove android_bluetooth_flags.h wrapper David Duarte
Bug: 307006275 Test: m com.android.btservices Test: ./floss/build/build-in-container.py Flag: EXEMPT no-op Change-Id: Ia7c600f4ce1aa698b1a6c2739e7f6302e1e5f62f
2024-04-18system: Remove most ADDRESS_TO_LOGGABLE_(CSTR|STR) Henri Chataing
The added formatters for address types have all the same behavior. ADDRESS_TO_LOGGABLE_STR still occurs in BTM_History, dumpsys, log::assert_that calls Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I950f76bd2f1d000638752759a3f08ba0be6f014c
2024-03-15Use GD for BLE ACL buffer sizes Myles Watson
Bug: 321273521 Test: mma -j32 Flag: EXEMPT, no logical change Change-Id: I7eb7571afa97ae75c4d14ce4466b91148057d291
2024-03-13Socket API to get L2CAP channel ID Jayden Kim
This system API is to provide local and remote L2CAP channel IDs on the opened L2CAP socket. Test: m -j Bug: 326256996 Bug: 326351678 Change-Id: Ifa7123e833a0b9d5c38f7d3d8eca83f3355d5cf4
2024-02-13system/stack/gap: Migrate to libbluetooth_log Henri Chataing
Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I35057c3038b1e70188596659da41a3a245901c4a
2023-12-16bt_target:[8/37] IWYU stack:: Chris Manton
Bug: 315176531 Test: m . Flag: EXEMPT, IWYU Change-Id: I70fa868b6c01bfac57d8c0dd333b7d3861a3af20
2023-12-12bt_target:[16/37] IWYU stack::gap Chris Manton
Bug: 315176531 Test: m . Flag: EXEMPT, IWYU Change-Id: I7dcc515b35fe03ff9fb7cb635957adc07cec0482
2023-11-13Unify reference to GATT_MAX_ATTR_LEN Kihong Seong
Replace all references of GATT max attribute length in "gatt_api.h" to the one in "bt_gatt_types.h" to unify all references to one source. Bug: 301025186 Test: m com.android.btservices Change-Id: Idf5443e32ae179a73582f7417af49a375c8e432d
2023-10-30gap_ble: Remove unused service_handle Myles Watson
service_handle is no longer used, now that the log was removed. Bug: 305066880 Test: m com.android.btservices Change-Id: Iccd5b8501826f9410a130400d6ed9b711e5b0d64
2023-10-28system: Convert DVLOG() instances Henri Chataing
Depending on the context, the DVLOG call is removed or converted to VLOG(1) (manual change). note: DVLOG was previously printed iff NDEBUG was not set and bt_stack.conf modified to set the maximum verbosity level. Bug: 305066880 Test: m com.android.btservices Change-Id: I89835b55e422d6812e72307ec2c32922622eb9f5
2023-10-19IA2: Break out sdp uuids from other sdp definitions Chris Manton
Towards UUID unification Bug: 305296453 Test: m . Change-Id: Ia236448a5e1dab5f081d8ae5a6cf11ac07241762
2023-04-28Always check for no GATT transaction before sending request Archie Pusaka
After completing a GATT request in cl_op_cmpl(), we invoke a callback and send the next request. However, the callback mentioned can potentially send another request via accept_client_operation(). Since we shouldn't send two simultaneous request in GATT, this might end up being problematic, such as mismatching the response. This CL makes sure there are no parallel running request before sending the next request. Bug: 279881847 Test: Manual pairing/poweroff/poweron/forget loop with MX Master 2S mouse. Verify the device name never gets overwritten with wrong values. Change-Id: I08cca1dd588f748d253d6007ad50ac10d62668d4
2023-04-27Remove extern specifiers from function prototype declarations Henri Chataing
The extern specifier in this case has no effect as the default for functions is to have external linkage. However the extern specifier affects code search ability to explore function declarations and occurences as the prototype differs from the declaration. Test: mmm packages/modules/Bluetooth Bug: 279964152 Change-Id: I4f2e680d49068a0f708c40373bbe865e110f7db1
2023-03-06Fix L2CAP PTS issue Huirong Liao
[Root Cause] Not check p_ccb if null or not, and reference p_ccb->transport will crash [Solution] Use BTM_UseLeLink instead. Bug: 249615821 Test: a2dp, hogp connect l2cap pts successfully Change-Id: I1b2aafb3df65026d060c208a935b7c217e399c00
2023-02-10Merge changes Ia2d84cbc,I7bb9462b,I5deaee65,I5c9a000b,If6dd7b3a Aritra Sen
* changes: Change the BluetoothSocket#connect API to return L2CAP connection error code propagated from Native. Propagate the L2CAP error code from native to application via sockets. Capture the L2CAP error code from the GAP event data and propate it to the JV L2CAP socket callback. Add L2CAP conn result on error and propagate it upwards to GAP callback handler as a part of event data. Create new L2CAP Connection result codes for errors to replace L2CAP_CONN_OTHER_ERROR with specific errors in the GAP error callback.
2023-02-09Add L2CAP conn result on error and propagate it upwards to GAP callback ↵ Aritra Sen
handler as a part of event data. Bug: 263522407 Test: mma -j $(nproc) Change-Id: I5c9a000b6f36309d7a98b8b32b258d8c99427d50
2023-02-02Make L2CAP credit config modifiable Mehmet Murat Sevim
Value is overridable by build time system properties: bluetooth.l2cap.le.credit_default.value bluetooth.l2cap.le.credit_threshold.value Bug: 263323082 Bug: 174290912 Test: Manual test Change-Id: Ic27f572e73527bdf1af47e3781372043f8e310be (cherry picked from commit 5fa1707fd2d7ed5d040ab8aa2c35d07a3ce920fa)
2023-01-18[Non-Discoverable Mode] Selectively hide Device Name characteristic Rahul Arya
When in non-discoverable mode, this characteristic should not be readable (5.3 Vol 3C 12.1 Device Name Characteristic) Bug: 254314964 Test: compiles Change-Id: I4f9441eb099269e2c99a45ff7e505d71ed76d914
2023-01-10Replace PRIVATE_ADDRESS with ADDRESS_TO_LOGGABLE_CSTR Hui Peng
Test: refactoring CL. Existing unit tests still pass Bug: 174487588 Tag: #security Change-Id: Ia217b2a4ff9fea5d60491c23303764116ad1e94a