http://git.kernel.org/cgit/linux/kernel/git/jberg/iw.git/tree/scan.c?id=v3.17#n1046.

    Positional arguments:
    data -- bytearray data to read.

    Returns:
    Dict.

def get_wifi_wmm_param(data):
    """http://git.kernel.org/cgit/linux/kernel/git/jberg/iw.git/tree/scan.c?id=v3.17#n1046.

    Positional arguments:
    data -- bytearray data to read.

    Returns:
    Dict.
    """
    answers = dict()
    aci_tbl = ('BE', 'BK', 'VI', 'VO')
    if data[0] & 0x80:
        answers['u-APSD'] = True
    data = data[2:]

    for i in range(4):
        key = aci_tbl[(data[0] >> 5) & 3]
        value = dict()
        if data[0] & 0x10:
            value['acm'] = True
        value['CW'] = ((1 << (data[1] & 0xf)) - 1, (1 << (data[1] >> 4)) - 1)
        value['AIFSN'] = data[0] & 0xf
        if data[2] | data[3]:
            value['TXOP'] = (data[2] + (data[3] << 8)) * 32
        answers[key] = value
        data = data[4:]

    return {'Parameter version 1': answers}