瀏覽代碼

qcacmn: Add new macro for net_dev iface_id

IPA driver requires netdev iface_id at client disconnect event
so that the IPA driver can unregister the local interface.
Fix is to pass the netdev iface id from wlan driver to IPA
at client disconnect event.

Change-Id: Idf79553ee2a9574bf8213e69c46229a3843fca84
CRs-Fixed: 3165336
Devender Kumar 3 年之前
父節點
當前提交
96d0dd12b0
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. 18 0
      qdf/linux/src/i_qdf_ipa.h

+ 18 - 0
qdf/linux/src/i_qdf_ipa.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -488,6 +489,23 @@ typedef struct ipa_wlan_msg __qdf_ipa_wlan_msg_t;
 #define QDF_IPA_WLAN_MSG_MAC_ADDR(ipa_msg)	\
 	(((struct ipa_wlan_msg *)(ipa_msg))->mac_addr)
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
+#define QDF_IPA_WLAN_MSG_NETDEV_IF_ID(ipa_msg)	\
+	(((struct ipa_wlan_msg *)(ipa_msg))->if_index)
+#else
+/**
+ * ipa_wlan_msg_if_index - Netdev interface id
+ */
+struct ipa_wlan_msg_if_index {
+	char name[IPA_RESOURCE_NAME_MAX];
+	uint8_t mac_addr[IPA_MAC_ADDR_SIZE];
+	uint16_t if_index;
+};
+
+#define QDF_IPA_WLAN_MSG_NETDEV_IF_ID(ipa_msg)	\
+	(((struct ipa_wlan_msg_if_index *)(ipa_msg))->if_index)
+#endif
+
 typedef struct ipa_wlan_msg_ex __qdf_ipa_wlan_msg_ex_t;
 
 #define QDF_IPA_WLAN_MSG_EX_NAME(ipa_msg)	\