lkml.org 
[lkml]   [2021]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 12/24] wfx: add hif_api_*.h
Date
Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:

> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.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

\
 
 \ /
  Last update: 2021-10-01 13:46    [W:0.194 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site