diff options
author | 2020-07-20 08:19:59 +0000 | |
---|---|---|
committer | 2020-07-20 08:19:59 +0000 | |
commit | 5ed5d284388b1e82e0f3a95f71f179b3407ff7d6 (patch) | |
tree | 5177c9badb950234e602d101c5117d5aa67d332c /sys/dev/softraid.c | |
parent | Add powerpc64 to PIE_ARCH and STATICPIE_ARCH. (diff) | |
download | wireguard-openbsd-5ed5d284388b1e82e0f3a95f71f179b3407ff7d6.tar.xz wireguard-openbsd-5ed5d284388b1e82e0f3a95f71f179b3407ff7d6.zip |
Fix gain calibration for some iwn(4) devices (5000 and up).
IWN_LSB() returns an index starting with 1, however the arrays used
later on (noise and gain in iwn5000_set_gains()) start with 0. The
previous code accounted for this difference when setting the antenna
gain by accessing cmd.gain[i - 1]. However the noise array was accessed
with noise[i], the chainmask was checked against i, and more importantly
the overall for() loop iterated wrongly over the antennas by always
starting with i=2 (the third antenna). One consequence is that gain
calibration never happened in case of only two antennas.
Patch by Holger Mikolon.
Diffstat (limited to 'sys/dev/softraid.c')
0 files changed, 0 insertions, 0 deletions