How does TCP distinguish between packet loss caused by congestion and wireless transmission errors?

Technical