The IEEE 802.11 standard provides multi-rate support for different versions. As there is no specification on the dynamic strategy to adjust the rate, different rate adaptation algorithms are applied according to different manufacturers. Therefore, it is often hard to interpret the performance discrepancy of various devices. Moreover, the ever-changing channels always challenge the rate adaptation, especially in the scenario with scarce spectrum and low SNR. As a result, it is important to sense the radio environment cognitively and reduce the unnecessary oscillation of the transmission rate. In this paper, we propose an environment-aware robust (EAR) algorithm. This algorithm employs an occasional small packet, designs a rate scheme adaptive to the environment, and enhances the robustness. We verify the throughput of EAR using network simulator NS-3 in terms of station number, motion speed and node distance. We also compare the proposed algorithm with three benchmark methods: AARF, RBAR and CHARM. Simulation results demonstrate that EAR outperforms other algorithms in several wireless environments, greatly improving the system robustness and throughput.