Transmitting frames with iwn(4)

NOTE: this is just a series of notes as iwn(4) hacking is done. It doesn't at all qualify as complete documentation.

Overview

The iwn(4) hardware has a series of transmit rings which map to access categories. (TODO: there are other rings too - beacons? management? Do some digging!)

Each transmit ring entry contains a transmit descriptor and then multiple segments containing the data payload.

In the driver, iwn_tx_data() is the main transmit path and iwn_tx_data_raw() is for the raw data (management, etc) transmit path.

Rate selection

(TODO: talk about how this is done with PLCP and how antenna selection also goes into this.)

(.. and CCK/HT flags.)

The firmware supports trying multiple transmit attempts. iwn_set_link_quality() configures the rates in the transmit table. There are 16 slots to fill. There's one table per associated station. Upon association and rate control negotiation, iwn_set_link_quality() populate the transmit table from highest available transmit rate to lowest available rate - if there's less than 16 rates available, the final slots just contain the lowest transmit rate.

Then during iwn_tx_data() and iwn_tx_data_raw(), the TX descriptor can have a linkq value that points to a particular slot in the table to start transmitting from. Each attempt will occur from the linkq value all the way to 0 (ie, counting backwards.) That way it tries successive values until it hits the lowest rate. It tells the firmware to do this by setting the IWN_TX_LINKQ flag in the TX descriptor flag value.

Now, this means that the TX descriptor rate field needs to exist in the link quality rate table and it likely should match the linkq value given.

So for now this is disabled in iwn(4), at least until the link quality table use can be refactored out and better planned.

dev/iwn(4)/TransmitOverview (last edited 2013-10-25T19:42:03+0000 by AdrianChadd)