software/drivers/sd8887/src/wlan/mlan/mlan_sdio.c
/**
 *  @brief This function reads firmware status registers
 *
 *  @param pmadapter    A pointer to mlan_adapter structure
 *  @param dat          A pointer to keep returned data
 *  @return             MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
 */
@brief This function reads firmware status registers
@param pmadapter    A pointer to mlan_adapter structure
@param dat          A pointer to keep returned data
@return             MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
@brief This function reads firmware status registers @param pmadapter A pointer to mlan_adapter structure @param dat A pointer to keep returned data @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
static mlan_status
wlan_sdio_read_fw_status(mlan_adapter *pmadapter, t_u16 *dat)
{
	pmlan_callbacks pcb = &pmadapter->callbacks;
	t_u32 fws0 = 0, fws1 = 0;
	ENTER();
	if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle,
						      CARD_FW_STATUS0_REG,
						      &fws0)) {
		LEAVE();
		return MLAN_STATUS_FAILURE;
	}
	if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle,
						      CARD_FW_STATUS1_REG,
						      &fws1)) {
		LEAVE();
		return MLAN_STATUS_FAILURE;
	}
	*dat = (t_u16)((fws1 << 8) | fws0);
	LEAVE();
	return MLAN_STATUS_SUCCESS;
}
static mlan_status wlan_sdio_read_fw_status ( mlan_adapter * pmadapter , t_u16 * dat ) { pmlan_callbacks pcb = & pmadapter -> callbacks ; t_u32 fws0 = 0 , fws1 = 0 ; ENTER ( ) ; if ( MLAN_STATUS_SUCCESS != pcb -> moal_read_reg ( pmadapter -> pmoal_handle , CARD_FW_STATUS0_REG , & fws0 ) ) { LEAVE ( ) ; return MLAN_STATUS_FAILURE ; } if ( MLAN_STATUS_SUCCESS != pcb -> moal_read_reg ( pmadapter -> pmoal_handle , CARD_FW_STATUS1_REG , & fws1 ) ) { LEAVE ( ) ; return MLAN_STATUS_FAILURE ; } * dat = ( t_u16 ) ( ( fws1 << 8 ) | fws0 ) ; LEAVE ( ) ; return MLAN_STATUS_SUCCESS ; }
@brief This function reads firmware status registers
  @param pmadapter    A pointer to mlan_adapter structure
  @param dat          A pointer to keep returned data
  @return             MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
@brief This function reads firmware status registers @param pmadapter A pointer to mlan_adapter structure @param dat A pointer to keep returned data @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE