From: Ajay Singh Date: Tue, 5 Feb 2019 07:15:42 +0000 (+0000) Subject: staging: wilc1000: use random number for cookie instead of pointer X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ea3c0d4eaa9e89bb1c549d8eb6efc2a75687c651;p=linux.git staging: wilc1000: use random number for cookie instead of pointer Use random number to assign to cookie value. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index f719b74cf15de..98121ec362f46 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1252,7 +1252,7 @@ static int mgmt_tx(struct wiphy *wiphy, u32 buf_len = len + sizeof(p2p_vendor_spec) + sizeof(priv->p2p.local_random); int ret = 0; - *cookie = (unsigned long)buf; + *cookie = prandom_u32(); priv->tx_cookie = *cookie; mgmt = (const struct ieee80211_mgmt *)buf;