mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-04 00:57:55 +00:00
nimble/ll: Fix time restrictions on PHY transition in Master role
Fix according to Bluetooth 5.0 Vol. 6 Part B 5.1.10.1 This fixes LL/CON/MAS/BV-50-C
This commit is contained in:
@@ -2640,16 +2640,17 @@ ble_ll_ctrl_tx_done(struct os_mbuf *txpdu, struct ble_ll_conn_sm *connsm)
|
||||
#endif
|
||||
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
|
||||
case BLE_LL_CTRL_PHY_REQ:
|
||||
if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
|
||||
if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_1M) {
|
||||
connsm->phy_tx_transition = BLE_PHY_1M;
|
||||
} else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_2M) {
|
||||
connsm->phy_tx_transition = BLE_PHY_2M;
|
||||
} else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_CODED) {
|
||||
connsm->phy_tx_transition = BLE_PHY_CODED;
|
||||
}
|
||||
if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_1M) {
|
||||
connsm->phy_tx_transition = BLE_PHY_1M;
|
||||
} else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_2M) {
|
||||
connsm->phy_tx_transition = BLE_PHY_2M;
|
||||
} else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_CODED) {
|
||||
connsm->phy_tx_transition = BLE_PHY_CODED;
|
||||
}
|
||||
break;
|
||||
case BLE_LL_CTRL_PHY_UPDATE_IND:
|
||||
connsm->phy_tx_transition = txpdu->om_data[2];
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user