提交 ea3c0d4e 编写于 作者: A Ajay Singh 提交者: Greg Kroah-Hartman

staging: wilc1000: use random number for cookie instead of pointer

Use random number to assign to cookie value.
Signed-off-by: NAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b6c6cd11
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册