[CUWiN-Dev] Transmit power control / RSS measurement

David Young dyoung at pobox.com
Sun Apr 23 15:43:35 CDT 2006


On Fri, Apr 21, 2006 at 06:00:53PM +0900, Jeongkeun Lee wrote:
> Dave,
> 
> Any guidance (or samples codes) on per-packet TPC will be highly
> appreciated.

You will have to write the code.  You need to pass the transmit power
to the driver with either sendmsg() or setsockopt().  The driver has
to see the transmit power (which will probably be a m_tag-type label
on the mbuf that contains the packet to transmit) and put it into the
transmit descriptor.  In the Atheros driver, the transmit power is
loaded into the descriptor by ath_hal_setuptxdesc():

        ath_hal_setuptxdesc(ah, ds
                , pktlen                /* packet length */
                , hdrlen                /* header length */
                , atype                 /* Atheros packet type */
                , ni->ni_txpower        /* txpower */
                , txrate, try0          /* series 0 rate/tries */
                , keyix                 /* key cache index */
                , sc->sc_txantenna      /* antenna mode */
                , flags                 /* flags */
                , ctsrate               /* rts/cts rate */
                , ctsduration           /* rts/cts duration */

> And I'm also trying to get a per-packet RSS measurement.
> "tcpdump -ne -y ieee802_11_radio -i ath0" is helpful, but it was not easy to
> get RSS for a specific packet. For example, I want to know the RSS of a
> packet whose payload contains specific contents. 

Filtering based on payload contents might be tricky.  Is the payload a
fixed offset from the start of the packet?  Do you need to find the RSS
in real-time?  This question might be more appropriate for the tcpdump
mailing list.

If you want to see the RSS on UDP packets in an application program,
then the best way may be to pass information from the wireless driver
to the application.  The driver could load the RSS into an m_tag label
that your socket receives through recvmsg().

Dave

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless-Dev mailing list