def get_country(_, data):
answers = {'<STR_LIT>': country_env_str(chr(data[<NUM_LIT:2>]))}<EOL>data = data[<NUM_LIT:3>:]<EOL>while len(data) >= <NUM_LIT:3>:<EOL><INDENT>triplet = ieee80211_country_ie_triplet(data)<EOL>if triplet.ext.reg_extension_id >= IEEE80211_COUNTRY_EXTENSION_ID:<EOL><INDENT>answers['<STR_LIT>'] = triplet.ext.reg_extension_id<EOL>answers['<STR_LIT>'] = triplet.ext.reg_class<EOL>answers['<STR_LIT>'] = triplet.ext.coverage_class<EOL>answers['<STR_LIT>'] = triplet.ext.coverage_class * <NUM_LIT><EOL>data = data[<NUM_LIT:3>:]<EOL>continue<EOL><DEDENT>if triplet.chans.first_channel <= <NUM_LIT>:  <EOL><INDENT>end_channel = triplet.chans.first_channel + (triplet.chans.num_channels - <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>end_channel = triplet.chans.first_channel + (<NUM_LIT:4> * (triplet.chans.num_channels - <NUM_LIT:1>))<EOL><DEDENT>answers['<STR_LIT>'] = triplet.chans.max_power<EOL>answers['<STR_LIT>'] = (triplet.chans.first_channel, end_channel)<EOL>data = data[<NUM_LIT:3>:]<EOL><DEDENT>return answers<EOL>
http://git.kernel.org/cgit/linux/kernel/git/jberg/iw.git/tree/scan.c?id=v3.17#n267.

    Positional arguments:
    data -- bytearray data to read.

    Returns:
    Dict.