MA-20998-7 mxm_wifiex: Fix ISO C99 and later do not support implicit function declarations error

Fix below build error:

mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c:2910:12: error: call to undeclared function 'prandom_u32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        *cookie = prandom_u32() | 1;
                  ^

Change-Id: I7a314afe981b1919e4faeb946ed5fbc439496884
Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
This commit is contained in:
Zhipeng Wang 2023-01-11 10:54:48 +00:00
parent a7f96835dc
commit 5d6a2cc546

View file

@ -2945,8 +2945,10 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
ret = -ENOMEM;
goto done;
}
#if KERNEL_VERSION(3, 8, 0) > LINUX_VERSION_CODE
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
*cookie = random32() | 1;
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
*cookie = get_random_u32() | 1;
#else
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
*cookie = prandom_u32() | 1;