Cognitive Rate Adaptation in Wireless LANs