Looking at the schematic of the Yun G1 (https://www.arduino.cc/en/uploads/Main/arduino-Yun-schematic.pdf) it seems obvious that the Atheros is master.
Since the OE of the NTB0104 is pulled low I am assuming that it's only for programming the AVR.
My question now is, can I use the SPI pins on the AVR as master to control other SPI devices and go back to slave to program the AVR? What would be the best way to implement this?
That only shows that the Linux part is responsible to select the interface between the AVR and the NTB. Although programming the AVR be ICSP from the Linux part is possible by the hardware connection I'm not aware that it is used for the by any Arduino software.
So when you program the AVR over the air it uses reset and bootloader via the UART just like any other Arduino? Are you certain of this?
Else what is the purpose of the SPI connection between the Atheros chip and the ATmega ?