]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: move control.hw_key assignment
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 17 Jan 2010 00:47:58 +0000 (01:47 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 19 Jan 2010 21:25:19 +0000 (16:25 -0500)
commitfa96fd627a1272ab89ceb2f659160fbc4ca67332
treedaad130ca0a9e90f7616d88e5433654df89af14a
parentbe49189d7a07c7e1a7628d5ea59992b2181752ad
mac80211: move control.hw_key assignment

When mac80211 asks a driver to encrypt a frame, it
must assign the control.hw_key pointer for it to
know which key to use etc. Currently, mac80211 does
this whenever it would software-encrypt a frame.

Change the logic of this code to assign the hw_key
pointer when selecting the key, and later check it
when deciding whether to encrypt the frame or let
it be encrypted by the hardware. This allows us to
later simply skip the encryption function since it
no longer modifies the TX control.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/tkip.c
net/mac80211/tx.c
net/mac80211/wep.c
net/mac80211/wpa.c