Browse Source

qcacmn: Rename osif_pdev and os_if_vdev in dp_pdev and osif_dev
structures

Rename osif_pdev to ctrl_pdev and os_if_vdev to ctrl_vdev in dp_pdev and
osif_dev structures respectively which are
pointing to objmgr_pdev and objmgr_vdev structures to maintain
uniformity

Change-Id: Ida95a1a90ea74513573f00c652338baee3df897a
CRs-Fixed: 2241362

Akshay Kosigi 7 năm trước cách đây
mục cha
commit
1a9c6d1d4c

+ 1 - 1
dp/inc/cdp_txrx_cmn.h

@@ -199,7 +199,7 @@ cdp_pdev_attach_target(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
 }
 
 static inline struct cdp_pdev *cdp_pdev_attach
-	(ol_txrx_soc_handle soc, struct cdp_cfg *ctrl_pdev,
+	(ol_txrx_soc_handle soc, struct cdp_ctrl_objmgr_pdev *ctrl_pdev,
 	HTC_HANDLE htc_pdev, qdf_device_t osdev, uint8_t pdev_id)
 {
 	if (!soc || !soc->ops) {

+ 2 - 2
dp/inc/cdp_txrx_ctrl_def.h

@@ -73,9 +73,9 @@ void ol_ll_pdev_tx_unlock(void *);
 
 #else
 #define OSIF_VAP_TX_LOCK(_y, _x)  cdp_vdev_tx_lock( \
-			_y, wlan_vdev_get_dp_handle((_x)->os_if_vdev))
+			_y, wlan_vdev_get_dp_handle((_x)->ctrl_vdev))
 #define OSIF_VAP_TX_UNLOCK(_y, _x) cdp_vdev_tx_unlock( \
-			_y, wlan_vdev_get_dp_handle((_x)->os_if_vdev))
+			_y, wlan_vdev_get_dp_handle((_x)->ctrl_vdev))
 
 #define OL_TX_FLOW_CTRL_LOCK(_x)
 #define OL_TX_FLOW_CTRL_UNLOCK(_x)

+ 5 - 1
dp/inc/cdp_txrx_handle.h

@@ -1,6 +1,6 @@
 
 /*
- * Copyright (c) 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2018 The Linux Foundation. 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
@@ -33,4 +33,8 @@ struct cdp_peer;
 struct cdp_raw_ast;
 struct cdp_soc;
 
+/**
+ * cdp_ctrl_objmgr_pdev - opaque handle for UMAC pdev object
+ */
+struct cdp_ctrl_objmgr_pdev;
 #endif

+ 3 - 3
dp/inc/cdp_txrx_ops.h

@@ -75,7 +75,7 @@ struct cdp_cmn_ops {
 		 void *cb_context);
 
 	struct cdp_pdev *(*txrx_pdev_attach)
-		(ol_txrx_soc_handle soc, struct cdp_cfg *ctrl_pdev,
+		(ol_txrx_soc_handle soc, struct cdp_ctrl_objmgr_pdev *ctrl_pdev,
 		HTC_HANDLE htc_pdev, qdf_device_t osdev, uint8_t pdev_id);
 
 	int (*txrx_pdev_post_attach)(struct cdp_pdev *pdev);
@@ -734,7 +734,7 @@ struct ol_if_ops {
 			struct cdp_lro_hash_config *rx_offld_hash);
 	void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
 			uint8_t type);
