#194: Tx power setting patch --------------------------------------+------------------------------------- Reporter: [EMAIL PROTECTED] | Owner: mrenzmann Type: defect | Status: assigned Priority: major | Milestone: Component: madwifi: driver | Version: trunk Resolution: | Keywords: Tx Power --------------------------------------+------------------------------------- Comment (by mrenzmann):
The following is a answer from Sam to a mail from Bruno, regarding how to implement the TX power control right: {{{ #!blockquote {{{ #!blockquote we are trying to make the txpower setting work on madwifi, but it looks like ath_hal_getmaxtxpow(sc->sc_ah, &txpow) always clamps the value to something about 30. in the old madwifi we did'nt have this check, and it seemed to work (there was a change in RSSI) but it seems reasonable to have the check. can you explain the difference between: ath_hal_gettxpowlimit(ah, &txpow);[[br]] ath_hal_getmaxtxpow(sc->sc_ah, &txpow); what needs to be done for proper txpower handling from your point of view? }}} getmaxtxpow returns the txpow limit (in .5 dBm units) calculated from the card capabilities and the regulatory constraint gettxpowlimit returns the current, potentially constrained, txpow limit (in .5 dBm units) as set for example when implementing 11h; it is clamped (internally) to the value returned by getmaxtxpow There are 3 ways to control tx power: 1. settxpowlimit to clamp the max txpower to a setting lower than the max allowed by the card++regdomain 2. the per tx descriptor tpc which is an index into a table of size 64 which yields uneven tx power steps that you must calibrate per card but typically has finer grain control at the "low end"; you must explicitly enable this before use with HAL_CAP_TPC 3. tx power scaling (HAL_CAP_TXPOW, 3) which is included solely for compatbility with Atheros' vxworks code and may go away at any time; this is a setting in the range [0..4] which causes the txpow tables to be down- scaled when they are calculated by 0, 3, 6, 9, and max dBm The intended/preferred way to control txpower is with the per-packet TPC setting in the tx descriptor. However because it's been hard to get that right and because not all parts support it I added the tpScale knob. I recently did some txpower tests on 5212 cards and believe things are working. There is one issue that we discovered; that the txpower for self-generated frames was not set correctly when using per-packet tpc (it is low)--this will be fixed in the next hal rev. }}} This should be considered for the implementation of a patch as the one above. @reporter: Can you please verify if your patch complies with what Sam suggests? -- Ticket URL: <http://madwifi.org/ticket/194> Madwifi <http://madwifi.org/> Multiband Atheros Driver for Wireless Fidelity