afaik... it's stored somewhere, where exactly I don't know... probably in brcmOTP... these are not exposed/part of the pi4 'bios'/bootstrap-fw...
relevent line from link above;
On the Raspberry Pi 3B+ and Raspberry Pi 4B, you will also need to set the country code, so that the 5GHz networking can choose the correct frequency bands.
You can do this using the raspi-config application: select the 'Localisation Options' menu, then 'Change Wi-Fi Country'.
I don't know if that is still the case but it used to be necessary to run Raspian (now Raspberry PI OS) once to load the wifi chip with your country code. Set the same country code in OpenWrt.
AP and client at the same time does not work on the Raspberry built in wifi. Remove any client interfaces and run only an AP.
I did exactly what was written in that guide but, by setting the country code I did not solve the problem, access point still does not work
this is what I read in the openwrt log
Sun Dec 13 18:15:53 2020 daemon.notice netifd: radio0 (6743): command failed: No error information (-524)
Sun Dec 13 18:15:53 2020 daemon.notice netifd: radio0 (6743): command failed: I/O error (-5)
Sun Dec 13 18:15:53 2020 daemon.notice netifd: radio0 (6743): sh: out of range
Sun Dec 13 18:15:53 2020 daemon.notice netifd: radio0 (6743): sh: out of range
Sun Dec 13 18:15:53 2020 daemon.notice netifd: radio0 (6743): sh: out of range
Sun Dec 13 18:15:53 2020 daemon.notice netifd: radio0 (6743): sh: out of range
Sun Dec 13 18:15:53 2020 daemon.notice netifd: radio0 (6743): sh: out of range
remove tx-power... it's an advanced setting and of no use when you are troubleshooting basic functionality...
change mode 11g to "option hwmode '11a'" ( or AC i think in the gui )...
also...
just do 20 for now... no fancy stuff ok?
( probably remove no-scan too after you test with the above )
11g setting has known issues... see other threads for workarounds ( although 'b' was getting removed from master?... so i'm not sure if it will still work... but setting to b and allow legacy rates used to work for 2.4GHz )
the tx-power in the ac GUI cannot be removed, you can choose whether to set it to 20, 40 or 80MHz. I in the GUI set it to 20MHz. I can't find "No scan"
still not detected
as I explained there is only way to choose between 20, 40 and 80mhz, I tried to save the settings and in all three cases it is not detected, always set with default driver.
I can't explain why with OpenMPTCProuter I was able to get the wifi going, doesn't it always use Openwrt?
I gave the command but I did not notice any differences, what is it for?
I have attached a wifi key to the router, but maybe it needs to be installed because it remains off
rm /etc/config/wireless and reboot to rebuild the default configuration.
Set country to your country. Set channel to a specific channel--not auto-- in the band you're using and legal in your country. Enable the radio. Make no other changes.
Of course the network the AP will run on (by default, lan) needs to exist and should be a bridge.