• Pali Rohár's avatar
    mwifiex: Fix reporting 'operation not supported' error code · 9187f4e8
    Pali Rohár authored
    ENOTSUPP (double PP) is internal linux kernel code 524 available only in
    kernel include file linux/errno.h and not exported to userspace.
    
    EOPNOTSUPP (OP; double PP) is standard code 95 for reporting 'operation not
    supported' available via kernel include file uapi/asm-generic/errno.h.
    
    ENOTSUP (single P) is alias for EOPNOTSUPP defined only in userspace
    include file bits/errno.h and not available in kernel.
    
    Because Linux kernel does not support ENOTSUP (single P) and because
    userspace does not support ENOTSUPP (double PP), report error code for
    'operation not supported' via EOPNOTSUPP macro.
    
    This patch fixes problem that mwifiex kernel driver sends to userspace
    unsupported error codes like: "failed: -524 (No error information)".
    After applying this patch userspace see: "failed: -95 (Not supported)".
    Signed-off-by: default avatarPali Rohár <pali@kernel.org>
    Acked-by: default avatarGanapathi Bhat <ganapathi.bhat@nxp.com>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20200703112151.18917-1-pali@kernel.org
    9187f4e8
sta_cmd.c 74.6 KB