Cross-Layer Design for Cooperative Wireless Networks