Browse Source

qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeGetWPSPBCSessionsReq

Replace tSirMacAddr with cdf_mac_addr in tSirSmeGetWPSPBCSessionsReq.

Change-Id: I675907f2408b74e580fb9c5364e4ad1030e79736
CRs-Fixed: 898864
Srinivas Girigowda 9 years ago
parent
commit
edcfab99a7

+ 1 - 1
core/cdf/inc/cdf_util.h

@@ -140,7 +140,7 @@ CDF_INLINE_FN bool cdf_is_macaddr_equal(struct cdf_mac_addr *pMacAddr1,
  *
  *
  * Return:  true if the MacAddress is all Zeros
- *	flase if the MacAddress is not all Zeros.
+ *	false if the MacAddress is not all Zeros.
  *
  */
 CDF_INLINE_FN bool cdf_is_macaddr_zero(struct cdf_mac_addr *pMacAddr)

+ 2 - 2
core/mac/inc/sir_api.h

@@ -2488,9 +2488,9 @@ typedef struct sSirSmeGetWPSPBCSessionsReq {
 	uint16_t length;
 	void *pUsrContext;
 	void *pSapEventCallback;
-	tSirMacAddr bssId;      /* BSSID */
+	struct cdf_mac_addr bssid;      /* BSSID */
 	/* MAC Address of STA in WPS Session to be removed */
-	tSirMacAddr pRemoveMac;
+	struct cdf_mac_addr remove_mac;
 } tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
 
 typedef struct sSirWPSPBCProbeReq {

+ 15 - 8
core/mac/src/pe/lim/lim_process_probe_req_frame.c

@@ -145,26 +145,33 @@ static void lim_remove_timeout_pbc_sessions(tpAniSirGlobal pMac,
 	}
 }
 
-void lim_remove_pbc_sessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,
-			     tpPESession psessionEntry)
+/**
+ * lim_remove_pbc_sessions() - Remove PBC sessions
+ * @mac: Pointer to Global MAC structure
+ * @remove_mac: MAC Address of STA in WPS Session to be removed
+ * @session_entry: session entry
+ *
+ * Return: none
+ */
+void lim_remove_pbc_sessions(tpAniSirGlobal mac, struct cdf_mac_addr remove_mac,
+			     tpPESession session_entry)
 {
 	tSirWPSPBCSession *pbc, *prev = NULL;
-	prev = pbc = psessionEntry->pAPWPSPBCSession;
+	prev = pbc = session_entry->pAPWPSPBCSession;
 
 	while (pbc) {
 		if (cdf_mem_compare((uint8_t *) pbc->addr,
-				    (uint8_t *) pRemoveMac,
-				    sizeof(tSirMacAddr))) {
+				    (uint8_t *) remove_mac.bytes,
+				    CDF_MAC_ADDR_SIZE)) {
 			prev->next = pbc->next;
-			if (pbc == psessionEntry->pAPWPSPBCSession)
-				psessionEntry->pAPWPSPBCSession = pbc->next;
+			if (pbc == session_entry->pAPWPSPBCSession)
+				session_entry->pAPWPSPBCSession = pbc->next;
 			cdf_mem_free(pbc);
 			return;
 		}
 		prev = pbc;
 		pbc = pbc->next;
 	}
