mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 16:25:35 +00:00
mxm_wifiex: use get_random_u32() when possible
The prandom_u32() function has been a deprecated inline wrapper around get_random_u32() for several releases now, and compiles down to the exact same code. Replace the deprecated wrapper with a direct call to the real function. Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
5a38226a47
commit
72ddfc7550
2 changed files with 8 additions and 0 deletions
|
@ -2907,7 +2907,11 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
|||
#if KERNEL_VERSION(3, 8, 0) > LINUX_VERSION_CODE
|
||||
*cookie = random32() | 1;
|
||||
#else
|
||||
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
|
||||
*cookie = prandom_u32() | 1;
|
||||
#else
|
||||
*cookie = get_random_u32() | 1;
|
||||
#endif
|
||||
#endif
|
||||
pmbuf->data_offset = MLAN_MIN_DATA_HEADER_LEN;
|
||||
pkt_type = MRVL_PKT_TYPE_MGMT_FRAME;
|
||||
|
|
|
@ -6223,7 +6223,11 @@ woal_cfg80211_remain_on_channel(struct wiphy *wiphy, struct net_device *dev,
|
|||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
|
||||
*cookie = (u64)random32() | 1;
|
||||
#else
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
|
||||
*cookie = (u64)prandom_u32() | 1;
|
||||
#else
|
||||
*cookie = (u64)get_random_u32() | 1;
|
||||
#endif
|
||||
#endif
|
||||
priv->phandle->remain_on_channel = MTRUE;
|
||||
priv->phandle->remain_bss_index = priv->bss_index;
|
||||
|
|
Loading…
Reference in a new issue