wlan: use correct type conversion of cfg80211 cookies
Static source code analysis identified issues with the type conversion
being performed on cfg80211 cookie values, so correct those issues.
Change-Id: I560c3351f0ea78d1cbb89ee962ad53394e0888f3
CRs-fixed: 573468
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index f424fcc..6708060 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -333,7 +333,7 @@
#endif
pRemainChanCtx->duration = duration;
pRemainChanCtx->dev = dev;
- *cookie = (tANI_U32) pRemainChanCtx;
+ *cookie = (uintptr_t) pRemainChanCtx;
pRemainChanCtx->cookie = *cookie;
pRemainChanCtx->rem_on_chan_request = request_type;
cfgState->remain_on_chan_ctx = pRemainChanCtx;
@@ -440,7 +440,7 @@
#else
pAdapter->dev,
#endif
- (tANI_U32)pRemainChanCtx,
+ (uintptr_t)pRemainChanCtx,
&pRemainChanCtx->chan,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
pRemainChanCtx->chan_type,
@@ -799,7 +799,7 @@
else
{
#endif
- *cookie = (tANI_U32) cfgState->buf;
+ *cookie = (uintptr_t) cfgState->buf;
cfgState->action_cookie = *cookie;
/*There is race between expiration of remain on channel
in driver and also sending an action frame in wlan_hdd_action.
@@ -881,7 +881,7 @@
}
return 0;
err_rem_channel:
- *cookie = (tANI_U32)cfgState;
+ *cookie = (uintptr_t)cfgState;
cfg80211_mgmt_tx_status(
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
pAdapter->dev->ieee80211_ptr,
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index 4f5efd3..da9ce27 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -316,7 +316,7 @@
vos_mem_copy( cfgState->buf, skb->data, skb->len);
cfgState->skb = skb; //buf;
- cfgState->action_cookie = (tANI_U32)cfgState->buf;
+ cfgState->action_cookie = (uintptr_t)cfgState->buf;
hdr = (struct ieee80211_hdr *)skb->data;
if( (hdr->frame_control & HDD_FRAME_TYPE_MASK)