Explorar el Código

qcacld-3.0: cdp: Converge cdp_peer_ops

Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

Also remove the ops which are used to store
and retrieve such handles, that no more needed.

- register_peer
- clear_peer
- change_peer_state
- peer_get_ref_by_addr
- peer_release_ref
- peer_state_update
- get_vdev_by_sta_id
- register_ocb_peer
- get_peer_state
- get_vdev_for_peer
- update_ibss_add_peer_num_of_vdev
- remove_peers_for_vdev
- remove_peers_for_vdev_no_lock
- copy_mac_addr_raw
- add_last_real_peer
- is_vdev_restore_last_peer
- update_last_real_peer
- peer_detach_force_delete

Change-Id: I5134ca882f5fcf0e5941317e48712717eddb58fe
CRs-Fixed: 2541708
Vevek Venkatesan hace 5 años
padre
commit
2d88a6bc30

+ 67 - 64
core/dp/txrx/ol_tx_hl.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2020 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
@@ -1715,16 +1715,15 @@ qdf_nbuf_t ol_tx_non_std_hl(struct ol_txrx_vdev_t *vdev,
 }
 
 #ifdef FEATURE_WLAN_TDLS
-/**
- * ol_txrx_copy_mac_addr_raw() - copy raw mac addr
- * @vdev: the data virtual device
- * @bss_addr: bss address
- *
- * Return: None
- */
-void ol_txrx_copy_mac_addr_raw(struct cdp_vdev *pvdev, uint8_t *bss_addr)
+void ol_txrx_copy_mac_addr_raw(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
+			       uint8_t *bss_addr)
 {
-	struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t  *)pvdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
+
+	if (!vdev)
+		return;
 
 	qdf_spin_lock_bh(&vdev->pdev->last_real_peer_mutex);
 	if (bss_addr && vdev->last_real_peer &&
@@ -1737,21 +1736,19 @@ void ol_txrx_copy_mac_addr_raw(struct cdp_vdev *pvdev, uint8_t *bss_addr)
 	qdf_spin_unlock_bh(&vdev->pdev->last_real_peer_mutex);
 }
 
-/**
- * ol_txrx_add_last_real_peer() - add last peer
- * @pdev: the data physical device
- * @vdev: virtual device
- *
- * Return: None
- */
 void
-ol_txrx_add_last_real_peer(struct cdp_pdev *ppdev,
-			   struct cdp_vdev *pvdev)
+ol_txrx_add_last_real_peer(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
+			   uint8_t vdev_id)
 {
-	struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)ppdev;
-	struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t *)pvdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_pdev_handle pdev = ol_txrx_get_pdev_from_pdev_id(soc, pdev_id);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
 	ol_txrx_peer_handle peer;
 
+	if (!pdev || !vdev)
+		return;
+
 	peer = ol_txrx_find_peer_by_addr(
 		(struct cdp_pdev *)pdev,
 		vdev->hl_tdls_ap_mac_addr.raw);
@@ -1766,37 +1763,34 @@ ol_txrx_add_last_real_peer(struct cdp_pdev *ppdev,
 	qdf_spin_unlock_bh(&pdev->last_real_peer_mutex);
 }
 
-/**
- * is_vdev_restore_last_peer() - check for vdev last peer
- * @peer: peer object
- *
- * Return: true if last peer is not null
- */
-bool is_vdev_restore_last_peer(void *ppeer)
+bool is_vdev_restore_last_peer(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
+			       uint8_t *peer_mac)
 {
-	struct ol_txrx_peer_t *peer = ppeer;
-	struct ol_txrx_vdev_t *vdev;
+	struct ol_txrx_peer_t *peer;
+	struct ol_txrx_pdev_t *pdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
+
+	if (!vdev)
+		return false;
+
+	pdev = vdev->pdev;
+	peer = ol_txrx_find_peer_by_addr((struct cdp_pdev *)pdev, peer_mac);
 
-	vdev = peer->vdev;
 	return vdev->last_real_peer && (vdev->last_real_peer == peer);
 }
 
-/**
- * ol_txrx_update_last_real_peer() - check for vdev last peer
- * @pdev: the data physical device
- * @peer: peer device
- * @restore_last_peer: restore last peer flag
- *
- * Return: None
- */
-void ol_txrx_update_last_real_peer(struct cdp_pdev *ppdev, void *pvdev,
-				   bool restore_last_peer)
+void ol_txrx_update_last_real_peer(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
+				   uint8_t vdev_id, bool restore_last_peer)
 {
-	struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)ppdev;
-	struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t *)pvdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_pdev_handle pdev = ol_txrx_get_pdev_from_pdev_id(soc, pdev_id);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
 	struct ol_txrx_peer_t *peer;
 
-	if (!restore_last_peer)
+	if (!restore_last_peer || !pdev || !vdev)
 		return;
 
 	peer = ol_txrx_find_peer_by_addr((struct cdp_pdev *)pdev,
@@ -1812,40 +1806,49 @@ void ol_txrx_update_last_real_peer(struct cdp_pdev *ppdev, void *pvdev,
 	qdf_spin_unlock_bh(&pdev->last_real_peer_mutex);
 }
 
-/**
- * ol_txrx_set_peer_as_tdls_peer() - mark peer as tdls peer
- * @ppeer: cdp peer
- * @value: false/true
- *
- * Return: None
- */
-void ol_txrx_set_peer_as_tdls_peer(void *ppeer, bool val)
+void ol_txrx_set_peer_as_tdls_peer(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
+				   uint8_t *peer_mac, bool val)
 {
-	ol_txrx_peer_handle peer = ppeer;
+	ol_txrx_peer_handle peer;
+	struct ol_txrx_pdev_t *pdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
+
+	if (!vdev)
+		return;
+
+	pdev = vdev->pdev;
+	peer = ol_txrx_find_peer_by_addr((struct cdp_pdev *)pdev, peer_mac);
 
 	ol_txrx_info_high("peer %pK, peer->ref_cnt %d",
 			  peer, qdf_atomic_read(&peer->ref_cnt));
 
 	/* Mark peer as tdls */
-	peer->is_tdls_peer = val;
+	if (peer)
+		peer->is_tdls_peer = val;
 }
 
-/**
- * ol_txrx_set_tdls_offchan_enabled() - set tdls offchan enabled
- * @ppeer: cdp peer
- * @value: false/true
- *
- * Return: None
- */
-void ol_txrx_set_tdls_offchan_enabled(void *ppeer, bool val)
+void ol_txrx_set_tdls_offchan_enabled(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
+				      uint8_t *peer_mac, bool val)
 {
-	ol_txrx_peer_handle peer = ppeer;
+	ol_txrx_peer_handle peer;
+	struct ol_txrx_pdev_t *pdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
+
+	if (!vdev)
+		return;
+
+	pdev = vdev->pdev;
+	peer = ol_txrx_find_peer_by_addr((struct cdp_pdev *)pdev, peer_mac);
 
 	ol_txrx_info_high("peer %pK, peer->ref_cnt %d",
 			  peer, qdf_atomic_read(&peer->ref_cnt));
 
 	/* Set TDLS Offchan operation enable/disable */
-	if (peer->is_tdls_peer)
+	if (peer && peer->is_tdls_peer)
 		peer->tdls_offchan_enabled = val;
 }
 #endif

+ 194 - 199
core/dp/txrx/ol_txrx.c

@@ -105,9 +105,6 @@ enum dpt_set_param_debugfs {
 	DPT_SET_PARAM_MAX,
 };
 
-QDF_STATUS ol_txrx_peer_state_update(struct cdp_pdev *pdev,
-				     uint8_t *peer_mac,
-				     enum ol_txrx_peer_state state);
 static void ol_vdev_rx_set_intrabss_fwd(struct cdp_soc_t *soc_hdl,
 					uint8_t vdev_id, bool val);
 uint32_t ol_txrx_get_tx_pending(struct cdp_pdev *pdev_handle);
@@ -208,9 +205,26 @@ ol_txrx_find_peer_by_addr_and_vdev(struct cdp_pdev *ppdev,
 	return peer;
 }
 
-static QDF_STATUS ol_txrx_get_vdevid(void *ppeer, uint8_t *vdev_id)
+/**
+ * ol_txrx_get_vdevid() - Get virtual interface id which peer registered
+ * @soc_hdl - data path soc handle
+ * @peer_mac - peer mac address
+ * @vdev_id - virtual interface id which peer registered
+ *
+ * Get virtual interface id which peer registered
+ *
+ * Return: QDF_STATUS_SUCCESS registration success
+ *         QDF_STATUS_E_NOSUPPORT not support this feature
+ */
+static QDF_STATUS ol_txrx_get_vdevid(struct cdp_soc_t *soc_hdl,
+				     uint8_t *peer_mac, uint8_t *vdev_id)
 {
-	struct ol_txrx_peer_t *peer = ppeer;
+	uint8_t pdev_id = OL_TXRX_PDEV_ID;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_pdev_handle pdev = ol_txrx_get_pdev_from_pdev_id(soc, pdev_id);
+	struct ol_txrx_peer_t *peer =
+		ol_txrx_peer_find_hash_find_get_ref(pdev, peer_mac, 0, 1,
+						    PEER_DEBUG_ID_OL_INTERNAL);
 
 	if (!peer) {
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
@@ -219,6 +233,8 @@ static QDF_STATUS ol_txrx_get_vdevid(void *ppeer, uint8_t *vdev_id)
 	}
 
 	*vdev_id = peer->vdev->vdev_id;
+	ol_txrx_peer_release_ref(peer, PEER_DEBUG_ID_OL_INTERNAL);
+
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -271,6 +287,91 @@ ol_txrx_wrapper_get_vdev_by_peer_addr(struct cdp_pdev *ppdev,
 								peer_addr);
 }
 
+/*
+ * ol_txrx_find_peer_exist - find peer if already exists
+ * @soc_hdl: datapath soc handle
+ * @pdev_id: physical device instance id
+ * @peer_mac_addr: peer mac address
+ *
+ * Return: true or false
+ */
+static bool ol_txrx_find_peer_exist(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
+				    uint8_t *peer_addr)
+{
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_pdev_handle pdev = ol_txrx_get_pdev_from_pdev_id(soc, pdev_id);
+
+	if (!pdev)
+		return false;
+
+	return !!ol_txrx_find_peer_by_addr(ol_txrx_pdev_t_to_cdp_pdev(pdev),
+					   peer_addr);
+}
+
+/*
+ * ol_txrx_find_peer_exist_on_vdev - find if duplicate peer exists
+ * on the given vdev
+ * @soc_hdl: datapath soc handle
+ * @vdev_id: vdev instance id
+ * @peer_mac_addr: peer mac address
+ *
+ * Return: true or false
+ */
+static bool ol_txrx_find_peer_exist_on_vdev(struct cdp_soc_t *soc_hdl,
+					    uint8_t vdev_id,
+					    uint8_t *peer_addr)
+{
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
+
+	if (!vdev)
+		return false;
+
+	return !!ol_txrx_find_peer_by_addr_and_vdev(
+					ol_txrx_pdev_t_to_cdp_pdev(vdev->pdev),
+					ol_txrx_vdev_t_to_cdp_vdev(vdev),
+					peer_addr);
+}
+
+/*
+ * ol_txrx_find_peer_exist_on_other_vdev - find if duplicate peer exists
+ * on other than the given vdev
+ * @soc_hdl: datapath soc handle
+ * @vdev_id: vdev instance id
+ * @peer_mac_addr: peer mac address
+ * @max_bssid: max number of bssids
+ *
+ * Return: true or false
+ */
+static bool ol_txrx_find_peer_exist_on_other_vdev(struct cdp_soc_t *soc_hdl,
+						  uint8_t vdev_id,
+						  uint8_t *peer_addr,
+						  uint16_t max_bssid)
+{
+	int i;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	struct ol_txrx_vdev_t *vdev;
+
+	for (i = 0; i < max_bssid; i++) {
+		vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc, vdev_id);
+		/* Need to check vdevs other than the vdev_id */
+		if (vdev_id == i || !vdev)
+			continue;
+		if (ol_txrx_find_peer_by_addr_and_vdev(
+					ol_txrx_pdev_t_to_cdp_pdev(vdev->pdev),
+					ol_txrx_vdev_t_to_cdp_vdev(vdev),
+					peer_addr)) {
+			QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_HIGH,
+				  "%s: Duplicate peer %pM already exist on vdev %d",
+				  __func__, peer_addr, i);
+			return true;
+		}
+	}
+
+	return false;
+}
+
 /**
  * ol_txrx_find_peer_by_addr() - find peer via peer mac addr and peer_id
  * @ppdev: pointer of type cdp_pdev
@@ -2340,7 +2441,7 @@ ol_txrx_peer_attach(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
 	 * progress to "auth" state once the authentication completes.
 	 */
 	peer->state = OL_TXRX_PEER_STATE_INVALID;
