wi(4) tx power control

David Young <[email protected]> Sat, 29 Mar 2003 03:24:59 -0600
Newsgroups gmane.network.wireless.bsd.general
Message-ID <[email protected]>
At <http://che.ojctech.com/~dyoung/wireless/tpc-diffs> I have put
experimental patches for wi(4)/NetBSD which add TX power control to wi(4)
and to ifconfig(8).

Portions for reading/writing WI_RID_MIF come from M. Warner Losh /
FreeBSD.

Here are some outstanding issues:

 1 The power-control algorithm deserves review. I will describe it
   here. Please give your feedback.

   The user's txpower setting is taken as the output power goal for a
   power-control feedback loop. When the power goal is max power, I let
   the MAC run the loop, since its goal is always max power. When the
   power is lower, the host takes over the loop. The host and the MAC run
   essentially the same loop.

   I will describe how the loop works.  On every transmission, the
   3861 baseband processor measures the power in the first several
   microseconds of the transmission and latches that measurement into
   register CR74. After every transmission, I read that measurement and
   use it to adjust the gain setting in proportion to its difference
   from the power goal. I write the new gain setting into CR31. The MAC
   does essentially the same thing. See the Intersil application note
   <http://www.intersil.com/data/an/AN1037.pdf>.

   I count two events as a transmission. First, a TX interrupt. Second,
   an RX interrupt for a *unicast* packet. (Unicast packets are ACK'd.) I
   limit the rate of updates to 10 per second.

 2 At least on the 100mW Senao radio I have tested with, the power
   appears to bottom out at only 10dB below maximum power. Does that
   sound right?

 3 The power may bottom out way above the power goal.  I had thought I
   would add a calibration step to wi_init(). It will be run only once,
   the first time the interface is brought up or the first time the TX
   power is adjusted, whichever comes first. It will have to transmit
   for about a few moments at lowest power, and sometimes a process will
   get an EAGAIN while this is going on.  Opinions?

 4 Eventually I would like to program a daemon which will help two
   hosts to find a correspondence between hardware settings and dB. It
   could be more complicated than I'd thought: if my host AP and the
   Senao card are on the same desk, I see a bimodal distribution of RSSI
   measurements. Witness:

02:27:35.878705 11Mb/s -45dBm signal, -100dBm noise BSSID:0:5:5d:da:ac:a8 SA:0:2:6f:1:b7:95 DA:0:5:5d:da:ac:a8 192.168.1.109 > 192.168.1.1: icmp: echo request seq 61
02:27:36.878939 11Mb/s -63dBm signal, -100dBm noise BSSID:0:5:5d:da:ac:a8 SA:0:2:6f:1:b7:95 DA:0:5:5d:da:ac:a8 192.168.1.109 > 192.168.1.1: icmp: echo request seq 62

   I think that either the Prism auto gain control is broken or I am
   right on the margins for some attenuator to kick in to protect the
   receiver. Or is it something else?

Dave

-- 
David Young             OJC Technologies
[email protected]      Urbana, IL * (217) 278-3933
--
*bsd wireless list, a bawug thing <http://www.bawug.org/>
[un]subscribe: http://lists.bawug.org/mailman/listinfo/bsd-wireless/