software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @brief Convert an IEEE formatted IE to 16-bit ID/Len NXP
 *         proprietary format
 *
 *  @param pmadapter Pointer to mlan_adapter
 *  @param pout_buf Output parameter: Buffer to output NXP formatted IE
 *  @param pin_ie   Pointer to IEEE IE to be converted to NXP format
 *
 *  @return         Number of bytes output to pout_buf parameter return
 */


@param pmadapter Pointer to mlan_adapter
@param pout_buf Output parameter: Buffer to output NXP formatted IE
@param pin_ie   Pointer to IEEE IE to be converted to NXP format

@return         Number of bytes output to pout_buf parameter return
@param pmadapter Pointer to mlan_adapter @param pout_buf Output parameter : Buffer to output NXP formatted IE @param pin_ie Pointer to IEEE IE to be converted to NXP format @return Number of bytes output to pout_buf parameter return
static t_u32
wlan_11h_convert_ieee_to_mrvl_ie(mlan_adapter *pmadapter,
				 t_u8 *pout_buf, const t_u8 *pin_ie)
{
	MrvlIEtypesHeader_t mrvl_ie_hdr;
	t_u8 *ptmp_buf = pout_buf;
	ENTER();
	mrvl_ie_hdr.type = wlan_cpu_to_le16(pin_ie[0]);
	mrvl_ie_hdr.len = wlan_cpu_to_le16(pin_ie[1]);
	if (!mrvl_ie_hdr.type) {
		LEAVE();
		return 0;
	}
	memcpy(pmadapter, ptmp_buf, &mrvl_ie_hdr, sizeof(mrvl_ie_hdr));
	ptmp_buf += sizeof(mrvl_ie_hdr);
	memcpy(pmadapter, ptmp_buf, pin_ie + 2, pin_ie[1]);
	LEAVE();
	return sizeof(mrvl_ie_hdr) + pin_ie[1];
}
static t_u32 wlan_11h_convert_ieee_to_mrvl_ie ( mlan_adapter * pmadapter , t_u8 * pout_buf , const t_u8 * pin_ie ) { MrvlIEtypesHeader_t mrvl_ie_hdr ; t_u8 * ptmp_buf = pout_buf ; ENTER ( ) ; mrvl_ie_hdr . type = wlan_cpu_to_le16 ( pin_ie [ 0 ] ) ; mrvl_ie_hdr . len = wlan_cpu_to_le16 ( pin_ie [ 1 ] ) ; if ( ! mrvl_ie_hdr . type ) { LEAVE ( ) ; return 0 ; } memcpy ( pmadapter , ptmp_buf , & mrvl_ie_hdr , sizeof ( mrvl_ie_hdr ) ) ; ptmp_buf += sizeof ( mrvl_ie_hdr ) ; memcpy ( pmadapter , ptmp_buf , pin_ie + 2 , pin_ie [ 1 ] ) ; LEAVE ( ) ; return sizeof ( mrvl_ie_hdr ) + pin_ie [ 1 ] ; }
@brief Convert an IEEE formatted IE to 16-bit ID/Len NXP
         proprietary format
@brief Convert an IEEE formatted IE to 16 - bit ID / Len NXP proprietary format
/* Assign the Element Id and Len to the NXP struct attributes */ /* If the element ID is zero, return without doing any copying */ /* Copy the header to the buffer pointer */ /* Increment the temp buffer pointer by the size appended */ /* Append the data section of the IE; length given by the IEEE IE length */ /* Return the number of bytes appended to pout_buf */