summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flags/pairing.aconfig10
-rw-r--r--system/stack/l2cap/l2c_api.cc3
-rw-r--r--system/stack/l2cap/l2c_link.cc58
-rw-r--r--system/stack/l2cap/l2c_utils.cc6
4 files changed, 4 insertions, 73 deletions
diff --git a/flags/pairing.aconfig b/flags/pairing.aconfig
index b2ce3264de..585a3a6af0 100644
--- a/flags/pairing.aconfig
+++ b/flags/pairing.aconfig
@@ -42,16 +42,6 @@ flag {
}
flag {
- name: "transmit_smp_packets_before_release"
- namespace: "bluetooth"
- description: "Ensure that SMP packets are transmitted before SMP channel is released"
- bug: "357106628"
- metadata {
- purpose: PURPOSE_BUGFIX
- }
-}
-
-flag {
name: "donot_queue_dup_rnr"
namespace: "bluetooth"
description: "Avoid queueing second RNR as part of ssp process"
diff --git a/system/stack/l2cap/l2c_api.cc b/system/stack/l2cap/l2c_api.cc
index d8d2eb0023..38b9dd030c 100644
--- a/system/stack/l2cap/l2c_api.cc
+++ b/system/stack/l2cap/l2c_api.cc
@@ -1382,8 +1382,7 @@ bool L2CA_RemoveFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda) {
* exist */
tL2C_CCB* p_ccb = p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL];
- if (com::android::bluetooth::flags::transmit_smp_packets_before_release() && p_ccb->in_use &&
- !fixed_queue_is_empty(p_ccb->xmit_hold_q)) {
+ if (p_ccb->in_use && !fixed_queue_is_empty(p_ccb->xmit_hold_q)) {
if (l2cu_fixed_channel_suspended(p_lcb, fixed_cid)) {
log::warn("Removal of BDA: {} CID: 0x{:04x} already pending", rem_bda, fixed_cid);
} else {
diff --git a/system/stack/l2cap/l2c_link.cc b/system/stack/l2cap/l2c_link.cc
index 082e055afe..07c576496b 100644
--- a/system/stack/l2cap/l2c_link.cc
+++ b/system/stack/l2cap/l2c_link.cc
@@ -750,56 +750,6 @@ void l2c_pin_code_request(const RawAddress& bd_addr) {
/*******************************************************************************
*
- * Function l2c_link_check_power_mode
- *
- * Description This function is called to check power mode.
- *
- * Returns true if link is going to be active from park
- * false if nothing to send or not in park mode
- *
- ******************************************************************************/
-static bool l2c_link_check_power_mode(tL2C_LCB* p_lcb) {
- if (com::android::bluetooth::flags::transmit_smp_packets_before_release()) {
- // TODO: Remove this function when flag transmit_smp_packets_before_release is released
- return false;
- }
-
- bool need_to_active = false;
-
- // Return false as LM modes are applicable for BREDR transport
- if (p_lcb->is_transport_ble()) {
- return false;
- }
- /*
- * We only switch park to active only if we have unsent packets
- */
- if (list_is_empty(p_lcb->link_xmit_data_q)) {
- for (tL2C_CCB* p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; p_ccb = p_ccb->p_next_ccb) {
- if (!fixed_queue_is_empty(p_ccb->xmit_hold_q)) {
- need_to_active = true;
- break;
- }
- }
- } else {
- need_to_active = true;
- }
-
- /* if we have packets to send */
- if (need_to_active) {
- /* check power mode */
- tBTM_PM_MODE mode;
- if (BTM_ReadPowerMode(p_lcb->remote_bd_addr, &mode)) {
- if (mode == BTM_PM_STS_PENDING) {
- log::debug("LCB(0x{:x}) is in PM pending state", p_lcb->Handle());
- return true;
- }
- }
- }
- return false;
-}
-
-/*******************************************************************************
- *
* Function l2c_link_check_send_pkts
*
* Description This function is called to check if it can send packets
@@ -873,8 +823,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, BT_HDR* p_buf
continue;
}
- if ((!p_lcb->in_use) || (p_lcb->link_state != LST_CONNECTED) ||
- (p_lcb->link_xmit_quota != 0) || (l2c_link_check_power_mode(p_lcb))) {
+ if (!p_lcb->in_use || p_lcb->link_state != LST_CONNECTED || p_lcb->link_xmit_quota != 0) {
log::debug("Skipping lcb {} due to quota", xx);
continue;
}
@@ -915,7 +864,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, BT_HDR* p_buf
} else /* if this is not round-robin service */
{
/* link_state or power mode not ready, can't send anything else */
- if ((p_lcb->link_state != LST_CONNECTED) || (l2c_link_check_power_mode(p_lcb))) {
+ if (p_lcb->link_state != LST_CONNECTED) {
log::warn("Can't send, link state: {} not LST_CONNECTED or power mode BTM_PM_STS_PENDING",
p_lcb->link_state);
return;
@@ -1028,8 +977,7 @@ static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
l2cu_tx_complete(p_cbi);
}
- if (!com::android::bluetooth::flags::transmit_smp_packets_before_release() ||
- p_lcb->suspended.empty()) {
+ if (p_lcb->suspended.empty()) {
return;
}
diff --git a/system/stack/l2cap/l2c_utils.cc b/system/stack/l2cap/l2c_utils.cc
index c18ba8c5a9..ed5eb37fba 100644
--- a/system/stack/l2cap/l2c_utils.cc
+++ b/system/stack/l2cap/l2c_utils.cc
@@ -1641,9 +1641,6 @@ void l2cu_release_ccb(tL2C_CCB* p_ccb) {
}
void l2cu_fixed_channel_restore(tL2C_LCB* p_lcb, uint16_t fixed_cid) {
- if (!com::android::bluetooth::flags::transmit_smp_packets_before_release()) {
- return;
- }
auto it = p_lcb->suspended.begin();
while (it != p_lcb->suspended.end()) {
if (*it == fixed_cid) {
@@ -1655,9 +1652,6 @@ void l2cu_fixed_channel_restore(tL2C_LCB* p_lcb, uint16_t fixed_cid) {
}
bool l2cu_fixed_channel_suspended(tL2C_LCB* p_lcb, uint16_t fixed_cid) {
- if (!com::android::bluetooth::flags::transmit_smp_packets_before_release()) {
- return false;
- }
return std::find(p_lcb->suspended.begin(), p_lcb->suspended.end(), fixed_cid) !=
p_lcb->suspended.end();
}