Performance Analysis and Optimization of TCP over Adaptive Wireless Links