software/drivers/sd8887/src/wlan/mapp/uaputl/uaputl.c
/**
 *  @brief Process HT Tx configuration
 *  @param argc   Number of arguments
 *  @param argv   A pointer to arguments array
 *  @return     MLAN_STATUS_SUCCESS--success, otherwise--fail
 */
@brief Process HT Tx configuration
@param argc   Number of arguments
@param argv   A pointer to arguments array
@return     MLAN_STATUS_SUCCESS--success, otherwise--fail
@brief Process HT Tx configuration @param argc Number of arguments @param argv A pointer to arguments array @return MLAN_STATUS_SUCCESS -- success otherwise -- fail
int
apcmd_sys_cfg_ht_tx(int argc, char *argv[])
{
	int opt;
	ht_tx_cfg_para param;
	struct ifreq ifr;
	t_s32 sockfd;
	while ((opt = getopt_long(argc, argv, "+", cmd_options, NULL)) != -1) {
		switch (opt) {
		default:
			print_ht_tx_usage();
			return UAP_SUCCESS;
		}
	}
	argc -= optind;
	argv += optind;
	memset(&param, 0, sizeof(param));
	if (argc == 0) {
		param.action = ACTION_GET;
	} else if (argc == 1) {
		param.action = ACTION_SET;
		param.tx_cfg.httxcap = (t_u16)A2HEXDECIMAL(argv[0]);
	} else {
		print_ht_tx_usage();
		return UAP_FAILURE;
	}
	param.subcmd = UAP_HT_TX_CFG;
	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;
	errno = 0;
	if (ioctl(sockfd, UAP_IOCTL_CMD, &ifr)) {
		perror("");
		printf("ERR: HT Tx configuration failed\n");
		close(sockfd);
		return UAP_FAILURE;
	}
	if (param.action == ACTION_GET) {
		printf("HT Tx cfg: 0x%08x\n", param.tx_cfg.httxcap);
	}
	close(sockfd);
	return UAP_SUCCESS;
}
int apcmd_sys_cfg_ht_tx ( int argc , char * argv [ ] ) { int opt ; ht_tx_cfg_para param ; struct ifreq ifr ; t_s32 sockfd ; while ( ( opt = getopt_long ( argc , argv , " " , cmd_options , NULL ) ) != -1 ) { switch ( opt ) { default : print_ht_tx_usage ( ) ; return UAP_SUCCESS ; } } argc -= optind ; argv += optind ; memset ( & param , 0 , sizeof ( param ) ) ; if ( argc == 0 ) { param . action = ACTION_GET ; } else if ( argc == 1 ) { param . action = ACTION_SET ; param . tx_cfg . httxcap = ( t_u16 ) A2HEXDECIMAL ( argv [ 0 ] ) ; } else { print_ht_tx_usage ( ) ; return UAP_FAILURE ; } param . subcmd = UAP_HT_TX_CFG ; 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 ; errno = 0 ; if ( ioctl ( sockfd , UAP_IOCTL_CMD , & ifr ) ) { perror ( " " ) ; printf ( " \n " ) ; close ( sockfd ) ; return UAP_FAILURE ; } if ( param . action == ACTION_GET ) { printf ( " \n " , param . tx_cfg . httxcap ) ; } close ( sockfd ) ; return UAP_SUCCESS ; }
@brief Process HT Tx configuration
  @param argc   Number of arguments
  @param argv   A pointer to arguments array
  @return     MLAN_STATUS_SUCCESS--success, otherwise--fail
@brief Process HT Tx configuration @param argc Number of arguments @param argv A pointer to arguments array @return MLAN_STATUS_SUCCESS -- success otherwise -- fail
/* Check arguments */ /* Open socket */ /* Initialize the ifr structure */ /* Perform ioctl */ /* Handle response */ /* Close socket */