def get_wifi_wps(_, data):
answers = dict()<EOL>while len(data) >= <NUM_LIT:4>:<EOL><INDENT>subtype = (data[<NUM_LIT:0>] << <NUM_LIT:8>) + data[<NUM_LIT:1>]<EOL>sublen = (data[<NUM_LIT:2>] << <NUM_LIT:8>) + data[<NUM_LIT:3>]<EOL>if sublen > len(data):<EOL><INDENT>break<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>] >> <NUM_LIT:4>, data[<NUM_LIT:4>] & <NUM_LIT><EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>:sublen + <NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>if sublen != <NUM_LIT:2>:<EOL><INDENT>answers['<STR_LIT>'] = '<STR_LIT>'.format(sublen)<EOL><DEDENT>else:<EOL><INDENT>id_ = data[<NUM_LIT:4>] << <NUM_LIT:8> | data[<NUM_LIT:5>]<EOL>answers['<STR_LIT>'] = (id_, wifi_wps_dev_passwd_id(id_))<EOL><DEDENT><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>:sublen + <NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>:sublen + <NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>:sublen + <NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>val = data[<NUM_LIT:4>]<EOL>answers['<STR_LIT>'] = (val, '<STR_LIT>' if val == <NUM_LIT:3> else '<STR_LIT>')<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>:sublen + <NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>val = data[<NUM_LIT:4>]<EOL>answers['<STR_LIT>'] = (val, {<NUM_LIT:1>: '<STR_LIT>', <NUM_LIT:2>: '<STR_LIT>'}.get(val, '<STR_LIT>'))<EOL><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>if sublen != <NUM_LIT:16>:<EOL><INDENT>answers['<STR_LIT>'] = '<STR_LIT>'.format(sublen)<EOL><DEDENT>else:<EOL><INDENT>answers['<STR_LIT>'] = bytearray(data[<NUM_LIT:4>:<NUM_LIT>])<EOL><DEDENT><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>if sublen != <NUM_LIT:8>:<EOL><INDENT>answers['<STR_LIT>'] = '<STR_LIT>'.format(sublen)<EOL><DEDENT>else:<EOL><INDENT>answers['<STR_LIT>'] = '<STR_LIT>'.format(<EOL>data[<NUM_LIT:4>] << <NUM_LIT:8> | data[<NUM_LIT:5>],<EOL>'<STR_LIT>'.join(format(x, '<STR_LIT>') for x in data[<NUM_LIT:6>:<NUM_LIT:9>]),<EOL>data[<NUM_LIT:10>] << <NUM_LIT:8> | data[<NUM_LIT:11>]<EOL>)<EOL><DEDENT><DEDENT>elif subtype == <NUM_LIT>:<EOL><INDENT>answers['<STR_LIT>'] = data[<NUM_LIT:4>]<EOL><DEDENT>elif subtype == <NUM_LIT> or subtype == <NUM_LIT>:<EOL><INDENT>meth = (data[<NUM_LIT:4>] << <NUM_LIT:8>) + data[<NUM_LIT:5>]<EOL>key = '<STR_LIT>' if subtype == <NUM_LIT> else '<STR_LIT>'<EOL>values = [s for i, s in enumerate(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>')) if meth & (<NUM_LIT:1> << i)]<EOL>answers[key] = values<EOL><DEDENT>else:<EOL><INDENT>value = '<STR_LIT:U+0020>'.join(format(x, '<STR_LIT>') for x in data[<NUM_LIT:4>:])<EOL>answers['<STR_LIT>'.format(subtype, sublen)] = value<EOL><DEDENT>data = data[<NUM_LIT:4>:]<EOL><DEDENT>if data:<EOL><INDENT>answers['<STR_LIT>'] = '<STR_LIT:U+0020>'.join(format(x, '<STR_LIT>') for x in data)<EOL><DEDENT>return answers<EOL>
http://git.kernel.org/cgit/linux/kernel/git/jberg/iw.git/tree/scan.c?id=v3.17#n1130.

    Positional arguments:
    data -- bytearray data to read.

    Returns:
    Dict.