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

    Positional arguments:
    data -- bytearray data to read.

    Returns:
    Dict.

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

    Positional arguments:
    data -- bytearray data to read.

    Returns:
    Dict.
    """
    protection = ('no', 'nonmember', 20, 'non-HT mixed')
    sta_chan_width = (20, 'any')
    answers = {
        'primary channel': data[0],
        'secondary channel offset': ht_secondary_offset[data[1] & 0x3],
        'STA channel width': sta_chan_width[(data[1] & 0x4) >> 2],
        'RIFS': (data[1] & 0x8) >> 3,
        'HT protection': protection[data[2] & 0x3],
        'non-GF present': (data[2] & 0x4) >> 2,
        'OBSS non-GF present': (data[2] & 0x10) >> 4,
        'dual beacon': (data[4] & 0x40) >> 6,
        'dual CTS protection': (data[4] & 0x80) >> 7,
        'STBC beacon': data[5] & 0x1,
        'L-SIG TXOP Prot': (data[5] & 0x2) >> 1,
        'PCO active': (data[5] & 0x4) >> 2,
        'PCO phase': (data[5] & 0x8) >> 3,
    }
    return answers