File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
netjsonconfig/backends/openwrt Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -224,8 +224,9 @@ def _get_radios(self):
224224 for radio in radios :
225225 uci_radio = radio .copy ()
226226 # rename tx_power to txpower
227- uci_radio ['txpower' ] = radio ['tx_power' ]
228- del uci_radio ['tx_power' ]
227+ if 'tx_power' in radio :
228+ uci_radio ['txpower' ] = radio ['tx_power' ]
229+ del uci_radio ['tx_power' ]
229230 # rename driver to type
230231 uci_radio ['type' ] = radio ['driver' ]
231232 del uci_radio ['driver' ]
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ def test_radio(self):
2121 "protocol" : "802.11n" ,
2222 "channel" : 140 ,
2323 "channel_width" : 20 ,
24- "tx_power" : 9 ,
2524 "country" : "en"
2625 },
2726 {
@@ -45,7 +44,6 @@ def test_radio(self):
4544 option htmode 'HT20'
4645 option hwmode '11a'
4746 option phy 'phy0'
48- option txpower '9'
4947 option type 'mac80211'
5048
5149config wifi-device 'radio1'
You can’t perform that action at this time.
0 commit comments