Skip to content

Commit

Permalink
[OpenWrt] Removed support for "chanbw" for types "ath5k" and "ath9k"
Browse files Browse the repository at this point in the history
Backward incompatible change.
  • Loading branch information
nemesifier committed Mar 30, 2016
1 parent 2cb3087 commit 7f74209
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
2 changes: 0 additions & 2 deletions netjsonconfig/backends/openwrt/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ def _get_radios(self):
# determine channel width
if radio['driver'] == 'mac80211':
uci_radio['htmode'] = self.__get_htmode(radio)
elif radio['driver'] in ['ath9k', 'ath5k']:
uci_radio['chanbw'] = radio['channel_width']
del uci_radio['channel_width']
# ensure country is uppercase
if uci_radio.get('country'):
Expand Down
42 changes: 0 additions & 42 deletions tests/openwrt/test_wireless.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,48 +101,6 @@ def test_radio_2ghz_mac80211(self):
""")
self.assertEqual(o.render(), expected)

def test_radio_2ghz_athk(self):
o = OpenWrt({
"radios": [
{
"name": "radio0",
"phy": "phy0",
"driver": "ath5k",
"protocol": "802.11b",
"channel": 3,
"channel_width": 5,
"tx_power": 3
},
{
"name": "radio1",
"phy": "phy1",
"driver": "ath9k",
"protocol": "802.11a",
"channel": 140,
"channel_width": 10,
"tx_power": 4
}
]
})
expected = self._tabs("""package wireless
config wifi-device 'radio0'
option chanbw '5'
option channel '3'
option hwmode '11b'
option phy 'phy0'
option txpower '3'
option type 'ath5k'
config wifi-device 'radio1'
option chanbw '10'
option channel '140'
option hwmode '11a'
option phy 'phy1'
option txpower '4'
option type 'ath9k'
""")
self.assertEqual(o.render(), expected)

def test_radio_ac_and_custom_attrs(self):
o = OpenWrt({
Expand Down

0 comments on commit 7f74209

Please sign in to comment.