-	ol_txrx_peer_state_update((struct cdp_pdev *)pdev, peer->mac_addr.raw,
+	ol_txrx_peer_state_update(soc_hdl, peer->mac_addr.raw,
 				  OL_TXRX_PEER_STATE_DISC);
 
 #ifdef QCA_SUPPORT_PEER_DATA_RX_RSSI
@@ -2446,6 +2547,8 @@ ol_txrx_get_pn_info(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac,
 	*last_pn_valid = &peer->last_rmf_pn_valid;
 	*last_pn = &peer->last_rmf_pn;
 	*rmf_pn_replays = &peer->rmf_pn_replays;
+
+	ol_txrx_peer_release_ref(peer, PEER_DEBUG_ID_OL_INTERNAL);
 }
 #else
 static void
@@ -2479,28 +2582,33 @@ static int ol_txrx_get_opmode(struct cdp_soc_t *soc_hdl, uint8_t vdev_id)
 
 /**
  * ol_txrx_get_peer_state() - Return peer state of peer
- * @peer: peer handle
+ * @soc_hdl: datapath soc handle
+ * @vdev_id: virtual interface id
+ * @peer_mac: peer mac addr
  *
  * Return: return peer state
  */
-static int ol_txrx_get_peer_state(void *ppeer)
+static int ol_txrx_get_peer_state(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
+				  uint8_t *peer_mac)
 {
-	ol_txrx_peer_handle peer = ppeer;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_pdev_handle pdev =
+		ol_txrx_get_pdev_from_pdev_id(soc, OL_TXRX_PDEV_ID);
+	ol_txrx_peer_handle peer;
+	enum ol_txrx_peer_state peer_state;
 
-	return peer->state;
-}
+	if (!pdev)
+		return QDF_STATUS_E_FAILURE;
 
-/**
- * ol_txrx_get_vdev_for_peer() - Return vdev from peer handle
- * @peer: peer handle
- *
- * Return: vdev handle from peer
- */
-static struct cdp_vdev *ol_txrx_get_vdev_for_peer(void *ppeer)
-{
-	ol_txrx_peer_handle peer = ppeer;
+	peer =  ol_txrx_peer_find_hash_find_get_ref(pdev, peer_mac, 0, 1,
+						    PEER_DEBUG_ID_OL_INTERNAL);
+	if (!peer)
+		return QDF_STATUS_E_FAILURE;
+
+	peer_state = peer->state;
+	ol_txrx_peer_release_ref(peer, PEER_DEBUG_ID_OL_INTERNAL);
 
-	return (struct cdp_vdev *)peer->vdev;
+	return peer_state;
 }
 
 /**
@@ -2589,18 +2697,25 @@ ol_txrx_is_rx_fwd_disabled(struct cdp_vdev *pvdev)
 #ifdef QCA_IBSS_SUPPORT
 /**
  * ol_txrx_update_ibss_add_peer_num_of_vdev() - update and return peer num
- * @vdev: vdev handle
+ * @soc_hdl: datapath soc handle
+ * @vdev_id: virtual interface id
  * @peer_num_delta: peer nums to be adjusted
  *
  * Return: -1 for failure or total peer nums after adjustment.
  */
 static int16_t
-ol_txrx_update_ibss_add_peer_num_of_vdev(struct cdp_vdev *pvdev,
+ol_txrx_update_ibss_add_peer_num_of_vdev(struct cdp_soc_t *soc_hdl,
+					 uint8_t vdev_id,
 					 int16_t peer_num_delta)
 {
-	struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t *)pvdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
 	int16_t new_peer_num;
 
+	if (!vdev)
+		return QDF_STATUS_E_FAILURE;
+
 	new_peer_num = vdev->ibss_peer_num + peer_num_delta;
 	if (new_peer_num > MAX_PEERS || new_peer_num < 0)
 		return OL_TXRX_INVALID_NUM_PEERS;
@@ -2634,7 +2749,8 @@ ol_txrx_set_ibss_vdev_heart_beat_timer(struct cdp_soc_t *soc_hdl,
 }
 #else /* !QCA_IBSS_SUPPORT */
 static inline int16_t
-ol_txrx_update_ibss_add_peer_num_of_vdev(struct cdp_vdev *pvdev,
+ol_txrx_update_ibss_add_peer_num_of_vdev(struct cdp_soc_t *soc_hdl,
+					 uint8_t vdev_id,
 					 int16_t peer_num_delta)
 {
 	return 0;
@@ -2648,84 +2764,6 @@ static uint16_t ol_txrx_set_ibss_vdev_heart_beat_timer(
 }
 #endif /* QCA_IBSS_SUPPORT */
 
-/**
- * ol_txrx_remove_peers_for_vdev() - remove all vdev peers with lock held
- * @vdev: vdev handle
- * @callback: callback function to remove the peer.
- * @callback_context: handle for callback function
- * @remove_last_peer: Does it required to last peer.
- *
- * Return: NONE
- */
-static void
-ol_txrx_remove_peers_for_vdev(struct cdp_vdev *pvdev,
-			      ol_txrx_vdev_peer_remove_cb callback,
-			      void *callback_context, bool remove_last_peer)
-{
-	struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t *)pvdev;
-	ol_txrx_peer_handle peer, temp;
-	int self_removed = 0;
-	/* remove all remote peers for vdev */
-	qdf_spin_lock_bh(&vdev->pdev->peer_ref_mutex);
-
-	temp = NULL;
-	TAILQ_FOREACH_REVERSE(peer, &vdev->peer_list, peer_list_t,
-			      peer_list_elem) {
-		if (qdf_atomic_read(&peer->delete_in_progress))
-			continue;
-		if (temp) {
-			qdf_spin_unlock_bh(&vdev->pdev->peer_ref_mutex);
-			callback(callback_context, temp->mac_addr.raw,
-				vdev->vdev_id, temp);
-			qdf_spin_lock_bh(&vdev->pdev->peer_ref_mutex);
-		}
-		/* self peer is deleted last */
-		if (peer == TAILQ_FIRST(&vdev->peer_list)) {
-			self_removed = 1;
-			break;
-		}
-		temp = peer;
-	}
-
-	qdf_spin_unlock_bh(&vdev->pdev->peer_ref_mutex);
-
-	if (self_removed)
-		ol_txrx_info("self peer removed by caller");
-
-	if (remove_last_peer) {
-		/* remove IBSS bss peer last */
-		peer = TAILQ_FIRST(&vdev->peer_list);
-		callback(callback_context, (uint8_t *) &vdev->mac_addr,
-			 vdev->vdev_id, peer);
-	}
-}
-
-/**
- * ol_txrx_remove_peers_for_vdev_no_lock() - remove vdev peers with no lock.
- * @vdev: vdev handle
- * @callback: callback function to remove the peer.
- * @callback_context: handle for callback function
- *
- * Return: NONE
- */
-static void
-ol_txrx_remove_peers_for_vdev_no_lock(struct cdp_vdev *pvdev,
-			      ol_txrx_vdev_peer_remove_cb callback,
-			      void *callback_context)
-{
-	struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t *)pvdev;
-	ol_txrx_peer_handle peer = NULL;
-	ol_txrx_peer_handle tmp_peer = NULL;
-
-	TAILQ_FOREACH_SAFE(peer, &vdev->peer_list, peer_list_elem, tmp_peer) {
-		ol_txrx_info_high(
-			   "peer found for vdev id %d. deleting the peer",
-			   vdev->vdev_id);
-		callback(callback_context, (uint8_t *)&vdev->mac_addr,
-				vdev->vdev_id, peer);
-	}
-}
-
 #ifdef WLAN_FEATURE_DSRC
 /**
  * ol_txrx_set_ocb_chan_info() - set OCB channel info to vdev.
@@ -2773,27 +2811,13 @@ ol_txrx_get_ocb_chan_info(struct cdp_soc_t *soc_hdl, uint8_t vdev_id)
 }
 #endif
 
-/**
- * @brief specify the peer's authentication state
- * @details
- *  Specify the peer's authentication state (none, connected, authenticated)
- *  to allow the data SW to determine whether to filter out invalid data frames.
- *  (In the "connected" state, where security is enabled, but authentication
- *  has not completed, tx and rx data frames other than EAPOL or WAPI should
- *  be discarded.)
- *  This function is only relevant for systems in which the tx and rx filtering
- *  are done in the host rather than in the target.
- *
- * @param data_peer - which peer has changed its state
- * @param state - the new state of the peer
- *
- * Return: QDF Status
- */
-QDF_STATUS ol_txrx_peer_state_update(struct cdp_pdev *ppdev,
+QDF_STATUS ol_txrx_peer_state_update(struct cdp_soc_t *soc_hdl,
 				     uint8_t *peer_mac,
 				     enum ol_txrx_peer_state state)
 {
-	struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)ppdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_pdev_handle pdev =
+		ol_txrx_get_pdev_from_pdev_id(soc, OL_TXRX_PDEV_ID);
 	struct ol_txrx_peer_t *peer;
 	int    peer_ref_cnt;
 
@@ -3259,11 +3283,13 @@ ol_txrx_clear_peer_internal(struct ol_txrx_peer_t *peer)
  * Return: QDF Status
  */
 static QDF_STATUS
-ol_txrx_clear_peer(struct cdp_pdev *ppdev,
+ol_txrx_clear_peer(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
 		   struct qdf_mac_addr peer_addr)
 {
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	struct ol_txrx_pdev_t *pdev =
+			ol_txrx_get_pdev_from_pdev_id(soc, pdev_id);
 	struct ol_txrx_peer_t *peer;
-	struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)ppdev;
 	QDF_STATUS status;
 
 	if (!pdev) {
@@ -3403,7 +3429,9 @@ static QDF_STATUS ol_txrx_peer_detach(struct cdp_soc_t *soc_hdl, uint8_t vdev_id
 
 /**
  * ol_txrx_peer_detach_force_delete() - Detach and delete a peer's data object
- * @ppeer - the object to detach
+ * @soc_hdl - datapath soc handle
+ * @vdev_id - virtual interface id
+ * @peer_mac - peer mac address
  *
  * Detach a peer and force peer object to be removed. It is called during
  * roaming scenario when the firmware has already deleted a peer.
@@ -3412,25 +3440,35 @@ static QDF_STATUS ol_txrx_peer_detach(struct cdp_soc_t *soc_hdl, uint8_t vdev_id
  *
  * Return: None
  */
-static void ol_txrx_peer_detach_force_delete(void *ppeer)
+static void ol_txrx_peer_detach_force_delete(struct cdp_soc_t *soc_hdl,
+					     uint8_t vdev_id, uint8_t *peer_mac)
 {
-	struct ol_txrx_soc_t *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	ol_txrx_peer_handle peer = ppeer;
-	ol_txrx_pdev_handle pdev = peer->vdev->pdev;
+	struct ol_txrx_peer_t *peer;
+	struct ol_txrx_pdev_t *pdev;
+	struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
+	ol_txrx_vdev_handle vdev = ol_txrx_get_vdev_from_soc_vdev_id(soc,
+								     vdev_id);
 
-	ol_txrx_info_high("peer %pK, peer->ref_cnt %d",
-			  peer, qdf_atomic_read(&peer->ref_cnt));
+	if (!vdev || !vdev->pdev)
+		return;
+
+	pdev = vdev->pdev;
+	peer = ol_txrx_find_peer_by_addr(ol_txrx_pdev_t_to_cdp_pdev(pdev),
+					 peer_mac);
+	if (!peer)
+		return;
 
 	/* Clear the peer_id_to_obj map entries */
 	ol_txrx_peer_remove_obj_map_entries(pdev, peer);
-	ol_txrx_peer_detach((struct cdp_soc_t *)soc, peer->vdev->vdev_id,
-			    peer->mac_addr.raw,
+	ol_txrx_peer_detach(soc_hdl, vdev_id, peer_mac,
 			    1 << CDP_PEER_DELETE_NO_SPECIAL);
 }
 
 /**
  * ol_txrx_peer_detach_sync() - peer detach sync callback
- * @ppeer - the peer object
+ * @soc_hdl - datapath soc handle
+ * @vdev_id - virtual interface id
+ * @peer_mac - peer mac address
  * @peer_unmap_sync - peer unmap sync cb.
  * @bitmap - bitmap indicating special handling of request.
  *
@@ -5002,7 +5040,9 @@ drop_rx_buf:
 static QDF_STATUS ol_txrx_register_peer(struct ol_txrx_desc_type *sta_desc)
 {
 	struct ol_txrx_peer_t *peer;
-	struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
+	struct ol_txrx_soc_t *soc = cds_get_context(QDF_MODULE_ID_SOC);
+	ol_txrx_pdev_handle pdev =
+		ol_txrx_get_pdev_from_pdev_id(soc, OL_TXRX_PDEV_ID);
 	union ol_txrx_peer_update_param_t param;
 	struct privacy_exemption privacy_filter;
 
@@ -5045,12 +5085,13 @@ static QDF_STATUS ol_txrx_register_peer(struct ol_txrx_desc_type *sta_desc)
  */
 static QDF_STATUS ol_txrx_register_ocb_peer(uint8_t *mac_addr)
 {
-	ol_txrx_pdev_handle pdev;
+	struct ol_txrx_soc_t *soc = cds_get_context(QDF_MODULE_ID_SOC);
+	ol_txrx_pdev_handle pdev =
+		ol_txrx_get_pdev_from_pdev_id(soc, OL_TXRX_PDEV_ID);
 	ol_txrx_peer_handle peer;
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		ol_txrx_err("Unable to find pdev!");
+	if (!pdev || !soc) {
+		ol_txrx_err("Unable to find pdev or soc!");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -5064,7 +5105,7 @@ static QDF_STATUS ol_txrx_register_ocb_peer(uint8_t *mac_addr)
 	ol_txrx_set_ocb_peer(pdev, peer);
 
 	/* Set peer state to connected */
-	ol_txrx_peer_state_update((struct cdp_pdev *)pdev, peer->mac_addr.raw,
+	ol_txrx_peer_state_update((struct cdp_soc_t *)soc, peer->mac_addr.raw,
 				  OL_TXRX_PEER_STATE_AUTH);
 
 	return QDF_STATUS_SUCCESS;
@@ -5599,8 +5640,10 @@ static void ol_txrx_wrapper_flush_rx_frames(struct cdp_soc_t *soc_hdl,
  *
  * Return: QDF STATUS
  */
-static QDF_STATUS ol_txrx_wrapper_register_peer(struct cdp_pdev *pdev,
-		struct ol_txrx_desc_type *sta_desc)
+static QDF_STATUS ol_txrx_wrapper_register_peer(
+					struct cdp_soc_t *soc_hdl,
+					uint8_t pdev_id,
+					struct ol_txrx_desc_type *sta_desc)
 {
 	return ol_txrx_register_peer(sta_desc);
 }
@@ -5619,7 +5662,8 @@ static int ol_txrx_wrapper_cfg_is_high_latency(struct cdp_cfg *cfg_pdev)
 
 /**
  * ol_txrx_wrapper_peer_state_update() - specify the peer's authentication state
- * @data_peer - which peer has changed its state
+ * @soc_hdl - datapath soc handle
+ * @peer_mac - mac address of which peer has changed its state
  * @state - the new state of the peer
  *
  *  Specify the peer's authentication state (none, connected, authenticated)
@@ -5632,57 +5676,12 @@ static int ol_txrx_wrapper_cfg_is_high_latency(struct cdp_cfg *cfg_pdev)
  *
  * Return: QDF Status
  */
-static QDF_STATUS ol_txrx_wrapper_peer_state_update(struct cdp_pdev *pdev,
-		uint8_t *peer_mac, enum ol_txrx_peer_state state)
-{
-	return ol_txrx_peer_state_update(pdev,
-			peer_mac, state);
-}
-
-/**
- * ol_txrx_wrapper_find_peer_by_addr() - find peer instance by address
- * @pdev: pdev handle
- * @peer_addr: peer address want to find
- *
- * Return: peer instance pointer
- */
-static void *ol_txrx_wrapper_find_peer_by_addr(struct cdp_pdev *pdev,
-		uint8_t *peer_addr)
-{
-	return ol_txrx_find_peer_by_addr(pdev,
-				peer_addr);
-}
-
-/**
- * ol_txrx_wrapper_peer_get_ref_by_addr() - get peer reference by address
- * @pdev: pdev handle
- * @peer_addr: peer address we want to find
- * @debug_id: peer debug id for tracking
- *
- * Return: peer instance pointer
- */
-static void *
-ol_txrx_wrapper_peer_get_ref_by_addr(struct cdp_pdev *pdev,
-				     u8 *peer_addr,
-				     enum peer_debug_id_type debug_id)
-{
-	return ol_txrx_peer_get_ref_by_addr((ol_txrx_pdev_handle)pdev,
-					    peer_addr, debug_id);
-}
-
-/**
- * ol_txrx_wrapper_peer_release_ref() - release peer reference
- * @peer: peer handle
- * @debug_id: peer debug id for tracking
- *
- * Release peer ref acquired by peer get ref api
- *
- * Return: void
- */
-static void ol_txrx_wrapper_peer_release_ref(void *peer,
-					     enum peer_debug_id_type debug_id)
+static QDF_STATUS ol_txrx_wrapper_peer_state_update(
+						struct cdp_soc_t *soc_hdl,
+						uint8_t *peer_mac,
+						enum ol_txrx_peer_state state)
 {
-	ol_txrx_peer_release_ref(peer, debug_id);
+	return ol_txrx_peer_state_update(soc_hdl, peer_mac, state);
 }
 
 /**
@@ -6101,21 +6100,17 @@ static struct cdp_cfg_ops ol_ops_cfg = {
 static struct cdp_peer_ops ol_ops_peer = {
 	.register_peer = ol_txrx_wrapper_register_peer,
 	.clear_peer = ol_txrx_clear_peer,
-	.peer_get_ref_by_addr = ol_txrx_wrapper_peer_get_ref_by_addr,
-	.peer_release_ref = ol_txrx_wrapper_peer_release_ref,
-	.find_peer_by_addr = ol_txrx_wrapper_find_peer_by_addr,
-	.find_peer_by_addr_and_vdev = ol_txrx_find_peer_by_addr_and_vdev,
+	.find_peer_exist = ol_txrx_find_peer_exist,
+	.find_peer_exist_on_vdev = ol_txrx_find_peer_exist_on_vdev,
+	.find_peer_exist_on_other_vdev = ol_txrx_find_peer_exist_on_other_vdev,
 	.peer_state_update = ol_txrx_wrapper_peer_state_update,
 	.get_vdevid = ol_txrx_get_vdevid,
 	.get_vdev_by_peer_addr = ol_txrx_wrapper_get_vdev_by_peer_addr,
 	.register_ocb_peer = ol_txrx_register_ocb_peer,
 	.peer_get_peer_mac_addr = ol_txrx_peer_get_peer_mac_addr,
 	.get_peer_state = ol_txrx_get_peer_state,
-	.get_vdev_for_peer = ol_txrx_get_vdev_for_peer,
 	.update_ibss_add_peer_num_of_vdev =
 		ol_txrx_update_ibss_add_peer_num_of_vdev,
-	.remove_peers_for_vdev = ol_txrx_remove_peers_for_vdev,
-	.remove_peers_for_vdev_no_lock = ol_txrx_remove_peers_for_vdev_no_lock,
 #if defined(CONFIG_HL_SUPPORT) && defined(FEATURE_WLAN_TDLS)
 	.copy_mac_addr_raw = ol_txrx_copy_mac_addr_raw,
 	.add_last_real_peer = ol_txrx_add_last_real_peer,

+ 89 - 7
core/dp/txrx/ol_txrx.h

@@ -221,6 +221,27 @@ ol_txrx_get_vdev_by_peer_addr(struct cdp_pdev *ppdev,
 void *ol_txrx_find_peer_by_addr(struct cdp_pdev *pdev,
 				uint8_t *peer_addr);
 
+/**
+ * @brief specify the peer's authentication state
+ * @details
+ *  Specify the peer's authentication state (none, connected, authenticated)
+ *  to allow the data SW to determine whether to filter out invalid data frames.
+ *  (In the "connected" state, where security is enabled, but authentication
+ *  has not completed, tx and rx data frames other than EAPOL or WAPI should
+ *  be discarded.)
+ *  This function is only relevant for systems in which the tx and rx filtering
+ *  are done in the host rather than in the target.
+ *
+ * @param soc - datapath soc handle
+ * @param peer_mac - mac address of which peer has changed its state
+ * @param state - the new state of the peer
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS ol_txrx_peer_state_update(struct cdp_soc_t *soc_hdl,
+				     uint8_t *peer_mac,
+				     enum ol_txrx_peer_state state);
+
 void htt_pkt_log_init(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, void *scn);
 void peer_unmap_timer_handler(void *data);
 
@@ -315,14 +336,75 @@ ol_txrx_pdev_grp_stat_destroy(struct ol_txrx_pdev_t *pdev) {}
 #endif
 
 #if defined(CONFIG_HL_SUPPORT) && defined(FEATURE_WLAN_TDLS)
-void ol_txrx_copy_mac_addr_raw(struct cdp_vdev *pvdev, uint8_t *bss_addr);
-void ol_txrx_add_last_real_peer(struct cdp_pdev *ppdev,
-				struct cdp_vdev *pvdev);
-bool is_vdev_restore_last_peer(void *ppeer);
-void ol_txrx_update_last_real_peer(struct cdp_pdev *ppdev, void *pvdev,
+/**
+ * ol_txrx_copy_mac_addr_raw() - copy raw mac addr
+ * @soc_hdl: datapath soc handle
+ * @vdev_id: the data virtual device id
+ * @bss_addr: bss address
+ *
+ * Return: None
+ */
+void ol_txrx_copy_mac_addr_raw(struct cdp_soc_t *soc, uint8_t vdev_id,
+			       uint8_t *bss_addr);
+
+/**
+ * ol_txrx_add_last_real_peer() - add last peer
+ * @soc_hdl: datapath soc handle
+ * @pdev_id: the data physical device id
+ * @vdev_id: virtual device id
+ *
+ * Return: None
+ */
+void ol_txrx_add_last_real_peer(struct cdp_soc_t *soc, uint8_t pdev_id,
+				uint8_t vdev_id);
+
+/**
+ * is_vdev_restore_last_peer() - check for vdev last peer
+ * @soc: datapath soc handle
+ * vdev_id: vdev id
+ * @peer_mac: peer mac address
+ *
+ * Return: true if last peer is not null
+ */
+bool is_vdev_restore_last_peer(struct cdp_soc_t *soc, uint8_t vdev_id,
+			       uint8_t *peer_mac);
+
+/**
+ * ol_txrx_update_last_real_peer() - check for vdev last peer
+ * @soc: datapath soc handle
+ * @pdev_id: the data physical device id
+ * @vdev_id: vdev_id
+ * @restore_last_peer: restore last peer flag
+ *
+ * Return: None
+ */
+void ol_txrx_update_last_real_peer(struct cdp_soc_t *soc, uint8_t pdev_id,
+				   uint8_t vdev_id,
 				   bool restore_last_peer);
-void ol_txrx_set_peer_as_tdls_peer(void *ppeer, bool val);
-void ol_txrx_set_tdls_offchan_enabled(void *ppeer, bool val);
+
+/**
+ * ol_txrx_set_peer_as_tdls_peer() - mark peer as tdls peer
+ * @soc: pointer to SOC handle
+ * @vdev_id: virtual interface id
+ * @peer_mac: peer mac address
+ * @value: false/true
+ *
+ * Return: None
+ */
+void ol_txrx_set_peer_as_tdls_peer(struct cdp_soc_t *soc, uint8_t vdev_id,
+				   uint8_t *peer_mac, bool val);
+
+/**
+ * ol_txrx_set_tdls_offchan_enabled() - set tdls offchan enabled
+ * @soc: pointer to SOC handle
+ * @vdev_id: virtual interface id
+ * @peer_mac: peer mac address
+ * @value: false/true
+ *
+ * Return: None
+ */
+void ol_txrx_set_tdls_offchan_enabled(struct cdp_soc_t *soc, uint8_t vdev_id,
+				      uint8_t *peer_mac, bool val);
 #endif
 
 #if defined(FEATURE_TSO) && defined(FEATURE_TSO_DEBUG)

+ 9 - 25
core/hdd/src/wlan_hdd_assoc.c

@@ -52,6 +52,7 @@
 #include <cdp_txrx_peer_ops.h>
 #include <cdp_txrx_misc.h>
 #include <cdp_txrx_ctrl.h>
+#include "ol_txrx.h"
 #include <wlan_logging_sock_svc.h>
 #include <wlan_hdd_object_manager.h>
 #include <cdp_txrx_handle.h>
@@ -1618,8 +1619,7 @@ QDF_STATUS hdd_roam_deregister_sta(struct hdd_adapter *adapter,
 	QDF_STATUS qdf_status;
 
 	qdf_status = cdp_clear_peer(cds_get_context(QDF_MODULE_ID_SOC),
-			(struct cdp_pdev *)cds_get_context(QDF_MODULE_ID_TXRX),
-			mac_addr);
+				    OL_TXRX_PDEV_ID, mac_addr);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		hdd_err("cdp_clear_peer() failed for sta mac: "
 			QDF_MAC_ADDR_STR ". Status(%d) [0x%08X]",
@@ -1942,7 +1942,7 @@ static void hdd_set_peer_authorized_event(uint32_t vdev_id)
 
 #if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
 static inline
-void hdd_set_unpause_queue(void *soc, struct hdd_adapter *adapter, void *peer)
+void hdd_set_unpause_queue(void *soc, struct hdd_adapter *adapter)
 {
 	unsigned long rc;
 	/* wait for event from firmware to set the event */
@@ -1958,7 +1958,7 @@ void hdd_set_unpause_queue(void *soc, struct hdd_adapter *adapter, void *peer)
 }
 #else
 static inline
-void hdd_set_unpause_queue(void *soc, struct hdd_adapter *adapter, void *peer)
+void hdd_set_unpause_queue(void *soc, struct hdd_adapter *adapter)
 { }
 #endif
 
@@ -1968,20 +1968,9 @@ QDF_STATUS hdd_change_peer_state(struct hdd_adapter *adapter,
 				 bool roam_synch_in_progress)
 {
 	QDF_STATUS err;
-	void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	void *peer;
 
-	if (!pdev) {
-		hdd_err("Failed to get txrx context");
-		return QDF_STATUS_E_FAULT;
-	}
-
-	peer = cdp_peer_find_by_addr(soc, (struct cdp_pdev *)pdev, peer_mac);
-	if (!peer)
-		return QDF_STATUS_E_FAULT;
-
-	err = cdp_peer_state_update(soc, pdev, peer_mac, sta_state);
+	err = cdp_peer_state_update(soc, peer_mac, sta_state);
 	if (err != QDF_STATUS_SUCCESS) {
 		hdd_err("peer state update failed");
 		return QDF_STATUS_E_FAULT;
@@ -2011,7 +2000,7 @@ QDF_STATUS hdd_change_peer_state(struct hdd_adapter *adapter,
 
 		if (adapter->device_mode == QDF_STA_MODE ||
 		    adapter->device_mode == QDF_P2P_CLIENT_MODE) {
-			hdd_set_unpause_queue(soc, adapter, peer);
+			hdd_set_unpause_queue(soc, adapter);
 		}
 	}
 	return QDF_STATUS_SUCCESS;
@@ -2099,7 +2088,6 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
 	struct ol_txrx_desc_type txrx_desc = {0};
 	struct ol_txrx_ops txrx_ops;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 
 	if (!bss_desc)
 		return QDF_STATUS_E_FAILURE;
@@ -2152,8 +2140,7 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
 	}
 
 	adapter->tx_fn = txrx_ops.tx.tx;
-	qdf_status = cdp_peer_register(soc,
-			(struct cdp_pdev *)pdev, &txrx_desc);
+	qdf_status = cdp_peer_register(soc, OL_TXRX_PDEV_ID, &txrx_desc);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		hdd_err("cdp_peer_register() failed Status: %d [0x%08X]",
 			 qdf_status, qdf_status);
@@ -4002,7 +3989,6 @@ QDF_STATUS hdd_roam_register_tdlssta(struct hdd_adapter *adapter,
 	struct ol_txrx_desc_type txrx_desc = { 0 };
 	struct ol_txrx_ops txrx_ops;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 
 	/*
 	 * TDLS sta in BSS should be set as STA type TDLS and STA MAC should
@@ -4031,8 +4017,7 @@ QDF_STATUS hdd_roam_register_tdlssta(struct hdd_adapter *adapter,
 	txrx_ops.rx.stats_rx = hdd_tx_rx_collect_connectivity_stats_info;
 
 	/* Register the Station with TL...  */
-	qdf_status = cdp_peer_register(soc,
-			(struct cdp_pdev *)pdev, &txrx_desc);
+	qdf_status = cdp_peer_register(soc, OL_TXRX_PDEV_ID, &txrx_desc);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		hdd_err("cdp_peer_register() failed Status: %d [0x%08X]",
 			qdf_status, qdf_status);
@@ -4048,8 +4033,7 @@ QDF_STATUS hdd_roam_deregister_tdlssta(struct hdd_adapter *adapter,
 	QDF_STATUS qdf_status;
 
 	qdf_status = cdp_clear_peer(cds_get_context(QDF_MODULE_ID_SOC),
-			(struct cdp_pdev *)cds_get_context(QDF_MODULE_ID_TXRX),
-			*peer_mac);
+				    OL_TXRX_PDEV_ID, *peer_mac);
 
 	return qdf_status;
 }

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -6209,7 +6209,7 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
 	case QDF_OCB_MODE:
 		sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 		cdp_clear_peer(cds_get_context(QDF_MODULE_ID_SOC),
-			       cds_get_context(QDF_MODULE_ID_TXRX),
+			       OL_TXRX_PDEV_ID,
 			       sta_ctx->conn_info.peer_macaddr[0]);
 		hdd_deregister_hl_netdev_fc_timer(adapter);
 		hdd_deregister_tx_flow_control(adapter);

+ 2 - 1
core/hdd/src/wlan_hdd_ocb.c

@@ -41,6 +41,7 @@
 #include <cdp_txrx_peer_ops.h>
 #include <cdp_txrx_handle.h>
 #include <cdp_txrx_ocb.h>
+#include "ol_txrx.h"
 
 /* Structure definitions for WLAN_SET_DOT11P_CHANNEL_SCHED */
 #define AIFSN_MIN		(2)
@@ -240,7 +241,7 @@ static int hdd_ocb_register_sta(struct hdd_adapter *adapter)
 	txrx_ops.rx.stats_rx = hdd_tx_rx_collect_connectivity_stats_info;
 	adapter->tx_fn = txrx_ops.tx.tx;
 
-	qdf_status = cdp_peer_register(soc, (struct cdp_pdev *)pdev, &sta_desc);
+	qdf_status = cdp_peer_register(soc, OL_TXRX_PDEV_ID, &sta_desc);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		hdd_err("Failed to register. Status= %d [0x%08X]",
 		       qdf_status, qdf_status);

+ 2 - 4
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -982,7 +982,7 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter,
 
 	qdf_status = cdp_clear_peer(
 			cds_get_context(QDF_MODULE_ID_SOC),
-			(struct cdp_pdev *)cds_get_context(QDF_MODULE_ID_TXRX),
+			OL_TXRX_PDEV_ID,
 			*mac_addr);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		hdd_err("cdp_clear_peer failed for sta: " QDF_MAC_ADDR_STR
@@ -1017,7 +1017,6 @@ QDF_STATUS hdd_softap_register_sta(struct hdd_adapter *adapter,
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	struct ol_txrx_ops txrx_ops;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 	struct hdd_ap_ctx *ap_ctx;
 	struct hdd_station_info *sta_info;
 
@@ -1079,8 +1078,7 @@ QDF_STATUS hdd_softap_register_sta(struct hdd_adapter *adapter,
 			  &txrx_ops);
 	adapter->tx_fn = txrx_ops.tx.tx;
 
-	qdf_status = cdp_peer_register(soc,
-			(struct cdp_pdev *)pdev, &txrx_desc);
+	qdf_status = cdp_peer_register(soc, OL_TXRX_PDEV_ID, &txrx_desc);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		hdd_err("cdp_peer_register() failed to register.  Status = %d [0x%08X]",
 			qdf_status, qdf_status);

+ 8 - 19
core/hdd/src/wlan_hdd_tx_rx.c

@@ -551,7 +551,8 @@ void hdd_reset_all_adapters_connectivity_stats(struct hdd_context *hdd_ctx)
 /**
  * hdd_is_tx_allowed() - check if Tx is allowed based on current peer state
  * @skb: pointer to OS packet (sk_buff)
- * @peer_id: Peer STA ID in peer table
+ * @vdev_id: virtual interface id
+ * @peer_mac: Peer mac address
  *
  * This function gets the peer state from DP and check if it is either
  * in OL_TXRX_PEER_STATE_CONN or OL_TXRX_PEER_STATE_AUTH. Only EAP packets
@@ -560,26 +561,15 @@ void hdd_reset_all_adapters_connectivity_stats(struct hdd_context *hdd_ctx)
  *
  * Return: true if Tx is allowed and false otherwise.
  */
-static inline bool hdd_is_tx_allowed(struct sk_buff *skb, uint8_t *peer_mac)
+static inline bool hdd_is_tx_allowed(struct sk_buff *skb, uint8_t vdev_id,
+				     uint8_t *peer_mac)
 {
 	enum ol_txrx_peer_state peer_state;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	void *peer;
 
 	QDF_BUG(soc);
-	QDF_BUG(pdev);
 
-	peer = cdp_peer_find_by_addr(soc, pdev, peer_mac);
-
-	if (!peer) {
-		hdd_err_rl("Unable to find peer entry for sta: "
-			   QDF_MAC_ADDR_STR,
-			   QDF_MAC_ADDR_ARRAY(peer_mac));
-		return false;
-	}
-
-	peer_state = cdp_peer_state_get(soc, peer);
+	peer_state = cdp_peer_state_get(soc, vdev_id, peer_mac);
 	if (likely(OL_TXRX_PEER_STATE_AUTH == peer_state))
 		return true;
 	if (OL_TXRX_PEER_STATE_CONN == peer_state &&
@@ -1110,7 +1100,8 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb,
 			sizeof(qdf_nbuf_data(skb)),
 			QDF_TX));
 
-	if (!hdd_is_tx_allowed(skb, mac_addr_tx_allowed.bytes)) {
+	if (!hdd_is_tx_allowed(skb, wlan_vdev_get_id(vdev),
+			       mac_addr_tx_allowed.bytes)) {
 		QDF_TRACE(QDF_MODULE_ID_HDD_DATA,
 			  QDF_TRACE_LEVEL_INFO_HIGH,
 			  FL("Tx not allowed for sta: "
@@ -2758,7 +2749,6 @@ int hdd_set_mon_rx_cb(struct net_device *dev)
 	struct ol_txrx_desc_type sta_desc = {0};
 	struct ol_txrx_ops txrx_ops;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 
 	WLAN_ADDR_COPY(sta_desc.peer_addr.bytes, adapter->mac_addr.bytes);
 	qdf_mem_zero(&txrx_ops, sizeof(txrx_ops));
@@ -2768,8 +2758,7 @@ int hdd_set_mon_rx_cb(struct net_device *dev)
 			  (ol_osif_vdev_handle)adapter,
 			  &txrx_ops);
 	/* peer is created wma_vdev_attach->wma_create_peer */
-	qdf_status = cdp_peer_register(soc,
-			(struct cdp_pdev *)pdev, &sta_desc);
+	qdf_status = cdp_peer_register(soc, OL_TXRX_PDEV_ID, &sta_desc);
 	if (QDF_STATUS_SUCCESS != qdf_status) {
 		hdd_err("cdp_peer_register() failed to register. Status= %d [0x%08X]",
 			qdf_status, qdf_status);

+ 3 - 11
core/sme/src/common/sme_api.c

@@ -16097,8 +16097,7 @@ QDF_STATUS sme_check_for_duplicate_session(mac_handle_t mac_handle,
 					   uint8_t *peer_addr)
 {
 	QDF_STATUS status = QDF_STATUS_E_INVAL;
-	struct cdp_pdev *pdev;
-	ol_txrx_peer_handle peer;
+	bool peer_exist = false;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
 
@@ -16107,18 +16106,11 @@ QDF_STATUS sme_check_for_duplicate_session(mac_handle_t mac_handle,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		sme_err("Failed to get pdev handler");
-		return QDF_STATUS_E_INVAL;
-	}
-
 	if (QDF_STATUS_SUCCESS != sme_acquire_global_lock(&mac_ctx->sme))
 		return status;
 
-	peer = cdp_peer_find_by_addr(soc, pdev,
-				     peer_addr);
-	if (peer) {
+	peer_exist = cdp_find_peer_exist(soc, OL_TXRX_PDEV_ID, peer_addr);
+	if (peer_exist) {
 		sme_err("Peer exists with same MAC");
 		status = QDF_STATUS_E_EXISTS;
 	} else {

+ 3 - 5
core/wma/inc/wma.h

@@ -1725,12 +1725,10 @@ void wma_process_set_pdev_ht_ie_req(tp_wma_handle wma,
 void wma_process_set_pdev_vht_ie_req(tp_wma_handle wma,
 		struct set_ie_param *ie_params);
 
-QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
-			   uint8_t vdev_id, void *peer,
-			   bool roam_synch_in_progress);
+QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
+			   uint8_t vdev_id, bool roam_synch_in_progress);
 
-QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
-			    struct cdp_vdev *vdev, uint8_t peer_addr[6],
+QDF_STATUS wma_create_peer(tp_wma_handle wma, uint8_t peer_addr[6],
 			   u_int32_t peer_type, u_int8_t vdev_id,
 			   bool roam_synch_in_progress);
 

+ 15 - 17
core/wma/inc/wma_internal.h

@@ -568,15 +568,15 @@ static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
  */
 
 /**
- * wma_find_vdev_by_addr() - find vdev_id from mac address
+ * wma_find_vdev_id_by_addr() - find vdev_id from mac address
  * @wma: wma handle
  * @addr: mac address
  * @vdev_id: return vdev_id
  *
- * Return: Returns vdev handle or NULL if mac address don't match
+ * Return: SUCCESS or FAILURE
  */
-struct cdp_vdev *wma_find_vdev_by_addr(tp_wma_handle wma, uint8_t *addr,
-				   uint8_t *vdev_id);
+QDF_STATUS wma_find_vdev_id_by_addr(tp_wma_handle wma, uint8_t *addr,
+				    uint8_t *vdev_id);
 
 /**
  * wma_find_vdev_by_id() - Returns vdev handle for given vdev id.
@@ -739,15 +739,15 @@ static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma,
 }
 
 /**
- * wma_find_vdev_by_bssid() - Get the corresponding vdev_id from BSSID
+ * wma_find_vdev_id_by_bssid() - Get the corresponding vdev_id from BSSID
  * @wma - wma handle
+ * @bssid - bssid address
  * @vdev_id - vdev ID
  *
- * Return: fill vdev_id with appropriate vdev id and return vdev
- *         handle or NULL if not found.
+ * Return: SUCCESS or FAILURE.
  */
-struct cdp_vdev *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid,
-				    uint8_t *vdev_id);
+QDF_STATUS wma_find_vdev_id_by_bssid(tp_wma_handle wma, uint8_t *bssid,
+				     uint8_t *vdev_id);
 
 /**
  * wma_vdev_detach() - send vdev delete command to fw
@@ -762,18 +762,16 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
 QDF_STATUS wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id,
 				uint32_t param_id, uint32_t param_value);
 
-QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
-			   uint8_t vdev_id, void *peer,
-			   bool roam_synch_in_progress);
+QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
+			   uint8_t vdev_id, bool roam_synch_in_progress);
 
 QDF_STATUS wma_peer_unmap_conf_send(tp_wma_handle wma,
 				    struct send_peer_unmap_conf_params *msg);
 
-QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
-			  struct cdp_vdev *vdev,
-			  uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
-			  uint32_t peer_type, uint8_t vdev_id,
-			  bool roam_synch_in_progress);
+QDF_STATUS wma_create_peer(tp_wma_handle wma,
+			   uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
+			   uint32_t peer_type, uint8_t vdev_id,
+			   bool roam_synch_in_progress);
 
 /**
  * wma_send_del_bss_response() - send delete bss resp

+ 2 - 14
core/wma/src/wma_data.c

@@ -947,7 +947,6 @@ static void wma_data_tx_ack_work_handler(void *ack_work)
 void
 wma_data_tx_ack_comp_hdlr(void *wma_context, qdf_nbuf_t netbuf, int32_t status)
 {
-	void *pdev;
 	tp_wma_handle wma_handle = (tp_wma_handle) wma_context;
 
 	if (!wma_handle) {
@@ -955,10 +954,6 @@ wma_data_tx_ack_comp_hdlr(void *wma_context, qdf_nbuf_t netbuf, int32_t status)
 		return;
 	}
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev)
-		return;
-
 	/*
 	 * if netBuf does not match with pending nbuf then just free the
 	 * netbuf and do not call ack cb
@@ -1232,7 +1227,6 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
 {
 	int32_t ret = 0;
 	uint8_t vdev_id = 0;
-	void *pdev;
 	int32_t mbpsx10_rate = -1;
 	uint32_t paramId;
 	uint8_t rate = 0;
@@ -1241,9 +1235,8 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
 	QDF_STATUS status;
 
 	/* Get the vdev id */
-	pdev = wma_find_vdev_by_addr(wma, pRateUpdateParams->bssid.bytes,
-					&vdev_id);
-	if (!pdev) {
+	if (wma_find_vdev_id_by_addr(wma, pRateUpdateParams->bssid.bytes,
+				     &vdev_id)) {
 		WMA_LOGE("vdev handle is invalid for %pM",
 			 pRateUpdateParams->bssid.bytes);
 		qdf_mem_free(pRateUpdateParams);
@@ -2084,7 +2077,6 @@ int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
 {
 	struct scheduler_msg cds_msg = {0};
 	wmi_peer_info *peer_info;
-	void *pdev;
 	tSirIbssPeerInfoParams *pSmeRsp;
 	uint32_t count, num_peers, status;
 	tSirIbssGetPeerInfoRspParams *pRsp;
@@ -2098,10 +2090,6 @@ int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
 		return 0;
 	}
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev)
-		return 0;
-
 	param_tlvs = (WMI_PEER_INFO_EVENTID_param_tlvs *) data;
 	fix_param = param_tlvs->fixed_param;
 	peer_info = param_tlvs->peer_info;

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 118 - 323
core/wma/src/wma_dev_if.c


+ 29 - 67
core/wma/src/wma_features.c

@@ -501,9 +501,9 @@ QDF_STATUS wma_process_dhcp_ind(WMA_HANDLE handle,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	if (!wma_find_vdev_by_addr(wma_handle,
-				   ta_dhcp_ind->adapterMacAddr.bytes,
-				   &vdev_id)) {
+	if (wma_find_vdev_id_by_addr(wma_handle,
+				     ta_dhcp_ind->adapterMacAddr.bytes,
+				     &vdev_id)) {
 		WMA_LOGE("%s: Failed to find vdev id for DHCP indication",
 			 __func__);
 		return QDF_STATUS_E_FAILURE;
@@ -1131,7 +1131,7 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len)
 	csa_event = param_buf->fixed_param;
 	WMI_MAC_ADDR_TO_CHAR_ARRAY(&csa_event->i_addr2, &bssid[0]);
 
-	if (wma_find_vdev_by_bssid(wma, bssid, &vdev_id) == NULL) {
+	if (wma_find_vdev_id_by_bssid(wma, bssid, &vdev_id)) {
 		WMA_LOGE("Invalid bssid received %s:%d", __func__, __LINE__);
 		return -EINVAL;
 	}
@@ -2476,9 +2476,7 @@ static int wma_wake_event_piggybacked(
 	uint32_t wake_reason;
 	uint32_t event_id;
 	uint8_t *bssid;
-	void *peer, *pdev;
 	tpDeleteStaContext del_sta_ctx;
-	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	/*
 	 * There are "normal" cases where a wake reason that usually contains a
@@ -2492,12 +2490,6 @@ static int wma_wake_event_piggybacked(
 		return 0;
 	}
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE("Invalid pdev");
-		return -EINVAL;
-	}
-
 	bssid = wma_get_vdev_bssid
 		(wma->interfaces[event_param->fixed_param->vdev_id].vdev);
 	if (!bssid) {
@@ -2505,7 +2497,6 @@ static int wma_wake_event_piggybacked(
 			 __func__, event_param->fixed_param->vdev_id);
 		return 0;
 	}
-	peer = cdp_peer_find_by_addr(soc, pdev, bssid);
 	wake_reason = event_param->fixed_param->wake_reason;
 
 	/* parse piggybacked event from param buffer */
@@ -3034,8 +3025,7 @@ QDF_STATUS wma_process_get_peer_info_req
 	uint16_t len;
 	wmi_buf_t buf;
 	int32_t vdev_id;
-	struct cdp_pdev *pdev;
-	void *peer;
+	uint8_t pdev_id;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
 	wmi_peer_info_req_cmd_fixed_param *p_get_peer_info_cmd;
@@ -3054,9 +3044,9 @@ QDF_STATUS wma_process_get_peer_info_req
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE("%s: Failed to get pdev context", __func__);
+	pdev_id = WMI_PDEV_ID_SOC;
+	if (pdev_id == OL_TXRX_INVALID_PDEV_ID) {
+		WMA_LOGE("%s: Failed to get pdev id", __func__);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -3065,8 +3055,7 @@ QDF_STATUS wma_process_get_peer_info_req
 		qdf_mem_copy(peer_mac, bcast_mac, QDF_MAC_ADDR_SIZE);
 	} else {
 		/*get info for a single peer */
-		peer = cdp_peer_find_by_addr(soc, pdev, pReq->peer_mac.bytes);
-		if (!peer) {
+		if (!cdp_find_peer_exist(soc, pdev_id, pReq->peer_mac.bytes)) {
 			WMA_LOGE("%s: Failed to get peer handle using peer "
 				 QDF_MAC_ADDR_STR, __func__,
 				 QDF_MAC_ADDR_ARRAY(pReq->peer_mac.bytes));
@@ -3328,9 +3317,9 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	if (!wma_find_vdev_by_addr(wma_handle,
-				   pattern->mac_address.bytes,
-				   &vdev_id)) {
+	if (wma_find_vdev_id_by_addr(wma_handle,
+				     pattern->mac_address.bytes,
+				     &vdev_id)) {
 		WMA_LOGE("%s: Failed to find vdev id for %pM", __func__,
 			 pattern->mac_address.bytes);
 		return QDF_STATUS_E_INVAL;
@@ -3375,9 +3364,10 @@ QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	if (!wma_find_vdev_by_addr(wma_handle,
-				   pDelPeriodicTxPtrnParams->mac_address.bytes,
-				   &vdev_id)) {
+	if (wma_find_vdev_id_by_addr(
+			wma_handle,
+			pDelPeriodicTxPtrnParams->mac_address.bytes,
+			&vdev_id)) {
 		WMA_LOGE("%s: Failed to find vdev id for %pM", __func__,
 			 pDelPeriodicTxPtrnParams->mac_address.bytes);
 		return QDF_STATUS_E_INVAL;
@@ -3792,11 +3782,8 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
 {
 	tp_wma_handle wma_handle = (tp_wma_handle) handle;
 	uint32_t i;
-	struct cdp_pdev *pdev;
-	void *peer, *vdev;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	struct tdls_peer_params *peer_cap;
-	uint8_t *peer_mac_addr;
 	int ret = 0;
 	uint32_t *ch_mhz = NULL;
 	size_t ch_mhz_len;
@@ -3844,30 +3831,10 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
 		}
 	}
 
-	/* Make sure that peer exists before sending peer state cmd*/
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE("%s: Failed to find pdev", __func__);
-		ret = -EIO;
-		goto end_tdls_peer_state;
-	}
-
-	peer = cdp_peer_find_by_addr(soc,
-				     pdev,
-				     peer_state->peer_macaddr);
-	if (!peer) {
-		WMA_LOGE("%s: Failed to get peer handle using peer mac %pM",
-				__func__, peer_state->peer_macaddr);
-		ret = -EIO;
-		goto end_tdls_peer_state;
-	}
-
-	cdp_peer_set_tdls_offchan_enabled(soc,
-					  peer,
+	cdp_peer_set_tdls_offchan_enabled(soc, peer_state->vdev_id,
+					  peer_state->peer_macaddr,
 					  !!peer_cap->peer_off_chan_support);
 
-	vdev = cdp_peer_get_vdev(soc, peer);
-
 	if (wmi_unified_update_tdls_peer_state_cmd(wma_handle->wmi_handle,
 						   peer_state,
 						   ch_mhz)) {
@@ -3879,36 +3846,31 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
 
 	/* in case of teardown, remove peer from fw */
 	if (TDLS_PEER_STATE_TEARDOWN == peer_state->peer_state) {
-		peer_mac_addr = cdp_peer_get_peer_mac_addr(soc, peer);
-		if (!peer_mac_addr) {
-			WMA_LOGE("peer_mac_addr is NULL");
-			ret = -EIO;
-			goto end_tdls_peer_state;
-		}
-
 		restore_last_peer = cdp_peer_is_vdev_restore_last_peer(
-						soc, peer);
+						soc,
+						peer_state->vdev_id,
+						peer_state->peer_macaddr);
 
 		wma_debug("calling wma_remove_peer for peer " QDF_MAC_ADDR_STR
 			 " vdevId: %d",
-			 QDF_MAC_ADDR_ARRAY(peer_mac_addr),
+			 QDF_MAC_ADDR_ARRAY(peer_state->peer_macaddr),
 			 peer_state->vdev_id);
-		qdf_status = wma_remove_peer(wma_handle, peer_mac_addr,
-					     peer_state->vdev_id, peer, false);
+		qdf_status = wma_remove_peer(wma_handle,
+					     peer_state->peer_macaddr,
+					     peer_state->vdev_id, false);
 		if (QDF_IS_STATUS_ERROR(qdf_status)) {
 			WMA_LOGE(FL("wma_remove_peer failed"));
 			ret = -EINVAL;
 			goto end_tdls_peer_state;
 		}
-		cdp_peer_update_last_real_peer(soc, pdev, vdev,
+		cdp_peer_update_last_real_peer(soc, WMI_PDEV_ID_SOC,
+					       peer_state->vdev_id,
 					       restore_last_peer);
 	}
 
 	if (TDLS_PEER_STATE_CONNECTED == peer_state->peer_state) {
-		peer_mac_addr = cdp_peer_get_peer_mac_addr(soc, peer);
-		if (peer_mac_addr)
-			cdp_peer_state_update(soc, pdev, peer_mac_addr,
-					      OL_TXRX_PEER_STATE_AUTH);
+		cdp_peer_state_update(soc, peer_state->peer_macaddr,
+				      OL_TXRX_PEER_STATE_AUTH);
 	}
 
 end_tdls_peer_state:

+ 19 - 64
core/wma/src/wma_mgmt.c

@@ -87,7 +87,6 @@
 /**
  * wma_send_bcn_buf_ll() - prepare and send beacon buffer to fw for LL
  * @wma: wma handle
- * @pdev: txrx pdev
  * @vdev_id: vdev id
  * @param_buf: SWBA parameters
  *
@@ -95,7 +94,6 @@
  */
 #ifdef WLAN_WMI_BCN
 static void wma_send_bcn_buf_ll(tp_wma_handle wma,
-				struct cdp_pdev *pdev,
 				uint8_t vdev_id,
 				WMI_HOST_SWBA_EVENTID_param_tlvs *param_buf)
 {
@@ -252,7 +250,6 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
 #else
 static inline void
 wma_send_bcn_buf_ll(tp_wma_handle wma,
-		    struct cdp_pdev *pdev,
 		    uint8_t vdev_id,
 		    WMI_HOST_SWBA_EVENTID_param_tlvs *param_buf)
 {
@@ -276,7 +273,6 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len)
 	WMI_HOST_SWBA_EVENTID_param_tlvs *param_buf;
 	wmi_host_swba_event_fixed_param *swba_event;
 	uint32_t vdev_map;
-	struct cdp_pdev *pdev;
 	uint8_t vdev_id = 0;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
@@ -288,12 +284,6 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len)
 	swba_event = param_buf->fixed_param;
 	vdev_map = swba_event->vdev_map;
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE("%s: pdev is NULL", __func__);
-		return -EINVAL;
-	}
-
 	WMA_LOGD("vdev_map = %d", vdev_map);
 	for (; vdev_map && vdev_id < wma->max_bssid;
 			vdev_id++, vdev_map >>= 1) {
@@ -301,7 +291,7 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len)
 			continue;
 		if (!cdp_cfg_is_high_latency(soc,
 			(struct cdp_cfg *)cds_get_context(QDF_MODULE_ID_CFG)))
-			wma_send_bcn_buf_ll(wma, pdev, vdev_id, param_buf);
+			wma_send_bcn_buf_ll(wma, vdev_id, param_buf);
 		break;
 	}
 	return 0;
@@ -336,8 +326,6 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 	WMI_PEER_STA_KICKOUT_EVENTID_param_tlvs *param_buf = NULL;
 	wmi_peer_sta_kickout_event_fixed_param *kickout_event = NULL;
 	uint8_t vdev_id, macaddr[QDF_MAC_ADDR_SIZE];
-	void *peer;
-	struct cdp_pdev *pdev;
 	tpDeleteStaContext del_sta_ctx;
 	struct ibss_peer_inactivity_ind *inactivity;
 	uint8_t *addr, *bssid;
@@ -347,19 +335,9 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 	WMA_LOGD("%s: Enter", __func__);
 	param_buf = (WMI_PEER_STA_KICKOUT_EVENTID_param_tlvs *) event;
 	kickout_event = param_buf->fixed_param;
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE("%s: pdev is NULL", __func__);
-		return -EINVAL;
-	}
 	WMI_MAC_ADDR_TO_CHAR_ARRAY(&kickout_event->peer_macaddr, macaddr);
-	peer = cdp_peer_find_by_addr(soc, pdev, macaddr);
-	if (!peer) {
-		WMA_LOGE("PEER [%pM] not found", macaddr);
-		return -EINVAL;
-	}
-
-	if (cdp_peer_get_vdevid(soc, peer, &vdev_id) != QDF_STATUS_SUCCESS) {
+	if (cdp_peer_get_vdevid(soc, macaddr, &vdev_id) !=
+			QDF_STATUS_SUCCESS) {
 		WMA_LOGE("Not able to find BSSID for peer [%pM]", macaddr);
 		return -EINVAL;
 	}
@@ -960,7 +938,6 @@ static inline uint8_t wma_parse_mpdudensity(uint8_t mpdudensity)
 
 /**
  * wma_unified_peer_state_update() - update peer state
- * @pdev: pdev handle
  * @sta_mac: pointer to sta mac addr
  * @bss_addr: bss address
  * @sta_type: sta entry type
@@ -970,7 +947,6 @@ static inline uint8_t wma_parse_mpdudensity(uint8_t mpdudensity)
  */
 static void
 wma_unified_peer_state_update(
-	struct cdp_pdev *pdev,
 	uint8_t *sta_mac,
 	uint8_t *bss_addr,
 	uint8_t sta_type)
@@ -978,24 +954,23 @@ wma_unified_peer_state_update(
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	if (STA_ENTRY_TDLS_PEER == sta_type)
-		cdp_peer_state_update(soc, pdev, sta_mac,
-					  OL_TXRX_PEER_STATE_AUTH);
+		cdp_peer_state_update(soc, sta_mac,
+				      OL_TXRX_PEER_STATE_AUTH);
 	else
-		cdp_peer_state_update(soc, pdev, bss_addr,
-					  OL_TXRX_PEER_STATE_AUTH);
+		cdp_peer_state_update(soc, bss_addr,
+				      OL_TXRX_PEER_STATE_AUTH);
 }
 #else
 
 static inline void
 wma_unified_peer_state_update(
-	struct cdp_pdev *pdev,
 	uint8_t *sta_mac,
 	uint8_t *bss_addr,
 	uint8_t sta_type)
 {
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
-	cdp_peer_state_update(soc, pdev, bss_addr, OL_TXRX_PEER_STATE_AUTH);
+	cdp_peer_state_update(soc, bss_addr, OL_TXRX_PEER_STATE_AUTH);
 }
 #endif
 
@@ -1341,7 +1316,6 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
 				    tSirNwType nw_type,
 				    tpAddStaParams params)
 {
-	struct cdp_pdev *pdev;
 	struct peer_assoc_params *cmd;
 	int32_t ret, max_rates, i;
 	uint8_t *rate_pos;
@@ -1364,14 +1338,6 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
 
 	intr = &wma->interfaces[params->smesessionId];
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-
-	if (!pdev) {
-		WMA_LOGE("%s: Failed to get pdev", __func__);
-		qdf_mem_free(cmd);
-		return QDF_STATUS_E_INVAL;
-	}
-
 	wma_mask_tx_ht_rate(wma, params->supportedRates.supportedMCSSet);
 
 	qdf_mem_zero(&peer_legacy_rates, sizeof(wmi_rate_set));
@@ -1577,7 +1543,7 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
 	if (params->wpa_rsn >> 1)
 		cmd->need_gtk_2_way = 1;
 
-	wma_unified_peer_state_update(pdev, params->staMac,
+	wma_unified_peer_state_update(params->staMac,
 				      params->bssId, params->staType);
 
 #ifdef FEATURE_WLAN_WAPI
@@ -2017,7 +1983,6 @@ void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
 				      uint8_t vdev_id,
 				      int8_t peer_num_delta)
 {
-	struct cdp_vdev *vdev;
 	int16_t new_peer_num;
 	uint16_t new_timer_value_sec;
 	uint32_t new_timer_value_ms;
@@ -2029,16 +1994,10 @@ void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
 		return;
 	}
 
-	vdev = wma_find_vdev_by_id(wma, vdev_id);
-	if (!vdev) {
-		WMA_LOGE("vdev not found : vdev_id %d", vdev_id);
-		return;
-	}
-
 	/* adjust peer numbers */
-	new_peer_num = cdp_peer_update_ibss_add_peer_num_of_vdev(soc, vdev,
-								 peer_num_delta
-								 );
+	new_peer_num = cdp_peer_update_ibss_add_peer_num_of_vdev(
+								soc, vdev_id,
+								peer_num_delta);
 	if (OL_TXRX_INVALID_NUM_PEERS == new_peer_num) {
 		WMA_LOGE("new peer num %d out of valid boundary", new_peer_num);
 		return;
@@ -2447,7 +2406,6 @@ static int wma_p2p_go_set_beacon_ie(t_wma_handle *wma_handle,
 void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
 				    tpSendProbeRespParams probe_rsp_info)
 {
-	struct cdp_vdev *vdev;
 	uint8_t vdev_id;
 	struct sAniProbeRspStruct *probe_rsp;
 
@@ -2463,9 +2421,8 @@ void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
 		return;
 	}
 
-	vdev = wma_find_vdev_by_addr(wma, probe_rsp->macHdr.sa, &vdev_id);
-	if (!vdev) {
-		WMA_LOGE(FL("failed to get vdev handle"));
+	if (wma_find_vdev_id_by_addr(wma, probe_rsp->macHdr.sa, &vdev_id)) {
+		WMA_LOGE(FL("failed to get vdev id"));
 		return;
 	}
 
@@ -2517,7 +2474,6 @@ QDF_STATUS wma_set_ap_vdev_up(tp_wma_handle wma, uint8_t vdev_id)
  */
 void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
 {
-	struct cdp_vdev *vdev;
 	uint8_t vdev_id;
 	QDF_STATUS status;
 	uint8_t *p2p_ie;
@@ -2525,9 +2481,8 @@ void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
 
 	WMA_LOGD("Beacon update reason %d", bcn_info->reason);
 	beacon = (struct sAniBeaconStruct *) (bcn_info->beacon);
-	vdev = wma_find_vdev_by_addr(wma, beacon->macHdr.sa, &vdev_id);
-	if (!vdev) {
-		WMA_LOGE("%s : failed to get vdev handle", __func__);
+	if (wma_find_vdev_id_by_addr(wma, beacon->macHdr.sa, &vdev_id)) {
+		WMA_LOGE("%s : failed to get vdev id", __func__);
 		status = QDF_STATUS_E_INVAL;
 		goto send_rsp;
 	}
@@ -3106,7 +3061,7 @@ wma_is_ccmp_pn_replay_attack(void *cds_ctx, struct ieee80211_frame *wh,
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	bool ret = false;
 
-	if (!wma_find_vdev_by_bssid(cds_ctx, wh->i_addr3, &vdev_id)) {
+	if (wma_find_vdev_id_by_bssid(cds_ctx, wh->i_addr3, &vdev_id)) {
 		WMA_LOGE("%s: Failed to find vdev", __func__);
 		return true;
 	}
@@ -3634,8 +3589,8 @@ int wma_form_rx_packet(qdf_nbuf_t buf,
 	    (mgt_subtype == MGMT_SUBTYPE_DISASSOC ||
 	     mgt_subtype == MGMT_SUBTYPE_DEAUTH ||
 	     mgt_subtype == MGMT_SUBTYPE_ACTION)) {
-		if (wma_find_vdev_by_bssid(
-			wma_handle, wh->i_addr3, &vdev_id)) {
+		if (wma_find_vdev_id_by_bssid(wma_handle, wh->i_addr3,
+					      &vdev_id) == QDF_STATUS_SUCCESS) {
 			status = wma_check_and_process_rmf_frame(wma_handle,
 								 vdev_id,
 								 &wh,

+ 15 - 60
core/wma/src/wma_nan_datapath.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2020 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
@@ -45,36 +45,17 @@
 void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
 {
 	enum ol_txrx_peer_state state = OL_TXRX_PEER_STATE_CONN;
-	struct cdp_pdev *pdev;
-	struct cdp_vdev *vdev;
-	void *peer;
+	uint8_t pdev_id = WMI_PDEV_ID_SOC;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	QDF_STATUS status;
 	struct wma_txrx_node *iface;
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-
-	if (!pdev) {
-		WMA_LOGE(FL("Failed to find pdev"));
-		add_sta->status = QDF_STATUS_E_FAILURE;
-		goto send_rsp;
-	}
-
-	vdev = wma_find_vdev_by_id(wma, add_sta->smesessionId);
-	if (!vdev) {
-		WMA_LOGE(FL("Failed to find vdev"));
-		add_sta->status = QDF_STATUS_E_FAILURE;
-		goto send_rsp;
-	}
-
-	iface = &wma->interfaces[cdp_get_vdev_id(soc, vdev)];
+	iface = &wma->interfaces[add_sta->smesessionId];
 	wma_debug("vdev: %d, peer_mac_addr: "QDF_MAC_ADDR_STR,
 		add_sta->smesessionId, QDF_MAC_ADDR_ARRAY(add_sta->staMac));
 
-	peer = cdp_peer_find_by_addr_and_vdev(soc,
-			pdev, vdev,
-			add_sta->staMac);
-	if (peer) {
+	if (cdp_find_peer_exist_on_vdev(soc, add_sta->smesessionId,
+					add_sta->staMac)) {
 		WMA_LOGE(FL("NDI peer already exists, peer_addr %pM"),
 			 add_sta->staMac);
 		add_sta->status = QDF_STATUS_E_EXISTS;
@@ -88,16 +69,14 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
 	 * exists on the pDev. As this peer belongs to other vDevs, just return
 	 * here.
 	 */
-	peer = cdp_peer_find_by_addr(soc, pdev, add_sta->staMac);
-	if (peer) {
-		WMA_LOGE(FL("vdev:%d, peer exists on other vdev with peer_addr %pM"),
-			 cdp_get_vdev_id(soc, vdev),
-			add_sta->staMac);
+	if (cdp_find_peer_exist(soc, pdev_id, add_sta->staMac)) {
+		WMA_LOGE(FL("peer exists on other vdev with peer_addr %pM"),
+			 add_sta->staMac);
 		add_sta->status = QDF_STATUS_E_EXISTS;
 		goto send_rsp;
 	}
 
-	status = wma_create_peer(wma, pdev, vdev, add_sta->staMac,
+	status = wma_create_peer(wma, add_sta->staMac,
 				 WMI_PEER_TYPE_NAN_DATA, add_sta->smesessionId,
 				 false);
 	if (status != QDF_STATUS_SUCCESS) {
@@ -106,20 +85,18 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
 		goto send_rsp;
 	}
 
-	peer = cdp_peer_find_by_addr_and_vdev(soc,
-			pdev, vdev,
-			add_sta->staMac);
-	if (!peer) {
+	if (!cdp_find_peer_exist_on_vdev(soc, add_sta->smesessionId,
+					 add_sta->staMac)) {
 		WMA_LOGE(FL("Failed to find peer handle using peer mac %pM"),
 			 add_sta->staMac);
 		add_sta->status = QDF_STATUS_E_FAILURE;
 		wma_remove_peer(wma, add_sta->staMac, add_sta->smesessionId,
-				peer, false);
+				false);
 		goto send_rsp;
 	}
 
 	WMA_LOGD(FL("Moving peer %pM to state %d"), add_sta->staMac, state);
-	cdp_peer_state_update(soc, pdev, add_sta->staMac, state);
+	cdp_peer_state_update(soc, add_sta->staMac, state);
 
 	add_sta->nss    = iface->nss;
 	add_sta->status = QDF_STATUS_SUCCESS;
@@ -141,32 +118,10 @@ send_rsp:
 void wma_delete_sta_req_ndi_mode(tp_wma_handle wma,
 					tpDeleteStaParams del_sta)
 {
-	struct cdp_pdev *pdev;
-	void *peer;
-	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE(FL("Failed to get pdev"));
-		del_sta->status = QDF_STATUS_E_FAILURE;
-		goto send_del_rsp;
-	}
-
-	peer = cdp_peer_find_by_addr(cds_get_context(QDF_MODULE_ID_SOC),
-				     pdev, del_sta->staMac);
-	if (!peer) {
-		WMA_LOGE(FL("Failed to get peer handle using peer mac "
-			 QDF_MAC_ADDR_STR),
-			 QDF_MAC_ADDR_ARRAY(del_sta->staMac));
-		del_sta->status = QDF_STATUS_E_FAILURE;
-		goto send_del_rsp;
-	}
-
-	wma_remove_peer(wma, cdp_peer_get_peer_mac_addr(soc, peer),
-			del_sta->smesessionId, peer, false);
+	wma_remove_peer(wma, wma->peer_macaddr.bytes,
+			del_sta->smesessionId, false);
 	del_sta->status = QDF_STATUS_SUCCESS;
 
-send_del_rsp:
 	if (del_sta->respReqd) {
 		WMA_LOGD(FL("Sending del rsp to umac (status: %d)"),
 				del_sta->status);

+ 16 - 19
core/wma/src/wma_power.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2020 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
@@ -336,22 +336,21 @@ void wma_set_tx_power(WMA_HANDLE handle,
 	tp_wma_handle wma_handle = (tp_wma_handle) handle;
 	uint8_t vdev_id;
 	QDF_STATUS ret = QDF_STATUS_E_FAILURE;
-	struct cdp_vdev *vdev;
 	int8_t max_reg_power;
 	struct wma_txrx_node *iface;
 
 	if (tx_pwr_params->dev_mode == QDF_SAP_MODE ||
 	    tx_pwr_params->dev_mode == QDF_P2P_GO_MODE) {
-		vdev = wma_find_vdev_by_addr(wma_handle,
-					     tx_pwr_params->bssId.bytes,
-					     &vdev_id);
+		ret = wma_find_vdev_id_by_addr(wma_handle,
+					       tx_pwr_params->bssId.bytes,
+					       &vdev_id);
 	} else {
-		vdev = wma_find_vdev_by_bssid(wma_handle,
-					      tx_pwr_params->bssId.bytes,
-					      &vdev_id);
+		ret = wma_find_vdev_id_by_bssid(wma_handle,
+						tx_pwr_params->bssId.bytes,
+						&vdev_id);
 	}
-	if (!vdev) {
-		WMA_LOGE("vdev handle is invalid for %pM",
+	if (ret) {
+		WMA_LOGE("vdev id is invalid for %pM",
 			 tx_pwr_params->bssId.bytes);
 		qdf_mem_free(tx_pwr_params);
 		return;
@@ -415,21 +414,19 @@ void wma_set_max_tx_power(WMA_HANDLE handle,
 	tp_wma_handle wma_handle = (tp_wma_handle) handle;
 	uint8_t vdev_id;
 	QDF_STATUS ret = QDF_STATUS_E_FAILURE;
-	struct cdp_vdev *vdev;
 	int8_t prev_max_power;
 	int8_t max_reg_power;
 	struct wma_txrx_node *iface;
 
-	vdev = wma_find_vdev_by_addr(wma_handle, tx_pwr_params->bssId.bytes,
-				     &vdev_id);
-	if (!vdev) {
+	if (wma_find_vdev_id_by_addr(wma_handle, tx_pwr_params->bssId.bytes,
+				     &vdev_id)) {
 		/* not in SAP array. Try the station/p2p array */
-		vdev = wma_find_vdev_by_bssid(wma_handle,
-					      tx_pwr_params->bssId.bytes,
-					      &vdev_id);
+		ret = wma_find_vdev_id_by_bssid(wma_handle,
+						tx_pwr_params->bssId.bytes,
+						&vdev_id);
 	}
-	if (!vdev) {
-		WMA_LOGE("vdev handle is invalid for %pM",
+	if (ret) {
+		WMA_LOGE("vdev id is invalid for %pM",
 			 tx_pwr_params->bssId.bytes);
 		qdf_mem_free(tx_pwr_params);
 		return;

+ 1 - 0
core/wma/src/wma_scan_roam.c

@@ -35,6 +35,7 @@
 #include "wni_cfg.h"
 #include <cdp_txrx_peer_ops.h>
 #include <cdp_txrx_cfg.h>
+#include <cdp_txrx_ctrl.h>
 
 #include "qdf_nbuf.h"
 #include "qdf_types.h"

+ 3 - 12
core/wma/src/wma_utils.c

@@ -4218,8 +4218,7 @@ QDF_STATUS wma_get_roam_scan_stats(WMA_HANDLE handle,
 void wma_remove_bss_peer_on_vdev_start_failure(tp_wma_handle wma,
 					       uint8_t vdev_id)
 {
-	struct cdp_pdev *pdev;
-	void *peer = NULL;
+	uint8_t pdev_id = WMI_PDEV_ID_SOC;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	QDF_STATUS status;
 	struct qdf_mac_addr bss_peer;
@@ -4235,21 +4234,13 @@ void wma_remove_bss_peer_on_vdev_start_failure(tp_wma_handle wma,
 
 	WMA_LOGE("%s: ADD BSS failure for vdev %d", __func__, vdev_id);
 
-	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE("%s: Failed to get pdev", __func__);
-		return;
-	}
-
-	peer = cdp_peer_find_by_addr(soc, pdev, bss_peer.bytes);
-
-	if (!peer) {
+	if (!cdp_find_peer_exist(soc, pdev_id, bss_peer.bytes)) {
 		WMA_LOGE("%s Failed to find peer %pM",
 			 __func__, bss_peer.bytes);
 		return;
 	}
 
-	wma_remove_peer(wma, bss_peer.bytes, vdev_id, peer, false);
+	wma_remove_peer(wma, bss_peer.bytes, vdev_id, false);
 }
 
 QDF_STATUS wma_sta_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio