Logo Search packages:      
Sourcecode: uaputl version File versions  Download package

int is_tx_rate_valid ( u8  rate )

check rate is valid or not.

Parameters:
raterate for check
Returns:
UAP_SUCCESS or UAP_FAILURE

Definition at line 689 of file uapcmd.c.

References BASIC_RATE_SET_BIT, get_sys_cfg_rates(), MAX_DATA_RATES, UAP_FAILURE, and UAP_SUCCESS.

Referenced by apcmd_sys_cfg_rates_ext(), apcmd_sys_cfg_tx_data_rate(), and apcmd_sys_config_profile().

{
    int rate_cnt = 0;
    int i;
    u8 rates[MAX_DATA_RATES];

    rate_cnt = get_sys_cfg_rates((u8 *) & rates);
    if (rate_cnt > 0) {
        for (i = 0; i < rate_cnt; i++) {
            if (rate == (rates[i] & ~BASIC_RATE_SET_BIT)) {
                return UAP_SUCCESS;
            }
        }
    }
    return UAP_FAILURE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index