Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matisse
android_kernel_samsung_matisse
Commits
18379879
Commit
18379879
authored
18 years ago
by
Jeff Garzik
Browse files
Options
Download
Email Patches
Plain Diff
net/ieee80211: fix more crypto-related build breakage
Signed-off-by:
Jeff Garzik
<
jeff@garzik.org
>
parent
9b6b0b81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
net/ieee80211/ieee80211_crypt_tkip.c
net/ieee80211/ieee80211_crypt_tkip.c
+17
-2
net/ieee80211/ieee80211_crypt_wep.c
net/ieee80211/ieee80211_crypt_wep.c
+2
-1
No files found.
net/ieee80211/ieee80211_crypt_tkip.c
View file @
18379879
...
...
@@ -93,7 +93,7 @@ static void *ieee80211_tkip_init(int key_idx)
if
(
IS_ERR
(
priv
->
tx_tfm_arc4
))
{
printk
(
KERN_DEBUG
"ieee80211_crypt_tkip: could not allocate "
"crypto API arc4
\n
"
);
priv
->
tfm_arc4
=
NULL
;
priv
->
tx_
tfm_arc4
=
NULL
;
goto
fail
;
}
...
...
@@ -102,6 +102,7 @@ static void *ieee80211_tkip_init(int key_idx)
if
(
IS_ERR
(
priv
->
tx_tfm_michael
))
{
printk
(
KERN_DEBUG
"ieee80211_crypt_tkip: could not allocate "
"crypto API michael_mic
\n
"
);
priv
->
tx_tfm_michael
=
NULL
;
goto
fail
;
}
...
...
@@ -110,6 +111,7 @@ static void *ieee80211_tkip_init(int key_idx)
if
(
IS_ERR
(
priv
->
rx_tfm_arc4
))
{
printk
(
KERN_DEBUG
"ieee80211_crypt_tkip: could not allocate "
"crypto API arc4
\n
"
);
priv
->
rx_tfm_arc4
=
NULL
;
goto
fail
;
}
...
...
@@ -118,7 +120,7 @@ static void *ieee80211_tkip_init(int key_idx)
if
(
IS_ERR
(
priv
->
rx_tfm_michael
))
{
printk
(
KERN_DEBUG
"ieee80211_crypt_tkip: could not allocate "
"crypto API michael_mic
\n
"
);
priv
->
tfm_michael
=
NULL
;
priv
->
rx_
tfm_michael
=
NULL
;
goto
fail
;
}
...
...
@@ -392,6 +394,19 @@ static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
return
crypto_blkcipher_encrypt
(
&
desc
,
&
sg
,
&
sg
,
len
+
4
);
}
/*
* deal with seq counter wrapping correctly.
* refer to timer_after() for jiffies wrapping handling
*/
static
inline
int
tkip_replay_check
(
u32
iv32_n
,
u16
iv16_n
,
u32
iv32_o
,
u16
iv16_o
)
{
if
((
s32
)
iv32_n
-
(
s32
)
iv32_o
<
0
||
(
iv32_n
==
iv32_o
&&
iv16_n
<=
iv16_o
))
return
1
;
return
0
;
}
static
int
ieee80211_tkip_decrypt
(
struct
sk_buff
*
skb
,
int
hdr_len
,
void
*
priv
)
{
struct
ieee80211_tkip_data
*
tkey
=
priv
;
...
...
This diff is collapsed.
Click to expand it.
net/ieee80211/ieee80211_crypt_wep.c
View file @
18379879
...
...
@@ -50,7 +50,7 @@ static void *prism2_wep_init(int keyidx)
if
(
IS_ERR
(
priv
->
tx_tfm
))
{
printk
(
KERN_DEBUG
"ieee80211_crypt_wep: could not allocate "
"crypto API arc4
\n
"
);
priv
->
tfm
=
NULL
;
priv
->
tx_
tfm
=
NULL
;
goto
fail
;
}
...
...
@@ -58,6 +58,7 @@ static void *prism2_wep_init(int keyidx)
if
(
IS_ERR
(
priv
->
rx_tfm
))
{
printk
(
KERN_DEBUG
"ieee80211_crypt_wep: could not allocate "
"crypto API arc4
\n
"
);
priv
->
rx_tfm
=
NULL
;
goto
fail
;
}
/* start WEP IV from a random value */
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment