software/drivers/sd8887/src/wlan/mapp/uaputl/uaputl.c
/**
 *  @brief Get CAC timer status
 *
 *  @param mode    status of CAC timer is returned here
 *  @return        UAP_SUCCESS/UAP_FAILURE
 */
@brief Get CAC timer status
@param mode    status of CAC timer is returned here
@return        UAP_SUCCESS/UAP_FAILURE
@brief Get CAC timer status @param mode status of CAC timer is returned here @return UAP_SUCCESS / UAP_FAILURE
int
uap_ioctl_cac_timer_status(unsigned int *mode)
{
	struct ifreq ifr;
	cac_timer_status param;
	t_s32 sockfd;
	if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
		printf("ERR:Cannot open socket\n");
		return UAP_FAILURE;
	}
	memset(&ifr, 0, sizeof(ifr));
	strncpy(ifr.ifr_ifrn.ifrn_name, dev_name, IFNAMSIZ - 1);
	ifr.ifr_ifru.ifru_data = (void *)&param;
	param.action = ACTION_GET;
	param.subcmd = UAP_CAC_TIMER_STATUS;
	errno = 0;
	if (ioctl(sockfd, UAP_IOCTL_CMD, &ifr)) {
		printf("ERR:UAP_CAC_TIMER_STATUS is not"
		       "supported by %s\n", dev_name);
		close(sockfd);
		return UAP_FAILURE;
	}
	*mode = (int)param.mode;
	close(sockfd);
	return UAP_SUCCESS;
}
int uap_ioctl_cac_timer_status ( unsigned int * mode ) { struct ifreq ifr ; cac_timer_status param ; t_s32 sockfd ; if ( ( sockfd = socket ( AF_INET , SOCK_STREAM , 0 ) ) < 0 ) { printf ( " \n " ) ; return UAP_FAILURE ; } memset ( & ifr , 0 , sizeof ( ifr ) ) ; strncpy ( ifr . ifr_ifrn . ifrn_name , dev_name , IFNAMSIZ - 1 ) ; ifr . ifr_ifru . ifru_data = ( void * ) & param ; param . action = ACTION_GET ; param . subcmd = UAP_CAC_TIMER_STATUS ; errno = 0 ; if ( ioctl ( sockfd , UAP_IOCTL_CMD , & ifr ) ) { printf ( " " " \n " , dev_name ) ; close ( sockfd ) ; return UAP_FAILURE ; } * mode = ( int ) param . mode ; close ( sockfd ) ; return UAP_SUCCESS ; }
@brief Get CAC timer status
  @param mode    status of CAC timer is returned here
  @return        UAP_SUCCESS/UAP_FAILURE
@brief Get CAC timer status @param mode status of CAC timer is returned here @return UAP_SUCCESS / UAP_FAILURE
/* Open socket */ /* Initialize the ifr structure */ /* Perform ioctl */