/* Returns: The address of the specific IE found, or NULL  */
u8* rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, uint *ielen)
/* Returns: The address of the specific IE found, or NULL  */
u8* rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, uint *ielen)
{
	uint cnt;
	u8 *target_ie = NULL;
	if(ielen)
		*ielen = 0;
	if(!in_ie || in_len<=0)
		return target_ie;
	cnt = 0;
	while(cnt<in_len)
	{
		if(eid == in_ie[cnt]
			&& ( !oui || _rtw_memcmp(&in_ie[cnt+2], oui, oui_len) == _TRUE))
		{
			target_ie = &in_ie[cnt];
			if(ie)
				_rtw_memcpy(ie, &in_ie[cnt], in_ie[cnt+1]+2);
			if(ielen)
				*ielen = in_ie[cnt+1]+2;
			break;
		}
		else
		{
			cnt+=in_ie[cnt+1]+2;
		}
	}
	return target_ie;
}