History log of /system/bt/bta/pan/bta_pan_act.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5fe6f0cf6b223e3ed6be4912d55b3ed5b41ce0cd 06-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Removed checks for NULL returns after osi_calloc() / osi_malloc()

Removed explicit checks for NULL pointer returns after calls
to osi_calloc() and osi_malloc(), because those are not needed.
If the memory allocation fails, osi_calloc() and osi_malloc()
will trigger an assert.

Bug: 27048759
Change-Id: I2791eb2f69c08f991f8fcdef10e101a41568cd95
/system/bt/bta/pan/bta_pan_act.c
abd70abb5e42c9431df94fe9d2c4a78a0d8d9af9 05-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Replaced osi_getbuf()/osi_freebuf() with osi_malloc()/osi_free()

Removed the alternative buffer allocation osi_getbuf() / osi_freebuf()
and use instead osi_malloc() / osi_free().

Correspondingly, replaced usage of osi_freebuf_and_reset()
with osi_free_and_reset().

Bug: 24914560
Change-Id: I7a9599ba7fa900321f087da684428133eb0ddd6b
/system/bt/bta/pan/bta_pan_act.c
20524d393e8b3bea4c573f7980cd843500b0e6a4 03-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Refactor usage of osi_free() and osi_freebuf()

* Allow to call osi_freebuf(ptr) on NULL pointers. This simplifies
the code: a notable number of "if (foo != NULL)" checks are removed.
* Add new function osi_free_and_reset(p_ptr) that frees the buffer,
and explicitly resets the pointer to NULL.
This prevents unintended usage of free memory.
* Add corresponding function osi_freebuf_and_reset(p_ptr)
* Minor cleanup around usages of osi_free() and osi_freebuf()

Also:
* Removed unused function btif_gattc_cleanup()
* Replaced usage of the following functions with osi_freebuf_and_reset()
- mca_free_buf()
- utl_freebuf()
- btif_hl_free_buf()
* Replaced usage of rc_supported_event_free() with osi_freebuf()
* Replaced usage of btif_hl_get_buf() with osi_getbuf()
* Eliminate some of the osi_get_buf_size() calls

Bug: 22948224
Change-Id: Ife860658b26274da6f228d7353cb0f1531587337
/system/bt/bta/pan/bta_pan_act.c
258c2538e3b62a8cdb403f2730c45d721e5292b4 28-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - moved GKI buffer allocation wrappers to OSI

* Moved the following GKI buffer allocation functions to OSI:
- GKI_getbuf() -> osi_getbuf()
- GKI_freebuf() -> osi_freebuf()
- GKI_get_buf_size() -> osi_get_buf_size()

For now we need the osi_getbuf() / osi_freebuf() allocation wrapper,
because we need to be able to call osi_get_buf_size() on the allocated
buffer.
In the future those should be replaced with osi_malloc() / osi_free().
Currently, the osi_malloc() buffer size internal allocation tracker
does not always track the size, hence we need the osi_getbuf() wrapper.

* Replaced GKI_MAX_BUF_SIZE with BT_DEFAULT_BUFFER_SIZE

