txpower setting via config

This commit is contained in:
Vasil Kolev 2019-10-30 15:19:29 +02:00 committed by root
parent 2b2d2d3041
commit 6b373958bf
7 changed files with 34 additions and 9 deletions

View File

@ -18,6 +18,7 @@ def wifi(name)
wlans.each do |id, wlan| wlans.each do |id, wlan|
wlan_config.sub!("<radio#{id}-channel>", wlan['channel'].to_s) wlan_config.sub!("<radio#{id}-channel>", wlan['channel'].to_s)
wlan_config.sub!("<wlan#{id}-macaddr>", wlan['bssid'].to_s) wlan_config.sub!("<wlan#{id}-macaddr>", wlan['bssid'].to_s)
wlan_config.sub!("<wlan#{id}-txpower>", wlan['txpower'].to_s)
end end
#wlan_config.gsub!("# option channel", " option channel") #wlan_config.gsub!("# option channel", " option channel")
wlan_config.gsub!("# option macaddr", " option macaddr") wlan_config.gsub!("# option macaddr", " option macaddr")

View File

@ -12,9 +12,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:55 bssid: 0e:50:00:11:00:55
channel: 157 channel: 157
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:55 bssid: 0e:24:00:11:00:55
channel: 12 channel: 12
txpower: 20
mixins: mixins:
- all - all
- archer-c5 - archer-c5
@ -26,9 +28,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:50 bssid: 0e:50:00:11:00:50
channel: 157 channel: 157
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:50 bssid: 0e:24:00:11:00:50
channel: 12 channel: 12
txpower: 30
mixins: mixins:
- all - all
- dap2965 - dap2965
@ -40,9 +44,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:51 bssid: 0e:50:00:11:00:51
channel: 60 channel: 60
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:51 bssid: 0e:24:00:11:00:51
channel: 6 channel: 6
txpower: 30
mixins: mixins:
- all - all
- dap2965 - dap2965
@ -55,9 +61,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:52 bssid: 0e:50:00:11:00:52
channel: 157 channel: 157
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:52 bssid: 0e:24:00:11:00:52
channel: 6 channel: 6
txpower: 30
mixins: mixins:
- all - all
- linksys - linksys
@ -69,9 +77,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:53 bssid: 0e:50:00:11:00:53
channel: 44 channel: 44
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:53 bssid: 0e:24:00:11:00:53
channel: 12 channel: 12
txpower: 30
mixins: mixins:
- all - all
- dap2965 - dap2965
@ -83,9 +93,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:54 bssid: 0e:50:00:11:00:54
channel: 60 channel: 60
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:54 bssid: 0e:24:00:11:00:54
channel: 12 channel: 12
txpower: 30
mixins: mixins:
- all - all
- archer-c5 - archer-c5
@ -97,9 +109,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:56 bssid: 0e:50:00:11:00:56
channel: 108 channel: 108
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:56 bssid: 0e:24:00:11:00:56
channel: 1 channel: 1
txpower: 30
mixins: mixins:
- all - all
- dap2965 - dap2965
@ -112,9 +126,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:59 bssid: 0e:50:00:11:00:59
channel: 108 channel: 108
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:59 bssid: 0e:24:00:11:00:59
channel: 1 channel: 1
txpower: 30
mixins: mixins:
- all - all
- archer-c5 - archer-c5
@ -126,9 +142,11 @@ configurations:
0: 0:
bssid: 0e:50:00:11:00:58 bssid: 0e:50:00:11:00:58
channel: 44 channel: 44
txpower: 30
1: 1:
bssid: 0e:24:00:11:00:58 bssid: 0e:24:00:11:00:58
channel: 12 channel: 12
txpower: 30
mixins: mixins:
- all - all
- linksys - linksys
@ -141,9 +159,11 @@ configurations:
0: 0:
bssid: 0e:50:00:00:00:60 bssid: 0e:50:00:00:00:60
channel: 44 channel: 44
txpower: 30
1: 1:
bssid: 0e:24:00:00:00:60 bssid: 0e:24:00:00:00:60
channel: 1 channel: 1
txpower: 30
mixins: mixins:
- all - all
- linksys - linksys
@ -155,9 +175,11 @@ configurations:
0: 0:
bssid: 0e:50:00:00:00:61 bssid: 0e:50:00:00:00:61
channel: 157 channel: 157
txpower: 30
1: 1:
bssid: 0e:24:00:00:00:61 bssid: 0e:24:00:00:00:61
channel: 12 channel: 12
txpower: 30
mixins: mixins:
- all - all
- linksys - linksys
@ -170,9 +192,11 @@ configurations:
0: 0:
bssid: 0e:50:00:00:00:62 bssid: 0e:50:00:00:00:62
channel: 108 channel: 108
txpower: 30
1: 1:
bssid: 0e:24:00:00:00:62 bssid: 0e:24:00:00:00:62
channel: 6 channel: 6
txpower: 30
mixins: mixins:
- all - all
- archer-c5 - archer-c5

