From 2698de95a765f05379f8614fc88f9068ec4b25ee Mon Sep 17 00:00:00 2001 From: stsp Date: Sat, 13 Jun 2015 21:15:23 +0000 Subject: [PATCH] Busy-wait a short while after sending a command to rtwn(4) firmware. Fixes selection of initial TX rate. We're not stuck at 1Mbit/s anymore. --- sys/dev/pci/if_rtwn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c index 6cea7c3d4db..d344e223a78 100644 --- a/sys/dev/pci/if_rtwn.c +++ b/sys/dev/pci/if_rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtwn.c,v 1.3 2015/06/12 09:30:05 stsp Exp $ */ +/* $OpenBSD: if_rtwn.c,v 1.4 2015/06/13 21:15:23 stsp Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -761,6 +761,10 @@ rtwn_fw_cmd(struct rtwn_softc *sc, uint8_t id, const void *buf, int len) rtwn_write_4(sc, R92C_HMEBOX(sc->fwcur), *((uint8_t *)&cmd + 0)); sc->fwcur = (sc->fwcur + 1) % R92C_H2C_NBOX; + + /* Give firmware some time for processing. */ + DELAY(2000); + return (0); } -- 2.20.1