* Added new file include/bt_common.h that can be usee to include
few files that should be included alost everywhere (e.g. bt_target.h"
NOTE: This file might be removed in the future and we should include
everywhere the right set of header files.

* Removed some of the GKI-related references

* Removed file include/gki_target.h

Change-Id: Ie87830e73143de200746d54235aa99f228a95024
/system/bt/bta/pan/bta_pan_act.c
1a3844f933bd63c8a381371dabfb35c6a0249e3e 25-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - Replaced usage of GKI queue with OSI fixed_queue

* Added new functions to OSI:
- fixed_queue_init()
- fixed_queue_length()
- fixed_queue_try_remove_from_queue()
- fixed_queue_try_peek_last()

* Renamed fixed_queue_try_peek() to fixed_queue_try_peek_first()

* Replaced usage of GKI queue functions with OSI fixed_queue functions:
- GKI_init_q() -> fixed_queue_new(SIZE_MAX)
NOTE: unlike GKI_init_q(), fixed_queue_new() allocates memory /
state that needs to be released by calling fixed_queue_free()
- GKI_enqueue() -> fixed_queue_enqueue()
- GKI_dequeue() -> fixed_queue_try_dequeue()
NOTE: fixed_queue_try_dequeue() is non-blocking
- GKI_queue_length() -> fixed_queue_length()
- GKI_queue_is_empty() -> fixed_queue_is_empty()
- GKI_getfirst() -> fixed_queue_try_peek_first()
- GKI_getlast() -> fixed_queue_try_peek_last()
- GKI_remove_from_queue() -> fixed_queue_try_remove_from_queue()
- Queue elements iteration.
In the fixed_queue implementation we have to use the underlying
list_t mechanism to iterate over the elements.
OLD:
p = GKI_getfirst(queue);
...
while ((p = GKI_getnext(p) != NULL) {
...
}
NEW:
list_t *list = fixed_queue_get_list(queue);
for (const list_node_t *node = list_begin(list);
node != list_end(list); node = list_next(node)) {
p = list_node(node);
}

* Remove initialization of the GKI module, because it is not needed
anymore

* Removed unused files in GKI:
gki/common/gki_common.h
gki/ulinux/gki_int.h
gki/ulinux/gki_ulinux.c

Change-Id: I3ff9464db75252d6faf7476a9ca67c88e535c51c
/system/bt/bta/pan/bta_pan_act.c
2181f1a4a428926da214b94327c3bcef9d283522 06-Sep-2015 Nitin Shivpure <nshivpur@codeaurora.org> Fix PAN crash due to fd mismatch

A case, where tap read thread is always exist, Sometimes
data packets get recieved on older fd, which is not available.
which is causing assert due to fd mismatch in race condition.
when next pan connection is immediately available. If last pan
connection gets disconnected, then tap_read_thread should be
destroyed in btif context to fix this issue.

Bug: 24093456
Change-Id: Ic1053200a7be4c2091d6c394634831ca3fbd61df
/system/bt/bta/pan/bta_pan_act.c
2e3d006b96eafb0651fe7f78d28250faf89405de 18-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - Eliminate usage of pool buffers

* Replace usage of function GKI_getpoolbuf() with GKI_getbuf()
* Remove usage of function GKI_poolutilization()
* Remove usage of function GKI_poolfreecount()

Change-Id: Ide938192b878bbfb4912642c903fce548f2b5368
/system/bt/bta/pan/bta_pan_act.c
6b24485cec18ea111b05bc23f61d9c3f6a6b8747 21-Sep-2015 tturney <tturney@google.com> Fix PAN and AV role switch war

Bug: 23740164
Change-Id: Ib26a64b624c711443201adc4fde6b041ecb0dde1
/system/bt/bta/pan/bta_pan_act.c
1e61ce1ae3fe8ef72443b30907f1cf8acae39674 24-Oct-2014 Chris Manton <cmanton@google.com> Remove always true definition BTM_EIR_SERVER_INCLUDED
/system/bt/bta/pan/bta_pan_act.c
794f3b5f126fffc3dd1129a710187591348bbf23 01-Oct-2014 Chris Manton <cmanton@google.com> Removal of bd.[c|h]

Consolidate legacy types into bt_types.h
/system/bt/bta/pan/bta_pan_act.c
fe7216ca12f91baae733e7c93063db73121af308 06-May-2014 Chris Manton <cmanton@google.com> Enforce GKI API buffer usage

Also add another API GKI_queue_length(BUFFER_Q *)
/system/bt/bta/pan/bta_pan_act.c
e85eb5a7c3ea7eaca09cbb33920435d809b4dd3d 03-Oct-2013 Nitin Shivpure <nshivpur@codeaurora.org> Bluetooth: Cleaning up pan_conn DB, if connection is not successful. - do not merge

A case where DUT is paired with remoteDeviceA & remoteDeviceB.
remoteDeviceA is not pagable(turned off or some other reason).
DUT(PANU) try to connect remoteDeviceA(NAP). But connection is
unsuccessful, Because remoteDeviceA is not pagable, In this scenario
btpan_conn Database is not cleaning up at btif layer. Later
remoteDeviceB(PANU) connect to DUT(NAP) & connection is succesful,
When remoteDeviceB disconnect existing connection. As database
still has remoteDeviceA BD address at Btif layer. remoteDeviceA
BD address is passed instead of remoteDeviceB BD address from Btif
to UI. So remoteDeviceB still shows connected on UI. Cleaning up
pan_conn database for particular pan connection at BTIF layer,
whichever connection is not successful will solve this issue.

Change-Id: I31dfe3ef46295e74bbfb57563e4fd4fc7155f006
/system/bt/bta/pan/bta_pan_act.c
afa6e1abbedaad8fe854b0f43999b8aeb801af91 28-Jun-2014 Matthew Xie <mattx@google.com> resolved conflicts for merge of e8c3d75b to master

Change-Id: I78ef69c4d54a36243620ae14296d3507e3339567
e8c3d75b75493911ebf0f99c83676359657178f7 04-May-2014 Sharvil Nanavati <sharvil@google.com> Logging cleanup: BTIF and APPL.

Change-Id: I5b1214642bbb4b9aecc0fd2c899a6ec2c9793286
/system/bt/bta/pan/bta_pan_act.c
72f5ce63c2dbf31c7cfbb903c687ea71ad29b3ea 21-Apr-2014 Matthew Xie <mattx@google.com> am 4b416130: Merge "Bluetooth: Adding Sniff feature for PAN Profile"

* commit '4b41613019829b40e8ca75a87219a415c51ae3a1':
Bluetooth: Adding Sniff feature for PAN Profile
4b41613019829b40e8ca75a87219a415c51ae3a1 21-Apr-2014 Matthew Xie <mattx@google.com> Merge "Bluetooth: Adding Sniff feature for PAN Profile"
e74b1a0e4613d4aa109378b692d6ebdb9f2c6a6d 16-Apr-2014 Matthew Xie <mattx@google.com> am 87bea5bc: Merge "Fix bug where btpan_control_state_callback is called with invalid args."

* commit '87bea5bc24f03b671328bfdbac86b60085c1d2e1':
Fix bug where btpan_control_state_callback is called with invalid args.
36f43cc4b0ce38007c29d573f251ec594d95b180 29-Aug-2013 Nitin Shivpure <nshivpur@codeaurora.org> Bluetooth: Adding Sniff feature for PAN Profile

Sniff feature for PAN profile was not implemented in power
manager module of the stack, which was causing higher power
consumption after connecting PAN profile, Even though PAN
ACL link is idle & there is no data communication between
DUT & remote device. Adding sniff feature for PANU role &
NAP role to reduce power consumption.

Change-Id: Idf568f53a317abd536edf34fbdf1733fdf53b7d0
/system/bt/bta/pan/bta_pan_act.c
5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb 01-Feb-2014 Mike J. Chen <mjchen@google.com> Major warnings cleanup

Mostly fixing unused parameter warnings.
A few other warnings also fixed like possible use of
unitialized variables (no real issue found, just compiler couldn't
follow the path), signed vs unsigned warning.

Also fixed some typos, indent issues, removal of dead code, etc.

Change-Id: I95eb887aefc4d559d7921f71a0af5f3bfb01ac01
Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/bta/pan/bta_pan_act.c
84c63f1c985a30173fdf419167a3b85ba77a6d5b 02-Feb-2014 Sharvil Nanavati <sharvil@google.com> Fix bug where btpan_control_state_callback is called with invalid args.

When there's a connection error, btpan_control_state_callback sometimes
gets called back with incorrect local_role and remote_role values. These
values are simply not set (uninitialized) on one of the error handling
codepaths.

http://b/12854810

Change-Id: Ie2d9d252f185fca48ee6e2bfb697039d0ac10b43
/system/bt/bta/pan/bta_pan_act.c
5738f83aeb59361a0a2eda2460113f6dc9194271 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf

Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/bta/pan/bta_pan_act.c