Page MenuHomeFreeBSD

rtwn: export more stats to net80211
ClosedPublic

Authored by s3erios_gmail.com on Jan 2 2017, 2:35 PM.

Details

Summary

Setup more ieee80211_rx_stats fields for received frames:

    • pktflags:
      • IEEE80211_RX_F_FAIL_FCSCRC;
      • IEEE80211_RX_F_AMPDU;
      • IEEE80211_RX_F_AMPDU_MORE;
      • IEEE80211_RX_F_SHORTGI;
      • rate flags (CCK, OFDM, HT);
  • width;
  • phytype;
  • rate;
  • rx_tsf;
  • rssi;
  • nf;
  • ieee, freq (RTL8188EU only, when ht40 support is disabled).
Test Plan

Tested with:

  • RTL8188CE, STA, STA + AP modes.
  • RTL8188EU, STA, AP modes.
  • RTL8821AU, STA, AP mode.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

s3erios_gmail.com retitled this revision from to rtwn: export more stats to net80211..
s3erios_gmail.com updated this object.
s3erios_gmail.com edited the test plan for this revision. (Show Details)
s3erios_gmail.com added reviewers: adrian, kevlo.
s3erios_gmail.com set the repository for this revision to rS FreeBSD src repository.
kevlo edited edge metadata.Jan 3 2017, 1:25 AM

I get a panic when bringing up the link on the wireless interface on -CURRENT:
http://imgur.com/a/lmiBl

adrian added inline comments.Jan 3 2017, 1:57 AM
sys/dev/rtwn/if_rtwn_rx.c
289 ↗(On Diff #23530)

The intention of F_DECRYPTED right now is "the hardware decrypted a frame and is happily pretending it's an unencrypted frame." It looks like this doesn't do that - it instead just does payload decryption but doesn't clear M_WEP.

I'll go document it in the header file so it makes more sense.

kevlo added a comment.Jan 6 2017, 1:17 PM

In rtl8812au/rtl8821au, since the rate mask in the rxdw3 field of Rx descriptor
is changed, we also need to replace R92C_RXDW3_RATE with R12A_RXDW3_RATE in
r12a_rx_radiotap_flags().

s3erios_gmail.com retitled this revision from rtwn: export more stats to net80211. to rtwn: export more stats to net80211.
s3erios_gmail.com updated this object.
s3erios_gmail.com edited the test plan for this revision. (Show Details)
s3erios_gmail.com edited edge metadata.
  • Remove IEEE80211_RX_F_DECRYPTED flag setup.
  • Call ieee80211_add_rx_params() in rtwn_rx_common() (and drop __DECONST); ieee80211_input_mimo() will check mbuf tag presence anyway.
  • Fix possible NULL pointer dereference (after ieee80211_find_rxnode() call).
  • Do not try to define R92C_RX_DRVINFO_SZ_DEF in if_rtwnvar.h; it is always included before r92c_reg.h.
  • Fix rate mask in r12a_rx_radiotap_flags().
s3erios_gmail.com marked an inline comment as done.Jan 12 2017, 12:19 AM
kevlo accepted this revision.Jan 12 2017, 2:01 AM
kevlo edited edge metadata.

Diff looks good and works fine for me. Tested with rtl8188eu and rtl8812au
on amd64.

This revision is now accepted and ready to land.Jan 12 2017, 2:01 AM
This revision was automatically updated to reflect the committed changes.