software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @param priv  Private driver information structure
 *  @param resp  HostCmd_DS_COMMAND struct returned from the firmware
 *               command
 *
 *  @return      MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
 */
@param priv  Private driver information structure
@param resp  HostCmd_DS_COMMAND struct returned from the firmware
command


@param priv Private driver information structure @param resp HostCmd_DS_COMMAND struct returned from the firmware command
mlan_status
wlan_11h_cmdresp_process(mlan_private *priv, const HostCmd_DS_COMMAND *resp)
{
	mlan_status ret = MLAN_STATUS_SUCCESS;
	ENTER();
	switch (resp->command) {
	case HostCmd_CMD_802_11_TPC_ADAPT_REQ:
		HEXDUMP("11h: TPC REQUEST Rsp:", (t_u8 *)resp,
			(t_u32)resp->size);
		memcpy(priv->adapter, priv->adapter->curr_cmd->pdata_buf,
		       &resp->params.tpc_req,
		       sizeof(HostCmd_DS_802_11_TPC_ADAPT_REQ));
		break;
	case HostCmd_CMD_802_11_TPC_INFO:
		HEXDUMP("11h: TPC INFO Rsp Data:", (t_u8 *)resp,
			(t_u32)resp->size);
		break;
	case HostCmd_CMD_802_11_CHAN_SW_ANN:
		PRINTM(MINFO, "11h: Ret ChSwAnn: Sz=%u, Seq=%u, Ret=%u\n",
		       resp->size, resp->seq_num, resp->result);
		break;
	case HostCmd_CMD_CHAN_REPORT_REQUEST:
		priv->adapter->state_dfs.dfs_check_priv = priv;
		priv->adapter->state_dfs.dfs_check_pending = MTRUE;
		if (resp->params.chan_rpt_req.millisec_dwell_time == 0) {
			priv->adapter->state_dfs.dfs_check_pending = MFALSE;
			priv->adapter->state_dfs.dfs_check_priv = MNULL;
			priv->adapter->state_dfs.dfs_check_channel = 0;
			PRINTM(MINFO, "11h: Cancelling Chan Report \n");
		} else {
			PRINTM(MERROR,
			       "11h: Ret ChanRptReq.  Set dfs_check_pending and wait"
			       " for EVENT_CHANNEL_REPORT.\n");
		}
		break;
	default:
		ret = MLAN_STATUS_FAILURE;
	}
	LEAVE();
	return ret;
}
mlan_status wlan_11h_cmdresp_process ( mlan_private * priv , const HostCmd_DS_COMMAND * resp ) { mlan_status ret = MLAN_STATUS_SUCCESS ; ENTER ( ) ; switch ( resp -> command ) { case HostCmd_CMD_802_11_TPC_ADAPT_REQ : HEXDUMP ( " " , ( t_u8 * ) resp , ( t_u32 ) resp -> size ) ; memcpy ( priv -> adapter , priv -> adapter -> curr_cmd -> pdata_buf , & resp -> params . tpc_req , sizeof ( HostCmd_DS_802_11_TPC_ADAPT_REQ ) ) ; break ; case HostCmd_CMD_802_11_TPC_INFO : HEXDUMP ( " " , ( t_u8 * ) resp , ( t_u32 ) resp -> size ) ; break ; case HostCmd_CMD_802_11_CHAN_SW_ANN : PRINTM ( MINFO , " \n " , resp -> size , resp -> seq_num , resp -> result ) ; break ; case HostCmd_CMD_CHAN_REPORT_REQUEST : priv -> adapter -> state_dfs . dfs_check_priv = priv ; priv -> adapter -> state_dfs . dfs_check_pending = MTRUE ; if ( resp -> params . chan_rpt_req . millisec_dwell_time == 0 ) { priv -> adapter -> state_dfs . dfs_check_pending = MFALSE ; priv -> adapter -> state_dfs . dfs_check_priv = MNULL ; priv -> adapter -> state_dfs . dfs_check_channel = 0 ; PRINTM ( MINFO , " \n " ) ; } else { PRINTM ( MERROR , " " " \n " ) ; } break ; default : ret = MLAN_STATUS_FAILURE ; } LEAVE ( ) ; return ret ; }
@param priv  Private driver information structure
  @param resp  HostCmd_DS_COMMAND struct returned from the firmware
               command
@param priv Private driver information structure @param resp HostCmd_DS_COMMAND struct returned from the firmware command
/* from wlan_11h_ioctl_dfs_cancel_chan_report */