lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871r55kly1.fsf@codeaurora.org>
Date:   Fri, 01 Oct 2021 14:45:42 +0300
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Jerome Pouiller <Jerome.Pouiller@...abs.com>
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "David S . Miller" <davem@...emloft.net>,
        devicetree@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        linux-mmc@...r.kernel.org,
        Pali Rohár <pali@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>
Subject: Re: [PATCH v7 12/24] wfx: add hif_api_*.h

Jerome Pouiller <Jerome.Pouiller@...abs.com> writes:

> From: Jérôme Pouiller <jerome.pouiller@...abs.com>
>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>

[...]

> +#define HIF_STATUS_SUCCESS                         (cpu_to_le32(0x0000))
> +#define HIF_STATUS_FAIL                            (cpu_to_le32(0x0001))
> +#define HIF_STATUS_INVALID_PARAMETER               (cpu_to_le32(0x0002))
> +#define HIF_STATUS_WARNING                         (cpu_to_le32(0x0003))
> +#define HIF_STATUS_UNKNOWN_REQUEST                 (cpu_to_le32(0x0004))
> +#define HIF_STATUS_RX_FAIL_DECRYPT                 (cpu_to_le32(0x0010))
> +#define HIF_STATUS_RX_FAIL_MIC                     (cpu_to_le32(0x0011))
> +#define HIF_STATUS_RX_FAIL_NO_KEY                  (cpu_to_le32(0x0012))
> +#define HIF_STATUS_TX_FAIL_RETRIES                 (cpu_to_le32(0x0013))
> +#define HIF_STATUS_TX_FAIL_TIMEOUT                 (cpu_to_le32(0x0014))
> +#define HIF_STATUS_TX_FAIL_REQUEUE                 (cpu_to_le32(0x0015))
> +#define HIF_STATUS_REFUSED                         (cpu_to_le32(0x0016))
> +#define HIF_STATUS_BUSY                            (cpu_to_le32(0x0017))
> +#define HIF_STATUS_SLK_SET_KEY_SUCCESS             (cpu_to_le32(0x005A))
> +#define HIF_STATUS_SLK_SET_KEY_ALREADY_BURNED      (cpu_to_le32(0x006B))
> +#define HIF_STATUS_SLK_SET_KEY_DISALLOWED_MODE     (cpu_to_le32(0x007C))
> +#define HIF_STATUS_SLK_SET_KEY_UNKNOWN_MODE        (cpu_to_le32(0x008D))
> +#define HIF_STATUS_SLK_NEGO_SUCCESS                (cpu_to_le32(0x009E))
> +#define HIF_STATUS_SLK_NEGO_FAILED                 (cpu_to_le32(0x00AF))
> +#define HIF_STATUS_ROLLBACK_SUCCESS                (cpu_to_le32(0x1234))
> +#define HIF_STATUS_ROLLBACK_FAIL                   (cpu_to_le32(0x1256))

I think it's a bad idea to use cpu_to_le32 here. Just define in cpu
order and use cpu_to_le32() whenever using these defines.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