From: Dan Carpenter <dan.carpenter@oracle.com>
To: Gaston Gonzalez <gascoar@gmail.com>
Cc: devel@driverdev.osuosl.org, arnd@arndb.de,
gregkh@linuxfoundation.org, linux-wireless@vger.kernel.org,
joe@perches.com, navyasri.tech@gmail.com
Subject: Re: [PATCH] staging: rtl8192u: ieee80211: Silence sparse warning
Date: Fri, 8 May 2015 14:03:28 +0300 [thread overview]
Message-ID: <20150508110328.GT14154@mwanda> (raw)
In-Reply-To: <554AD76E.7060605@gmail.com>
To be honest, I'm a little bit a newbie myself when it comes to
linux-wireless so keep that in mind. ;) Changing the parameters seems
simple enough. But it needs to an EXPORT_SYMBOL() and to be declared in
a header file and I'm not sure what else. But we have four
implementations of this function now.
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index 0ae2077..f149593 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -105,11 +105,9 @@ static void tkip_mixing_phase1(const u8 *tk, struct tkip_ctx *ctx,
ctx->p1k_iv32 = tsc_IV32;
}
-static void tkip_mixing_phase2(const u8 *tk, struct tkip_ctx *ctx,
- u16 tsc_IV16, u8 *rc4key)
+void tkip_mixing_phase2(const u8 *tk, const u16 *p1k, u16 tsc_IV16, u8 *rc4key)
{
u16 ppk[6];
- const u16 *p1k = ctx->p1k;
int i;
ppk[0] = p1k[0];
@@ -210,7 +208,7 @@ void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf,
spin_lock(&key->u.tkip.txlock);
ieee80211_compute_tkip_p1k(key, iv32);
- tkip_mixing_phase2(tk, ctx, iv16, p2k);
+ tkip_mixing_phase2(tk, ctx->p1k, iv16, p2k);
spin_unlock(&key->u.tkip.txlock);
}
EXPORT_SYMBOL(ieee80211_get_tkip_p2k);
@@ -295,7 +293,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
key->u.tkip.rx[queue].state = TKIP_STATE_PHASE1_HW_UPLOADED;
}
- tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key);
+ tkip_mixing_phase2(tk, key->u.tkip.rx[queue].p1k, iv16, rc4key);
res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12);
done:
next parent reply other threads:[~2015-05-08 11:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1429476231-6197-1-git-send-email-gascoar@gmail.com>
[not found] ` <20150420082441.GU10964@mwanda>
[not found] ` <553C18B6.807@gmail.com>
[not found] ` <20150427101242.GR14154@mwanda>
[not found] ` <554AD76E.7060605@gmail.com>
2015-05-08 11:03 ` Dan Carpenter [this message]
2015-05-12 22:23 ` [PATCH] staging: rtl8192u: ieee80211: Silence sparse warning Gaston Gonzalez
2015-05-12 23:11 ` Julian Calaby
2015-05-13 8:36 ` Dan Carpenter
2015-05-14 1:04 ` Gaston Gonzalez
2015-05-14 8:30 ` Dan Carpenter
2015-05-14 19:35 ` Johannes Berg
2015-05-14 19:51 ` Dan Carpenter
2015-05-14 20:01 ` Larry Finger
2015-05-14 22:03 ` Gaston Gonzalez
2015-05-15 7:26 ` Johannes Berg
2015-05-15 20:47 ` Gaston Gonzalez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150508110328.GT14154@mwanda \
--to=dan.carpenter@oracle.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gascoar@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-wireless@vger.kernel.org \
--cc=navyasri.tech@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).