def test_ap_tx_queue_params_invalid(dev, apdev):
    'Invalid TX queue params set (cwmin/cwmax)'
    ssid = 'tx'
    params = {}
    params['ssid'] = ssid
    params['tx_queue_data2_aifs'] = '4'
    params['tx_queue_data2_cwmin'] = '7'
    params['tx_queue_data2_cwmax'] = '1023'
    params['tx_queue_data2_burst'] = '4.2'
    params['wmm_ac_bk_cwmin'] = '4'
    params['wmm_ac_bk_cwmax'] = '10'
    params['wmm_ac_bk_aifs'] = '7'
    params['wmm_ac_bk_txop_limit'] = '0'
    params['wmm_ac_bk_acm'] = '0'
    hapd = hostapd.add_ap(apdev[0], params)
    hapd.set('wmm_ac_be_cwmin', '3')
    if ('FAIL' not in hapd.request('SET tx_queue_data2_cwmax 3')):
        raise Exception('TX cwMax < cwMin accepted')
    if ('FAIL' not in hapd.request('SET wmm_ac_bk_cwmax 3')):
        raise Exception('AC cwMax < cwMin accepted')
Invalid TX queue params set (cwmin/cwmax)
def test_ap_tx_queue_params_invalid(dev, apdev):
    
    ssid = 'tx'
    params = {}
    params['ssid'] = ssid
    params['tx_queue_data2_aifs'] = '4'
    params['tx_queue_data2_cwmin'] = '7'
    params['tx_queue_data2_cwmax'] = '1023'
    params['tx_queue_data2_burst'] = '4.2'
    params['wmm_ac_bk_cwmin'] = '4'
    params['wmm_ac_bk_cwmax'] = '10'
    params['wmm_ac_bk_aifs'] = '7'
    params['wmm_ac_bk_txop_limit'] = '0'
    params['wmm_ac_bk_acm'] = '0'
    hapd = hostapd.add_ap(apdev[0], params)
    hapd.set('wmm_ac_be_cwmin', '3')
    if ('FAIL' not in hapd.request('SET tx_queue_data2_cwmax 3')):
        raise Exception('TX cwMax < cwMin accepted')
    if ('FAIL' not in hapd.request('SET wmm_ac_bk_cwmax 3')):
        raise Exception('AC cwMax < cwMin accepted')