summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbschmidt <bschmidt@FreeBSD.org>2010-04-10 07:00:26 +0000
committerbschmidt <bschmidt@FreeBSD.org>2010-04-10 07:00:26 +0000
commitd0431fd8e27f68528c3c90072909cd9c0e60e809 (patch)
tree87447a5096a13aaa03fca9710dca9e3dfa12a438
parent4019bb930997c919b9363639d087ebe764e68e0c (diff)
downloadFreeBSD-src-d0431fd8e27f68528c3c90072909cd9c0e60e809.zip
FreeBSD-src-d0431fd8e27f68528c3c90072909cd9c0e60e809.tar.gz
iwn4965_set_txpower() uses maxpwr from EEPROM to calculate the power to
set, it make sense to actually initialize that array. This fixes some issues with 4965 adapters where the TX power is crucial. This got lost somewhere while merging with the OpenBSD code. Approved by: rpaulo (mentor) Obtained from: OpenBSD MFC after: 2 weeks
-rw-r--r--sys/dev/iwn/if_iwn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 8d8fe2d..15ffceb 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -1711,6 +1711,10 @@ iwn_read_eeprom_band(struct iwn_softc *sc, int n)
c->ic_ieee = chan;
c->ic_maxregpower = channels[i].maxpwr;
c->ic_maxpower = 2*c->ic_maxregpower;
+
+ /* Save maximum allowed TX power for this channel. */
+ sc->maxpwr[chan] = channels[i].maxpwr;
+
if (n == 0) { /* 2GHz band */
c->ic_freq = ieee80211_ieee2mhz(chan,
IEEE80211_CHAN_G);
OpenPOWER on IntegriCloud