feat: netconfig: Allow wifi-iface(s) to remain without ifname
There are certain situations we do not want to set the ifname on a wifi-ifae, e.g. when navigating bugs related to hard-setting the `ifname` as we see on DBDC-capable mt76 devices. Change our wifi-iface setup so that we do not search for devices by ifname, but instead, by section name (e.g. `labb5` in `config wifi-iface 'labb5'`). Also, add an `force_ifnameless` variable to our wifi-iface YAML so that we can optionally force-empty the ifname field in settings where we would like to do so. By default (with `force_ifnameless` unset or false), we will use the same value for the `ifname` option and for the section name. Impacts - You will need to migrate manually by naming your wifi-iface sections
This commit is contained in:
		
							parent
							
								
									e05b253210
								
							
						
					
					
						commit
						29e103a176
					
				@ -52,10 +52,9 @@
 | 
			
		||||
    command: section
 | 
			
		||||
    config: wireless
 | 
			
		||||
    type: wifi-iface
 | 
			
		||||
    find:
 | 
			
		||||
      ifname: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') }}"
 | 
			
		||||
    name: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') }}"
 | 
			
		||||
    value:
 | 
			
		||||
      ifname: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') }}"
 | 
			
		||||
      ifname: "{{ item.ifname | default(wifi_iface[item.template].ifname) | default('') if not item.force_ifnameless | default(false) }}"
 | 
			
		||||
      mode: "{{ item.mode | default(wifi_iface[item.template].mode) }}"
 | 
			
		||||
      device: "{{ item.device | default(wifi_iface[item.template].device) }}"
 | 
			
		||||
      network: "{{ item.network | default(wifi_iface[item.template].network) }}"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user