Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #1284 (closed enhancement: fixed)

Opened 13 years ago

Last modified 12 years ago

[patch] Support for per-packet tpc modparam

Reported by: Assigned to: mtaylor
Priority: trivial Milestone: version 0.9.5
Component: madwifi: other Version: v0.9.3
Keywords: Cc:
Patch is attached: 1 Pending:


I have added a patch to support a module parameter "tpc" that enables per-packet transmit power control in the HAL.


madwifi-0.9.3-add-tpc-support.diff (2.2 kB) - added by on 04/26/07 19:56:21.
Patch to add tpc module parameter for per-packet power control
madwifi-0.9.3-add-tpc-support.2.diff (2.2 kB) - added by mtaylor on 05/21/07 23:47:58.
Signed off version.

Change History

04/26/07 19:56:21 changed by

  • attachment madwifi-0.9.3-add-tpc-support.diff added.

Patch to add tpc module parameter for per-packet power control

04/27/07 07:21:28 changed by mrenzmann

Thanks for the patch. Please don't forget to sign it off, so we can commit it after review.

05/21/07 23:47:58 changed by mtaylor

  • attachment madwifi-0.9.3-add-tpc-support.2.diff added.

Signed off version.

05/21/07 23:48:47 changed by mtaylor

Signed-off-by: Michael D. Taylor <>

05/22/07 01:22:39 changed by mentor

We should be turning on TPC by default, as it is the preferred method of setting a TX power limit. Using ath_hal_settxpowlimit is fundamentally limited.

05/22/07 22:51:56 changed by mtaylor

  • owner set to mtaylor.

I'm not sure whether or not I disagree, but it does change the default behavior of the driver so I'm hesitant.

Also - current TPC testing by FCC/ETSI is all about being able to specify a specific power level in a continuous transmit mode (100% duty cycle) and see how the waveforms look on the scope - and having user control to be able to drop txpower by 6dBm.

They don't *test* whether you are using the minimum power for each STA, nor that you have the capability in your firmware.

Finally, we do not have API in the HAL to set the power levels for ACK,CTS and chirp (these are in separate register). I wasn't sure whether to add it as a iwpriv or not.


  • TX power control (TPC) register */

#define AR5K_AR5212_TXPC 0x80e8 #define AR5K_AR5212_TXPC_ACK_M 0x0000003f #define AR5K_AR5212_TXPC_ACK_S 0 #define AR5K_AR5212_TXPC_CTS_M 0x00003f00 #define AR5K_AR5212_TXPC_CTS_S 8 #define AR5K_AR5212_TXPC_CHIRP_M 0x003f0000 #define AR5K_AR5212_TXPC_CHIRP_S 22

What do you suggest?

05/23/07 19:44:14 changed by mtaylor

  • milestone set to version 0.9.x - progressive release candidate phase.

05/25/07 22:04:31 changed by mtaylor

  • status changed from new to closed.
  • resolution set to fixed.

committed in r2375. We can add the other TPC power level settings later, if someone needs them. The default behavior now is to include TPC code in the build but leave per-packet TPC off unless/until you enable it with the module parameter. This means that txpower is used still for now, and until everyone agrees that per-packet TPC should be the default.

05/26/07 08:30:16 changed by mrenzmann

  • milestone changed from version 0.9.x - progressive release candidate phase to version 0.9.4.

02/11/08 06:18:10 changed by mrenzmann

  • milestone changed from version 0.9.4 to version 0.9.5.