-
 }
 
 /**

+ 3 - 5
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3251,7 +3251,6 @@ void lim_process_sme_get_wpspbc_sessions(tpAniSirGlobal mac_ctx,
 	tSap_Event sap_event;
 	tpWLAN_SAPEventCB sap_event_cb = NULL;
 	uint8_t session_id = CSR_SESSION_ID_INVALID;
-	tSirMacAddr zero_mac = { 0, 0, 0, 0, 0, 0 };
 	tSap_GetWPSPBCSessionEvent *sap_get_wpspbc_event;
 
 	if (msg_buf == NULL) {
@@ -3269,7 +3268,7 @@ void lim_process_sme_get_wpspbc_sessions(tpAniSirGlobal mac_ctx,
 	 * Find PE session Entry
 	 */
 	session_entry = pe_find_session_by_bssid(mac_ctx,
-			get_wps_pbc_sessions_req.bssId, &session_id);
+			get_wps_pbc_sessions_req.bssid.bytes, &session_id);
 	if (session_entry == NULL) {
 		lim_log(mac_ctx, LOGE,
 			FL("session does not exist for given bssId"));
@@ -3289,8 +3288,7 @@ void lim_process_sme_get_wpspbc_sessions(tpAniSirGlobal mac_ctx,
 	sap_event.sapHddEventCode = eSAP_GET_WPSPBC_SESSION_EVENT;
 	sap_get_wpspbc_event->module = CDF_MODULE_ID_PE;
 
-	if (cdf_mem_compare(zero_mac, get_wps_pbc_sessions_req.pRemoveMac,
-				sizeof(tSirMacAddr))) {
+	if (cdf_is_macaddr_zero(&get_wps_pbc_sessions_req.remove_mac)) {
 		lim_get_wpspbc_sessions(mac_ctx,
 				sap_get_wpspbc_event->addr.bytes,
 				sap_get_wpspbc_event->UUID_E,
@@ -3298,7 +3296,7 @@ void lim_process_sme_get_wpspbc_sessions(tpAniSirGlobal mac_ctx,
 				session_entry);
 	} else {
 		lim_remove_pbc_sessions(mac_ctx,
-				get_wps_pbc_sessions_req.pRemoveMac,
+				get_wps_pbc_sessions_req.remove_mac,
 				session_entry);
 		/* don't have to inform the HDD/Host */
 		return;

+ 3 - 2
core/mac/src/pe/lim/lim_types.h

@@ -816,8 +816,9 @@ void lim_get_wpspbc_sessions(tpAniSirGlobal pMac, uint8_t *addr, uint8_t *uuid_e
 			     eWPSPBCOverlap *overlap, tpPESession psessionEntry);
 void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
 void lim_wpspbc_close(tpAniSirGlobal pMac, tpPESession psessionEntry);
-void lim_remove_pbc_sessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,
-			     tpPESession psessionEntry);
+void lim_remove_pbc_sessions(tpAniSirGlobal pMac,
+				struct cdf_mac_addr pRemoveMac,
+				tpPESession psessionEntry);
 
 #define LIM_WPS_OVERLAP_TIMER_MS                 10000
 void

+ 6 - 8
core/sme/src/csr/csr_api_roam.c

@@ -3183,9 +3183,8 @@ csr_roam_get_wps_session_overlap(tpAniSirGlobal pMac, uint32_t sessionId,
 		"CSR getting WPS Session Overlap for Bssid = " MAC_ADDRESS_STR,
 		MAC_ADDR_ARRAY(bssId.bytes));
 
-	status =
-		csr_send_mb_get_wpspbc_sessions(pMac, sessionId, bssId.bytes, pUsrContext,
-						pfnSapEventCallback, pRemoveMac);
+	status = csr_send_mb_get_wpspbc_sessions(pMac, sessionId, bssId,
+				pUsrContext, pfnSapEventCallback, pRemoveMac);
 
 	return status;
 }
@@ -14056,9 +14055,9 @@ csr_send_mb_get_associated_stas_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 
 CDF_STATUS
 csr_send_mb_get_wpspbc_sessions(tpAniSirGlobal pMac, uint32_t sessionId,
-				tSirMacAddr bssId, void *pUsrContext,
+				struct cdf_mac_addr bssid, void *pUsrContext,
 				void *pfnSapEventCallback,
-				struct cdf_mac_addr pRemoveMac)
+				struct cdf_mac_addr remove_mac)
 {
 	CDF_STATUS status = CDF_STATUS_SUCCESS;
 	tSirSmeGetWPSPBCSessionsReq *pMsg;
@@ -14076,9 +14075,8 @@ csr_send_mb_get_wpspbc_sessions(tpAniSirGlobal pMac, uint32_t sessionId,
 		cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *));
 		cdf_mem_copy(pMsg->pSapEventCallback, pfnSapEventCallback,
 			     sizeof(void *));
-		cdf_mem_copy(pMsg->bssId, bssId, sizeof(tSirMacAddr));
-		cdf_mem_copy(pMsg->pRemoveMac, pRemoveMac.bytes,
-			     CDF_MAC_ADDR_SIZE);
+		cdf_copy_macaddr(&pMsg->bssid, &bssid);
+		cdf_copy_macaddr(&pMsg->remove_mac, &remove_mac);
 		pMsg->length = sizeof(struct sSirSmeGetWPSPBCSessionsReq);
 		status = cds_send_mb_message_to_mac(pMsg);
 	} while (0);

+ 4 - 2
core/sme/src/csr/csr_inside_api.h

@@ -992,8 +992,10 @@ CDF_STATUS csr_roam_get_wps_session_overlap(tpAniSirGlobal pMac, uint32_t sessio
 					    void *pfnSapEventCallback,
 					    struct cdf_mac_addr pRemoveMac);
 
-CDF_STATUS csr_send_mb_get_wpspbc_sessions(tpAniSirGlobal pMac, uint32_t sessionId,
-					   tSirMacAddr bssId, void *pUsrContext,
+CDF_STATUS csr_send_mb_get_wpspbc_sessions(tpAniSirGlobal pMac,
+					   uint32_t sessionId,
+					   struct cdf_mac_addr bssId,
+					   void *pUsrContext,
 					   void *pfnSapEventCallback,
 					   struct cdf_mac_addr pRemoveMac);