Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2785520rdd; Sat, 13 Jan 2024 01:44:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IERh87lM13VsrJLGXWbjQU5IbcTmuWkNC30mzV7ZBN7hgm/2hqOaHmFBKdpaGXjLs7PIHZf X-Received: by 2002:a17:907:9618:b0:a2c:345b:f069 with SMTP id gb24-20020a170907961800b00a2c345bf069mr3924364ejc.38.1705139084182; Sat, 13 Jan 2024 01:44:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705139084; cv=none; d=google.com; s=arc-20160816; b=G0nu/eYlMYHXxq9ZmO8obpia/QanGiMMo3lwL19hRbXVDvfNLOEI9jE3oyUKVEgFAF YF+bhmpX65uSff3tYviaTE6xDPeLaN9NOt0HSq+UB6SnnIi4I0dTriPMa0EFE5lqzC0n rHnoCJ4UwXa/RrjBAYUi86x584S04SxjFiXmD0u4Vc32c/yt9xh9Z8GmTctKLfnu8ZJK fgGn3qZFC8UXnZZOoysu1cbvYMi5ILiisUxJO6PjV0oEwQfE+Jo5OgyMn8Y2vsGdeovz bbIg/W3w4DEWvkbkuKWPD599rLxFjnsWYB/jyuL2eaYHUdtevITjOfMgHXZVgzzB2rab InBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=p6Eb+B6YMRgsLS3XtEyomyE73GMv3ezDtKAXl2lwhYk=; fh=C0hW2jczUh3kdYnIYPTDcpMflf+mY0TySE5n0DH+RhU=; b=i/mbYdknOJZylLKiaUPHYizfKgO22DqwHiD78vdxwGjkjAxfXfdAOu7QR9l4GP9HZq z3qsQV7/CWw/YNEXpw4S1t292K4RZFjRfzBIvp0UeRNhN8PUv4n2lKlE9ERrrZ6TqO7O RbL0mK/OwLnS/ipU/JAg8e38ms3PfhauAtwMoe0T3jEniGufU7MKTBAJfjU96zViy1bL 8AHbPyzsugTOdXpqqoiHMNYp1vW4S38RNzxNdqIMwb51dmCk0BbNvJZ/ZRtJZshkAzvm J44/1tZOT6gOEFGVun1xWndYAw3UVg/KFWWYYfFX5ck3b6xRt7NHqDkflcYlxsIQgIbe fleg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fvqWcWqt; spf=pass (google.com: domain of linux-wireless+bounces-1873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b27-20020a170906039b00b00a2ce47a1ef9si967239eja.471.2024.01.13.01.44.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 01:44:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fvqWcWqt; spf=pass (google.com: domain of linux-wireless+bounces-1873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E749C1F2293F for ; Sat, 13 Jan 2024 09:44:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11C5AEC5; Sat, 13 Jan 2024 09:44:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fvqWcWqt" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA2C1A3F for ; Sat, 13 Jan 2024 09:44:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C082C433C7; Sat, 13 Jan 2024 09:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705139079; bh=1hvDFRV24xJJKkGg0jYO3A1J1KEhcdugByo3G/yj7Dw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fvqWcWqtTrHxllZ17lSGnOeJciIg627H7RZMhPFhyFImMVvFRvItdWCFNMzykwYli AOi/QuzHHoFDTMhVsVFh5Cc3VpREmNQK5q3717epyYGH+weq3RZuB9Pnsqz8NbM6Yd gNnezmr46goqzAaazhkQLF4dV4IkYzdCabnenIShU64nbvMMEwPuxBLMpc0olEf5dj QGRWWDx+H3lYFM6oQhTyTLR51GlrsZNLjUJKmw7sAbbhodVD4hTi7YsgQGa8DVVVhM wG4itUKEtvsBf/4tAsUJPyb/YzCSLygfAWmPGziSo0jwjJ+Lo4+aEGFZpxinAm65IF +tmMeJiyFoDsg== From: Kalle Valo To: Jeff Johnson Cc: Sriram R , , Subject: Re: [PATCH 07/12] wifi: ath12k: Cache vdev configs before vdev create References: <20240111045045.28377-1-quic_srirrama@quicinc.com> <20240111045045.28377-8-quic_srirrama@quicinc.com> Date: Sat, 13 Jan 2024 11:44:36 +0200 In-Reply-To: (Jeff Johnson's message of "Fri, 12 Jan 2024 09:23:59 -0800") Message-ID: <87cyu5h8jf.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jeff Johnson writes: >> +static int ath12k_mac_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, >> + struct ieee80211_vif *vif, struct ieee80211_sta *sta, >> + struct ieee80211_key_conf *key) >> +{ >> + struct ath12k_hw *ah = ath12k_hw_to_ah(hw); >> + struct ath12k *ar; >> + struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif); >> + int ret; >> + >> + /* BIP needs to be done in software */ >> + if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC || >> + key->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 || >> + key->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256 || >> + key->cipher == WLAN_CIPHER_SUITE_BIP_CMAC_256) >> + return 1; > > I know this in the existing code, but what is the significance of > returning 1? Should this be returning a -errno like the error cases that > follow? It's to use software encryption, from mac80211.h: * Note that in the case that the @IEEE80211_HW_SW_CRYPTO_CONTROL flag is * set, mac80211 will not automatically fall back to software crypto if * enabling hardware crypto failed. The set_key() call may also return the * value 1 to permit this specific key/algorithm to be done in software. Yeah, this is confusing. IMHO there should be a define or an enum for this value. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches