On Wed, May 06, 2026 at 01:01:45PM -0400, Farhan Khan wrote: > Hi all, > > Question: What is the difference between if_input and ieee80211_inputm? Why > use both handlers to receive the frame? > > In the USB athn (sys/dev/usb/if_athn_usb.c), in athn_usb_rxeof it calls > if_input. athn_usb_rxeof also calls athn_usb_rx_frame, which calls > ieee80211_inputm. > > Why are there two input handlers happening for the same buffer? What's the > difference?
if_input() is the entrypoint for packets into the network stack, which starts with layer 2 processing. wifi interfaces are treated as ethernet interfaces by the network stack, so if_input() is expecting ethernet packets from athn. ieee80211_enqueue_data() takes 802.11 frames and handles the low level 802.11 packets, but filters/transforms the data packets into ethernet packets for if_input() to consume.

