The code incorrect accessed user memory directlyCheck copyin's error code (differ adding copyout checks at this time).
Expose and use ifr_buffer_get_(buffer|length) APIs to access the ifreq
buffer andDon't directly access user memory in the switch statement.
Since bnxt_ioctl_data isn't allowing freebsd32 support that big, use a stack allocation.