Adaptive transmission rate for LQG control over Wi-Fi: A cross-layer approach