Is there a way to config the txpower of wifi card?

I have to set the txpower of my wifi card to 10 or 11 dBm so that it can work properly (the macbook issue). The only way I found now is using iwconfig with root permission. Is there a way to config it, i.e. set it automatically after boot? Put the command in boot.postBootCommand doesn’t work because it seems the device is not detected at that time.

OK, I made this by a systemd service, but have to restart on failure because sometimes the command will return an ‘Input/output error’. Is there a time slot where I can ensure all the network interfaces are ready?

Not sure if this helps, but on my machine there is (its deprecated though?).
Also NetworkTarget might be helpful.

You can either write a udev rule or add .device unit as dependency to your service: linux - How to write a systemd service that depends on a device being present? - Super User