summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-10-02 22:51:09 +0200
committerChristian Pointner <equinox@spreadspace.org>2022-10-02 22:51:09 +0200
commitca51484234d85341bf4df613a4ffab162bcadbe2 (patch)
treed1b7baf98aa8f99d5b6c24cac22bfafff7310101
parentupdate wpa_supplicant.conf (diff)
refactoring of access point client steering config
-rw-r--r--inventory/group_vars/accesspoints/vars.yml48
-rw-r--r--inventory/group_vars/chaos-at-home-ap/vars.yml8
2 files changed, 33 insertions, 23 deletions
diff --git a/inventory/group_vars/accesspoints/vars.yml b/inventory/group_vars/accesspoints/vars.yml
index e78740d4..b704e147 100644
--- a/inventory/group_vars/accesspoints/vars.yml
+++ b/inventory/group_vars/accesspoints/vars.yml
@@ -105,7 +105,7 @@ accesspoint_wireless_ifaces_yaml: |
mobility_domain: '{{ "%04x" % (accesspoint_80211r.mobility_domain_base + outer_loop.index0) }}'
ft_over_ds: '1'
{% endif %}
- {% if accesspoint_band_steering is defined %}
+ {% if accesspoint_client_steering is defined %}
bss_transition: '1'
wnm_sleep_mode: '1'
time_advertisement: '2'
@@ -156,14 +156,14 @@ openwrt_packages_add:
- libiwinfo-lua
- libubus-lua
-_accesspoint_band_steering_packages_extra_:
+_accesspoint_client_steering_packages_extra_:
none: []
dawn:
- dawn
usteer:
- usteer
-openwrt_packages_extra: "{{ _accesspoint_band_steering_packages_extra_[accesspoint_band_steering.kind | default('none')] }}"
+openwrt_packages_extra: "{{ _accesspoint_client_steering_packages_extra_[accesspoint_client_steering.kind | default('none')] }}"
openwrt_mixin:
@@ -352,10 +352,22 @@ openwrt_uci_base:
network: "{{ accesspoint_network_base + accesspoint_network_zones }}"
wireless: "{{ accesspoint_wireless_devices + accesspoint_wireless_ifaces }}"
+
+_accesspoint_client_steering_options_default_:
+ dawn:
+ network:
+ broadcast_ip: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr('broadcast') }}"
+ usteer:
+ network: 'mgmt'
+ syslog: '1'
+ local_mode: '0'
+ ipv6: '0'
+ debug_level: '2'
+
openwrt_uci_band_steering: "{{ openwrt_uci_band_steering_yaml | from_yaml }}"
openwrt_uci_band_steering_yaml: |
- {% if accesspoint_band_steering is defined %}
- {% if accesspoint_band_steering.kind == 'dawn' %}
+ {% if accesspoint_client_steering is defined %}
+ {% if accesspoint_client_steering.kind == 'dawn' %}
umdns:
- name: umds
options:
@@ -363,29 +375,23 @@ openwrt_uci_band_steering_yaml: |
network:
- mgmt
- ## TODO: what are the minimal required settings here??
dawn:
- - name: network
+ {% for section, options in (_accesspoint_client_steering_options_default_.dawn | combine(accesspoint_client_steering.options | default({}))).items() %}
+ - name: {{ section }}
options:
- broadcast_ip: '{{ network_mgmt_zone.prefix | ansible.utils.ipaddr("broadcast") }}'
- {% elif accesspoint_band_steering.kind == 'usteer' %}
+ {% for option, value in options.items() %}
+ {{ option }}: {{ value }}
+ {% endfor %}
+ {% endfor %}
+ {% elif accesspoint_client_steering.kind == 'usteer' %}
usteer:
- name: usteer
options:
- network: 'mgmt'
- syslog: '1'
- local_mode: '0'
- ipv6: '0'
- debug_level: '2'
- assoc_steering: '1'
- band_steering_threshold: '0'
- band_steering_interval: '30000'
- ssid_list:
- {% for zone in accesspoint_band_steering.zones %}
- - '{{ accesspoint_zones[zone].ssid }}'
+ {% for option,value in (_accesspoint_client_steering_options_default_.usteer | combine(accesspoint_client_steering.options | default({}))).items() %}
+ {{ option }}: {{ value }}
{% endfor %}
{% endif %}
{% endif %}
-openwrt_uci: "{{ openwrt_uci_base | combine(accesspoint_band_steering is defined | ternary(openwrt_uci_band_steering, {})) }}"
+openwrt_uci: "{{ openwrt_uci_base | combine(accesspoint_client_steering is defined | ternary(openwrt_uci_band_steering, {})) }}"
diff --git a/inventory/group_vars/chaos-at-home-ap/vars.yml b/inventory/group_vars/chaos-at-home-ap/vars.yml
index af4773f4..535dedef 100644
--- a/inventory/group_vars/chaos-at-home-ap/vars.yml
+++ b/inventory/group_vars/chaos-at-home-ap/vars.yml
@@ -18,9 +18,13 @@ accesspoint_wifi_channels:
accesspoint_80211r:
mobility_domain_base: 0xca00
-accesspoint_band_steering:
+accesspoint_client_steering:
kind: usteer
- zones: "{{ accesspoint_zones | list }}"
+ options:
+ assoc_steering: '1'
+ band_steering_threshold: '0'
+ band_steering_interval: '30000'
+ ssid_list: "{{ accesspoint_zones | dict2items | map(attribute='value.ssid') }}"
accesspoint_ntp_servers: