File tree Expand file tree Collapse file tree
netjsonconfig/backends/raspbian Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ def to_intermediate(self):
3535 def _get_hwmode (self , radio ):
3636 protocol = radio ['protocol' ]
3737 if protocol in ['802.11a' , '802.11b' , '802.11g' ]:
38- return protocol [1 :]
39- if radio ['channel' ] is 0 :
40- return radio .get ('hwmode' )
38+ return protocol [- 1 :]
4139 elif radio ['channel' ] <= 13 :
4240 return 'g'
4341 else :
Original file line number Diff line number Diff line change 44# config: /etc/hostapd/hostapd.conf
55interface={{ wireless.get('ifname') }}
66driver=nl80211
7+ {% if wireless .get ('protocol' ) == 'a' or 'b' or 'g' %}
78hw_mode={{ wireless.get('hwmode')}}
9+ {% endif %}
810channel={{ wireless.get('channel')}}
911{% if wireless .get ('protocol' ) == '80211n' %}
1012ieee80211n=1
1113{% endif %}
14+ {% if wireless .get ('protocol' ) == '80211ac' %}
15+ ieee80211ac=1
16+ {% endif %}
1217ssid={{ wireless.get('ssid') }}
1318{% if wireless .get ('encryption' ) != {} %}
1419auth_algs={{ wireless.get('encryption').get('auth_algs') }}
You can’t perform that action at this time.
0 commit comments