diff options
author | John W. Linville <linville@tuxdriver.com> | 2008-10-29 11:35:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-21 11:08:17 -0500 |
commit | 274bfb8dc5ffa16cb073801bebe76ab7f4e2e73d (patch) | |
tree | 04cd3f6a062496911b56737daa6a0858b769ccd6 /net/ieee80211/ieee80211_tx.c | |
parent | dfe1bafdbac1c7b48b636fb7ace799e78170e0d6 (diff) |
lib80211: absorb crypto bits from net/ieee80211
These bits are shared already between ipw2x00 and hostap, and could
probably be shared both more cleanly and with other drivers. This
commit simply relocates the code to lib80211 and adjusts the drivers
appropriately.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211/ieee80211_tx.c')
-rw-r--r-- | net/ieee80211/ieee80211_tx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index d996547f7a62..f78f57e8844a 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c | |||
@@ -152,7 +152,8 @@ static int ieee80211_copy_snap(u8 * data, __be16 h_proto) | |||
152 | static int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, | 152 | static int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, |
153 | struct sk_buff *frag, int hdr_len) | 153 | struct sk_buff *frag, int hdr_len) |
154 | { | 154 | { |
155 | struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx]; | 155 | struct lib80211_crypt_data *crypt = |
156 | ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; | ||
156 | int res; | 157 | int res; |
157 | 158 | ||
158 | if (crypt == NULL) | 159 | if (crypt == NULL) |
@@ -270,7 +271,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
270 | .qos_ctl = 0 | 271 | .qos_ctl = 0 |
271 | }; | 272 | }; |
272 | u8 dest[ETH_ALEN], src[ETH_ALEN]; | 273 | u8 dest[ETH_ALEN], src[ETH_ALEN]; |
273 | struct ieee80211_crypt_data *crypt; | 274 | struct lib80211_crypt_data *crypt; |
274 | int priority = skb->priority; | 275 | int priority = skb->priority; |
275 | int snapped = 0; | 276 | int snapped = 0; |
276 | 277 | ||
@@ -294,7 +295,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
294 | 295 | ||
295 | ether_type = ((struct ethhdr *)skb->data)->h_proto; | 296 | ether_type = ((struct ethhdr *)skb->data)->h_proto; |
296 | 297 | ||
297 | crypt = ieee->crypt[ieee->tx_keyidx]; | 298 | crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; |
298 | 299 | ||
299 | encrypt = !(ether_type == htons(ETH_P_PAE) && ieee->ieee802_1x) && | 300 | encrypt = !(ether_type == htons(ETH_P_PAE) && ieee->ieee802_1x) && |
300 | ieee->sec.encrypt; | 301 | ieee->sec.encrypt; |