Cognitive Link Layer for Wireless Local Area Networks