diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index f3a2f437263d..a09fa117f765 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1056,6 +1056,8 @@ int wlan_hdd_send_hang_reason_event(struct hdd_context *hdd_ctx, { struct sk_buff *vendor_event; enum qca_wlan_vendor_hang_reason hang_reason; + struct hdd_adapter *sta_adapter; + struct wireless_dev *wdev = NULL; hdd_enter(); @@ -1064,8 +1066,12 @@ int wlan_hdd_send_hang_reason_event(struct hdd_context *hdd_ctx, return -EINVAL; } + sta_adapter = hdd_get_adapter(hdd_ctx, QDF_STA_MODE); + if (sta_adapter) + wdev = &(sta_adapter->wdev); + vendor_event = cfg80211_vendor_event_alloc(hdd_ctx->wiphy, - NULL, + wdev, sizeof(uint32_t), HANG_REASON_INDEX, GFP_KERNEL);