Kaynağa Gözat

qcacld-3.0: Cleanup datapath component code

Code cleanup in datapath component.

Change-Id: I03585bd319e835a28de37ae98fb8edafbc1820ee
CRs-Fixed: 3568991
Rakesh Pillai 1 yıl önce
ebeveyn
işleme
8f9d742ef5

+ 0 - 1
components/dp/core/src/wlan_dp_bus_bandwidth.c

@@ -1084,7 +1084,6 @@ static void wlan_dp_display_txrx_stats(struct wlan_dp_psoc_context *dp_ctx)
 		if (!dp_intf->num_links)
 			continue;
 
-		/* TODO - Print opmode and see if vdev_id can be printed */
 		dp_info("dp_intf: " QDF_MAC_ADDR_FMT,
 			QDF_MAC_ADDR_REF(dp_intf->mac_addr.bytes));
 		for (i = 0; i < NUM_CPUS; i++) {

+ 0 - 1
components/dp/core/src/wlan_dp_fisa_rx.c

@@ -788,7 +788,6 @@ static void dp_fisa_rx_fst_update(struct dp_rx_fst *fisa_hdl,
 	struct cdp_rx_flow_tuple_info *rx_flow_tuple_info;
 	uint32_t skid_count = 0, max_skid_length;
 	struct dp_fisa_rx_sw_ft *sw_ft_entry;
-	/* TODO - Make this better */
 	struct wlan_dp_psoc_context *dp_ctx = dp_get_context();
 	struct wlan_dp_psoc_cfg *dp_cfg = &dp_ctx->dp_cfg;
 	bool is_fst_updated = false;

+ 3 - 2
components/dp/core/src/wlan_dp_main.c

@@ -940,8 +940,9 @@ dp_intf_get_next_deflink_candidate(struct wlan_dp_intf *dp_intf,
 
 	dp_for_each_link_held_safe(dp_intf, dp_link, dp_link_next) {
 		/*
-		 * TODO - Might not need to check link valid, since dp_link
-		 * is removed from the list during delete.
+		 * dp_link is removed from the list when its deleted.
+		 * But check if its valid or not. Additional check to make
+		 * sure that the next deflink is valid.
 		 */
 		if (!is_dp_link_valid(dp_link))
 			continue;

+ 8 - 11
components/dp/core/src/wlan_dp_nud_tracking.c

@@ -166,7 +166,6 @@ static void dp_nud_stats_info(struct wlan_dp_intf *dp_intf)
 
 	cb->os_if_dp_nud_stats_info(vdev);
 
-	/* TODO - Again this is also adapter based so pass dev */
 	pause_map = cb->dp_get_pause_map(cb->callback_ctx,
 					 dp_intf->dev);
 	dp_info("Current pause_map value %x", pause_map);
@@ -285,10 +284,6 @@ static void dp_nud_failure_work(void *data)
 		return;
 	}
 
-	/*
-	 * TODO - The handler is totally adapter based,
-	 * so just dev should be fine
-	 */
 	dp_ctx->dp_ops.dp_nud_failure_work(dp_ctx->dp_ops.callback_ctx,
 					   dp_intf->dev);
 }
@@ -395,7 +390,13 @@ static void dp_nud_filter_netevent(struct qdf_mac_addr *netdev_addr,
 		return;
 	}
 
-	vdev = dp_objmgr_get_vdev_by_user(dp_intf->def_link, WLAN_DP_ID);
+	/*
+	 * NUD is used for STATION mode only, where all the MLO links
+	 * are assumed to be connected. Hence use the deflink here to check
+	 * if the interface is connected.
+	 */
+	dp_link = dp_intf->def_link;
+	vdev = dp_objmgr_get_vdev_by_user(dp_link, WLAN_DP_ID);
 	if (!vdev)
 		return;
 
@@ -405,11 +406,7 @@ static void dp_nud_filter_netevent(struct qdf_mac_addr *netdev_addr,
 		return;
 	}
 	dp_objmgr_put_vdev_by_user(vdev, WLAN_DP_ID);
-	dp_link = dp_intf->def_link;
-	/*
-	 * TODO - For now using deflink, have some analysis
-	 * (I think this should be fine)
-	 */
+
 	if (!dp_link->conn_info.is_authenticated) {
 		dp_info("client " QDF_MAC_ADDR_FMT
 			" is in the middle of WPS/EAPOL exchange.",

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

@@ -223,8 +223,7 @@ int dp_post_dhcp_ind(struct wlan_dp_link *dp_link, uint8_t *mac_addr,
 	dp_info("Post DHCP indication,sta_mac=" QDF_MAC_ADDR_FMT
 		 " ,  start=%u", QDF_MAC_ADDR_REF(mac_addr), dhcp_start);
 
-	/* TODO - Should we just check is_dp_link_valid(dp_link) */
-	if (!dp_link) {
+	if (!is_dp_link_valid(dp_link)) {
 		dp_err("NULL DP link");
 		return QDF_STATUS_E_INVAL;
 	}

+ 0 - 12
components/dp/dispatcher/src/wlan_dp_ucfg_api.c

@@ -126,11 +126,6 @@ void ucfg_dp_update_inf_mac(struct wlan_objmgr_psoc *psoc,
 
 	qdf_copy_macaddr(&dp_intf->mac_addr, new_mac);
 
-	/*
-	 * TODO - Expectation here is that
-	 * vdevs will be deleted and created for MLD addr change
-	 * Hence, set the direct link config for all its links
-	 */
 	wlan_dp_set_vdev_direct_link_cfg(psoc, dp_intf);
 }
 
@@ -195,15 +190,8 @@ ucfg_dp_destroy_intf(struct wlan_objmgr_psoc *psoc,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	/*
-	 * TODO - dp_intf is destroyed, so such config is no longer
-	 * required.
-	 * Check and confirm this theory and remove this call
-	 */
-	/*
 	if (dp_intf->device_mode == QDF_SAP_MODE)
 		dp_config_direct_link(dp_intf, false, false);
-	*/
 
 	dp_periodic_sta_stats_mutex_destroy(dp_intf);
 	dp_nud_deinit_tracking(dp_intf);