From patchwork Fri May 8 11:03:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 6364161 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E0CCEBEEE1 for ; Fri, 8 May 2015 11:03:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21D6F20204 for ; Fri, 8 May 2015 11:03:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 220D1201C8 for ; Fri, 8 May 2015 11:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbbEHLDq (ORCPT ); Fri, 8 May 2015 07:03:46 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:32880 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751970AbbEHLDp (ORCPT ); Fri, 8 May 2015 07:03:45 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t48B3Z25004347 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 May 2015 11:03:35 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t48B3YBm011114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 8 May 2015 11:03:34 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t48B3YrN013150; Fri, 8 May 2015 11:03:34 GMT Received: from mwanda (/154.0.139.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 08 May 2015 04:03:33 -0700 Date: Fri, 8 May 2015 14:03:28 +0300 From: Dan Carpenter To: Gaston Gonzalez 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 Message-ID: <20150508110328.GT14154@mwanda> References: <1429476231-6197-1-git-send-email-gascoar@gmail.com> <20150420082441.GU10964@mwanda> <553C18B6.807@gmail.com> <20150427101242.GR14154@mwanda> <554AD76E.7060605@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <554AD76E.7060605@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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: