Hi,
I have a Dlink DWA121 that contains a realtek rtl8188cus chipset. It
is supported by openBSD with urtwn driver.
The man page for the driver states that the driver supports monitor mode.
So I wanted to try monitor mode. I installed openBSD 5.2 on a Pentium4
machine I have and did the following:
ifconfig urtwn0 chan 1
ifconfig urtwn0 mediaopt monitor
ifconfig urtwn0 up
Then I ran tcpdump -i urtwn0 -y IEEE802_11
But I only see frames that has broadcast as destination. For example I
could see ARP request and not the arp reply.
Any idea why? Wifi chip in monitor mode should receive all frame types.
Then I look a bit in the driver and found this:
void
urtwn_rxfilter_init(struct urtwn_softc *sc)
{
/* Initialize Rx filter. */
/* TODO: use better filter for monitor mode. */
urtwn_write_4(sc, R92C_RCR,
R92C_RCR_AAP | R92C_RCR_APM | R92C_RCR_AM | R92C_RCR_AB |
R92C_RCR_APP_ICV | R92C_RCR_AMF | R92C_RCR_HTC_LOC_CTRL |
R92C_RCR_APP_MIC | R92C_RCR_APP_PHYSTS);
/* Accept all multicast frames. */
urtwn_write_4(sc, R92C_MAR + 0, 0xffffffff);
urtwn_write_4(sc, R92C_MAR + 4, 0xffffffff);
/* Accept all management frames. */
urtwn_write_2(sc, R92C_RXFLTMAP0, 0xffff);
/* Reject all control frames. */
urtwn_write_2(sc, R92C_RXFLTMAP1, 0x0000);
/* Accept all data frames. */
urtwn_write_2(sc, R92C_RXFLTMAP2, 0xffff);
}
The comment talking about better filter for monitor mode caught my
attention. So I thought maybe you guys can help me?
I tried to run with the firmware that was checked in when the driver
first appeared in openBSD but I got same results.
Thank you in advance!
Monthadar
--
Monthadar Al Jaberi