Adaptive Beamforming and Coding for Multi-node Wireless Networks