Due to the fact that a higher datarate leads to a shorter transmission range, a multirate wireless network is less connected at the higher datarate. On the other hand, a higher datarate provides better per-hop link capacity in multihop wireless networks. In this paper, we propose a connectivity-aware rate adaptation algorithm for multirate 802.11 ad hoc networking. Given sufficient number of nodes and a set of possible datarates in 802.11b/g based ad hoc networks, the algorithm selects the highest datarate which guarantees a network connectivity of 99%. Through analysis and simulations, we demonstrate that the selected datarate by the proposed algorithm outperforms other datarates in terms of connectivity, throughput, end-to-end delay and packet loss ratio.