Wireless LANs: an adaptive algorithm to reduce power consumption