Revert "qcacld-2.0: Add netlink message to communicate with control app"
This reverts the changes I5969e35a92c82647ebfd62c2ceb9a22f17ec0f1f.
New QCA vendor commands in thermal shutdown feature should not be used
before the permission in qca-vendor.h.
Change-Id: Ifdf9a83e87949f5b56199494c91dfcbebc303db9
CRs-Fixed: 2176134
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
index 6b84e98..821ae60 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
@@ -306,13 +306,6 @@
QCA_NL80211_VENDOR_SUBCMD_CHIP_PWRSAVE_FAILURE = 148,
/* subcommand to flush peer tids */
QCA_NL80211_VENDOR_SUBCMD_PEER_FLUSH_PENDING = 162,
-
-#ifdef FEATURE_WLAN_THERMAL_SHUTDOWN
- /* Thermal Shutdown cmds to protect chip */
- QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD = 165,
- QCA_NL80211_VENDOR_SUBCMD_TEMPERATURE_EVENT = 166,
- QCA_NL80211_VENDOR_SUBCMD_RESUME_COMP_EVENT = 167,
-#endif
};
/**
@@ -429,11 +422,6 @@
QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_PNO_PASSPOINT_NETWORK_FOUND_INDEX,
#endif /* FEATURE_WLAN_EXTSCAN */
-#ifdef FEATURE_WLAN_THERMAL_SHUTDOWN
- QCA_NL80211_VENDOR_SUBCMD_TEMPERATURE_EVENT_INDEX,
- QCA_NL80211_VENDOR_SUBCMD_RESUME_COMP_EVENT_INDEX,
-#endif
-
/* OCB events */
QCA_NL80211_VENDOR_SUBCMD_DCC_STATS_EVENT_INDEX,
QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI_INDEX,
@@ -1579,54 +1567,6 @@
QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_AFTER_LAST - 1,
};
-#ifdef FEATURE_WLAN_THERMAL_SHUTDOWN
-/**
- * enum qca_wlan_vendor_attr_get_temperature_rsp - vendor subcmd to get chip
- * temperature
- *
- * @QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_INVALID: invalid
- * @QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_TEMPERATURE: 32 bits temperature
- *
- * enum values are used for NL attributes for data used by
- * QCA_NL80211_VENDOR_SUBCMD_GET_TEMPERATURE sub command.
- */
-enum qca_wlan_vendor_attr_get_temperature_rsp {
- QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_INVALID = 0,
- QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_TEMPERATURE,
- QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_AFTER_LAST,
- QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_MAX =
- QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_AFTER_LAST - 1,
-};
-
-/**
- * enum qca_wlan_vendor_attr_get_thermal_params_rsp - vendor subcmd to get
- * parameters of thermal shutdown feature
- *
- * @QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_INVALID: invalid
- * @QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SHUTDOWN_EN: 8 bits flag
- * @QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SHUTDOWN_AUTO_EN: 8 bits flag
- * @QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_RESUME_THRESH: 16 bits threshold
- * @QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_WARNING_THRESH: 16 bits threshold
- * @QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SUSPEND_THRESH: 16 bits threshold
- * @QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SAMPLE_RATE: 16 bits sample rate
- *
- * enum values are used for NL attributes for data used by
- * QCA_NL80211_VENDOR_SUBCMD_GET_THERMAL_PARAMS sub command.
- */
-enum qca_wlan_vendor_attr_get_thermal_params_rsp {
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_INVALID = 0,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SHUTDOWN_EN,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SHUTDOWN_AUTO_EN,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_RESUME_THRESH,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_WARNING_THRESH,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SUSPEND_THRESH,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SAMPLE_RATE,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_AFTER_LAST,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_MAX =
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_AFTER_LAST - 1,
-};
-#endif
-
/**
* enum qca_wlan_vendor_features - vendor device/driver features
* @QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD: Device supports key
@@ -2710,43 +2650,6 @@
QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_LAST - 1,
};
-#ifdef FEATURE_WLAN_THERMAL_SHUTDOWN
-/**
- * enum wlan_ts_cmds - thermal commands.
- *
- * @WLAN_TS_CMD_GET_PARAMS:
- * Get the configuration parameters for thermal shutdown for user.
- * @WLAN_TS_CMD_GET_TEMP:
- * Get the temperature from FW and send it to user.
- * @WLAN_TS_CMD_SUSPEND:
- * Execute the suspend command issued from user.
- * @WLAN_TS_CMD_RESUME:
- * Execute the resume command issued from user.
- */
-enum wlan_ts_cmds {
- WLAN_TS_CMD_NONE,
- WLAN_TS_CMD_GET_PARAMS,
- WLAN_TS_CMD_GET_TEMP,
- WLAN_TS_CMD_SUSPEND,
- WLAN_TS_CMD_RESUME,
-};
-
-/**
- * enum qca_wlan_vendor_attr_thermal_drv_cmd - thermal command value for vendor
- * sub-command QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD
- * @QCA_WLAN_VENDOR_ATTR_THM_CMD_VALUE:
- * The value of command, driver will implement different operations according
- * to this value.
- */
-enum qca_wlan_vendor_attr_thermal_drv_cmd {
- QCA_WLAN_VENDOR_ATTR_THM_CMD_INVALID = 0,
- QCA_WLAN_VENDOR_ATTR_THM_CMD_VALUE,
- QCA_WLAN_VENDOR_ATTR_THM_CMD_AFTER_LAST,
- QCA_WLAN_VENDOR_ATTR_THM_CMD_MAX =
- QCA_WLAN_VENDOR_ATTR_THM_CMD_AFTER_LAST - 1,
-};
-#endif
-
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0))
/**
* enum ieee80211_band - supported frequency bands
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 699f073..178eb6e 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -1384,17 +1384,6 @@
.subcmd = QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_HOTLIST_AP_LOST
},
#endif /* FEATURE_WLAN_EXTSCAN */
-#ifdef FEATURE_WLAN_THERMAL_SHUTDOWN
- [QCA_NL80211_VENDOR_SUBCMD_TEMPERATURE_EVENT_INDEX] = {
- .vendor_id = QCA_NL80211_VENDOR_ID,
- .subcmd = QCA_NL80211_VENDOR_SUBCMD_TEMPERATURE_EVENT
- },
- [QCA_NL80211_VENDOR_SUBCMD_RESUME_COMP_EVENT_INDEX] = {
- .vendor_id = QCA_NL80211_VENDOR_ID,
- .subcmd = QCA_NL80211_VENDOR_SUBCMD_RESUME_COMP_EVENT
- },
-#endif /* FEATURE_WLAN_THERMAL_SHUTDOWN */
-
/* OCB events */
[QCA_NL80211_VENDOR_SUBCMD_DCC_STATS_EVENT_INDEX] = {
.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -8205,304 +8194,6 @@
return ret;
}
-
-#ifdef FEATURE_WLAN_THERMAL_SHUTDOWN
-static const struct nla_policy qca_wlan_vendor_thermal_cmd_policy[
- QCA_WLAN_VENDOR_ATTR_THM_CMD_MAX + 1] = {
- [QCA_WLAN_VENDOR_ATTR_THM_CMD_VALUE] = {
- .type = NLA_U32
- },
-};
-
-/**
- * wlan_hdd_thermal_cmd_get_temperature() - Fetch temperature and send it to ap
- * @wiphy: pointer to wireless wiphy structure.
- * @wdev: pointer to wireless_dev structure.
- *
- * This is called by thermal cmd and data is sent to user space.
- *
- * Return: Return the Success or Failure code.
- */
-
-static int
-wlan_hdd_thermal_cmd_get_temperature(struct wiphy *wiphy,
- struct wireless_dev *wdev)
-{
- eHalStatus status;
- struct statsContext temp_context;
- unsigned long rc;
- struct sk_buff *nl_resp = 0;
- hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
- struct net_device *dev = wdev->netdev;
- hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
-
- if (VOS_FTM_MODE == hdd_get_conparam()) {
- hddLog(LOGE, FL("Command not allowed in FTM mode"));
- return -EINVAL;
- }
-
- if (wlan_hdd_validate_context(hdd_ctx))
- return -EINVAL;
-
- /* prepare callback context and magic pattern */
- init_completion(&temp_context.completion);
- temp_context.pAdapter = adapter;
- temp_context.magic = TEMP_CONTEXT_MAGIC;
-
- status = sme_GetTemperature(WLAN_HDD_GET_HAL_CTX(adapter),
- &temp_context, hdd_GetTemperatureCB);
- if (eHAL_STATUS_SUCCESS != status) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("Unable to get temperature"));
- } else {
- rc = wait_for_completion_timeout(&temp_context.completion,
- msecs_to_jiffies(1000));
- if (!rc) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("SME timed out while getting temperature"));
- return -EBUSY;
- }
- }
-
- spin_lock(&hdd_context_lock);
- temp_context.magic = 0;
- spin_unlock(&hdd_context_lock);
-
- nl_resp = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, 4 + NLMSG_HDRLEN);
- if (!nl_resp) {
- hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed"));
- rc = -ENOMEM;
- goto exit;
- }
-
- rc = nla_put_u32(nl_resp, QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_TEMPERATURE,
- adapter->temperature);
- if (rc) {
- kfree_skb(nl_resp);
- goto exit;
- }
-
- rc = cfg80211_vendor_cmd_reply(nl_resp);
- if (rc) {
- hddLog(LOGE, FL("cfg80211_vendor_cmd_reply failed: %ld"), rc);
- goto exit;
- }
-exit:
- return rc;
-}
-
-/**
- * wlan_hdd_thermal_cmd_get_params() - Get thermal parameters and send them
- * to app
- * @wiphy: pointer to wireless wiphy structure.
- * @wdev: pointer to wireless_dev structure.
- *
- * This is called by thermal cmd and data is sent to user space.
- *
- * Return: Return the Success or Failure code.
- */
-
-static int
-wlan_hdd_thermal_cmd_get_params(struct wiphy *wiphy)
-{
- int rc;
- struct sk_buff *nl_resp = 0;
- hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
- uint32_t nl_buf_len;
-
- if (VOS_FTM_MODE == hdd_get_conparam()) {
- hddLog(LOGE, FL("Command not allowed in FTM mode"));
- return -EINVAL;
- }
-
- if (wlan_hdd_validate_context(hdd_ctx))
- return -EINVAL;
-
- nl_buf_len = NLMSG_HDRLEN;
- nl_buf_len += (sizeof(hdd_ctx->cfg_ini->thermal_shutdown_enabled)
- + NLA_HDRLEN) + (sizeof(hdd_ctx->cfg_ini->thermal_shutdown_auto_enabled)
- + NLA_HDRLEN) + (sizeof(hdd_ctx->cfg_ini->thermal_resume_threshold)
- + NLA_HDRLEN) + (sizeof(hdd_ctx->cfg_ini->thermal_warning_threshold)
- + NLA_HDRLEN) + (sizeof(hdd_ctx->cfg_ini->thermal_suspend_threshold)
- + NLA_HDRLEN) + (sizeof(hdd_ctx->cfg_ini->thermal_sample_rate)
- + NLA_HDRLEN);
-
- nl_resp = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, nl_buf_len);
- if (!nl_resp) {
- hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed"));
- rc = -ENOMEM;
- goto exit;
- }
-
- nla_put_u8(nl_resp, QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SHUTDOWN_EN,
- hdd_ctx->cfg_ini->thermal_shutdown_enabled);
- nla_put_u8(nl_resp,
- QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SHUTDOWN_AUTO_EN,
- hdd_ctx->cfg_ini->thermal_shutdown_auto_enabled);
- nla_put_u16(nl_resp, QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_RESUME_THRESH,
- hdd_ctx->cfg_ini->thermal_resume_threshold);
- nla_put_u16(nl_resp, QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_WARNING_THRESH,
- hdd_ctx->cfg_ini->thermal_warning_threshold);
- nla_put_u16(nl_resp, QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SUSPEND_THRESH,
- hdd_ctx->cfg_ini->thermal_suspend_threshold);
- nla_put_u16(nl_resp, QCA_WLAN_VENDOR_ATTR_GET_THM_PARAMS_RSP_SAMPLE_RATE,
- hdd_ctx->cfg_ini->thermal_sample_rate);
-
- rc = cfg80211_vendor_cmd_reply(nl_resp);
- if (rc) {
- hddLog(LOGE, FL("cfg80211_vendor_cmd_reply failed: %d"), rc);
- goto exit;
- }
-exit:
- return rc;
-}
-
-/**
- * wlan_hdd_thermal_cmd_suspend() - Execute the suspend command
- *
- * @wiphy: pointer to wireless wiphy structure.
- * @wdev: pointer to wireless_dev structure.
- *
- * This is called by thermal cmd.
- *
- * Return: Return the Success or Failure code.
- */
-static int wlan_hdd_thermal_cmd_suspend(struct wiphy *wiphy)
-{
- hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
-
- if (!hdd_ctx->cfg_ini->thermal_shutdown_enabled)
- return -ENOSYS;
-
- if (hdd_ctx->cfg_ini->thermal_shutdown_auto_enabled)
- return -EINVAL;
-
- if (hdd_thermal_suspend_state(hdd_ctx) == HDD_WLAN_THERMAL_ACTIVE)
- if (hdd_thermal_suspend_queue_work(hdd_ctx, 0))
- return 0;
-
- return -EBUSY;
-}
-
-/**
- * wlan_hdd_thermal_cmd_resume() - Execute the resume command
- *
- * @wiphy: pointer to wireless wiphy structure.
- * @wdev: pointer to wireless_dev structure.
- *
- * This is called by thermal cmd.
- *
- * Return: Return the Success or Failure code.
- */
-static int wlan_hdd_thermal_cmd_resume(struct wiphy *wiphy)
-{
- hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
-
- if (!hdd_ctx->cfg_ini->thermal_shutdown_enabled)
- return -ENOSYS;
-
- if (hdd_ctx->cfg_ini->thermal_shutdown_auto_enabled)
- return -EINVAL;
-
- if (hdd_thermal_suspend_state(hdd_ctx) == HDD_WLAN_THERMAL_ACTIVE)
- if (hdd_thermal_suspend_queue_work(hdd_ctx, 0))
- return 0;
-
- return -EBUSY;
-}
-
-/**
- * __wlan_hdd_cfg80211_thermal_cmd() - Parse the thermal command from user space
- * and call the function according to different commands.
- *
- * @wiphy: pointer to wireless wiphy structure.
- * @wdev: pointer to wireless_dev structure.
- * @data: Pointer to the Key data
- * @data_len:Length of the data passed
- *
- * This is called when the wlan_ts tool execute commands.
- *
- * Return: Return the Success or Failure code.
- */
-static int
-__wlan_hdd_cfg80211_thermal_cmd(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- const void *data, int data_len)
-{
- int ret;
- hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
- struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_THM_CMD_MAX + 1];
- uint32_t ts_cmd;
-
- if (VOS_FTM_MODE == hdd_get_conparam()) {
- hddLog(LOGE, FL("Command not allowed in FTM mode"));
- return -EINVAL;
- }
-
- if (wlan_hdd_validate_context(hdd_ctx))
- return -EINVAL;
-
- if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_THM_CMD_VALUE,
- data, data_len,
- qca_wlan_vendor_thermal_cmd_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
- return -EINVAL;
- }
-
- if (!tb[QCA_WLAN_VENDOR_ATTR_THM_CMD_VALUE]) {
- hddLog(LOGE, FL("attr thermal cmd failed"));
- return -EINVAL;
- }
- ts_cmd = nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_THM_CMD_VALUE]);
-
- switch(ts_cmd) {
- case WLAN_TS_CMD_GET_PARAMS:
- ret = wlan_hdd_thermal_cmd_get_params(wiphy);
- break;
- case WLAN_TS_CMD_GET_TEMP:
- ret = wlan_hdd_thermal_cmd_get_temperature(wiphy, wdev);
- break;
- case WLAN_TS_CMD_SUSPEND:
- ret = wlan_hdd_thermal_cmd_suspend(wiphy);
- break;
- case WLAN_TS_CMD_RESUME:
- ret = wlan_hdd_thermal_cmd_resume(wiphy);
- break;
- default:
- ret = -EINVAL;
- break;
- }
- return ret;
-}
-
-/**
- * wlan_hdd_cfg80211_thermal_cmd() - Parse the thermal command from user space
- * and call the function according to different commands.
- *
- * @wiphy: pointer to wireless wiphy structure.
- * @wdev: pointer to wireless_dev structure.
- * @data: Pointer to the Key data
- * @data_len:Length of the data passed
- *
- * This is called when the wlan_ts tool execute commands.
- *
- * Return: Return the Success or Failure code.
- */
-
-static int
-wlan_hdd_cfg80211_thermal_cmd(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- const void *data, int data_len)
-{
- int ret;
-
- vos_ssr_protect(__func__);
- ret = __wlan_hdd_cfg80211_thermal_cmd(wiphy, wdev, data, data_len);
- vos_ssr_unprotect(__func__);
-
- return ret;
-}
-#endif /* FEATURE_WLAN_THERMAL_SHUTDOWN */
-
#ifdef FEATURE_WLAN_TDLS
/* EXT TDLS */
static const struct nla_policy
@@ -15612,15 +15303,6 @@
WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlan_hdd_cfg80211_peer_flush_pending
},
-#ifdef FEATURE_WLAN_THERMAL_SHUTDOWN
- {
- .info.vendor_id = QCA_NL80211_VENDOR_ID,
- .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD,
- .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
- WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = wlan_hdd_cfg80211_thermal_cmd
- },
-#endif /* FEATURE_WLAN_THERMAL_SHUTDOWN */
};
/*
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 75b872b..db6dc01 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -1790,15 +1790,6 @@
return s;
}
-/**
- * hdd_system_suspend_state_set() - Set the system suspended state
- * @hdd_ctx: Pointer to hdd_context_t
- * @state: The target state to be set
- *
- * Set the system suspended state
- *
- * Return: The state before set.
- */
bool
hdd_system_suspend_state_set(hdd_context_t *hdd_ctx, bool state)
{
@@ -1813,14 +1804,7 @@
return old;
}
-/**
- * hdd_thermal_suspend_state() - Get the thermal suspend state
- * @hdd_ctx: Pointer to hdd_context_t
- *
- * Get the thermal suspend state
- *
- * Return: The current thermal suspend state
- */
+
int
hdd_thermal_suspend_state(hdd_context_t *hdd_ctx)
{
@@ -1904,24 +1888,6 @@
}
}
-static inline void
-hdd_thermal_resume_complete_ind(struct wiphy *wiphy)
-{
- struct sk_buff *vendor_event;
-
- hddLog(LOG1, FL("Thermal resume complete indication"));
-
- vendor_event = cfg80211_vendor_event_alloc(wiphy, NULL, NLMSG_HDRLEN,
- QCA_NL80211_VENDOR_SUBCMD_RESUME_COMP_EVENT_INDEX,
- GFP_KERNEL);
- if (!vendor_event) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
- return;
- }
-
- cfg80211_vendor_event(vendor_event, GFP_KERNEL);
-}
-
static void
hdd_thermal_suspend_work(struct work_struct *work)
{
@@ -1986,26 +1952,6 @@
static void
hdd_thermal_temp_ind_event_cb(hdd_context_t *hdd_ctx, uint32_t degreeC)
{
- struct sk_buff *vendor_event;
-
- vendor_event = cfg80211_vendor_event_alloc(hdd_ctx->wiphy,
- NULL, sizeof(uint32_t) + NLMSG_HDRLEN,
- QCA_NL80211_VENDOR_SUBCMD_TEMPERATURE_EVENT_INDEX,
- GFP_KERNEL);
- if (!vendor_event) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
- return;
- }
-
- if (nla_put_u32(vendor_event,
- QCA_WLAN_VENDOR_ATTR_GET_TEMP_RSP_TEMPERATURE, degreeC)) {
- hddLog(LOGE, FL("nla put failed"));
- kfree_skb(vendor_event);
- return;
- }
-
- cfg80211_vendor_event(vendor_event, GFP_KERNEL);
-
if (!hdd_ctx->cfg_ini->thermal_shutdown_auto_enabled) {
return;
}