Changeset 11738 in genesis for tools


Ignore:
Timestamp:
Feb 14, 2013, 9:44:35 AM (12 years ago)
Author:
rick
Message:

Allign at channels to match the 801.11g recommendations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r11736 r11738  
    3131import sys
    3232import os
    33 import re
    3433sys.path.append(os.path.dirname(__file__))
    3534sys.path.append('/usr/local/bin')
     
    4140import make_network_kml
    4241import math
     42import random
    4343import rdnap
     44import re
    4445import socket
    4546import string
     
    4748import time
    4849import urlparse
     50
    4951from pprint import pprint
    5052from collections import defaultdict
     
    18351837                datadump[iface_key] = datadump[iface_key]['desc']
    18361838
     1839              # We are not using 802.11b anymore. OFDM is preferred over DSSS
     1840              # due to better collision avoidance.
     1841              if datadump[iface_key]['type'] == '11b':
     1842                datadump[iface_key]['type'] = '11g'
     1843
     1844              # Setting 802.11g channels to de-facto standards, to avoid
     1845              # un-detected sharing with other overlapping channels
     1846              #
     1847              # Technically we could also use channel 13 in NL, but this is not
     1848              # recommended as foreign devices might not be able to select this
     1849              # channel. Secondly using 1,5,9,13 instead is going to clash with
     1850              # the de-facto usage of 1,6,11.
     1851              #
     1852              # See: https://en.wikipedia.org/wiki/List_of_WLAN_channels
     1853              channels_at_2400Mhz = (1,6,11)
     1854              if datadump[iface_key]['type'] == '11g' and datadump[iface_key].has_key('channel'):
     1855                datadump[iface_key]['channel'] = int(datadump[iface_key]['channel'])
     1856                if datadump[iface_key]['channel'] not in channels_at_2400Mhz:
     1857                   datadump[iface_key]['channel'] = random.choice(channels_at_2400Mhz)
     1858
    18371859              # Mandatory interface keys
    18381860              if not datadump[iface_key].has_key('status'):
Note: See TracChangeset for help on using the changeset viewer.