software/drivers/sd8887/src/wlan/mapp/uaputl/uaputl.h
/**
 *  @brief  Detects if band is different across the list of scan channels
 *
 *  @param  argc    Number of elements
 *  @param  argv    Array of strings
 *  @return UAP_FAILURE or UAP_SUCCESS
 */
@brief  Detects if band is different across the list of scan channels
@param  argc    Number of elements
@param  argv    Array of strings
@return UAP_FAILURE or UAP_SUCCESS
@brief Detects if band is different across the list of scan channels @param argc Number of elements @param argv Array of strings @return UAP_FAILURE or UAP_SUCCESS
static inline int
has_diff_band(int argc, char *argv[])
{
	int i = 0;
	int channel = 0;
	int band[MAX_CHANNELS];
	for (i = 0; i < argc; i++) {
		band[i] = -1;
		sscanf(argv[i], "%d.%d", &channel, &band[i]);
		if (band[i] == -1) {
			if (channel > MAX_CHANNELS_BG) {
				band[i] = 1;
			} else {
				band[i] = 0;
			}
		}
	}
	for (i = 0; i <= (argc - 2); i++) {
		if (band[i] != band[i + 1]) {
			return UAP_FAILURE;
		}
	}
	return UAP_SUCCESS;
}
static inline int has_diff_band ( int argc , char * argv [ ] ) { int i = 0 ; int channel = 0 ; int band [ MAX_CHANNELS ] ; for ( i = 0 ; i < argc ; i ++ ) { band [ i ] = -1 ; sscanf ( argv [ i ] , " " , & channel , & band [ i ] ) ; if ( band [ i ] == -1 ) { if ( channel > MAX_CHANNELS_BG ) { band [ i ] = 1 ; } else { band [ i ] = 0 ; } } } for ( i = 0 ; i <= ( argc - 2 ) ; i ++ ) { if ( band [ i ] != band [ i + 1 ] ) { return UAP_FAILURE ; } } return UAP_SUCCESS ; }
@brief  Detects if band is different across the list of scan channels
  @param  argc    Number of elements
  @param  argv    Array of strings
  @return UAP_FAILURE or UAP_SUCCESS
@brief Detects if band is different across the list of scan channels @param argc Number of elements @param argv Array of strings @return UAP_FAILURE or UAP_SUCCESS
/* Check for different bands */