software/drivers/sd8887/src/wlan/mlan/mlan_scan.c
/**
 *  @brief This function will parse a given IE for a given OUI
 *
 *  Parse a given WPA/RSN IE to find if it has a given oui in PTK,
 *  if no OUI found for PTK it returns 0.
 *
 *  @param pbss_desc       A pointer to current BSS descriptor
 *  @return                0 on failure to find OUI, 1 on success.
 */
@brief This function will parse a given IE for a given OUI
Parse a given WPA/RSN IE to find if it has a given oui in PTK,
if no OUI found for PTK it returns 0.

@param pbss_desc       A pointer to current BSS descriptor
@return                0 on failure to find OUI, 1 on success.
@brief This function will parse a given IE for a given OUI Parse a given WPA / RSN IE to find if it has a given oui in PTK if no OUI found for PTK it returns 0 . @param pbss_desc A pointer to current BSS descriptor @return 0 on failure to find OUI 1 on success .
static t_u8
search_oui_in_ie(mlan_adapter *pmadapter, IEBody *ie_body, t_u8 *oui)
{
	t_u8 count;
	count = ie_body->PtkCnt[0];
	ENTER();
	while (count) {
		if (!memcmp
		    (pmadapter, ie_body->PtkBody, oui,
		     sizeof(ie_body->PtkBody))) {
			LEAVE();
			return MLAN_OUI_PRESENT;
		}
		--count;
		if (count) {
			ie_body = (IEBody *)((t_u8 *)ie_body +
					     sizeof(ie_body->PtkBody));
		}
	}
	PRINTM(MINFO, "The OUI %x:%x:%x:%x is not found in PTK\n", oui[0],
	       oui[1], oui[2], oui[3]);
	LEAVE();
	return MLAN_OUI_NOT_PRESENT;
}
static t_u8 search_oui_in_ie ( mlan_adapter * pmadapter , IEBody * ie_body , t_u8 * oui ) { t_u8 count ; count = ie_body -> PtkCnt [ 0 ] ; ENTER ( ) ; while ( count ) { if ( ! memcmp ( pmadapter , ie_body -> PtkBody , oui , sizeof ( ie_body -> PtkBody ) ) ) { LEAVE ( ) ; return MLAN_OUI_PRESENT ; } -- count ; if ( count ) { ie_body = ( IEBody * ) ( ( t_u8 * ) ie_body + sizeof ( ie_body -> PtkBody ) ) ; } } PRINTM ( MINFO , " \n " , oui [ 0 ] , oui [ 1 ] , oui [ 2 ] , oui [ 3 ] ) ; LEAVE ( ) ; return MLAN_OUI_NOT_PRESENT ; }
@brief This function will parse a given IE for a given OUI
  Parse a given WPA/RSN IE to find if it has a given oui in PTK,
  if no OUI found for PTK it returns 0.
@brief This function will parse a given IE for a given OUI Parse a given WPA / RSN IE to find if it has a given oui in PTK if no OUI found for PTK it returns 0 .
/* There could be multiple OUIs for PTK hence
	 * 1) Take the length.
	 * 2) Check all the OUIs for AES.
	 * 3) If one of them is AES then pass success.
	 */