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
@@ -2640,7 +2640,6 @@ 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) {
@@ -2648,7 +2647,9 @@ ble_ll_ctrl_tx_done(struct os_mbuf *txpdu, struct ble_ll_conn_sm *connsm)
} 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:
