Ver Fonte

qcacld-3.0: Move vdev and vdev_lock to dp_link

Move the vdev and vdev_lock to dp_link, since
dp_link corresponds to objmgr vdev now.

Change-Id: Id1ef27911c4eaa3434fc2719a8f5951f00d31116
CRs-Fixed: 3518896
Rakesh Pillai há 2 anos atrás
pai
commit
a3161f8f5b

+ 8 - 8
components/dp/core/inc/wlan_dp_objmgr.h

@@ -105,26 +105,26 @@ dp_psoc_get_priv(struct wlan_objmgr_psoc *psoc)
 }
 
 /**
- * dp_objmgr_get_vdev_by_user() - Get reference of vdev from dp_intf
+ * dp_objmgr_get_vdev_by_user() - Get reference of vdev from dp_link
  *  with user id
- * @dp_intf: dp dp_intf
+ * @dp_link: DP link handle
  * @dbgid: reference count dbg id
  *
  * Return: pointer to vdev object for success, NULL for failure
  */
 #ifdef WLAN_OBJMGR_REF_ID_TRACE
-#define dp_objmgr_get_vdev_by_user(dp_intf, dbgid) \
-	__dp_objmgr_get_vdev_by_user(dp_intf, dbgid, __func__, __LINE__)
+#define dp_objmgr_get_vdev_by_user(dp_link, dbgid) \
+	__dp_objmgr_get_vdev_by_user(dp_link, dbgid, __func__, __LINE__)
 struct wlan_objmgr_vdev *
