wlan: Passing correct arguments to kernel API
Sending correct arguments to kernel 'cfg80211_testmode_alloc_event_skb'
API, which allocate testmode event.
Change-Id: Ia2fa352824f8c68a3d60a3c33f295180de0d6a52
CRs-fixed: 651491
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 84520db..c49a50e 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -9604,10 +9604,18 @@
{
tSirLPHBInd *lphbInd;
struct sk_buff *skb;
+ hdd_context_t *pHddCtxt;
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"LPHB indication arrived");
+ if (pAdapter == NULL)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: pAdapter is NULL\n",__func__);
+ return;
+ }
+
if (NULL == indCont)
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
@@ -9615,9 +9623,10 @@
return;
}
+ pHddCtxt = (hdd_context_t *)pAdapter;
lphbInd = (tSirLPHBInd *)indCont;
skb = cfg80211_testmode_alloc_event_skb(
- ((hdd_adapter_t *)pAdapter)->wdev.wiphy,
+ pHddCtxt->wiphy,
sizeof(tSirLPHBInd),
GFP_ATOMIC);
if (!skb)