BRN:Dev:Madwifi

From
Jump to navigation Jump to search

Madwifi-Treiber

Country Codes

  • The insmod command for the ath_pci module takes a further parameter countrycode. The following command loads the module with the country code for japan (392).
insmod ath_pci.ko countrycode=392

Receive phy errors

To receive phy errors (crc errors and the like) from the card, run

sysctl -w dev.ath.phyerr=1

Packets with phy errors will be marked with the WIFI_RX_STATUS_ANNO and WIFI_RX_ERR_ANNO annotations set. You can use the PhyErrFilter element to distinguish between phy err packets and packets that were received intact.To receive phy errors (crc errors and the like) from the card, run "sysctl -w dev.ath.phyerr=1". Packets with phy errors will be marked with the WIFI_RX_STATUS_ANNO and WIFI_RX_ERR_ANNO annotations set. You can use the PhyErrFilter element to distinguish between phy err packets and packets that were received intact.To receive phy errors (crc errors and the like) from the card, run "sysctl -w dev.ath.phyerr=1". Packets with phy errors will be marked with the WIFI_RX_STATUS_ANNO and WIFI_RX_ERR_ANNO annotations set. You can use the PhyErrFilter element to distinguish between phy err packets and packets that were received intact.

prism2 header encapsulation

iwpriv ath0 setrxhdr 1

encapsulates all received packets with prism2 headers.

Accessing Registers

You can read and write registers using iwpriv. Here are some examples to set the RSSI_THRESHOLD register.

iwpriv ath0 getreg `hex 0x8018` 
iwpriv ath0 setreg `hex 0x8018` `hex 0x700`

Debugging

  • enable console msgs from the driver
sysctl -w dev.ath.debug=1	
  • dump h/w register state to the console
sysctl -w dev.ath.dump="hal"
  • enable console msgs from the wlan module
echo 1>/proc/net/wlan0/debug

Sysctl keys and default values

dev.ath.calibrate    = 30
dev.ath.dwelltime    = 200
dev.ath.xchanmode    = 1
dev.ath.outdoor      = 1
dev.ath.regdomain    = 0
dev.ath.countrycode  = 0
dev.ath.debug        = 0
dev.ath0.phyerr      = 0
dev.ath0.diversity   = 0
dev.ath0.rxantenna   = 0
dev.ath0.txantenna   = 0
dev.ath0.debug       = 0
dev.ath0.regdomain   = 0
dev.ath0.countrycode = 0
dev.ath0.ledpin      = 0
dev.ath0.softled     = 0
dev.ath0.ctstimeout  = 26
dev.ath0.acktimeout  = 26
dev.ath0.slottime    = 440

Beobachtungen

  • Häufiges Ein- und Ausladen des Treibers führt zum Systemabsturz.

Ein Test des openwifi Treibers zeigte keine derartigen Probleme bei 800 Durchläufen

n=0 ; 
while true ; do
  n=$(expr $n + 1)
  echo $n
  ./insmod.sh
  ./rmmod.sh
done
  • Treiber akzeptiert nur 11b

Ein aus der svn-revision 3365 ausgecheckter Treiber akzeptiert auf den SK-Boxen nur 11b raten. Das wifi0 device erkennt auch die g-Raten. Aber beim setzen der Raten stirbt der Kernel