Skip to content

Commit

Permalink
wireless: T5540: fix VHT capability settings for 802.11ac
Browse files Browse the repository at this point in the history
  • Loading branch information
alainlamar authored Sep 2, 2023
1 parent 8daf7f9 commit 6896aab
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions data/templates/wifi/hostapd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ vht_oper_chwidth={{ capabilities.vht.channel_set_width }}
{% endif %}

{% set output = namespace(value='') %}
{% if capabilities.vht.channel_set_width is vyos_defined('2') %}
{% set output.value = output.value ~ '[VHT160]' %}
{% endif %}
{% if capabilities.vht.channel_set_width is vyos_defined('3') %}
{% set output.value = output.value ~ '[VHT160-80PLUS80]' %}
{% endif %}
{% if capabilities.vht.stbc.tx is vyos_defined %}
{% set output.value = output.value ~ '[TX-STBC-2BY1]' %}
{% endif %}
Expand All @@ -363,30 +369,21 @@ vht_oper_chwidth={{ capabilities.vht.channel_set_width }}
{% endif %}
{% if capabilities.vht.max_mpdu_exp is vyos_defined %}
{% set output.value = output.value ~ '[MAX-A-MPDU-LEN-EXP-' ~ capabilities.vht.max_mpdu_exp ~ ']' %}
{% if capabilities.vht.max_mpdu_exp is vyos_defined('2') %}
{% set output.value = output.value ~ '[VHT160]' %}
{% endif %}
{% if capabilities.vht.max_mpdu_exp is vyos_defined('3') %}
{% set output.value = output.value ~ '[VHT160-80PLUS80]' %}
{% endif %}
{% endif %}
{% if capabilities.vht.link_adaptation is vyos_defined('unsolicited') %}
{% set output.value = output.value ~ '[VHT-LINK-ADAPT2]' %}
{% elif capabilities.vht.link_adaptation is vyos_defined('both') %}
{% set output.value = output.value ~ '[VHT-LINK-ADAPT3]' %}
{% endif %}

{% for short_gi in capabilities.vht.short_gi if capabilities.vht.short_gi is vyos_defined %}
{% set output.value = output.value ~ '[SHORT-GI-' ~ short_gi | upper ~ ']' %}
{% endfor %}

{% for beamform in capabilities.vht.beamform if capabilities.vht.beamform is vyos_defined %}
{% set output.value = output.value ~ '[SU-BEAMFORMER]' if beamform is vyos_defined('single-user-beamformer') else '' %}
{% set output.value = output.value ~ '[SU-BEAMFORMEE]' if beamform is vyos_defined('single-user-beamformee') else '' %}
{% set output.value = output.value ~ '[MU-BEAMFORMER]' if beamform is vyos_defined('multi-user-beamformer') else '' %}
{% set output.value = output.value ~ '[MU-BEAMFORMEE]' if beamform is vyos_defined('multi-user-beamformee') else '' %}
{% endfor %}

{% if capabilities.vht.antenna_count is vyos_defined and capabilities.vht.antenna_count | int > 1 %}
{% if capabilities.vht.beamform is vyos_defined %}
{% if capabilities.vht.beamform == 'single-user-beamformer' %}
Expand Down

0 comments on commit 6896aab

Please sign in to comment.