Эх сурвалжийг харах

qcacmn: Use mac_addr pointer as constant

Use mac_addr pointer as constant in wlan_hdd_ml_sap_get_peer,
hdd_set_mld_address and use the same for consecutive APIs.

Change-Id: I3ab7b0f3c03e9175c62179029efb53fb9fe75277
CRs-Fixed: 3342115
Asutosh Mohapatra 2 жил өмнө
parent
commit
1ade380fc3

+ 5 - 5
qdf/inc/qdf_util.h

@@ -328,8 +328,8 @@ typedef __qdf_wait_queue_head_t qdf_wait_queue_head_t;
  * Return: true if the MacAddress's are equal
  * not true if the MacAddress's are not equal
  */
-static inline bool qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1,
-					struct qdf_mac_addr *mac_addr2)
+static inline bool qdf_is_macaddr_equal(const struct qdf_mac_addr *mac_addr1,
+					const struct qdf_mac_addr *mac_addr2)
 {
 	return __qdf_is_macaddr_equal(mac_addr1, mac_addr2);
 }
@@ -345,7 +345,7 @@ static inline bool qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1,
  * Return: true if the MacAddress is all Zeros
  * false if the MacAddress is not all Zeros.
  */
-static inline bool qdf_is_macaddr_zero(struct qdf_mac_addr *mac_addr)
+static inline bool qdf_is_macaddr_zero(const struct qdf_mac_addr *mac_addr)
 {
 	struct qdf_mac_addr zero_mac_addr = QDF_MAC_ADDR_ZERO_INIT;
 
@@ -394,7 +394,7 @@ static inline bool qdf_is_macaddr_group(struct qdf_mac_addr *mac_addr)
  * Return: true if the input MacAddress is a broadcast address
  * flase if the input MacAddress is not a broadcast address
  */
-static inline bool qdf_is_macaddr_broadcast(struct qdf_mac_addr *mac_addr)
+static inline bool qdf_is_macaddr_broadcast(const struct qdf_mac_addr *mac_addr)
 {
 	struct qdf_mac_addr broadcast_mac_addr = QDF_MAC_ADDR_BCAST_INIT;
 	return qdf_is_macaddr_equal(mac_addr, &broadcast_mac_addr);
@@ -410,7 +410,7 @@ static inline bool qdf_is_macaddr_broadcast(struct qdf_mac_addr *mac_addr)
  * Return: none
  */
 static inline void qdf_copy_macaddr(struct qdf_mac_addr *dst_addr,
-				    struct qdf_mac_addr *src_addr)
+				    const struct qdf_mac_addr *src_addr)
 {
 	*dst_addr = *src_addr;
 }

+ 2 - 2
qdf/linux/src/i_qdf_util.h

@@ -164,8 +164,8 @@ static inline void __qdf_zero_macaddr(struct qdf_mac_addr *mac_addr)
  * Return: true if the MacAddress's are equal
  *      not true if the MacAddress's are not equal
  */
-static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1,
-					  struct qdf_mac_addr *mac_addr2)
+static inline bool __qdf_is_macaddr_equal(const struct qdf_mac_addr *mac_addr1,
+					  const struct qdf_mac_addr *mac_addr2)
 {
 	return 0 == memcmp(mac_addr1, mac_addr2, QDF_MAC_ADDR_SIZE);
 }

+ 1 - 1
umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h

@@ -669,7 +669,7 @@ struct wlan_objmgr_peer *wlan_objmgr_get_peer_by_mac(
 #ifdef WLAN_OBJMGR_REF_ID_TRACE
 struct wlan_objmgr_peer *wlan_objmgr_get_peer_debug(
 			struct wlan_objmgr_psoc *psoc, uint8_t pdev_id,
-			uint8_t *macaddr, wlan_objmgr_ref_dbgid dbg_id,
+			const uint8_t *macaddr, wlan_objmgr_ref_dbgid dbg_id,
 			const char *func, int line);
 
 #define wlan_objmgr_get_peer(psoc, pdev_id, macaddr, dbgid) \

+ 2 - 2
umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c

@@ -1360,7 +1360,7 @@ static QDF_STATUS wlan_peer_bssid_match(struct wlan_objmgr_peer *peer,
 #ifdef WLAN_OBJMGR_REF_ID_TRACE
 static struct wlan_objmgr_peer
 	*wlan_obj_psoc_peerlist_get_peer_by_pdev_id_debug(
-				qdf_list_t *obj_list, uint8_t *macaddr,
+				qdf_list_t *obj_list, const uint8_t *macaddr,
 				uint8_t pdev_id, wlan_objmgr_ref_dbgid dbg_id,
 				const char *func, int line)
 {
@@ -2076,7 +2076,7 @@ QDF_STATUS wlan_objmgr_psoc_peer_detach(struct wlan_objmgr_psoc *psoc,
 #ifdef WLAN_OBJMGR_REF_ID_TRACE
 struct wlan_objmgr_peer *wlan_objmgr_get_peer_debug(
 			struct wlan_objmgr_psoc *psoc, uint8_t pdev_id,
-			uint8_t *macaddr, wlan_objmgr_ref_dbgid dbg_id,
+			const uint8_t *macaddr, wlan_objmgr_ref_dbgid dbg_id,
 			const char *func, int line)
 {
 	struct wlan_objmgr_psoc_objmgr *objmgr;

+ 1 - 1
umac/mlo_mgr/inc/wlan_mlo_mgr_peer.h

@@ -54,7 +54,7 @@ void mlo_peer_create(struct wlan_objmgr_vdev *vdev,
  */
 struct wlan_mlo_peer_context *mlo_get_mlpeer(
 				struct wlan_mlo_dev_context *ml_dev,
-				struct qdf_mac_addr *ml_addr);
+				const struct qdf_mac_addr *ml_addr);
 
 /**
  * mlo_peer_attach - Attaches the peer by updating the MLO peer context with

+ 1 - 1
umac/mlo_mgr/src/wlan_mlo_mgr_peer_list.c

@@ -76,7 +76,7 @@ static inline struct wlan_mlo_peer_context *wlan_mlo_peer_get_next_mlpeer(
 
 struct wlan_mlo_peer_context *mlo_get_mlpeer(
 				struct wlan_mlo_dev_context *ml_dev,
-				struct qdf_mac_addr *ml_addr)
+				const struct qdf_mac_addr *ml_addr)
 {
 	uint8_t hash_index;
 	struct wlan_mlo_peer_list *mlo_peer_list;