software/drivers/sd8887/src/wlan/mlan/mlan_join.c
/**
 *  @brief Append  IE as a pass through TLV to a TLV buffer.
 *
 *  This routine appends IE as a pass through TLV type to the request.
 *
 *  @param priv     A pointer to mlan_private structure
 *  @param ie       A pointer to IE buffer
 *  @param ppbuffer pointer to command buffer pointer
 *
 *  @return         bytes added to the buffer
 */
@brief Append  IE as a pass through TLV to a TLV buffer.
This routine appends IE as a pass through TLV type to the request.

@param priv     A pointer to mlan_private structure
@param ie       A pointer to IE buffer
@param ppbuffer pointer to command buffer pointer

@return         bytes added to the buffer
@brief Append IE as a pass through TLV to a TLV buffer . This routine appends IE as a pass through TLV type to the request . @param priv A pointer to mlan_private structure @param ie A pointer to IE buffer @param ppbuffer pointer to command buffer pointer @return bytes added to the buffer
static int
wlan_cmd_append_pass_through_ie(mlan_private *priv, IEEEtypes_Generic_t *ie,
				t_u8 **ppbuffer)
{
	int ret_len = 0;
	MrvlIEtypesHeader_t ie_header;
	ENTER();
	if (ppbuffer == MNULL) {
		LEAVE();
		return 0;
	}
	if (*ppbuffer == MNULL) {
		LEAVE();
		return 0;
	}
	if (ie->ieee_hdr.len) {
		PRINTM(MINFO, "append generic IE %d to %p\n", ie->ieee_hdr.len,
		       *ppbuffer);
		ie_header.type = wlan_cpu_to_le16(TLV_TYPE_PASSTHROUGH);
		ie_header.len =
			wlan_cpu_to_le16(ie->ieee_hdr.len +
					 sizeof(IEEEtypes_Header_t));
		memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header));
		*ppbuffer += sizeof(ie_header);
		ret_len += sizeof(ie_header);
		memcpy(priv->adapter, *ppbuffer, ie,
		       ie->ieee_hdr.len + sizeof(IEEEtypes_Header_t));
		*ppbuffer += ie->ieee_hdr.len + sizeof(IEEEtypes_Header_t);
		ret_len += ie->ieee_hdr.len + sizeof(IEEEtypes_Header_t);
	}
	LEAVE();
	return ret_len;
}
static int wlan_cmd_append_pass_through_ie ( mlan_private * priv , IEEEtypes_Generic_t * ie , t_u8 * * ppbuffer ) { int ret_len = 0 ; MrvlIEtypesHeader_t ie_header ; ENTER ( ) ; if ( ppbuffer == MNULL ) { LEAVE ( ) ; return 0 ; } if ( * ppbuffer == MNULL ) { LEAVE ( ) ; return 0 ; } if ( ie -> ieee_hdr . len ) { PRINTM ( MINFO , " \n " , ie -> ieee_hdr . len , * ppbuffer ) ; ie_header . type = wlan_cpu_to_le16 ( TLV_TYPE_PASSTHROUGH ) ; ie_header . len = wlan_cpu_to_le16 ( ie -> ieee_hdr . len + sizeof ( IEEEtypes_Header_t ) ) ; memcpy ( priv -> adapter , * ppbuffer , & ie_header , sizeof ( ie_header ) ) ; * ppbuffer += sizeof ( ie_header ) ; ret_len += sizeof ( ie_header ) ; memcpy ( priv -> adapter , * ppbuffer , ie , ie -> ieee_hdr . len + sizeof ( IEEEtypes_Header_t ) ) ; * ppbuffer += ie -> ieee_hdr . len + sizeof ( IEEEtypes_Header_t ) ; ret_len += ie -> ieee_hdr . len + sizeof ( IEEEtypes_Header_t ) ; } LEAVE ( ) ; return ret_len ; }
@brief Append  IE as a pass through TLV to a TLV buffer.
@brief Append IE as a pass through TLV to a TLV buffer .
/* Null Checks */ /* Wrap the generic IE buffer with a pass through TLV type */ /* Increment the return size and the return buffer pointer param */ /* Copy the generic IE buffer to the output buffer, advance pointer */ /* Increment the return size and the return buffer pointer param */ /* return the length appended to the buffer */