software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @brief Prepare CMD_802_11_TPC_INFO firmware command
 *
 *  @param priv      Private driver information structure
 *  @param pcmd_ptr  Output parameter: Pointer to the command being prepared
 *                   for the firmware
 *  @param pinfo_buf wlan_11h_tpc_info_param_t passed as void data block
 *
 *  @return          MLAN_STATUS_SUCCESS
 */
@brief Prepare CMD_802_11_TPC_INFO firmware command
@param priv      Private driver information structure
@param pcmd_ptr  Output parameter: Pointer to the command being prepared
for the firmware
@param pinfo_buf wlan_11h_tpc_info_param_t passed as void data block


@brief Prepare CMD_802_11_TPC_INFO firmware command @param priv Private driver information structure @param pcmd_ptr Output parameter : Pointer to the command being prepared for the firmware @param pinfo_buf wlan_11h_tpc_info_param_t passed as void data block
static mlan_status
wlan_11h_cmd_tpc_info(mlan_private *priv,
		      HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf)
{
	HostCmd_DS_802_11_TPC_INFO *ptpc_info = &pcmd_ptr->params.tpc_info;
	MrvlIEtypes_LocalPowerConstraint_t *pconstraint =
		&ptpc_info->local_constraint;
	MrvlIEtypes_PowerCapability_t *pcap = &ptpc_info->power_cap;
	wlan_11h_device_state_t *pstate = &priv->adapter->state_11h;
	const wlan_11h_tpc_info_param_t *ptpc_info_param =
		(wlan_11h_tpc_info_param_t *)pinfo_buf;
	ENTER();
	pcap->min_power = pstate->min_tx_power_capability;
	pcap->max_power = pstate->max_tx_power_capability;
	pcap->header.len = wlan_cpu_to_le16(2);
	pcap->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CAPABILITY);
	pconstraint->chan = ptpc_info_param->chan;
	pconstraint->constraint = ptpc_info_param->power_constraint;
	pconstraint->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CONSTRAINT);
	pconstraint->header.len = wlan_cpu_to_le16(2);
	pcmd_ptr->size = sizeof(HostCmd_DS_802_11_TPC_INFO) + S_DS_GEN;
	HEXDUMP("11h: TPC INFO", (t_u8 *)pcmd_ptr, (t_u32)pcmd_ptr->size);
	LEAVE();
	return MLAN_STATUS_SUCCESS;
}
static mlan_status wlan_11h_cmd_tpc_info ( mlan_private * priv , HostCmd_DS_COMMAND * pcmd_ptr , const t_void * pinfo_buf ) { HostCmd_DS_802_11_TPC_INFO * ptpc_info = & pcmd_ptr -> params . tpc_info ; MrvlIEtypes_LocalPowerConstraint_t * pconstraint = & ptpc_info -> local_constraint ; MrvlIEtypes_PowerCapability_t * pcap = & ptpc_info -> power_cap ; wlan_11h_device_state_t * pstate = & priv -> adapter -> state_11h ; const wlan_11h_tpc_info_param_t * ptpc_info_param = ( wlan_11h_tpc_info_param_t * ) pinfo_buf ; ENTER ( ) ; pcap -> min_power = pstate -> min_tx_power_capability ; pcap -> max_power = pstate -> max_tx_power_capability ; pcap -> header . len = wlan_cpu_to_le16 ( 2 ) ; pcap -> header . type = wlan_cpu_to_le16 ( TLV_TYPE_POWER_CAPABILITY ) ; pconstraint -> chan = ptpc_info_param -> chan ; pconstraint -> constraint = ptpc_info_param -> power_constraint ; pconstraint -> header . type = wlan_cpu_to_le16 ( TLV_TYPE_POWER_CONSTRAINT ) ; pconstraint -> header . len = wlan_cpu_to_le16 ( 2 ) ; pcmd_ptr -> size = sizeof ( HostCmd_DS_802_11_TPC_INFO ) + S_DS_GEN ; HEXDUMP ( " " , ( t_u8 * ) pcmd_ptr , ( t_u32 ) pcmd_ptr -> size ) ; LEAVE ( ) ; return MLAN_STATUS_SUCCESS ; }
@brief Prepare CMD_802_11_TPC_INFO firmware command
  @param priv      Private driver information structure
  @param pcmd_ptr  Output parameter: Pointer to the command being prepared
                   for the firmware
  @param pinfo_buf wlan_11h_tpc_info_param_t passed as void data block
@brief Prepare CMD_802_11_TPC_INFO firmware command @param priv Private driver information structure @param pcmd_ptr Output parameter : Pointer to the command being prepared for the firmware @param pinfo_buf wlan_11h_tpc_info_param_t passed as void data block
/* Converted to little endian in wlan_11h_cmd_process */