Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cddb44a8 authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

controller: Disable packet boundary on Intel AC7265

Intel AC7265 claims the support of the packet boundary feature but is
not working properly and affect l2cap stability. This patch identifies
the chip through LMP version and overwrites the flag.

Bug: 306542979
Tag: #floss
Test: mmm packages/modules/Bluetooth
Test: manual switch between A2DP and HFP frequently
Flag: EXEMPT, Floss-only changes as Android doesn't use Intel chip
Change-Id: I2b5ef5067add12933d60d16251701d1642d2d01d
parent 2ea02cc3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "hci_controller_generated.h"
#include "os/metrics.h"
#include "os/system_properties.h"
#include "stack/include/hcidefs.h"
#if TARGET_FLOSS
#include "sysprops/sysprops_module.h"
#endif
@@ -360,6 +361,13 @@ struct Controller::impl {
    log::assert_that(status == ErrorCode::SUCCESS, "Status {}", ErrorCodeText(status));
    uint8_t page_number = complete_view.GetPageNumber();
    extended_lmp_features_array_.push_back(complete_view.GetExtendedLmpFeatures());
    if (page_number == 0 && local_version_information_.manufacturer_name_ == LMP_COMPID_INTEL &&
        local_version_information_.lmp_version_ == LmpVersion::V_4_2 &&
        local_version_information_.lmp_subversion_ == LMP_SUBVERSION_INTEL_AC7265) {
      // Override the packet boundary feature bit on Intel AC7265 because it don't support well.
      extended_lmp_features_array_.back() &=
              ~static_cast<uint64_t>(LMPFeaturesPage0Bits::NON_FLUSHABLE_PACKET_BOUNDARY_FLAG);
    }
    bluetooth::os::LogMetricBluetoothLocalSupportedFeatures(page_number,
                                                            complete_view.GetExtendedLmpFeatures());
    // Query all extended features
+3 −0
Original line number Diff line number Diff line
@@ -878,6 +878,7 @@ typedef struct {
#define HCI_BRCM_ACL_HIGH_PRIORITY_LOW_LATENCY 0xF3

#define LMP_COMPID_GOOGLE 0xE0
#define LMP_COMPID_INTEL 0x02

// TODO(zachoverflow): remove this once broadcom specific hacks are removed
#define LMP_COMPID_BROADCOM 15
@@ -894,6 +895,8 @@ typedef struct {
// TODO Remove this once all Mediatek specific hacks are removed.
#define LMP_COMPID_MEDIATEK 0x0046

#define LMP_SUBVERSION_INTEL_AC7265 0x1100

/* Parameter information for HCI_SYNA_SET_ACL_PRIORITY */
#define HCI_SYNA_ACL_PRIORITY_PARAM_SIZE 3
#define HCI_SYNA_ACL_NORMAL_PRIORITY 0xF0