diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2009-10-26 18:38:33 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2009-10-26 18:38:33 +0000 |
commit | ab06013bb98fcd17ad95bebdd981404a48d9ff25 (patch) | |
tree | 09e58e827c723908b641d0ac36972bcba385baeb /sys/dev/pci | |
parent | 0a5baf6b3f412dd924ae0d51892e12616b9bac51 (diff) |
start Tx at lowest available rate to give initial WPA handshake and
DHCP more chance to succeed w/o too much retries.
AMRR is good enough at raising the Tx rate fast.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_iwn.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/if_wpi.c | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index 9c17d3e0559..e4ab311d37e 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.70 2009/10/26 17:55:29 damien Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.71 2009/10/26 18:38:32 damien Exp $ */ /*- * Copyright (c) 2007-2009 Damien Bergamini <damien.bergamini@free.fr> @@ -1603,6 +1603,8 @@ iwn_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew) int ridx, i; ieee80211_amrr_node_init(&sc->amrr, &wn->amn); + /* Start at lowest available bit-rate, AMRR will raise. */ + ni->ni_txrate = 0; for (i = 0; i < ni->ni_rates.rs_nrates; i++) { rate = ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL; @@ -1611,9 +1613,6 @@ iwn_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew) if (iwn_rates[ridx].rate == rate) break; wn->ridx[i] = ridx; - /* Initial TX rate <= 24Mbps. */ - if (rate <= 48) - ni->ni_txrate = i; } } diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index d91310d6542..c2113136f25 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.95 2009/10/24 21:01:18 damien Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.96 2009/10/26 18:38:32 damien Exp $ */ /*- * Copyright (c) 2006-2008 @@ -587,7 +587,7 @@ wpi_dma_contig_alloc(bus_dma_tag_t tag, struct wpi_dma_info *dma, void **kvap, goto fail; error = bus_dmamem_map(tag, &dma->seg, 1, size, &dma->vaddr, - BUS_DMA_NOWAIT); + BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (error != 0) goto fail; @@ -1000,6 +1000,8 @@ wpi_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew) int ridx, i; ieee80211_amrr_node_init(&sc->amrr, &wn->amn); + /* Start at lowest available bit-rate, AMRR will raise. */ + ni->ni_txrate = 0; for (i = 0; i < ni->ni_rates.rs_nrates; i++) { rate = ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL; @@ -1008,9 +1010,6 @@ wpi_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew) if (wpi_rates[ridx].rate == rate) break; wn->ridx[i] = ridx; - /* Initial TX rate <= 24Mbps. */ - if (rate <= 48) - ni->ni_txrate = i; } } |