software/drivers/sd8887/src/wlan/mapp/uaputl/uaputl.c
/**
 *  @brief Set/get txpause setting
 *
 *  @param txpause  A pointer to the Tx data pause parameters structure
 *  @return         UAP_SUCCESS/UAP_FAILURE
 */
@brief Set/get txpause setting
@param txpause  A pointer to the Tx data pause parameters structure
@return         UAP_SUCCESS/UAP_FAILURE
@brief Set / get txpause setting @param txpause A pointer to the Tx data pause parameters structure @return UAP_SUCCESS / UAP_FAILURE
int
send_txpause_ioctl(tx_data_pause_para *txpause)
{
	struct ifreq ifr;
	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 *)txpause;
	errno = 0;
	if (ioctl(sockfd, UAP_IOCTL_CMD, &ifr)) {
		perror("");
		printf("ERR:txpause is not supported by %s\n", dev_name);
		close(sockfd);
		return UAP_FAILURE;
	}
	close(sockfd);
	return UAP_SUCCESS;
}
int send_txpause_ioctl ( tx_data_pause_para * txpause ) { struct ifreq ifr ; 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 * ) txpause ; errno = 0 ; if ( ioctl ( sockfd , UAP_IOCTL_CMD , & ifr ) ) { perror ( " " ) ; printf ( " \n " , dev_name ) ; close ( sockfd ) ; return UAP_FAILURE ; } close ( sockfd ) ; return UAP_SUCCESS ; }
@brief Set/get txpause setting
  @param txpause  A pointer to the Tx data pause parameters structure
  @return         UAP_SUCCESS/UAP_FAILURE
@brief Set / get txpause setting @param txpause A pointer to the Tx data pause parameters structure @return UAP_SUCCESS / UAP_FAILURE
/* Open socket */ /* Initialize the ifr structure */ /* Perform ioctl */ /* Close socket */