-	uint8_t (*rx_invalid_peer)(void *osif_pdev, void *msg);
+	uint8_t (*rx_invalid_peer)(void *ctrl_pdev, void *msg);
 
 	int  (*peer_map_event)(void *ol_soc_handle, uint16_t peer_id, uint16_t hw_peer_id,
 			uint8_t vdev_id, uint8_t *peer_mac_addr,
@@ -758,7 +758,7 @@ struct ol_if_ops {
 	int (*config_bssid_in_fw_for_nac_rssi)(struct wlan_objmgr_pdev *pdev,
 		u_int8_t vdev_id, enum cdp_nac_param_cmd cmd, char *bssid);
 #endif
-	int (*peer_sta_kickout)(void *osif_pdev, uint8_t *peer_macaddr);
+	int (*peer_sta_kickout)(void *ctrl_pdev, uint8_t *peer_macaddr);
 
 	/* TODO: Add any other control path calls required to OL_IF/WMA layer */
 };

+ 4 - 2
dp/wifi3.0/dp_htt.c

@@ -151,7 +151,7 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
 			((mcs < (MAX_MCS - 1)) && (preamble == DOT11_AX)));
 
 	if (soc->cdp_soc.ol_ops->update_dp_stats) {
-		soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev,
+		soc->cdp_soc.ol_ops->update_dp_stats(pdev->ctrl_pdev,
 				&peer->stats, ppdu->peer_id,
 				UPDATE_PEER_STATS);
 
@@ -1648,7 +1648,7 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
 		ppdu_desc->channel = freq;
 		if (soc && soc->cdp_soc.ol_ops->freq_to_channel)
 			pdev->operating_channel =
-		soc->cdp_soc.ol_ops->freq_to_channel(pdev->osif_pdev, freq);
+		soc->cdp_soc.ol_ops->freq_to_channel(pdev->ctrl_pdev, freq);
 	}
 
 	ppdu_desc->phy_mode = HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_GET(*tag_buf);
@@ -2518,6 +2518,8 @@ static struct ppdu_info *dp_htt_process_tlv(struct dp_pdev *pdev,
 				(uint32_t *)((uint8_t *)tlv_buf + tlv_length);
 			length -= (tlv_length);
 			continue;
+		} else {
+			pdev->mgmtctrl_frm_info.mgmt_buf = NULL;
 		}
 
 		ppdu_info = dp_get_ppdu_desc(pdev, ppdu_id, tlv_type);

+ 13 - 11
dp/wifi3.0/dp_main.c

@@ -2429,7 +2429,8 @@ void dp_mark_peer_inact(void *peer_handle, bool inactive)
 		 * per inactivity timeout threshold)
 		 */
 		if (soc->cdp_soc.ol_ops->record_act_change) {
-			soc->cdp_soc.ol_ops->record_act_change(pdev->osif_pdev,
+			soc->cdp_soc.ol_ops->record_act_change(
+					(void *)pdev->ctrl_pdev,
 					peer->mac_addr.raw, !inactive);
 		}
 	}
@@ -2578,7 +2579,7 @@ static void dp_cleanup_ipa_rx_refill_buf_ring(struct dp_soc *soc,
 * Return: DP PDEV handle on success, NULL on failure
 */
 static struct cdp_pdev *dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
-	struct cdp_cfg *ctrl_pdev,
+	struct cdp_ctrl_objmgr_pdev *ctrl_pdev,
 	HTC_HANDLE htc_handle, qdf_device_t qdf_osdev, uint8_t pdev_id)
 {
 	int tx_ring_size;
@@ -2611,7 +2612,7 @@ static struct cdp_pdev *dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
 			(wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx) & (1 << pdev_id)));
 
 	pdev->soc = soc;
-	pdev->osif_pdev = ctrl_pdev;
+	pdev->ctrl_pdev = ctrl_pdev;
 	pdev->pdev_id = pdev_id;
 	soc->pdev_list[pdev_id] = pdev;
 	soc->pdev_count++;