View File

@ -3,7 +3,7 @@ config wifi-device radio0
option hwmode 11a option hwmode 11a
option path 'pci0000:01/0000:01:00.0' option path 'pci0000:01/0000:01:00.0'
option channel <radio0-channel> option channel <radio0-channel>
option txpower '30' option txpower '<wlan0-txpower>'
option htmode VHT80 option htmode VHT80
option distance '20' option distance '20'
option require_mode 'n' option require_mode 'n'
@ -28,7 +28,7 @@ config wifi-device radio1
option hwmode 11g option hwmode 11g
option path 'platform/qca955x_wmac' option path 'platform/qca955x_wmac'
option channel <radio1-channel> option channel <radio1-channel>
option txpower '20' option txpower '<wlan1-txpower>'
option htmode 'HT20' option htmode 'HT20'
option distance '20' option distance '20'
option require_mode 'g' option require_mode 'g'

View File

@ -3,7 +3,7 @@ config wifi-device radio0
option hwmode 11a option hwmode 11a
option path 'pci0000:00/0000:00:00.0' option path 'pci0000:00/0000:00:00.0'
option channel <radio0-channel> option channel <radio0-channel>
option txpower '30' option txpower '<wlan0-txpower>'
option htmode VHT80 option htmode VHT80
option distance '20' option distance '20'
option require_mode 'n' option require_mode 'n'
@ -28,7 +28,7 @@ config wifi-device radio1
option hwmode 11g option hwmode 11g
option path 'platform/qca955x_wmac' option path 'platform/qca955x_wmac'
option channel <radio1-channel> option channel <radio1-channel>
option txpower '20' option txpower '<wlan1-txpower>'
option htmode 'HT20' option htmode 'HT20'
option distance '20' option distance '20'
option require_mode 'g' option require_mode 'g'

View File

@ -3,7 +3,7 @@ config wifi-device radio0
option hwmode 11a option hwmode 11a
option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0' option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
option channel <radio0-channel> option channel <radio0-channel>
option txpower '30' option txpower '<wlan0-txpower>'
option htmode VHT80 option htmode VHT80
option distance '20' option distance '20'
option require_mode 'n' option require_mode 'n'
@ -28,7 +28,7 @@ config wifi-device radio1
option hwmode 11g option hwmode 11g
option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0' option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
option channel <radio1-channel> option channel <radio1-channel>
option txpower '20' option txpower '<wlan1-txpower>'
option htmode 'HT20' option htmode 'HT20'
option distance '20' option distance '20'
option require_mode 'g' option require_mode 'g'

View File

@ -3,7 +3,7 @@ config wifi-device radio0
option hwmode 11g option hwmode 11g
option path 'platform/ar934x_wmac' option path 'platform/ar934x_wmac'
option channel <radio0-channel> option channel <radio0-channel>
option txpower '20' option txpower '<wlan0-txpower>'
option htmode 'HT20' option htmode 'HT20'
option distance '20' option distance '20'
option require_mode 'g' option require_mode 'g'
@ -28,7 +28,7 @@ config wifi-device radio1
option hwmode 11a option hwmode 11a
option path 'pci0000:00/0000:00:00.0' option path 'pci0000:00/0000:00:00.0'
option channel <radio1-channel> option channel <radio1-channel>
option txpower '30' option txpower '<wlan1-txpower>'
option htmode HT40 option htmode HT40
option distance '20' option distance '20'
option require_mode 'n' option require_mode 'n'

View File

@ -3,7 +3,7 @@ config wifi-device radio0
option hwmode 11g option hwmode 11g
option path 'platform/qca955x_wmac' option path 'platform/qca955x_wmac'
option channel <radio1-channel> option channel <radio1-channel>
option txpower '20' option txpower '<wlan0-txpower>'
option htmode 'HT20' option htmode 'HT20'
option distance '20' option distance '20'
option require_mode 'g' option require_mode 'g'