瀏覽代碼

qcacmn: Add UMAC peer into DP peer structure

Add and initialize UMAC peer handle into DP peer structure as opaque
and to pass UMAC node structure to ol if layer for Block Ack and
rx_frag_tkip_demic functions.

Change-Id: If7c3faf859c97832c3c7f50fc163142b68eedeeb
CRs-Fixed: 2241356
Akshay Kosigi 6 年之前
父節點
當前提交
78eced8c1d
共有 6 個文件被更改,包括 21 次插入12 次删除
  1. 2 2
      dp/inc/cdp_txrx_cmn.h
  2. 5 0
      dp/inc/cdp_txrx_handle.h
  3. 3 2
      dp/inc/cdp_txrx_ops.h
  4. 8 4
      dp/wifi3.0/dp_main.c
  5. 1 1
      dp/wifi3.0/dp_rx_defrag.c
  6. 2 3
      dp/wifi3.0/dp_types.h

+ 2 - 2
dp/inc/cdp_txrx_cmn.h

@@ -270,7 +270,7 @@ cdp_pdev_detach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, int force)
 
 static inline void *cdp_peer_create
 	(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
-	uint8_t *peer_mac_addr, void *ol_peer)
+	uint8_t *peer_mac_addr, struct cdp_ctrl_objmgr_peer *ctrl_peer)
 {
 	if (!soc || !soc->ops) {
 		QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
@@ -284,7 +284,7 @@ static inline void *cdp_peer_create
 		return NULL;
 
 	return soc->ops->cmn_drv_ops->txrx_peer_create(vdev,
-			peer_mac_addr, ol_peer);
+			peer_mac_addr, ctrl_peer);
 }
 
 static inline void cdp_peer_setup

+ 5 - 0
dp/inc/cdp_txrx_handle.h

@@ -43,4 +43,9 @@ struct cdp_ctrl_objmgr_pdev;
  */
 struct cdp_ctrl_objmgr_vdev;
 
+/**
+ * cdp_ctrl_objmgr_peer - opaque handle for UMAC peer object
+ */
+struct cdp_ctrl_objmgr_peer;
+
 #endif

+ 3 - 2
dp/inc/cdp_txrx_ops.h

@@ -86,7 +86,7 @@ struct cdp_cmn_ops {
 
 	void *(*txrx_peer_create)
 		(struct cdp_vdev *vdev, uint8_t *peer_mac_addr,
-		 void *ol_peer);
+		 struct cdp_ctrl_objmgr_peer *ctrl_peer);
 
 	void (*txrx_peer_setup)
 		(struct cdp_vdev *vdev_hdl, void *peer_hdl);
@@ -754,7 +754,8 @@ struct ol_if_ops {
 
 	void (*rx_mic_error)(void *ol_soc_handle,
 			 uint16_t vdev_id, void *wh);
-	bool (*rx_frag_tkip_demic)(void *ol_peer, qdf_nbuf_t nbuf,
+	bool (*rx_frag_tkip_demic)(struct wlan_objmgr_peer *ctrl_peer,
+				   qdf_nbuf_t nbuf,
 				   uint16_t hdr_space);
 	uint8_t (*freq_to_channel)(void *ol_soc_handle,  uint16_t vdev_id);
 

+ 8 - 4
dp/wifi3.0/dp_main.c

@@ -62,7 +62,8 @@ static void dp_pkt_log_con_service(struct cdp_pdev *ppdev, void *scn);
 #endif
 static void dp_pktlogmod_exit(struct dp_pdev *handle);
 static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
-				uint8_t *peer_mac_addr, void *ol_peer);
+				uint8_t *peer_mac_addr,
+				struct cdp_ctrl_objmgr_peer *ctrl_peer);
 static void dp_peer_delete_wifi3(void *peer_handle, uint32_t bitmap);
 
 #define DP_INTR_POLL_TIMER_MS	10
@@ -3359,7 +3360,8 @@ static struct cdp_vdev *dp_vdev_attach_wifi3(struct cdp_pdev *txrx_pdev,
 
 	if (wlan_op_mode_sta == vdev->opmode)
 		dp_peer_create_wifi3((struct cdp_vdev *)vdev,
-						vdev->mac_addr.raw, NULL);
+							vdev->mac_addr.raw,
+							NULL);
 
 	return (struct cdp_vdev *)vdev;
 
@@ -3548,7 +3550,7 @@ static inline void dp_peer_delete_ast_entries(struct dp_soc *soc,
  * Return: DP peeer handle on success, NULL on failure
  */
 static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
-		uint8_t *peer_mac_addr, void *ol_peer)
+		uint8_t *peer_mac_addr, struct cdp_ctrl_objmgr_peer *ctrl_peer)
 {
 	struct dp_peer *peer;
 	int i;
@@ -3581,6 +3583,7 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
 			soc->cdp_soc.ol_ops->peer_unref_delete(pdev->ctrl_pdev,
 				vdev->vdev_id, peer->mac_addr.raw);
 		}
+		peer->ctrl_peer = ctrl_peer;
 
 		dp_local_peer_id_alloc(pdev, peer);
 		DP_STATS_INIT(peer);
@@ -3612,6 +3615,7 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
 
 	/* store provided params */
 	peer->vdev = vdev;
+	peer->ctrl_peer = ctrl_peer;
 
 	dp_peer_add_ast(soc, peer, peer_mac_addr, CDP_TXRX_AST_TYPE_STATIC, 0);
 
@@ -3665,7 +3669,6 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
 
 	dp_local_peer_id_alloc(pdev, peer);
 	DP_STATS_INIT(peer);
-	peer->ol_peer = ol_peer;
 	return (void *)peer;
 }
 
@@ -4294,6 +4297,7 @@ static void dp_peer_delete_wifi3(void *peer_handle, uint32_t bitmap)
 	 */
 
 	peer->rx_opt_proc = dp_rx_discard;
+	peer->ctrl_peer = NULL;
 
 	QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_HIGH,
 		FL("peer %pK (%pM)"),  peer, peer->mac_addr.raw);

+ 1 - 1
dp/wifi3.0/dp_rx_defrag.c

@@ -1229,7 +1229,7 @@ static QDF_STATUS dp_rx_defrag(struct dp_peer *peer, unsigned tid,
 		msdu = frag_list_head;
 		if (soc->cdp_soc.ol_ops->rx_frag_tkip_demic) {
 			status = soc->cdp_soc.ol_ops->rx_frag_tkip_demic(
-				peer->ol_peer, msdu, hdr_space);
+				(void *)peer->ctrl_peer, msdu, hdr_space);
 		} else {
 			qdf_mem_copy(key,
 				     &peer->security[index].michael_key[0],

+ 2 - 3
dp/wifi3.0/dp_types.h

@@ -1357,6 +1357,8 @@ struct dp_peer {
 	/* VDEV to which this peer is associated */
 	struct dp_vdev *vdev;
 
+	struct cdp_ctrl_objmgr_peer *ctrl_peer;
+
 	struct dp_ast_entry *self_ast_entry;
 
 	qdf_atomic_t ref_cnt;
@@ -1423,9 +1425,6 @@ struct dp_peer {
 	dp_ecm_policy wds_ecm;
 #endif
 	bool delete_in_progress;
-
-	/* Opaque handle to node */
-	void *ol_peer;
 };
 
 #ifdef CONFIG_WIN