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

Fix below build error:

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

Change-Id: Ica0ef0268f2c24fb12906bde96aabb0753b0c855
Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
This commit is contained in:
Zhipeng Wang 2023-01-11 10:45:07 +00:00
parent e1b6635d62
commit c847fbe032

View file

@ -6280,6 +6280,8 @@ woal_cfg80211_remain_on_channel(struct wiphy *wiphy, struct net_device *dev,
/* we need update the value cookie */
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
*cookie = (u64)random32() | 1;
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
*cookie = (u64)get_random_u32() | 1;
#else
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
*cookie = (u64)prandom_u32() | 1;