Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp924168ybz; Wed, 29 Apr 2020 11:49:23 -0700 (PDT) X-Google-Smtp-Source: APiQypKJ+0d0q43pDI0cjWk/ugpSlPZjeHTHgS7td73qJdcEuFwr49q1h3fS97YDM7EZlfWqTLO7 X-Received: by 2002:a05:6402:8c9:: with SMTP id d9mr3681873edz.357.1588186163363; Wed, 29 Apr 2020 11:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588186163; cv=none; d=google.com; s=arc-20160816; b=0jWuI9BqMzMdq7J69T95tSqfv75zzM9TjLW13Z3K6f8PeeAWuEhgC6gcVg9xD3NT28 F27gCC2Ee7xi/J/jTTDNhGkKwbCOnpUAGhb4izsSL2IVCeMWFQHaAXsDXMkJlgVDkVqb 16C3bwjPlI5YV3FSa3EN3DeTRYv28IlAq1/YODomPt8dCBXi5Ie+NhFZfRfZ3brr3kwd RC022zJ8SPL11qj5mVsqIhKj7kefOB7pi2lwHys7s6yC8EP3p6C1SanXQuTccbALV0kh FY/lbD4ToDB3oyWZOI9wKhL3dG5PlKMU7kI4WwxCLqZ3TRTVI4aDzuLoSLGR59/UUYm/ g5Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=CDyB54AjrNjFSRl8MhLod74ljRZRfy3XowXumg1NuYA=; b=ZlX7u2AOD0KH5r3nG8xdVfuHPlkf7RlqUWsA8xzl5uNyCVj9nWHCBODDMJFa6pn543 Bx1aoyVuSrutdScmTZ0D2m+Gh6JgEINLN2FMhAF7VffVbwIVpQPrZ3bLeNGOy7D4egxv v30+dy+brVR6Zk14sLwHkDObzBPZW02VcopDQiQSFgytZlFW02QAwhEUA/aAIJosqGxO v+peQ2zZ0Ha6UMk7asA+hhncM0eTuPXI2Dc2vh5LiUZy8NsHXWYJ0C8cxXUHNlixrECj 57J0J0Lz8X0//4dVbqkt7sAPuFvuUfzMpKxUD23+HXUCcaUJPIsmGatqARRi7L5LzWkb rz2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RFScoR6J; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h2si3802600edz.585.2020.04.29.11.48.59; Wed, 29 Apr 2020 11:49:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RFScoR6J; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbgD2SsS (ORCPT + 99 others); Wed, 29 Apr 2020 14:48:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726423AbgD2SsS (ORCPT ); Wed, 29 Apr 2020 14:48:18 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 391BFC03C1AE for ; Wed, 29 Apr 2020 11:48:18 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id x17so3814862wrt.5 for ; Wed, 29 Apr 2020 11:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=CDyB54AjrNjFSRl8MhLod74ljRZRfy3XowXumg1NuYA=; b=RFScoR6J8meDk+PuK2qeAGbRkEVzZHhD1uzBwEJ3DQIcVuxphdWlDVf0fgX2hJIqBx YTz6jzAXFrAfbNp47ifFA2RHHuWlxI9AIinVzfZPApdRnXhllA5zFbpzSnfuRilh8jhG skmXqtlsKN1kxXtdIrVJXiLYbKYSbauT0rT0uuy3Mmx+5rdUj41bDCsHOBjB4rz+jmFQ Qgi6AgskeaeEHq70tSzHYCON5fAPq5ctWxmzLifGl26WCWnUatDX9Ll1iCLpjQivmWSq Z1hgFT8YHzZtM8kXgf77XOOYVfWf7TNswDuplPDs1/PQdSBrhjvcW//GfxvLLQMtHeRt J6vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=CDyB54AjrNjFSRl8MhLod74ljRZRfy3XowXumg1NuYA=; b=fKg2SUtTholUbp5K2vEoKjXj16w2HFwFYNjdvltFcp0dZOD2YjfU041yxh/hy4j8r6 7Y9o2DQOS5HbuBYICwhwoh38afF33FvomgX/t86LiBRkeGtVOulhsXSOyoEePlknoPIw buSt6EhtL1qkZAk/V+JlA9FTJ4U0yBsJgOjxRmhFvzsAng4tmCPbCBHJGroB/6kq4ajW JPGAbhDK7UCJotrTjK/sD/Ju/4iv96DQQ2iFtBQ4pMf94PxJiYxkFxgRG/Yuj24WOKkz fVthrQzLQ87x5bABGgHMLKc/2noS8dx5nRu1on6lWUys1PxJQKZ+Als+njv4zPjikxG8 9m9A== X-Gm-Message-State: AGi0PubOtYqVnByTFD3T1DShJ+RQzI5EZ4EBmspHKWg/qarRgI7m95sy Uo4zwEY31GU4zikoxTlMUMo= X-Received: by 2002:adf:e5c8:: with SMTP id a8mr44341553wrn.56.1588186096957; Wed, 29 Apr 2020 11:48:16 -0700 (PDT) Received: from [192.168.43.18] (188.29.164.11.threembb.co.uk. [188.29.164.11]) by smtp.gmail.com with ESMTPSA id 17sm8790455wmo.2.2020.04.29.11.48.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 11:48:16 -0700 (PDT) To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org, Oscar Carter From: Malcolm Priestley Subject: [PATCH 3/3] staging: vt6656: return all key calls to mac80211 stack. Message-ID: Date: Wed, 29 Apr 2020 19:48:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org vnt_mac_set_keyentry can return USB calls so return them to mac80211. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/key.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index de54cc3ff95a..c66cb53cfc09 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -91,9 +91,8 @@ static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr, key->key[15] |= 0x80; } - vnt_mac_set_keyentry(priv, key_mode, entry, key_inx, bssid, key->key); - - return 0; + return vnt_mac_set_keyentry(priv, key_mode, entry, + key_inx, bssid, key->key); } int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta, @@ -102,7 +101,6 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta, struct vnt_private *priv = hw->priv; u8 *mac_addr = NULL; u8 key_dec_mode = 0; - int ret = 0; if (sta) mac_addr = &sta->addr[0]; @@ -115,7 +113,9 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta, key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; - return ret; + return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY, + KEY_CTL_WEP); + case WLAN_CIPHER_SUITE_TKIP: key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; @@ -136,11 +136,9 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta, } if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) - vnt_set_keymode(hw, mac_addr, key, VNT_KEY_PAIRWISE, - key_dec_mode); - else - vnt_set_keymode(hw, mac_addr, key, - VNT_KEY_GROUP_ADDRESS, key_dec_mode); + return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_PAIRWISE, + key_dec_mode); - return 0; + return vnt_set_keymode(hw, mac_addr, key, + VNT_KEY_GROUP_ADDRESS, key_dec_mode); } -- 2.25.1