1. 19 Oct, 2015 7 commits
    • Pavlin Radoslavov's avatar
      GKI cleanup - Replaced usage of GKI queue with OSI fixed_queue · 1a3844f9
      Pavlin Radoslavov authored
      * 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
      1a3844f9
    • Pavlin Radoslavov's avatar
      GKI cleanup - Moved functions GKI_disable() and GKI_enable() to OSI · 1eb1ea0c
      Pavlin Radoslavov authored
      Added new functions mutex_global_lock() and mutex_global_unlock()
      within the OSI module, and replaced GKI_disable() and GKI_enable()
      with those functions.
      
      Also, minor cleanup in the gki.h header file.
      
      Change-Id: I5f410e3174541224fcf30f37e1524ef099c25193
      1eb1ea0c
    • Pavlin Radoslavov's avatar
      GKI cleanup - Moved GKI_get_os_tick_count() to OSI · c196f214
      Pavlin Radoslavov authored
       * Renamed function GKI_get_os_tick_count() to time_get_os_boottime_ms()
         and moved it to the OSI module: to the new file osi/src/time.c .
         The corresponding header file is osi/include/time.h
      
       * Added unit tests for function time_get_os_boottime_ms() in file
         osi/test/time_test.cpp
      
       * Removed "osi/include" from the list of paths to search for include
         files. This is needed, because file name collision of "time.h"
         in osi/include and the system <time.h>
      
      Change-Id: I934be0c8f392150a352947326546bcf8aa070f97
      c196f214
    • Pavlin Radoslavov's avatar
      GKI cleanup - Eliminate function GKI_get_pool_bufsize() · 1d5b8592
      Pavlin Radoslavov authored
      Change-Id: I87168157b9bb3e9d315c03b98a10d18b38cce3e1
      1d5b8592
    • Pavlin Radoslavov's avatar
      GKI cleanup - Eliminated function GKI_poolcount · 21cce2ec
      Pavlin Radoslavov authored
      Refactored function l2c_link_adjust_chnl_allocation.
      Now the buffer quota computation is done without using the
      GKI poll counts.
      
      Change-Id: I669492becc9024c12f3360ea58a06188caa6420a
      21cce2ec
    • Pavlin Radoslavov's avatar
      GKI cleanup - Eliminate usage of pool buffers · 2e3d006b
      Pavlin Radoslavov authored
      * Replace usage of function GKI_getpoolbuf() with GKI_getbuf()
      * Remove usage of function GKI_poolutilization()
      * Remove usage of function GKI_poolfreecount()
      
      Change-Id: Ide938192b878bbfb4912642c903fce548f2b5368
      2e3d006b
    • Pavlin Radoslavov's avatar
      GKI cleanup - Eliminated function GKI_delay · 642f2330
      Pavlin Radoslavov authored
      Removed function GKI_delay from the GKI module, and replaced
      it with a local static function inside file btif/src/btif_rc.c - the
      only place it is (still) used.
      
      Change-Id: Id8f3f700efd22d6e31c70aa8b1724ffa9afbc631
      642f2330
  2. 12 Jun, 2015 1 commit
    • Arman Uguray's avatar
      build: Fix ptr <-> integer cast warnings · bb954527
      Arman Uguray authored
      This CL removes the -Wno-pointer-to-integer-cast and
      -Wno-integer-to-pointer-cast flags from GN build files. The resulting errors
      were fixed using the following:
      
        1. All ptr <-> integer casts are now done by using the new
           PTR_TO_INT/INT_TO_PTR macros defined in osi.h
      
        2. The TIMER_PARAM_TYPE macro, defined in gki/common/gki.h and
           include/bt_target.h have been redefined as void* rather than UINT32. This
           is better, since "void*" can act as a simple container without any
           precision loss that would be caused by a type such as UINT32 on 64-bit
           systems. void* inherently is a safer container for all pointer types but
           UINT32 isn't.
      
      BUG=21570302
      
      Change-Id: I4a82c4a40c91caa31e372382c40d424be220cbe3
      bb954527
  3. 16 Mar, 2015 15 commits
  4. 20 Aug, 2014 1 commit
    • Andre Eisenbach's avatar
      Protect against potential endless loop in BTU task timer handling · e3afaf05
      Andre Eisenbach authored
      Fix potential bug where stale timer list entry causes endless loops in
      BTU task. Also added return parameter to GKI_remove_from_timer_list() to
      allow breaking out of the BTU timer task look in case the timer list
      becomes corrupted.
      
      Bug: 16897789
      Change-Id: Ic70cf4346efbb063bbb952ebe7c2f7d0bf395493
      e3afaf05
  5. 12 Aug, 2014 1 commit
    • Andre Eisenbach's avatar
      LE: Fix limited advertising not stopping after timeout · cf32e8d4
      Andre Eisenbach authored
      When starting to advertise with a given timeout, the alarm did not fire
      and thus not stop the advertising. This patch switchs from the new alarm
      system to use BTU timers.
      
      Also fixes a bug in the oneshot timer handling where adding a new timer
      with a short timeout value would not actually restart the timer to pull
      in the deadline.
      
      Bug: 16988160
      Change-Id: Ia556562675636be440ddca7682ac7d092bc0b48b
      cf32e8d4
  6. 16 Jul, 2014 2 commits
    • Sharvil Nanavati's avatar
      Eliminate last_ticks from TIMER_LIST_ENT. · 446da53d
      Sharvil Nanavati authored
      It's unnecessary, potentially calculated incorrectly, and the insertion
      logic that depended on it was fragile. I've rewritten the list
      insertion routine so it's easier to follow. This should also fix
      http://b/16259295.
      
      Change-Id: Ib7184c94c495c03d3acbe105955b1bb712dbbfaa
      (cherry picked from commit a1bfd3ee)
      446da53d
    • Sharvil Nanavati's avatar
      Eliminate last_ticks from TIMER_LIST_ENT. · a1bfd3ee
      Sharvil Nanavati authored
      It's unnecessary, potentially calculated incorrectly, and the insertion
      logic that depended on it was fragile. I've rewritten the list
      insertion routine so it's easier to follow. This should also fix
      http://b/16259295.
      
      Change-Id: Ib7184c94c495c03d3acbe105955b1bb712dbbfaa
      a1bfd3ee
  7. 02 Jul, 2014 2 commits
  8. 24 Jun, 2014 2 commits
  9. 12 Jun, 2014 1 commit
  10. 10 Jun, 2014 2 commits
  11. 09 Jun, 2014 1 commit
  12. 13 Dec, 2012 1 commit