-__dp_objmgr_get_vdev_by_user(struct wlan_dp_intf *dp_intf,
+__dp_objmgr_get_vdev_by_user(struct wlan_dp_link *dp_link,
 			     wlan_objmgr_ref_dbgid id,
 			     const char *func,
 			     int line);
 #else
-#define dp_objmgr_get_vdev_by_user(dp_intf, dbgid) \
-	__dp_objmgr_get_vdev_by_user(dp_intf, dbgid, __func__)
+#define dp_objmgr_get_vdev_by_user(dp_link, dbgid) \
+	__dp_objmgr_get_vdev_by_user(dp_link, dbgid, __func__)
 struct wlan_objmgr_vdev *
-__dp_objmgr_get_vdev_by_user(struct wlan_dp_intf *dp_intf,
+__dp_objmgr_get_vdev_by_user(struct wlan_dp_link *dp_link,
 			     wlan_objmgr_ref_dbgid id,
 			     const char *func);
 #endif

+ 4 - 4
components/dp/core/inc/wlan_dp_priv.h

@@ -574,8 +574,6 @@ struct dp_rx_fst {
  * @device_mode: Device Mode
  * @intf_id: Interface ID
  * @node: list node for membership in the interface list
- * @vdev: object manager vdev context
- * @vdev_lock: vdev spin lock
  * @dev: netdev reference
  * @txrx_ops: Interface tx-rx ops
  * @dp_stats: Device TX/RX statistics
@@ -631,8 +629,6 @@ struct wlan_dp_intf {
 
 	qdf_list_node_t node;
 
-	struct wlan_objmgr_vdev *vdev;
-	qdf_spinlock_t vdev_lock;
 	qdf_netdev_t dev;
 	struct ol_txrx_ops txrx_ops;
 	struct dp_stats dp_stats;
@@ -690,12 +686,16 @@ struct wlan_dp_intf {
  * @link_id: ID for this DP link (Same as vdev_id)
  * @mac_addr: mac address of this link
  * @dp_intf: Parent DP interface for this DP link
+ * @vdev: object manager vdev context
+ * @vdev_lock: vdev spin lock
  */
 struct wlan_dp_link {
 	qdf_list_node_t node;
 	uint8_t link_id;
 	struct qdf_mac_addr mac_addr;
 	struct wlan_dp_intf *dp_intf;
+	struct wlan_objmgr_vdev *vdev;
+	qdf_spinlock_t vdev_lock;
 };
 
 /**

+ 9 - 9
components/dp/core/inc/wlan_dp_txrx.h

@@ -148,8 +148,8 @@ int dp_softap_inspect_dhcp_packet(struct wlan_dp_intf *dp_intf,
 
 /**
  * dp_rx_flush_packet_cbk() - flush rx packet handler
- * @dp_intf_ctx: pointer to DP interface context
- * @vdev_id: vdev_id of the packets to be flushed
+ * @dp_link_context: pointer to DP link context
+ * @link_id: vdev_id of the packets to be flushed
  *
  * Flush rx packet callback registered with data path. DP will call this to
  * notify when packets for a particular vdev is to be flushed out.
@@ -157,7 +157,7 @@ int dp_softap_inspect_dhcp_packet(struct wlan_dp_intf *dp_intf,
  * Return: QDF_STATUS_E_FAILURE if any errors encountered,
  *	   QDF_STATUS_SUCCESS otherwise
  */
-QDF_STATUS dp_rx_flush_packet_cbk(void *dp_intf_ctx, uint8_t vdev_id);
+QDF_STATUS dp_rx_flush_packet_cbk(void *dp_link_context, uint8_t link_id);
 
 /**
  * dp_softap_start_xmit() - Transmit a frame for SAP interface
@@ -198,12 +198,12 @@ dp_softap_rx_packet_cbk(void *intf_ctx, qdf_nbuf_t rx_buf);
 /**
  * dp_start_xmit() - Transmit a frame for STA interface
  * @nbuf: pointer to Network buffer
- * @dp_intf: DP interface
+ * @dp_link: DP link handle
  *
  * Return: QDF_STATUS_SUCCESS on successful transmission
  */
 QDF_STATUS
-dp_start_xmit(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf);
+dp_start_xmit(struct wlan_dp_link *dp_link, qdf_nbuf_t nbuf);
 
 /**
  * dp_tx_timeout() - DP Tx timeout API
@@ -217,7 +217,7 @@ void dp_tx_timeout(struct wlan_dp_intf *dp_intf);
 
 /**
  * dp_rx_packet_cbk() - Receive packet handler
- * @dp_intf_context: pointer to DP interface context
+ * @dp_link_context: pointer to DP link context
  * @rx_buf: pointer to rx qdf_nbuf
  *
  * Receive callback registered with data path.  DP will call this to notify
@@ -227,7 +227,7 @@ void dp_tx_timeout(struct wlan_dp_intf *dp_intf);
  * Return: QDF_STATUS_E_FAILURE if any errors encountered,
  *	   QDF_STATUS_SUCCESS otherwise
  */
-QDF_STATUS dp_rx_packet_cbk(void *dp_intf_context, qdf_nbuf_t rx_buf);
+QDF_STATUS dp_rx_packet_cbk(void *dp_link_context, qdf_nbuf_t rx_buf);
 
 #if defined(WLAN_SUPPORT_RX_FISA)
 /**
@@ -495,7 +495,7 @@ void dp_get_tx_resource(struct wlan_dp_intf *dp_intf,
 
 /**
  * dp_start_xmit() - Transmit a frame
- * @dp_intf: pointer to DP interface
+ * @dp_link: DP link handle
  * @nbuf: n/w buffer
  *
  * Function called to Transmit a n/w buffer in STA mode.
@@ -503,7 +503,7 @@ void dp_get_tx_resource(struct wlan_dp_intf *dp_intf,
  * Return: Status of the transmission
  */
 QDF_STATUS
-dp_start_xmit(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf);
+dp_start_xmit(struct wlan_dp_link *dp_link, qdf_nbuf_t nbuf);
 
 #ifdef FEATURE_MONITOR_MODE_SUPPORT
 /**

+ 5 - 2
components/dp/core/src/wlan_dp_bus_bandwidth.c

@@ -1815,7 +1815,9 @@ dp_link_monitoring(struct wlan_dp_psoc_context *dp_ctx,
 	peer_stats = qdf_mem_malloc(sizeof(*peer_stats));
 	if (!peer_stats)
 		return;
-	bss_peer = wlan_vdev_get_bsspeer(dp_intf->vdev);
+
+	/* TODO - Temp WAR, check what to do here */
+	bss_peer = wlan_vdev_get_bsspeer(dp_intf->def_link->vdev);
 	if (!bss_peer) {
 		dp_debug("Invalid bss peer");
 		qdf_mem_free(peer_stats);
@@ -1898,7 +1900,8 @@ static void __dp_bus_bw_work_handler(struct wlan_dp_psoc_context *dp_ctx)
 	dp_ctx->bw_vote_time = curr_time_us;
 
 	dp_for_each_intf_held_safe(dp_ctx, dp_intf, dp_intf_next) {
-		vdev = dp_objmgr_get_vdev_by_user(dp_intf, WLAN_DP_ID);
+		vdev = dp_objmgr_get_vdev_by_user(dp_intf->def_link,
+						  WLAN_DP_ID);
 		if (!vdev)
 			continue;
 

+ 20 - 21
components/dp/core/src/wlan_dp_main.c

@@ -733,7 +733,7 @@ __dp_process_mic_error(struct wlan_dp_intf *dp_intf)
 	struct wlan_dp_psoc_callbacks *ops = &dp_intf->dp_ctx->dp_ops;
 	struct wlan_objmgr_vdev *vdev;
 
-	vdev = dp_objmgr_get_vdev_by_user(dp_intf, WLAN_DP_ID);
+	vdev = dp_objmgr_get_vdev_by_user(dp_intf->def_link, WLAN_DP_ID);
 	if (!vdev) {
 		return;
 	}
@@ -1010,12 +1010,13 @@ dp_vdev_obj_create_notification(struct wlan_objmgr_vdev *vdev, void *arg)
 	qdf_spin_unlock_bh(&dp_intf->dp_link_list_lock);
 
 	qdf_copy_macaddr(&dp_link->mac_addr, mac_addr);
+	qdf_spinlock_create(&dp_link->vdev_lock);
 
-	qdf_spin_lock_bh(&dp_intf->vdev_lock);
+	qdf_spin_lock_bh(&dp_link->vdev_lock);
 	dp_link->link_id = vdev->vdev_objmgr.vdev_id;
 	dp_intf->intf_id = vdev->vdev_objmgr.vdev_id;
-	dp_intf->vdev = vdev;
-	qdf_spin_unlock_bh(&dp_intf->vdev_lock);
+	dp_link->vdev = vdev;
+	qdf_spin_unlock_bh(&dp_link->vdev_lock);
 
 	status = wlan_objmgr_vdev_component_obj_attach(vdev,
 						       WLAN_COMP_DP,
@@ -1112,9 +1113,11 @@ dp_vdev_obj_destroy_notification(struct wlan_objmgr_vdev *vdev, void *arg)
 		return status;
 
 	dp_intf->intf_id = WLAN_UMAC_VDEV_ID_MAX;
-	qdf_spin_lock_bh(&dp_intf->vdev_lock);
-	dp_intf->vdev = NULL;
-	qdf_spin_unlock_bh(&dp_intf->vdev_lock);
+	qdf_spin_lock_bh(&dp_link->vdev_lock);
+	dp_link->vdev = NULL;
+	qdf_spin_unlock_bh(&dp_link->vdev_lock);
+
+	qdf_spinlock_destroy(&dp_link->vdev_lock);
 
 	status = wlan_objmgr_vdev_component_obj_detach(vdev,
 						       WLAN_COMP_DP,
@@ -1588,27 +1591,25 @@ QDF_STATUS dp_get_arp_stats_event_handler(struct wlan_objmgr_psoc *psoc,
 
 #ifdef WLAN_OBJMGR_REF_ID_TRACE
 struct wlan_objmgr_vdev *
-__dp_objmgr_get_vdev_by_user(struct wlan_dp_intf *dp_intf,
+__dp_objmgr_get_vdev_by_user(struct wlan_dp_link *dp_link,
 			     wlan_objmgr_ref_dbgid id,
 			     const char *func, int line)
 {
 	struct wlan_objmgr_vdev *vdev;
 	QDF_STATUS status;
 
-	if (!dp_intf) {
-		dp_err("dp_intf is NULL (via %s, id %d)", func, id);
+	if (!dp_link)
 		return NULL;
-	}
 
-	qdf_spin_lock_bh(&dp_intf->vdev_lock);
-	vdev = dp_intf->vdev;
+	qdf_spin_lock_bh(&dp_link->vdev_lock);
+	vdev = dp_link->vdev;
 	if (vdev) {
 		status = wlan_objmgr_vdev_try_get_ref_debug(vdev, id, func,
 							    line);
 		if (QDF_IS_STATUS_ERROR(status))
 			vdev = NULL;
 	}
-	qdf_spin_unlock_bh(&dp_intf->vdev_lock);
+	qdf_spin_unlock_bh(&dp_link->vdev_lock);
 
 	if (!vdev)
 		dp_debug("VDEV is NULL (via %s, id %d)", func, id);
@@ -1630,26 +1631,24 @@ __dp_objmgr_put_vdev_by_user(struct wlan_objmgr_vdev *vdev,
 }
 #else
 struct wlan_objmgr_vdev *
-__dp_objmgr_get_vdev_by_user(struct wlan_dp_intf *dp_intf,
+__dp_objmgr_get_vdev_by_user(struct wlan_dp_link *dp_link,
 			     wlan_objmgr_ref_dbgid id,
 			     const char *func)
 {
 	struct wlan_objmgr_vdev *vdev;
 	QDF_STATUS status;
 
-	if (!dp_intf) {
-		dp_err("dp_intf is NULL (via %s, id %d)", func, id);
+	if (!dp_link)
 		return NULL;
-	}
 
-	qdf_spin_lock_bh(&dp_intf->vdev_lock);
-	vdev = dp_intf->vdev;
+	qdf_spin_lock_bh(&dp_link->vdev_lock);
+	vdev = dp_link->vdev;
 	if (vdev) {
 		status = wlan_objmgr_vdev_try_get_ref(vdev, id);
 		if (QDF_IS_STATUS_ERROR(status))
 			vdev = NULL;
 	}
-	qdf_spin_unlock_bh(&dp_intf->vdev_lock);
+	qdf_spin_unlock_bh(&dp_link->vdev_lock);
 
 	if (!vdev)
 		dp_debug("VDEV is NULL (via %s, id %d)", func, id);

+ 3 - 3
components/dp/core/src/wlan_dp_nud_tracking.c

@@ -146,7 +146,7 @@ static void dp_nud_stats_info(struct wlan_dp_intf *dp_intf)
 	struct wlan_dp_psoc_callbacks *cb = &dp_intf->dp_ctx->dp_ops;
 	uint32_t pause_map;
 
-	vdev = dp_objmgr_get_vdev_by_user(dp_intf, WLAN_DP_ID);
+	vdev = dp_objmgr_get_vdev_by_user(dp_intf->def_link, WLAN_DP_ID);
 	if (!vdev) {
 		return;
 	}
@@ -216,7 +216,7 @@ static bool dp_nud_honour_failure(struct wlan_dp_intf *dp_intf)
 	uint8_t bssid[QDF_MAC_ADDR_SIZE];
 	bool ap_is_gateway;
 
-	vdev = dp_objmgr_get_vdev_by_user(dp_intf, WLAN_DP_ID);
+	vdev = dp_objmgr_get_vdev_by_user(dp_intf->def_link, WLAN_DP_ID);
 	if (!vdev)
 		goto fail;
 	wlan_vdev_mgr_get_param_bssid(vdev, bssid);
@@ -386,7 +386,7 @@ static void dp_nud_filter_netevent(struct qdf_mac_addr *netdev_addr,
 		return;
 	}
 
-	vdev = dp_objmgr_get_vdev_by_user(dp_intf, WLAN_DP_ID);
+	vdev = dp_objmgr_get_vdev_by_user(dp_intf->def_link, WLAN_DP_ID);
 	if (!vdev)
 		return;
 

+ 1 - 2
components/dp/core/src/wlan_dp_softap_txrx.c

@@ -774,8 +774,7 @@ static inline bool dp_nbuf_dst_addr_is_mld_addr(struct wlan_dp_intf *dp_intf,
 {
 	struct qdf_mac_addr *mld_addr;
 
-	mld_addr = (struct qdf_mac_addr *)
-		wlan_vdev_mlme_get_mldaddr(dp_intf->vdev);
+	mld_addr = (struct qdf_mac_addr *)&dp_intf->mac_addr;
 
 	if (!qdf_is_macaddr_zero(mld_addr) &&
 	    !qdf_mem_cmp(mld_addr->bytes,

+ 26 - 20
components/dp/core/src/wlan_dp_txrx.c

@@ -404,23 +404,24 @@ dp_tx_rx_collect_connectivity_stats_info(qdf_nbuf_t nbuf, void *context,
 
 /**
  * dp_get_transmit_mac_addr() - Get the mac address to validate the xmit
- * @dp_intf: DP interface
+ * @dp_link: DP link handle
  * @nbuf: The network buffer
  * @mac_addr_tx_allowed: The mac address to be filled
  *
  * Return: None
  */
 static
-void dp_get_transmit_mac_addr(struct wlan_dp_intf *dp_intf,
+void dp_get_transmit_mac_addr(struct wlan_dp_link *dp_link,
 			      qdf_nbuf_t nbuf,
 			      struct qdf_mac_addr *mac_addr_tx_allowed)
 {
+	struct wlan_dp_intf *dp_intf = dp_link->dp_intf;
 	bool is_mc_bc_addr = false;
 	enum nan_datapath_state state;
 
 	switch (dp_intf->device_mode) {
 	case QDF_NDI_MODE:
-		state = wlan_nan_get_ndi_state(dp_intf->vdev);
+		state = wlan_nan_get_ndi_state(dp_link->vdev);
 		if (state == NAN_DATA_NDI_CREATED_STATE ||
 		    state == NAN_DATA_CONNECTED_STATE ||
 		    state == NAN_DATA_CONNECTING_STATE ||
@@ -438,7 +439,7 @@ void dp_get_transmit_mac_addr(struct wlan_dp_intf *dp_intf,
 		break;
 	case QDF_STA_MODE:
 	case QDF_P2P_CLIENT_MODE:
-		if (wlan_cm_is_vdev_active(dp_intf->vdev))
+		if (wlan_cm_is_vdev_active(dp_link->vdev))
 			qdf_copy_macaddr(mac_addr_tx_allowed,
 					 &dp_intf->conn_info.bssid);
 		break;
@@ -550,8 +551,9 @@ void wlan_dp_pkt_add_timestamp(struct wlan_dp_intf *dp_intf,
 #endif
 
 QDF_STATUS
-dp_start_xmit(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf)
+dp_start_xmit(struct wlan_dp_link *dp_link, qdf_nbuf_t nbuf)
 {
+	struct wlan_dp_intf *dp_intf = dp_link->dp_intf;
 	struct wlan_dp_psoc_context *dp_ctx = dp_intf->dp_ctx;
 	struct dp_tx_rx_stats *stats;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
@@ -619,7 +621,7 @@ dp_start_xmit(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf)
 							 PKT_TYPE_REQ,
 							 &pkt_type);
 
-	dp_get_transmit_mac_addr(dp_intf, nbuf, &mac_addr_tx_allowed);
+	dp_get_transmit_mac_addr(dp_link, nbuf, &mac_addr_tx_allowed);
 	if (qdf_is_macaddr_zero(&mac_addr_tx_allowed)) {
 		dp_info_rl("tx not allowed, transmit operation suspended");
 		goto drop_pkt;
@@ -773,7 +775,8 @@ void dp_tx_timeout(struct wlan_dp_intf *dp_intf)
 
 void dp_sta_notify_tx_comp_cb(qdf_nbuf_t nbuf, void *ctx, uint16_t flag)
 {
-	struct wlan_dp_intf *dp_intf = ctx;
+	struct wlan_dp_link *dp_link = ctx;
+	struct wlan_dp_intf *dp_intf = dp_link->dp_intf;
 	enum qdf_proto_subtype subtype;
 	struct qdf_mac_addr *dest_mac_addr;
 	QDF_STATUS status;
@@ -812,10 +815,10 @@ void dp_sta_notify_tx_comp_cb(qdf_nbuf_t nbuf, void *ctx, uint16_t flag)
 	}
 
 	/* Since it is TDLS call took TDLS vdev ref*/
-	status = wlan_objmgr_vdev_try_get_ref(dp_intf->vdev, WLAN_TDLS_SB_ID);
+	status = wlan_objmgr_vdev_try_get_ref(dp_link->vdev, WLAN_TDLS_SB_ID);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		wlan_tdls_update_tx_pkt_cnt(dp_intf->vdev, dest_mac_addr);
-		wlan_objmgr_vdev_release_ref(dp_intf->vdev, WLAN_TDLS_SB_ID);
+		wlan_tdls_update_tx_pkt_cnt(dp_link->vdev, dest_mac_addr);
+		wlan_objmgr_vdev_release_ref(dp_link->vdev, WLAN_TDLS_SB_ID);
 	}
 }
 
@@ -1563,9 +1566,10 @@ dp_is_gratuitous_arp_unsolicited_na(struct wlan_dp_psoc_context *dp_ctx,
 	return false;
 }
 
-QDF_STATUS dp_rx_flush_packet_cbk(void *dp_intf_context, uint8_t intf_id)
+QDF_STATUS dp_rx_flush_packet_cbk(void *dp_link_context, uint8_t link_id)
 {
-	struct wlan_dp_intf *dp_intf = (struct wlan_dp_intf *)dp_intf_context;
+	struct wlan_dp_link *dp_link = (struct wlan_dp_link *)dp_link_context;
+	struct wlan_dp_intf *dp_intf = dp_link->dp_intf;
 	struct wlan_dp_psoc_context *dp_ctx;
 	ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
 
@@ -1580,10 +1584,10 @@ QDF_STATUS dp_rx_flush_packet_cbk(void *dp_intf_context, uint8_t intf_id)
 
 	/* do fisa flush for this vdev */
 	if (wlan_dp_cfg_is_rx_fisa_enabled(&dp_ctx->dp_cfg))
-		wlan_dp_rx_fisa_flush_by_vdev_id((struct dp_soc *)soc, intf_id);
+		wlan_dp_rx_fisa_flush_by_vdev_id((struct dp_soc *)soc, link_id);
 
 	if (dp_ctx->enable_dp_rx_threads)
-		dp_txrx_flush_pkts_by_vdev_id(soc, intf_id);
+		dp_txrx_flush_pkts_by_vdev_id(soc, link_id);
 
 	qdf_atomic_dec(&dp_intf->num_active_task);
 
@@ -1610,10 +1614,11 @@ QDF_STATUS wlan_dp_rx_fisa_flush_by_vdev_id(void *dp_soc, uint8_t vdev_id)
 }
 #endif
 
-QDF_STATUS dp_rx_packet_cbk(void *dp_intf_context,
+QDF_STATUS dp_rx_packet_cbk(void *dp_link_context,
 			    qdf_nbuf_t rxBuf)
 {
 	struct wlan_dp_intf *dp_intf = NULL;
+	struct wlan_dp_link *dp_link = NULL;
 	struct wlan_dp_psoc_context *dp_ctx = NULL;
 	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
 	qdf_nbuf_t nbuf = NULL;
@@ -1630,12 +1635,13 @@ QDF_STATUS dp_rx_packet_cbk(void *dp_intf_context,
 	uint8_t pkt_type;
 
 	/* Sanity check on inputs */
-	if (qdf_unlikely((!dp_intf_context) || (!rxBuf))) {
+	if (qdf_unlikely((!dp_link_context) || (!rxBuf))) {
 		dp_err("Null params being passed");
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	dp_intf = (struct wlan_dp_intf *)dp_intf_context;
+	dp_link = (struct wlan_dp_link *)dp_link_context;
+	dp_intf = dp_link->dp_intf;
 	dp_ctx = dp_intf->dp_ctx;
 
 	cpu_index = qdf_get_cpu();
@@ -1727,12 +1733,12 @@ QDF_STATUS dp_rx_packet_cbk(void *dp_intf_context,
 		mac_addr = (struct qdf_mac_addr *)(qdf_nbuf_data(nbuf) +
 						   QDF_NBUF_SRC_MAC_OFFSET);
 
-		status = wlan_objmgr_vdev_try_get_ref(dp_intf->vdev,
+		status = wlan_objmgr_vdev_try_get_ref(dp_link->vdev,
 						      WLAN_TDLS_SB_ID);
 		if (QDF_IS_STATUS_SUCCESS(status)) {
-			wlan_tdls_update_rx_pkt_cnt(dp_intf->vdev, mac_addr,
+			wlan_tdls_update_rx_pkt_cnt(dp_link->vdev, mac_addr,
 						    dest_mac_addr);
-			wlan_objmgr_vdev_release_ref(dp_intf->vdev,
+			wlan_objmgr_vdev_release_ref(dp_link->vdev,
 						     WLAN_TDLS_SB_ID);
 		}
 

+ 4 - 6
components/dp/dispatcher/src/wlan_dp_ucfg_api.c

@@ -125,7 +125,6 @@ ucfg_dp_create_intf(struct wlan_objmgr_psoc *psoc,
 	dp_intf->dev = ndev;
 	dp_intf->intf_id = WLAN_UMAC_VDEV_ID_MAX;
 	qdf_copy_macaddr(&dp_intf->mac_addr, intf_addr);
-	qdf_spinlock_create(&dp_intf->vdev_lock);
 
 	qdf_spin_lock_bh(&dp_ctx->intf_list_lock);
 	qdf_list_insert_front(&dp_ctx->intf_list, &dp_intf->node);
@@ -169,7 +168,6 @@ ucfg_dp_destroy_intf(struct wlan_objmgr_psoc *psoc,
 	dp_periodic_sta_stats_mutex_destroy(dp_intf);
 	dp_nud_deinit_tracking(dp_intf);
 	dp_mic_deinit_work(dp_intf);
-	qdf_spinlock_destroy(&dp_intf->vdev_lock);
 
 	qdf_spinlock_destroy(&dp_intf->dp_link_list_lock);
 	qdf_list_destroy(&dp_intf->dp_link_list);
@@ -1069,7 +1067,7 @@ QDF_STATUS ucfg_dp_sta_register_txrx_ops(struct wlan_objmgr_vdev *vdev)
 	txrx_ops.tx.tx_comp = dp_sta_notify_tx_comp_cb;
 	txrx_ops.tx.tx = NULL;
 	txrx_ops.get_tsf_time = wlan_dp_get_tsf_time;
-	cdp_vdev_register(soc, dp_intf->intf_id, (ol_osif_vdev_handle)dp_intf,
+	cdp_vdev_register(soc, dp_link->link_id, (ol_osif_vdev_handle)dp_link,
 			  &txrx_ops);
 	if (!txrx_ops.tx.tx) {
 		dp_err("vdev register fail");
@@ -1120,7 +1118,7 @@ QDF_STATUS ucfg_dp_tdlsta_register_txrx_ops(struct wlan_objmgr_vdev *vdev)
 	txrx_ops.tx.tx_comp = dp_sta_notify_tx_comp_cb;
 	txrx_ops.tx.tx = NULL;
 
-	cdp_vdev_register(soc, dp_intf->intf_id, (ol_osif_vdev_handle)dp_intf,
+	cdp_vdev_register(soc, dp_link->link_id, (ol_osif_vdev_handle)dp_link,
 			  &txrx_ops);
 
 	if (!txrx_ops.tx.tx) {
@@ -1272,7 +1270,7 @@ QDF_STATUS ucfg_dp_start_xmit(qdf_nbuf_t nbuf, struct wlan_objmgr_vdev *vdev)
 
 	dp_intf = dp_link->dp_intf;
 	qdf_atomic_inc(&dp_intf->num_active_task);
-	status = dp_start_xmit(dp_intf, nbuf);
+	status = dp_start_xmit(dp_link, nbuf);
 	qdf_atomic_dec(&dp_intf->num_active_task);
 
 	return status;
@@ -1290,7 +1288,7 @@ QDF_STATUS ucfg_dp_rx_packet_cbk(struct wlan_objmgr_vdev *vdev, qdf_nbuf_t nbuf)
 	}
 
 	dp_intf = dp_link->dp_intf;
-	return dp_rx_packet_cbk(dp_intf, nbuf);
+	return dp_rx_packet_cbk(dp_link, nbuf);
 }
 
 void ucfg_dp_tx_timeout(struct wlan_objmgr_vdev *vdev)