software/drivers/sd8887/src/wlan/mapp/mlanconfig/mlanconfig.c
/**
 *  @brief Get the current status of the WMM Traffic Streams
 *
 *  Command: mlanconfig mlanX ts_status
 *
 *  @param argc     number of arguments
 *  @param argv     A pointer to arguments array
 *
 *  @return         MLAN_STATUS_SUCCESS--success, otherwise--fail
 */
@brief Get the current status of the WMM Traffic Streams
Command: mlanconfig mlanX ts_status

@param argc     number of arguments
@param argv     A pointer to arguments array


@brief Get the current status of the WMM Traffic Streams Command : mlanconfig mlanX ts_status @param argc number of arguments @param argv A pointer to arguments array
static int
process_wmm_ts_status(int argc, char *argv[])
{
	int ioctl_val, subioctl_val;
	struct iwreq iwr;
	wlan_ioctl_wmm_ts_status_t ts_status;
	int tid;
	const char *ac_str_tbl[] = { "BK", "BE", "VI", "VO" };
	if (get_priv_ioctl("ts_status",
			   &ioctl_val, &subioctl_val) == MLAN_STATUS_FAILURE) {
		return -EOPNOTSUPP;
	}
	printf("\nTID   Valid    AC   UP   PSB   FlowDir  MediumTime\n");
	printf("---------------------------------------------------\n");
	for (tid = 0; tid <= 7; tid++) {
		memset(&ts_status, 0x00, sizeof(ts_status));
		ts_status.tid = tid;
		strncpy(iwr.ifr_name, dev_name, IFNAMSIZ - 1);
		iwr.u.data.flags = subioctl_val;
		iwr.u.data.pointer = (caddr_t) & ts_status;
		iwr.u.data.length = (sizeof(ts_status));
		if (ioctl(sockfd, ioctl_val, &iwr) < 0) {
			perror("mlanconfig: ts_status ioctl");
			return -EFAULT;
		}
		printf(" %02d     %3s    %2s    %u     %c    ",
		       ts_status.tid,
		       (ts_status.valid ? "Yes" : "No"),
		       (ts_status.
			valid ? ac_str_tbl[ts_status.accessCategory] : "--"),
		       ts_status.userPriority, (ts_status.psb ? 'U' : 'L'));
		if ((ts_status.flowDir & 0x03) == 0) {
			printf("%s", " ---- ");
		} else {
			printf("%2s%4s",
			       (ts_status.flowDir & 0x01 ? "Up" : ""),
			       (ts_status.flowDir & 0x02 ? "Down" : ""));
		}
		printf("%12u\n", ts_status.mediumTime);
	}
	printf("\n");
	return MLAN_STATUS_SUCCESS;
}
static int process_wmm_ts_status ( int argc , char * argv [ ] ) { int ioctl_val , subioctl_val ; struct iwreq iwr ; wlan_ioctl_wmm_ts_status_t ts_status ; int tid ; const char * ac_str_tbl [ ] = { " " , " " , " " , " " } ; if ( get_priv_ioctl ( " " , & ioctl_val , & subioctl_val ) == MLAN_STATUS_FAILURE ) { return - EOPNOTSUPP ; } printf ( " \n \n " ) ; printf ( " \n " ) ; for ( tid = 0 ; tid <= 7 ; tid ++ ) { memset ( & ts_status , 0x00 , sizeof ( ts_status ) ) ; ts_status . tid = tid ; strncpy ( iwr . ifr_name , dev_name , IFNAMSIZ - 1 ) ; iwr . u . data . flags = subioctl_val ; iwr . u . data . pointer = ( caddr_t ) & ts_status ; iwr . u . data . length = ( sizeof ( ts_status ) ) ; if ( ioctl ( sockfd , ioctl_val , & iwr ) < 0 ) { perror ( " " ) ; return - EFAULT ; } printf ( " " , ts_status . tid , ( ts_status . valid ? " " : " " ) , ( ts_status . valid ? ac_str_tbl [ ts_status . accessCategory ] : " " ) , ts_status . userPriority , ( ts_status . psb ? ' ' : ' ' ) ) ; if ( ( ts_status . flowDir & 0x03 ) == 0 ) { printf ( " " , " " ) ; } else { printf ( " " , ( ts_status . flowDir & 0x01 ? " " : " " ) , ( ts_status . flowDir & 0x02 ? " " : " " ) ) ; } printf ( " \n " , ts_status . mediumTime ) ; } printf ( " \n " ) ; return MLAN_STATUS_SUCCESS ; }
@brief Get the current status of the WMM Traffic Streams
  Command: mlanconfig mlanX ts_status
@brief Get the current status of the WMM Traffic Streams Command : mlanconfig mlanX ts_status