Skip to content
Jeong-ho Sohn edited this page Dec 18, 2019 · 14 revisions

Memo

STUDY THIS!!

CHANGES

OpenWrt version is now v18.06.5. Need to re-assess points of interest.

Terminologies

Need to mark potentially useful terms!

IEEE 802.11 Standards Dictionary

  • WOW := Wake On WLAN
  • (*)chanctx := channel context
    • struct ath_chanctx defined in /ath9k/ath9k.h
  • (*)softc := normally refers to driver specific software context
    • struct ath_softc defined in /ath9k/ath9k.h
    • similar to task_struct??
  • ieee80211_*
  • (*)AIFS := Acknowledgement IFS or Arbitrary IFS
  • (*)EIFS := Extended IFS
  • (*)C-MPDU := Coded MAC Protocol Data Unit
  • (*)A-MPDU := Aggregate MAC Protocol Data Unit
  • (*)S-MPDU := Single MAC Protocol Data Unit
  • CCA := Clear Channel Assessment or Carrier-Controlled Approach
  • TX/RX := Abbreviations for Transmit/Receive
  • ACS := Adaptive Channel Selection
    • AC := Access Control ?
  • (*)RIFS := Reduced IFS
  • DMA := Direct Memory Access
  • HAL := Hardware Abstraction Layer
    • Seems like manufacturers hide their lower level implementations in the form of HAL as binary code.
Brain-fficial Stuff
  • vifs/nvifs means virtual interfaces, non-virtual interfaces
  • static int ath9k_conf_tx is "configure transmission queue" function

Points of Interest

/ath9k/main.c
  • struct ieee80211_ops ath9k_ops = { ... };
    • line 2631
    • This is an interface to which other code can invoke callbacks. (recall WRR scheduler!)
  • static int ath9k_conf_tx( ... )
    • line 1621
    • possibly used for configuring (or updating) transmission queue
/ath9k/mac.c

managing transmit & receive actions

/ath9k/mac.h
  • OFDM_SIFS_TIME and INIT_AIFS
    • line 44, 59
/ath9k/hw.c

writes parameters such as sifs to hardware (register)

  • void ...init_global_settings (...)
    • line 1026
    • calculate & set sifs time, slottime, ack timeout, cts timeout
/ath9k/init.c

driver initialization

  • static int ath9k_init_queues ( ... )
    • line 344
    • calls ath_txq_setup(...)
/ath9k/xmit.c
  • struct ath_txq *ath_txq_setup ( ... )
    • line 1701~
    • qi.tqi_aifs = ATH9K_TXQ_USEDEFAULT ?
/ath9k/ath9k.h
  • struct ath_txq
    • line 159
    • transmission queue struct

Points of NON-Interest

  • /ath9k/reg.h
  • ~~_phy.c/h
  • beacon.c
  • ~~_wow.c/h
  • dynack.c
  • htc_~~.c/h
    • htc driver is related to USB

Need to Investigate

Seems like driver is built around generic files such as mac.c, hw.c and then adds device/chipset specific code like arXXXX_~~.c/h. Therefore, have to pinpoint which chipset/cpu we're dealing with.