]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
mac80211: fix virtual interfaces vs. injection
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 12 Sep 2008 20:52:47 +0000 (22:52 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Sep 2008 20:48:25 +0000 (16:48 -0400)
commit25d834e16294c8dfd923dae6bdb8a055391a99a5
treeb9d756464d89949651e5acd1df97846af3028df0
parent9c31fd635ddfae6eb61712491770befa2ce1fdde
mac80211: fix virtual interfaces vs. injection

Currently, virtual interface pointers passed to drivers might be
from monitor interfaces and as such completely uninitialised
because we do not tell the driver about monitor interfaces when
those are created. Instead of passing them, we should therefore
indicate to the driver that there is no information; do that by
passing a NULL value and adjust drivers to cope with it.

As a result, some mac80211 API functions also need to cope with
a NULL vif pointer so drivers can still call them unconditionally.

Also, when injecting frames we really don't want to pass NULL all
the time, if we know we are the source address of a frame and have
a local interface for that address, we can to use that interface.
This also helps with processing the frame correctly for that
interface which will help the 802.11w implementation. It's not
entirely correct for VLANs or WDS interfaces because there the MAC
address isn't unique, but it's already a lot better than what we
do now.

Finally, when injecting without a matching local interface, don't
assign sequence numbers at all.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mac80211_hwsim.c
drivers/net/wireless/rt2x00/rt2x00queue.c
include/net/mac80211.h
net/mac80211/tx.c
net/mac80211/util.c