Hi,
I'm also trying to include a new option to /etc/config/wireless so it is finally present in /var/run/hostapd-phy0.conf. I have been travelling through the code and this is what I have seen:
- Netifd is is charge of listening network events and manage network interfaces upon these events.
- When netifd starts, it registers some scripts as handlers. The handler that is called when an event related to a wifi network interface rises is /lib/netifd/mac80211.sh.
- /lib/netifd/mac80211.sh uses functions from /lib/netifd/hostapd.sh and /lib/netifd/netifd-wireless.sh to generate the hostapd config file.
- When netifd calls to /lib/netifd/mac80211.sh, it passes a json config as an argument. I think that hostapd config is derived from this json config, however I can't see the new options I add to /etc/config/wireless in this json config.
Please, could anyone explain how all these scripts interact among them and with netfid? Who is in charge of parsing the /etc/config/wireless file? How the json config that is passed to /lib/netifd/mac80211.sh as an argument is derived?
Thanks in advance for your help.