@@ -3571,7 +3572,7 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
 		* take care of incrementing count
 		* */
 		if (soc->cdp_soc.ol_ops->peer_unref_delete) {
-			soc->cdp_soc.ol_ops->peer_unref_delete(pdev->osif_pdev,
+			soc->cdp_soc.ol_ops->peer_unref_delete(pdev->ctrl_pdev,
 				vdev->vdev_id, peer->mac_addr.raw);
 		}
 
@@ -3709,7 +3710,7 @@ static void dp_peer_setup_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
 	if (soc->cdp_soc.ol_ops->peer_set_default_routing) {
 		/* TODO: Check the destination ring number to be passed to FW */
 		soc->cdp_soc.ol_ops->peer_set_default_routing(
-			pdev->osif_pdev, peer->mac_addr.raw,
+			pdev->ctrl_pdev, peer->mac_addr.raw,
 			 peer->vdev->vdev_id, hash_based, reo_dest);
 	}
 
@@ -4249,7 +4250,7 @@ void dp_peer_unref_delete(void *peer_handle)
 		}
 
 		if (soc->cdp_soc.ol_ops->peer_unref_delete) {
-			soc->cdp_soc.ol_ops->peer_unref_delete(pdev->osif_pdev,
+			soc->cdp_soc.ol_ops->peer_unref_delete(pdev->ctrl_pdev,
 					vdev_id, peer->mac_addr.raw);
 		}
 
@@ -4905,7 +4906,7 @@ void dp_aggregate_vdev_stats(struct dp_vdev *vdev)
 		DP_UPDATE_STATS(vdev, peer);
 
 	if (soc->cdp_soc.ol_ops->update_dp_stats)
-		soc->cdp_soc.ol_ops->update_dp_stats(vdev->pdev->osif_pdev,
+		soc->cdp_soc.ol_ops->update_dp_stats(vdev->pdev->ctrl_pdev,
 			&vdev->stats, (uint16_t) vdev->vdev_id,
 			UPDATE_VDEV_STATS);
 
@@ -4978,7 +4979,7 @@ static inline void dp_aggregate_pdev_stats(struct dp_pdev *pdev)
 	}
 	qdf_spin_unlock_bh(&pdev->vdev_list_lock);
 	if (soc->cdp_soc.ol_ops->update_dp_stats)
-		soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev,
+		soc->cdp_soc.ol_ops->update_dp_stats(pdev->ctrl_pdev,
 				&pdev->stats, pdev->pdev_id, UPDATE_PDEV_STATS);
 
 }
@@ -5494,7 +5495,7 @@ dp_txrx_host_stats_clr(struct dp_vdev *vdev)
 
 		if (soc->cdp_soc.ol_ops->update_dp_stats) {
 			soc->cdp_soc.ol_ops->update_dp_stats(
-					vdev->pdev->osif_pdev,
+					vdev->pdev->ctrl_pdev,
 					&peer->stats,
 					peer->peer_ids[0],
 					UPDATE_PEER_STATS);
@@ -5503,7 +5504,7 @@ dp_txrx_host_stats_clr(struct dp_vdev *vdev)
 	}
 
 	if (soc->cdp_soc.ol_ops->update_dp_stats)
-		soc->cdp_soc.ol_ops->update_dp_stats(vdev->pdev->osif_pdev,
+		soc->cdp_soc.ol_ops->update_dp_stats(vdev->pdev->ctrl_pdev,
 				&vdev->stats, (uint16_t)vdev->vdev_id,
 				UPDATE_VDEV_STATS);
 }
@@ -6983,7 +6984,8 @@ static QDF_STATUS dp_config_for_nac_rssi(struct cdp_vdev *vdev_handle,
 
 	if (soc->cdp_soc.ol_ops->config_bssid_in_fw_for_nac_rssi)
 		soc->cdp_soc.ol_ops->config_bssid_in_fw_for_nac_rssi
-			(vdev->pdev->osif_pdev, vdev->vdev_id, cmd, bssid);
+			((void *)vdev->pdev->ctrl_pdev,
+			 vdev->vdev_id, cmd, bssid);
 
 	return QDF_STATUS_SUCCESS;
 }

+ 3 - 3
dp/wifi3.0/dp_peer.c

