Struggling to understand how to pass a new arbitrary variable from /etc/config/wireless to the downstream setup processes.
If i add a new variable foo=bar under a wifi-device stanza such as:
config wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
...
option foo 'bar'
I cannot figure out how to access this variable at somewhere downstream like mac80211_hostapd_setup_base
.
It appears that this variable never gets loaded into config
. Config is part of the json data coming into init_wireless_driver "$@"
as far as i can work out, but it never contains my new variable.
I've read the interaction between ldir and jow here: https://openwrt.org/docs/techref/netifd
but my efforts to register additional variables have failed. I'm missing some understanding here. I can see that some variables get registered here, but what about the channel
variable? It seems to just be innately declared.
Someone please steer me in the right direction lol.