software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @brief  Utility function to process a join to an infrastructure BSS
 *
 *  @param priv          Private driver information structure
 *  @param ppbuffer      Output parameter: Pointer to the TLV output buffer,
 *                       modified on return to point after the appended 11h TLVs
 *  @param band          Band on which we are joining the BSS
 *  @param channel       Channel on which we are joining the BSS
 *  @param p11h_bss_info Pointer to the 11h BSS information for this network
 *                       that was parsed out of the scan response.
 *
 *  @return              Integer number of bytes appended to the TLV output
 *                       buffer (ppbuffer)
 */


@return              Integer number of bytes appended to the TLV output
buffer (ppbuffer)
@return Integer number of bytes appended to the TLV output buffer ( ppbuffer )
static t_u32
wlan_11h_process_infra_join(mlan_private *priv,
			    t_u8 **ppbuffer,
			    t_u8 band,
			    t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info)
{
	MrvlIEtypesHeader_t ie_header;
	IEEEtypes_SupportedChannels_t sup_chan_ie;
	t_u32 ret_len = 0;
	t_u16 sup_chan_len = 0;
	ENTER();
	if ((ppbuffer == MNULL) || (((t_u8 *)(*ppbuffer)) == MNULL)) {
		LEAVE();
		return 0;
	}
	ret_len +=
		wlan_11h_set_local_power_constraint_tlv(ppbuffer, (t_u8)channel,
							(t_u8)p11h_bss_info->
							power_constraint.
							local_constraint,
							(t_u8)priv->adapter->
							state_11h.
							min_tx_power_capability,
							(t_u8)priv->adapter->
							state_11h.
							max_tx_power_capability);
	sup_chan_len = wlan_11h_set_supp_channels_ie(priv, band, &sup_chan_ie);
	if (sup_chan_len) {
		ie_header.type = wlan_cpu_to_le16(TLV_TYPE_PASSTHROUGH);
		ie_header.len = wlan_cpu_to_le16(sup_chan_len);
		memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header));
		*ppbuffer += sizeof(ie_header);
		ret_len += sizeof(ie_header);
		memcpy(priv->adapter, *ppbuffer, &sup_chan_ie, sup_chan_len);
		*ppbuffer += sup_chan_len;
		ret_len += sup_chan_len;
	}
	LEAVE();
	return ret_len;
}
static t_u32 wlan_11h_process_infra_join ( mlan_private * priv , t_u8 * * ppbuffer , t_u8 band , t_u32 channel , wlan_11h_bss_info_t * p11h_bss_info ) { MrvlIEtypesHeader_t ie_header ; IEEEtypes_SupportedChannels_t sup_chan_ie ; t_u32 ret_len = 0 ; t_u16 sup_chan_len = 0 ; ENTER ( ) ; if ( ( ppbuffer == MNULL ) || ( ( ( t_u8 * ) ( * ppbuffer ) ) == MNULL ) ) { LEAVE ( ) ; return 0 ; } ret_len += wlan_11h_set_local_power_constraint_tlv ( ppbuffer , ( t_u8 ) channel , ( t_u8 ) p11h_bss_info -> power_constraint . local_constraint , ( t_u8 ) priv -> adapter -> state_11h . min_tx_power_capability , ( t_u8 ) priv -> adapter -> state_11h . max_tx_power_capability ) ; sup_chan_len = wlan_11h_set_supp_channels_ie ( priv , band , & sup_chan_ie ) ; if ( sup_chan_len ) { ie_header . type = wlan_cpu_to_le16 ( TLV_TYPE_PASSTHROUGH ) ; ie_header . len = wlan_cpu_to_le16 ( sup_chan_len ) ; memcpy ( priv -> adapter , * ppbuffer , & ie_header , sizeof ( ie_header ) ) ; * ppbuffer += sizeof ( ie_header ) ; ret_len += sizeof ( ie_header ) ; memcpy ( priv -> adapter , * ppbuffer , & sup_chan_ie , sup_chan_len ) ; * ppbuffer += sup_chan_len ; ret_len += sup_chan_len ; } LEAVE ( ) ; return ret_len ; }
@brief  Utility function to process a join to an infrastructure BSS
  @param priv          Private driver information structure
  @param ppbuffer      Output parameter: Pointer to the TLV output buffer,
                       modified on return to point after the appended 11h TLVs
  @param band          Band on which we are joining the BSS
  @param channel       Channel on which we are joining the BSS
  @param p11h_bss_info Pointer to the 11h BSS information for this network
                       that was parsed out of the scan response.
@brief Utility function to process a join to an infrastructure BSS @param priv Private driver information structure @param ppbuffer Output parameter : Pointer to the TLV output buffer modified on return to point after the appended 11h TLVs @param band Band on which we are joining the BSS @param channel Channel on which we are joining the BSS @param p11h_bss_info Pointer to the 11h BSS information for this network that was parsed out of the scan response .
/* Null Checks */ /* Setup the Supported Channels IE */ /*
	 * If we returned a valid Supported Channels IE, wrap and append it
	 */ /* Wrap the supported channels IE with a passthrough TLV type */ /*
		 * Increment the return size and the return buffer
		 * pointer param
		 */ /*
		 * Copy the supported channels IE to the output buf,
		 * advance pointer
		 */