CVSROOT: /cvs Module name: src Changes by: s...@cvs.openbsd.org 2020/05/16 05:26:51
Modified files: sys/dev/pci : if_iwx.c if_iwxreg.h Log message: Fix PHY_CONTEXT commands sent to iwx(4) firmware. iwx(4) firmware understands two different variants of these commands. Both variants are documented with the same command API version number, but they use different sizes for an embedded struct which contains information about channels. Which variant to use depends on whether the firmware advertises support for the "ULTRA_HB_CHANNELS" feature. The code I wrote to handle both cases had a bug in case this feature is not supported: The channel info size difference was only accounted for while computing the command's length, but not while writing command data. This bug does not affect devices presently matched by iwx(4). But it is possible that other devices may need this fix in the future. So, for now, fix the buggy code path instead of removing it. ok mpi@