summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2020-07-20 08:19:59 +0000
committerstsp <stsp@openbsd.org>2020-07-20 08:19:59 +0000
commit5ed5d284388b1e82e0f3a95f71f179b3407ff7d6 (patch)
tree5177c9badb950234e602d101c5117d5aa67d332c /sys/dev/softraid.c
parentAdd powerpc64 to PIE_ARCH and STATICPIE_ARCH. (diff)
downloadwireguard-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