Explorar o código

qcacmn: Remove lock requirement for trivial APIs

Function headers updated to reflect lock requirement removal

Change-Id: I67ff64253abc402d41d3e19f3579dcf76b15067a
CRs-Fixed: 2060880
Srinivas Pitla %!s(int64=8) %!d(string=hai) anos
pai
achega
adbe5caff0

+ 0 - 30
umac/cmn_services/obj_mgr/inc/wlan_objmgr_pdev_obj.h

@@ -384,8 +384,6 @@ struct wlan_objmgr_vdev *wlan_objmgr_get_vdev_by_macaddr_from_pdev_no_state(
  *
  * API to get component private object
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void *ptr on SUCCESS
  *         NULL on Failure
  */
@@ -428,8 +426,6 @@ static inline void wlan_pdev_obj_unlock(struct wlan_objmgr_pdev *pdev)
  *
  * API to get the psoc object from PDEV
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return:
  * @psoc: PSOC object
  */
@@ -447,8 +443,6 @@ static inline struct wlan_objmgr_psoc *wlan_pdev_get_psoc(
  *
  * API to set the psoc object from PDEV
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_pdev_set_psoc(struct wlan_objmgr_pdev *pdev,
@@ -465,8 +459,6 @@ static inline void wlan_pdev_set_psoc(struct wlan_objmgr_pdev *pdev,
  *
  * API to set fw caps in pdev
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_pdev_nif_fw_cap_set(struct wlan_objmgr_pdev *pdev,
@@ -483,8 +475,6 @@ static inline void wlan_pdev_nif_fw_cap_set(struct wlan_objmgr_pdev *pdev,
  *
  * API to clear fw caps in pdev
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_pdev_nif_fw_cap_clear(struct wlan_objmgr_pdev *pdev,
@@ -501,8 +491,6 @@ static inline void wlan_pdev_nif_fw_cap_clear(struct wlan_objmgr_pdev *pdev,
  *
  * API to know, whether particular fw caps flag is set in pdev
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: 1 (for set) or 0 (for not set)
  */
 static inline uint8_t wlan_pdev_nif_fw_cap_get(struct wlan_objmgr_pdev *pdev,
@@ -519,8 +507,6 @@ static inline uint8_t wlan_pdev_nif_fw_cap_get(struct wlan_objmgr_pdev *pdev,
  *
  * API to set feat caps in pdev
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_pdev_nif_feat_cap_set(struct wlan_objmgr_pdev *pdev,
@@ -537,8 +523,6 @@ static inline void wlan_pdev_nif_feat_cap_set(struct wlan_objmgr_pdev *pdev,
  *
  * API to clear feat caps in pdev
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_pdev_nif_feat_cap_clear(struct wlan_objmgr_pdev *pdev,
@@ -555,8 +539,6 @@ static inline void wlan_pdev_nif_feat_cap_clear(struct wlan_objmgr_pdev *pdev,
  *
  * API to know, whether particular feat caps flag is set in pdev
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: 1 (for set) or 0 (for not set)
  */
 static inline uint8_t wlan_pdev_nif_feat_cap_get(struct wlan_objmgr_pdev *pdev,
@@ -611,8 +593,6 @@ static inline void wlan_pdev_set_hw_macaddr(struct wlan_objmgr_pdev *pdev,
  *
  * API to get OS private pointer from PDEV
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: ospriv - private pointer
  */
 static inline struct pdev_osif_priv *wlan_pdev_get_ospriv(
@@ -628,8 +608,6 @@ static inline struct pdev_osif_priv *wlan_pdev_get_ospriv(
  *
  * API to reset OS private pointer in PDEV
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_pdev_reset_ospriv(struct wlan_objmgr_pdev *pdev)
@@ -645,8 +623,6 @@ static inline void wlan_pdev_reset_ospriv(struct wlan_objmgr_pdev *pdev)
  *
  * API to set Max vdev count
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_pdev_set_max_vdev_count(struct wlan_objmgr_pdev *pdev,
@@ -662,8 +638,6 @@ static inline void wlan_pdev_set_max_vdev_count(struct wlan_objmgr_pdev *pdev,
  *
  * API to set Max vdev count
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: @vdev count: Max vdev count
  */
 static inline uint8_t wlan_pdev_get_max_vdev_count(
@@ -756,8 +730,6 @@ void wlan_objmgr_pdev_release_ref(struct wlan_objmgr_pdev *pdev,
  *
  * API to get pdev id from pdev object
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: @pdev id
  */
 static inline
@@ -794,8 +766,6 @@ static inline void wlan_pdev_set_tgt_if_handle(struct wlan_objmgr_pdev *pdev,
  *
  * API to get target interface handle from pdev object
  *
- * Caller need to acquire lock with wlan_pdev_obj_lock()
- *
  * Return: target interface handle
  */
 static inline void *wlan_pdev_get_tgt_if_handle(struct wlan_objmgr_pdev *pdev)

+ 0 - 24
umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h

@@ -296,8 +296,6 @@ QDF_STATUS wlan_objmgr_trigger_peer_comp_priv_object_deletion(
  *
  * API to get component private object
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: void *ptr on SUCCESS
  *         NULL on Failure
  */
@@ -563,8 +561,6 @@ static inline void wlan_peer_set_next_peer_of_psoc(qdf_list_t *peer_list,
  *
  * API to set peer type
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_peer_set_peer_type(struct wlan_objmgr_peer *peer,
@@ -580,8 +576,6 @@ static inline void wlan_peer_set_peer_type(struct wlan_objmgr_peer *peer,
  *
  * API to get peer type
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return:
  * @peer_type: type of PEER
  */
@@ -633,8 +627,6 @@ static inline uint8_t *wlan_peer_get_macaddr(struct wlan_objmgr_peer *peer)
  *
  * API to get peer's vdev
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return:
  * @vdev: VDEV object
  */
@@ -652,8 +644,6 @@ static inline struct wlan_objmgr_vdev *wlan_peer_get_vdev(
  *
  * API to set peer's vdev
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_peer_set_vdev(struct wlan_objmgr_peer *peer,
@@ -670,8 +660,6 @@ static inline void wlan_peer_set_vdev(struct wlan_objmgr_peer *peer,
  *
  * API to set flag in peer
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_peer_mlme_flag_set(struct wlan_objmgr_peer *peer,
@@ -688,8 +676,6 @@ static inline void wlan_peer_mlme_flag_set(struct wlan_objmgr_peer *peer,
  *
  * API to clear flag in peer
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_peer_mlme_flag_clear(struct wlan_objmgr_peer *peer,
@@ -706,8 +692,6 @@ static inline void wlan_peer_mlme_flag_clear(struct wlan_objmgr_peer *peer,
  *
  * API to know, whether particular flag is set in peer
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: 1 (for set) or 0 (for not set)
  */
 static inline uint8_t wlan_peer_mlme_flag_get(struct wlan_objmgr_peer *peer,
@@ -724,8 +708,6 @@ static inline uint8_t wlan_peer_mlme_flag_get(struct wlan_objmgr_peer *peer,
  *
  * API to update the current peer state
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_peer_mlme_set_state(
@@ -743,8 +725,6 @@ static inline void wlan_peer_mlme_set_state(
  *
  * API to update the current peer auth state
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_peer_mlme_set_auth_state(
@@ -761,8 +741,6 @@ static inline void wlan_peer_mlme_set_auth_state(
  *
  * API to get peer state
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: enum wlan_peer_state
  */
 static inline enum wlan_peer_state wlan_peer_mlme_get_state(
@@ -778,8 +756,6 @@ static inline enum wlan_peer_state wlan_peer_mlme_get_state(
  *
  * API to get peer auth state
  *
- * Caller need to acquire lock with wlan_peer_obj_lock()
- *
  * Return: auth state true/false
  */
 static inline bool wlan_peer_mlme_get_auth_state(

+ 5 - 40
umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h

@@ -759,8 +759,6 @@ static inline void wlan_psoc_obj_unlock(struct wlan_objmgr_psoc *psoc)
  *
  * API to set nif phy version in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_set_nif_phy_version(struct wlan_objmgr_psoc *psoc,
@@ -776,8 +774,6 @@ static inline void wlan_psoc_set_nif_phy_version(struct wlan_objmgr_psoc *psoc,
  *
  * API to set nif phy version in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: @phy_ver: phy version
  */
 static inline uint32_t wlan_psoc_get_nif_phy_version(
@@ -786,6 +782,7 @@ static inline uint32_t wlan_psoc_get_nif_phy_version(
 	/* This API is invoked with lock acquired, do not add log prints */
 	if (psoc == NULL)
 		return (uint32_t)-1;
+
 	return psoc->soc_nif.phy_version;
 }
 
@@ -796,8 +793,6 @@ static inline uint32_t wlan_psoc_get_nif_phy_version(
  *
  * API to set dev type in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_set_dev_type(struct wlan_objmgr_psoc *psoc,
@@ -813,8 +808,6 @@ static inline void wlan_psoc_set_dev_type(struct wlan_objmgr_psoc *psoc,
  *
  * API to get dev type in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: phy type (OL/DA)
  */
 static inline WLAN_DEV_TYPE wlan_objmgr_psoc_get_dev_type(
@@ -823,6 +816,7 @@ static inline WLAN_DEV_TYPE wlan_objmgr_psoc_get_dev_type(
 	/* This API is invoked with lock acquired, do not add log prints */
 	if (psoc == NULL)
 		return (uint32_t)-1;
+
 	return psoc->soc_nif.phy_type;
 }
 
@@ -833,8 +827,6 @@ static inline WLAN_DEV_TYPE wlan_objmgr_psoc_get_dev_type(
  *
  * API to set fw caps in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_nif_fw_cap_set(struct wlan_objmgr_psoc *psoc,
@@ -851,8 +843,6 @@ static inline void wlan_psoc_nif_fw_cap_set(struct wlan_objmgr_psoc *psoc,
  *
  * API to clear fw caps in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_nif_fw_cap_clear(struct wlan_objmgr_psoc *psoc,
@@ -869,8 +859,6 @@ static inline void wlan_psoc_nif_fw_cap_clear(struct wlan_objmgr_psoc *psoc,
  *
  * API to know, whether particular fw caps flag is set in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: 1 (for set) or 0 (for not set)
  */
 static inline uint8_t wlan_psoc_nif_fw_cap_get(struct wlan_objmgr_psoc *psoc,
@@ -887,8 +875,6 @@ static inline uint8_t wlan_psoc_nif_fw_cap_get(struct wlan_objmgr_psoc *psoc,
  *
  * API to set fw ext caps in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_nif_fw_ext_cap_set(struct wlan_objmgr_psoc *psoc,
@@ -905,8 +891,6 @@ static inline void wlan_psoc_nif_fw_ext_cap_set(struct wlan_objmgr_psoc *psoc,
  *
  * API to clear fw ext caps in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_nif_fw_ext_cap_clear(struct wlan_objmgr_psoc *psoc,
@@ -923,8 +907,6 @@ static inline void wlan_psoc_nif_fw_ext_cap_clear(struct wlan_objmgr_psoc *psoc,
  *
  * API to know, whether particular fw caps flag is set in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: 1 (for set) or 0 (for not set)
  */
 static inline uint8_t wlan_psoc_nif_fw_ext_cap_get(
@@ -941,8 +923,6 @@ static inline uint8_t wlan_psoc_nif_fw_ext_cap_get(
  *
  * API to set feature caps in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_nif_feat_cap_set(struct wlan_objmgr_psoc *psoc,
@@ -959,8 +939,6 @@ static inline void wlan_psoc_nif_feat_cap_set(struct wlan_objmgr_psoc *psoc,
  *
  * API to clear feature caps in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_psoc_nif_feat_cap_clear(struct wlan_objmgr_psoc *psoc,
@@ -977,8 +955,6 @@ static inline void wlan_psoc_nif_feat_cap_clear(struct wlan_objmgr_psoc *psoc,
  *
  * API to know, whether particular feature cap flag is set in psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: 1 (for set) or 0 (for not set)
  */
 static inline uint8_t wlan_psoc_nif_feat_cap_get(struct wlan_objmgr_psoc *psoc,
@@ -1013,8 +989,6 @@ static inline void wlan_psoc_set_hw_macaddr(struct wlan_objmgr_psoc *psoc,
  *
  * API to set hw macaddr of psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: hw macaddr
  */
 static inline uint8_t *wlan_psoc_get_hw_macaddr(struct wlan_objmgr_psoc *psoc)
@@ -1022,6 +996,7 @@ static inline uint8_t *wlan_psoc_get_hw_macaddr(struct wlan_objmgr_psoc *psoc)
 	/* This API is invoked with lock acquired, do not add log prints */
 	if (psoc == NULL)
 		return NULL;
+
 	return psoc->soc_nif.soc_hw_macaddr;
 }
 
@@ -1033,8 +1008,6 @@ static inline uint8_t *wlan_psoc_get_hw_macaddr(struct wlan_objmgr_psoc *psoc)
  * This API is used to get the component private object pointer tied to the
  * corresponding psoc object
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: Component private object
  */
 void *wlan_objmgr_psoc_get_comp_private_obj(struct wlan_objmgr_psoc *psoc,
@@ -1045,8 +1018,6 @@ void *wlan_objmgr_psoc_get_comp_private_obj(struct wlan_objmgr_psoc *psoc,
  *
  * API to get number of pdev's attached to the psoc
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: number of pdev's
  */
 static inline uint8_t wlan_psoc_get_pdev_count(struct wlan_objmgr_psoc *psoc)
@@ -1065,8 +1036,6 @@ static inline uint8_t wlan_psoc_get_pdev_count(struct wlan_objmgr_psoc *psoc)
  *
  * API to set target interface handle in psoc object
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: None
  */
 static inline void wlan_psoc_set_tgt_if_handle(struct wlan_objmgr_psoc *psoc,
@@ -1075,6 +1044,7 @@ static inline void wlan_psoc_set_tgt_if_handle(struct wlan_objmgr_psoc *psoc,
 	/* This API is invoked with lock acquired, do not add log prints */
 	if (psoc == NULL)
 		return;
+
 	psoc->tgt_if_handle = tgt_if_handle;
 }
 
@@ -1084,8 +1054,6 @@ static inline void wlan_psoc_set_tgt_if_handle(struct wlan_objmgr_psoc *psoc,
  *
  * API to get target interface handle from psoc object
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: target interface handle
  */
 static inline void *wlan_psoc_get_tgt_if_handle(struct wlan_objmgr_psoc *psoc)
@@ -1093,6 +1061,7 @@ static inline void *wlan_psoc_get_tgt_if_handle(struct wlan_objmgr_psoc *psoc)
 	/* This API is invoked with lock acquired, do not add log prints */
 	if (psoc == NULL)
 		return NULL;
+
 	return psoc->tgt_if_handle;
 }
 
@@ -1102,8 +1071,6 @@ static inline void *wlan_psoc_get_tgt_if_handle(struct wlan_objmgr_psoc *psoc)
  *
  * API to get qdf device from psoc object
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: qdf_device_t
  */
 static inline qdf_device_t wlan_psoc_get_qdf_dev(
@@ -1123,8 +1090,6 @@ static inline qdf_device_t wlan_psoc_get_qdf_dev(
  *
  * API to set qdf device from psoc object
  *
- * Caller need to acquire lock with wlan_psoc_obj_lock()
- *
  * Return: None
  */
 static inline void wlan_psoc_set_qdf_dev(

+ 0 - 84
umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h

@@ -494,8 +494,6 @@ QDF_STATUS wlan_objmgr_trigger_vdev_comp_priv_object_deletion(
  *
  * API to get component private object
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void *ptr on SUCCESS
  *         NULL on Failure
  */
@@ -511,8 +509,6 @@ void *wlan_objmgr_vdev_get_comp_private_obj(
  *
  * API to get pdev object pointer from vdev
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: pdev object pointer
  */
 static inline struct wlan_objmgr_pdev *wlan_vdev_get_pdev(
@@ -603,8 +599,6 @@ static inline void wlan_vdev_set_pdev(struct wlan_objmgr_vdev *vdev,
  *
  * API to get pdev object pointer from vdev
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: psoc object pointer
  */
 static inline struct wlan_objmgr_psoc *wlan_vdev_get_psoc(
@@ -630,8 +624,6 @@ static inline struct wlan_objmgr_psoc *wlan_vdev_get_psoc(
  *
  * API to set opmode in vdev object
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_opmode(struct wlan_objmgr_vdev *vdev,
@@ -647,8 +639,6 @@ static inline void wlan_vdev_mlme_set_opmode(struct wlan_objmgr_vdev *vdev,
  *
  * API to set opmode of vdev object
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @mode: VDEV op mode
  */
@@ -735,8 +725,6 @@ static inline uint8_t *wlan_vdev_mlme_get_mataddr(struct wlan_objmgr_vdev *vdev)
  *
  * API to get vdev id
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @id: vdev id
  */
@@ -861,8 +849,6 @@ static inline void wlan_vdev_obj_unlock(struct wlan_objmgr_vdev *vdev)
  *
  * API to set the BSS channel
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_bss_chan(struct wlan_objmgr_vdev *vdev,
@@ -878,8 +864,6 @@ static inline void wlan_vdev_mlme_set_bss_chan(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the BSS channel
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @bss_chan: Channel
  */
@@ -897,8 +881,6 @@ static inline struct wlan_channel *wlan_vdev_mlme_get_bss_chan(
  *
  * API to set the desired channel
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_des_chan(struct wlan_objmgr_vdev *vdev,
@@ -914,8 +896,6 @@ static inline void wlan_vdev_mlme_set_des_chan(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the desired channel
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @des_chan: Channel configured by user
  */
@@ -933,8 +913,6 @@ static inline struct wlan_channel *wlan_vdev_mlme_get_des_chan(
  *
  * API to set the Number of Spatial streams
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_nss(struct wlan_objmgr_vdev *vdev,
@@ -950,8 +928,6 @@ static inline void wlan_vdev_mlme_set_nss(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the Number of Spatial Streams
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @nss: nss value
  */
@@ -969,8 +945,6 @@ static inline uint8_t wlan_vdev_mlme_get_nss(
  *
  * API to set the Tx chainmask
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_txchainmask(struct wlan_objmgr_vdev *vdev,
@@ -986,8 +960,6 @@ static inline void wlan_vdev_mlme_set_txchainmask(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the Tx chainmask
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @chainmask : Tx chainmask either configured by user or max supported
  */
@@ -1005,8 +977,6 @@ static inline uint8_t wlan_vdev_mlme_get_txchainmask(
  *
  * API to set the Rx chainmask
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_rxchainmask(struct wlan_objmgr_vdev *vdev,
@@ -1022,8 +992,6 @@ static inline void wlan_vdev_mlme_set_rxchainmask(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the Rx chainmask
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @chainmask : Rx chainmask either configured by user or max supported
  */
@@ -1041,8 +1009,6 @@ static inline uint8_t wlan_vdev_mlme_get_rxchainmask(
  *
  * API to set the tx power
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_txpower(struct wlan_objmgr_vdev *vdev,
@@ -1058,8 +1024,6 @@ static inline void wlan_vdev_mlme_set_txpower(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the tx power
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @txpow: tx power either configured by used or max allowed
  */
@@ -1077,8 +1041,6 @@ static inline uint8_t wlan_vdev_mlme_get_txpower(
  *
  * API to set the max rate the vdev supports
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_maxrate(struct wlan_objmgr_vdev *vdev,
@@ -1094,8 +1056,6 @@ static inline void wlan_vdev_mlme_set_maxrate(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the max rate the vdev supports
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @maxrate: configured by used or based on configured mode
  */
@@ -1113,8 +1073,6 @@ static inline uint32_t wlan_vdev_mlme_get_maxrate(
  *
  * API to set Mgmt Tx rate
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_txmgmtrate(struct wlan_objmgr_vdev *vdev,
@@ -1130,8 +1088,6 @@ static inline void wlan_vdev_mlme_set_txmgmtrate(struct wlan_objmgr_vdev *vdev,
  *
  * API to get Mgmt Tx rate
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @txmgmtrate: Tx Mgmt rate
  */
@@ -1149,8 +1105,6 @@ static inline uint32_t wlan_vdev_mlme_get_txmgmtrate(
  *
  * API to set MLME feature capabilities
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_feat_cap_set(struct wlan_objmgr_vdev *vdev,
@@ -1167,8 +1121,6 @@ static inline void wlan_vdev_mlme_feat_cap_set(struct wlan_objmgr_vdev *vdev,
  *
  * API to clear MLME feature capabilities
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_feat_cap_clear(struct wlan_objmgr_vdev *vdev,
@@ -1185,8 +1137,6 @@ static inline void wlan_vdev_mlme_feat_cap_clear(struct wlan_objmgr_vdev *vdev,
  *
  * API to know MLME feature capability is set or not
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: 1 -- if capabilities set
  *         0 -- if capabilities clear
  */
@@ -1204,8 +1154,6 @@ static inline uint8_t wlan_vdev_mlme_feat_cap_get(struct wlan_objmgr_vdev *vdev,
  *
  * API to set the MLME extensive feature capabilities
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_feat_ext_cap_set(
@@ -1223,8 +1171,6 @@ static inline void wlan_vdev_mlme_feat_ext_cap_set(
  *
  * API to clear the MLME extensive feature capabilities
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_feat_ext_cap_clear(
@@ -1242,8 +1188,6 @@ static inline void wlan_vdev_mlme_feat_ext_cap_clear(
  *
  * API to know MLME ext feature capability is set or not
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: 1 -- if capabilities set
  *         0 -- if capabilities clear
  */
@@ -1262,8 +1206,6 @@ static inline uint8_t wlan_vdev_mlme_feat_ext_cap_get(
  *
  * API to set the MLME capabilities
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_cap_set(struct wlan_objmgr_vdev *vdev,
@@ -1280,8 +1222,6 @@ static inline void wlan_vdev_mlme_cap_set(struct wlan_objmgr_vdev *vdev,
  *
  * API to clear the MLME capabilities
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_cap_clear(struct wlan_objmgr_vdev *vdev,
@@ -1298,8 +1238,6 @@ static inline void wlan_vdev_mlme_cap_clear(struct wlan_objmgr_vdev *vdev,
  *
  * API to know MLME capability is set or not
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: 1 -- if capabilities set
  *         0 -- if capabilities clear
  */
@@ -1316,8 +1254,6 @@ static inline uint8_t wlan_vdev_mlme_cap_get(struct wlan_objmgr_vdev *vdev,
  *
  * API to get MLME state
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: state of MLME
  */
 static inline enum wlan_vdev_state wlan_vdev_mlme_get_state(
@@ -1334,8 +1270,6 @@ static inline enum wlan_vdev_state wlan_vdev_mlme_get_state(
  *
  * API to set MLME state
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_mlme_set_state(struct wlan_objmgr_vdev *vdev,
@@ -1353,8 +1287,6 @@ static inline void wlan_vdev_mlme_set_state(struct wlan_objmgr_vdev *vdev,
  *
  * API to set the self peer of VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_set_selfpeer(struct wlan_objmgr_vdev *vdev,
@@ -1370,8 +1302,6 @@ static inline void wlan_vdev_set_selfpeer(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the self peer of VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @peer: peer pointer
  */
@@ -1389,8 +1319,6 @@ static inline struct wlan_objmgr_peer *wlan_vdev_get_selfpeer(
  *
  * API to set the BSS peer of VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_set_bsspeer(struct wlan_objmgr_vdev *vdev,
@@ -1406,8 +1334,6 @@ static inline void wlan_vdev_set_bsspeer(struct wlan_objmgr_vdev *vdev,
  *
  * API to get the BSS peer of VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return:
  * @peer: BSS peer pointer
  */
@@ -1424,8 +1350,6 @@ static inline struct wlan_objmgr_peer *wlan_vdev_get_bsspeer(
  *
  * API to get OS private pointer from VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: ospriv - private pointer
  */
 static inline struct vdev_osif_priv *wlan_vdev_get_ospriv(
@@ -1441,8 +1365,6 @@ static inline struct vdev_osif_priv *wlan_vdev_get_ospriv(
  *
  * API to reset OS private pointer in VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_reset_ospriv(struct wlan_objmgr_vdev *vdev)
@@ -1457,8 +1379,6 @@ static inline void wlan_vdev_reset_ospriv(struct wlan_objmgr_vdev *vdev)
  *
  * API to get OS private pointer from VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: peer_count - vdev's peer count
  */
 static inline uint16_t wlan_vdev_get_peer_count(struct wlan_objmgr_vdev *vdev)
@@ -1542,8 +1462,6 @@ void wlan_objmgr_vdev_release_ref(struct wlan_objmgr_vdev *vdev,
  *
  * API to set max peer count of VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: void
  */
 static inline void wlan_vdev_set_max_peer_count(struct wlan_objmgr_vdev *vdev,
@@ -1559,8 +1477,6 @@ static inline void wlan_vdev_set_max_peer_count(struct wlan_objmgr_vdev *vdev,
  *
  * API to get max peer count of VDEV
  *
- * Caller need to acquire lock with wlan_vdev_obj_lock()
- *
  * Return: max peer count
  */
 static inline uint16_t wlan_vdev_get_max_peer_count(

+ 1 - 0
umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c

@@ -374,6 +374,7 @@ QDF_STATUS wlan_objmgr_vdev_component_obj_detach(
 	/* component id is invalid */
 	if (id >= WLAN_UMAC_MAX_COMPONENTS)
 		return QDF_STATUS_MAXCOMP_FAIL;
+
 	wlan_vdev_obj_lock(vdev);
 	/* If there is a valid entry, return failure */
 	if (vdev->vdev_comp_priv_obj[id] != comp_priv_obj) {