@@ -559,7 +559,7 @@ int dp_peer_update_ast(struct dp_soc *soc, struct dp_peer *peer,
 			sa_peer->delete_in_progress = true;
 			if (soc->cdp_soc.ol_ops->peer_sta_kickout) {
 				soc->cdp_soc.ol_ops->peer_sta_kickout(
-						sa_peer->vdev->pdev->osif_pdev,
+						sa_peer->vdev->pdev->ctrl_pdev,
 						ast_entry->mac_addr.raw);
 			}
 			return 0;
@@ -1328,7 +1328,7 @@ try_desc_alloc:
 
 	if (soc->cdp_soc.ol_ops->peer_rx_reorder_queue_setup) {
 		soc->cdp_soc.ol_ops->peer_rx_reorder_queue_setup(
-			vdev->pdev->osif_pdev,
+			vdev->pdev->ctrl_pdev,
 			peer->vdev->vdev_id, peer->mac_addr.raw,
 			rx_tid->hw_qdesc_paddr, tid, tid);
 
@@ -1581,7 +1581,7 @@ void dp_peer_rx_cleanup(struct dp_vdev *vdev, struct dp_peer *peer)
 	}
 #ifdef notyet /* See if FW can remove queues as part of peer cleanup */
 	if (soc->ol_ops->peer_rx_reorder_queue_remove) {
-		soc->ol_ops->peer_rx_reorder_queue_remove(vdev->pdev->osif_pdev,
+		soc->ol_ops->peer_rx_reorder_queue_remove(vdev->pdev->ctrl_pdev,
 			peer->vdev->vdev_id, peer->mac_addr.raw,
 			tid_delete_mask);
 	}

+ 3 - 2
dp/wifi3.0/dp_rx.c

@@ -761,7 +761,8 @@ out:
 	msg.nbuf = mpdu;
 	msg.vdev_id = vdev->vdev_id;
 	if (pdev->soc->cdp_soc.ol_ops->rx_invalid_peer)
-		pdev->soc->cdp_soc.ol_ops->rx_invalid_peer(pdev->osif_pdev, &msg);
+		pdev->soc->cdp_soc.ol_ops->rx_invalid_peer(pdev->ctrl_pdev,
+							&msg);
 
 free:
 	/* Drop and free packet */
@@ -1180,7 +1181,7 @@ static void dp_rx_msdu_stats_update(struct dp_soc *soc,
 	    hal_rx_attn_first_mpdu_get(rx_tlv_hdr)) {
 		if (soc->cdp_soc.ol_ops->update_dp_stats) {
 			soc->cdp_soc.ol_ops->update_dp_stats(
-					vdev->pdev->osif_pdev,
+					vdev->pdev->ctrl_pdev,
 					&peer->stats,
 					peer_id,
 					UPDATE_PEER_STATS);

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

@@ -840,7 +840,7 @@ static void dp_rx_defrag_err(struct dp_vdev *vdev, qdf_nbuf_t nbuf)
 
 	tops = pdev->soc->cdp_soc.ol_ops;
 	if (tops->rx_mic_error)
-		tops->rx_mic_error(pdev->osif_pdev, vdev->vdev_id, wh);
+		tops->rx_mic_error(pdev->ctrl_pdev, vdev->vdev_id, wh);
 }
 
 

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

@@ -854,7 +854,7 @@ dp_rx_process_mic_error(struct dp_soc *soc,
 
 	tops = pdev->soc->cdp_soc.ol_ops;
 	if (tops->rx_mic_error)
-		tops->rx_mic_error(pdev->osif_pdev, vdev->vdev_id, wh);
+		tops->rx_mic_error(pdev->ctrl_pdev, vdev->vdev_id, wh);
 
 fail:
 	qdf_nbuf_free(nbuf);

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

@@ -198,7 +198,7 @@ static void dp_rx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
 		DP_STATS_INC(peer, rx.wme_ac_type[ac], num_msdu);
 
 	if (soc->cdp_soc.ol_ops->update_dp_stats) {
-		soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev,
+		soc->cdp_soc.ol_ops->update_dp_stats(pdev->ctrl_pdev,
 				&peer->stats, ppdu->peer_id,
 				UPDATE_PEER_STATS);
 

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

@@ -2649,7 +2649,7 @@ static void dp_tx_update_peer_stats(struct dp_peer *peer,
 	DP_STATS_INCC(peer, tx.retries, 1, ts->transmit_cnt > 1);
 
 	if (soc->cdp_soc.ol_ops->update_dp_stats) {
-		soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev,
+		soc->cdp_soc.ol_ops->update_dp_stats(pdev->ctrl_pdev,
 				&peer->stats, ts->peer_id,
 				UPDATE_PEER_STATS);
 	}

+ 1 - 1
dp/wifi3.0/dp_types.h

@@ -969,7 +969,7 @@ struct ppdu_info {
 /* PDEV level structure for data path */
 struct dp_pdev {
 	/* PDEV handle from OSIF layer TBD: see if we really need osif_pdev */
-	void *osif_pdev;
+	struct cdp_ctrl_objmgr_pdev *ctrl_pdev;
 
 	/* PDEV Id */
 	int pdev_id;