Receiver code: Some questions

ahuguet at ahuguet
Mon Mar 12 08:16:30 PDT 2007


this is my first message in the mailing list, and I hope all works correctly.

First of all, congratulations to Jouni for having developed this tool,
that seems it's widely used and that today is even embedded within the
Linux kernel.

I'm consulting the code as to see how HostAP handles things, and to check
if certain functionalities could be added/modified within it, in order to
test new communication methods or some protocol changes.

I've not downloaded the latest HostAP release, but got the 0.4.9 version

I've started taking a look at the code that handles the recieved packets
at hostap80211rx.c

I focused on function "void hostap_80211_rx ( struct net_device *dev,
struct sk_buff *skb, struct hostap_80211_rx_status *rx_stats)" to see what
is done when HostAP recieves a packet.

I was particularly interested keeping track of what was done to control
type packets, and I've found out that it seems said function does not deal
with them.

Specifically, surely that when:
"if (skb->len > IEEE80211_DATA_HDR3_LEN) goto rx_dropped;"
The control packets are dropped, for none of them has a header greater
than 24 Bytes (==IEEE80211_DATA_HDR3_LEN)

Some reading seems to point out to the idea that time critical packets
(such as the control ones are) are dealt directly by the firmware and
remain transparent to HostAP.
I was wondering if that was the case, or if there is another code portion
I've not realized where the control packets are dealt.
I'd appreciate some help clarifying this point.

The other point I'd like to talk about with this message also, is the
I've tried to see where the CRC check is done, in the code, for those
incoming packets. I've been unable to find it inside the aforementioned
function, but, watching a comment done inside function:

"int prism2_rx_80211 (struct net_device *dev, struct sk_buff *skb, struct
hostap_80211_rx_status *rx_stats, int type)"

that says "Prism2 strips CRC" commenting a line where 4 extra bytes are
added to the incoming packet (as in, indeed, somewhere before those 4
bytes devoted to CRC were ripped) so, once again, is the CRC checksum done
by the firmware, and thus transparent to HostAP?
Wouldn't be any way to make HostAP "see" those incorrect datagrams, with
wrong checksum?

Thanks a lot in advance.

More information about the Hostap mailing list