ANTENNA CONTROL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Antenna control(9) πŸ¦‹

okay so this is the Kernel API Manual page for Antenna control, and it is lowkey iconic how much antenna lore is packed in here. Bestie, buckle up. πŸ’–

Hw supports up to 14 antennas ! I haven't found any card that implements that. The maximum number of antennas I've seen is up to 4 (2 for 2GHz and 2 for 5GHz). Antenna 1 (MAIN) should be omnidirectional, 2 (AUX) omnidirectional or sectorial and antennas 3-14 sectorial (or directional).

We can have a single antenna for RX and multiple antennas for TX. RX antenna is our "default" antenna (usually antenna 1) set on DEFAULT_ANTENNA register and TX antenna is set on each TX control descriptor (0 for automatic selection, 1 - 14 antenna number).

We can let hw do all the work doing fast antenna diversity for both tx and rx or we can do things manually. Here are the options we have (all are bits of STA_ID1 register):

  • AR5K_STA_ID1_DEFAULT_ANTENNA β€” When 0 is set as the TX antenna on TX control descriptor, use the default antenna to transmit or else use the last antenna on which we received an ACK.
  • AR5K_STA_ID1_DESC_ANTENNA β€” Update default antenna after each TX frame to the antenna on which we got the ACK for that frame.
  • AR5K_STA_ID1_RTS_DEF_ANTENNA β€” Use default antenna for RTS or else use the one on the TX descriptor.
  • AR5K_STA_ID1_SELFGEN_DEF_ANT β€” Use default antenna for self generated frames (ACKs etc), or else use current antenna (the one we just used for TX).

Using the above we support the following scenarios:

  • AR5K_ANTMODE_DEFAULT β€” Hw handles antenna diversity etc automatically
  • AR5K_ANTMODE_FIXED_A β€” Only antenna A (MAIN) is present
  • AR5K_ANTMODE_FIXED_B β€” Only antenna B (AUX) is present
  • AR5K_ANTMODE_SINGLE_AP β€” Sta locked on a single ap
  • AR5K_ANTMODE_SECTOR_AP β€” AP with tx antenna set on tx desc
  • AR5K_ANTMODE_SECTOR_STA β€” STA with tx antenna set on tx desc
  • AR5K_ANTMODE_DEBUG β€” Debug mode -A -> Rx, B-> Tx-
Also note that when setting antenna to F on tx descriptor card inverts current tx antenna. 🫠

✨ SEE ALSO ✨

like, the whole related-pages friend group is here:


mwah πŸ’‹ this cutie comes from ./drivers/net/wireless/ath/ath5k, dated October 2026, and yes bestie, it is the Antenna control(9) page. 🫢

πŸ“¦ where this page comes from