return ret;
 }
 
+static int wcn36xx_smd_gtk_offload_get_info_rsp(struct wcn36xx *wcn,
+                                               struct ieee80211_vif *vif)
+{
+       struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
+       struct wcn36xx_hal_gtk_offload_get_info_rsp_msg *rsp;
+       __be64 replay_ctr;
+
+       if (wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len))
+               return -EIO;
+
+       rsp = (struct wcn36xx_hal_gtk_offload_get_info_rsp_msg *)wcn->hal_buf;
+
+       if (rsp->bss_index != vif_priv->bss_index) {
+               wcn36xx_err("gtk_offload_info invalid response bss index %d\n",
+                           rsp->bss_index);
+               return -ENOENT;
+       }
+
+       if (vif_priv->rekey_data.replay_ctr != cpu_to_le64(rsp->key_replay_counter)) {
+               replay_ctr = cpu_to_be64(rsp->key_replay_counter);
+               vif_priv->rekey_data.replay_ctr =
+                       cpu_to_le64(rsp->key_replay_counter);
+               ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid,
+                                          (void *)&replay_ctr, GFP_KERNEL);
+                wcn36xx_dbg(WCN36XX_DBG_HAL,
+                            "GTK replay counter increment %llu\n",
+                            rsp->key_replay_counter);
+       }
+
+       wcn36xx_dbg(WCN36XX_DBG_HAL,
+                   "gtk offload info status %d last_rekey_status %d "
+                   "replay_counter %llu total_rekey_count %d gtk_rekey_count %d "
+                   "igtk_rekey_count %d bss_index %d\n",
+                   rsp->status, rsp->last_rekey_status,
+                   rsp->key_replay_counter, rsp->total_rekey_count,
+                   rsp->gtk_rekey_count, rsp->igtk_rekey_count,
+                   rsp->bss_index);
+
+       return 0;
+}
+
+int wcn36xx_smd_gtk_offload_get_info(struct wcn36xx *wcn,
+                                    struct ieee80211_vif *vif)
+{
+       struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
+       struct wcn36xx_hal_gtk_offload_get_info_req_msg msg_body;
+       int ret;
+
+       mutex_lock(&wcn->hal_mutex);
+
+       INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ);
+
+       msg_body.bss_index = vif_priv->bss_index;
+
+       PREPARE_HAL_BUF(wcn->hal_buf, msg_body);
+
+       ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len);
+       if (ret) {
+               wcn36xx_err("Sending gtk_offload_get_info failed\n");
+               goto out;
+       }
+       ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len);
+       if (ret) {
+               wcn36xx_err("gtk_offload_get_info failed err=%d\n", ret);
+               goto out;
+       }
+       ret = wcn36xx_smd_gtk_offload_get_info_rsp(wcn, vif);
+out:
+       mutex_unlock(&wcn->hal_mutex);
+       return ret;
+}
+
 int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev,
                            void *buf, int len, void *priv, u32 addr)
 {
        case WCN36XX_HAL_STOP_SCAN_OFFLOAD_RSP:
        case WCN36XX_HAL_HOST_OFFLOAD_RSP:
        case WCN36XX_HAL_GTK_OFFLOAD_RSP:
+       case WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP:
                memcpy(wcn->hal_buf, buf, len);
                wcn->hal_rsp_len = len;
                complete(&wcn->hal_rsp_compl);