Hi All,

I am working on AMPDU stats for ath9k PCIe cards for use as sniffer in
monitor mode.
As the driver doesnt support the AMPDU stats for radiotap we have
written the below snippet to add support for the same.

Can someone answer the below queries?

1) How to populate the below fields?
                ampdu_reference
                ampdu_delimiter_crc
2) Whats the difference between the PRE and POST delimiter CRC Error counters?
3) how do we get the first subframe info? the status8 register (0x8)
is not working.

Once i get all the answers and after testing will submit this patch.

Reference for radiotap ampdu fields:
http://www.radiotap.org/defined-fields/A-MPDU%20status

Attached the capture with the below code added.

Code Snippet: recv.c:  ath9k_rx_skb_preprocess (similar approach can
be done for HTC based chips, htc_txrx.c: ath9k_rx_prepare)

#define AR_RxFirstAggr      0x20000000


        if (rx_stats->rs_isaggr) {
                rx_status->flag |= RX_FLAG_AMPDU_DETAILS;
                rx_status->ampdu_reference=0x99999999; // Junk..
                rx_status->ampdu_delimiter_crc=0x10; //Junk
                rx_status->flag |= RX_FLAG_AMPDU_LAST_KNOWN;
                if (rx_stats->rs_isfirstaggr) { // Took from other
chipset (ar9220) but not working for ar5008 chipset...always it shows
zero
                        printk("\n packet is first SF of the AMPDU\n");
                        rx_status->flag |=RX_FLAG_AMPDU_IS_ZEROLEN; //
Temp Hack to Verify
                }
                //printk("\n packet is aggr: Setting the AMPDU\n");
                if (!rx_stats->rs_moreaggr) {
                        rx_status->flag |=RX_FLAG_AMPDU_IS_LAST;
                }
                if (rx_stats->pre_delim_crc_err ||
rx_stats->post_delim_crc_err ) {
                        printk("\n packet is aggr: Delim crc is True\n");
                        rx_status->flag |= RX_FLAG_AMPDU_DELIM_CRC_ERROR;
                } else if(!rx_stats->pre_delim_crc_err &&
!rx_stats->post_delim_crc_err ) {
                        //printk("\n packet is aggr: Delim crc is True\n");
                        rx_status->flag |= RX_FLAG_AMPDU_DELIM_CRC_KNOWN;

                }

        }

Regards,
Chaitanya T K.

Attachment: ampdu_stats_radiotap_ar5008
Description: Binary data

_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to