Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp509213pxv; Thu, 24 Jun 2021 13:01:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCTZCgYOPNgQso0ZnAZRAvBARgABTbmpUL75Md92hXU+3B9Hg2BV1OuaLEKGRFgfslpSMf X-Received: by 2002:a05:6638:12cd:: with SMTP id v13mr6137655jas.104.1624564862531; Thu, 24 Jun 2021 13:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624564862; cv=none; d=google.com; s=arc-20160816; b=WEpAyEJ6k+dr/xPOBYvKswqv3JaQuiVbIhn1xoQqsVrayN3cmtZnCImxYDYC9B9LCm pK+1kcF+Mxp78kkCeopL8H+Icl/Ka3++lyDV80MnwwINWZyBsD+mXNJhhNA6OXikXaBS txt3g5fo0o7T7/2ASyo6Phj1QXazseUrH5hAY4h+42FMRzaVdLRHb73hm30A7aspNfG+ faIMi4TpslhFqu9k4g2jUwmsjVdA0aMK4yzIjiiFpcEtslF3L2dAWiu8Yi4OrtSOavws yXyX/gZJHUORwD5ef7SCbaPbfj5wRETzW8DjFyXr1UgovXuXhehyiJxRpM4MsB4TO+in wcBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MgYUf2UwozZW1M1F4AiO1MTGhl6u3fFGhBU4S5iL+m8=; b=lqXkK0yaYh011GGj9b4yuP1AZ7lD6A9z4/CmgjB+RlnFh7bYV/TEZcswE5RbbIcz4u Vr8CyVYyLgNhUPNU5sIOYDjZ4McaXy0cP6ZM/Jt0vR5uApZu/3ZmWn5ZSUIvGWq807l1 /0qVSNFD97RVznG0KPalt/6+PaF3NIl41gbDoWdgZTFvxootXFza001e1DLI486LW8Xq iIbfPJyol+E1fmVlg9CKBUr1EVSuJGonYGpist1BUsk7SqWPRu6irsy8AZlVjr+PIuoT 1G9Eh9ayYXGBqzAmXEi2U2BXegXPWiQO2Oftei5wOVcWbDejfM+mhqf3BB6SeLYR43mc CU7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eRLfY5gF; 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 w16si1711344jad.115.2021.06.24.13.00.50; Thu, 24 Jun 2021 13:01:02 -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=eRLfY5gF; 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 S232740AbhFXUCE (ORCPT + 99 others); Thu, 24 Jun 2021 16:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232653AbhFXUCE (ORCPT ); Thu, 24 Jun 2021 16:02:04 -0400 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDAF3C061574 for ; Thu, 24 Jun 2021 12:59:43 -0700 (PDT) Received: by mail-ua1-x92b.google.com with SMTP id k9so2666418uaq.6 for ; Thu, 24 Jun 2021 12:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MgYUf2UwozZW1M1F4AiO1MTGhl6u3fFGhBU4S5iL+m8=; b=eRLfY5gFUkzk5YtmMD8YX7u2vVMYdAuLTQkrUc3NFS04g4EkTRigpAVEU4FSjnxmaI hoagqiFz28ZcuD7RGwYqKk3V0hmGiZRHbRH64/OcgrPsYgdKuxzBVg4wGg1HyTCZc/Sd R7aYcG24QxcYHYmzqpVtE014ziDUygzMKNSGxqr3vodiqPNmcmGBX5LYbbNBIfzN9jSG tC+pD+Ho6nhyUqHnwQpLFCOCnzM41Qf8Njl76ZSczaCmw6EyNgJJ2TktLOzHVJvnhHsj tILOGc776UEn4261OU7FQvZ5DnnxhUenPxW6sXVIOxMBiq8quRNKbyUAGOkDDx4AFTQr HRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MgYUf2UwozZW1M1F4AiO1MTGhl6u3fFGhBU4S5iL+m8=; b=gi3QkcE1leZF5gi3M1oKbCrngFNpYNmK6uh8lDregq8obf4dBRCkjdVcSRyMg+ZHXl be1ZrRvhHSZ4GKhOlPLHVe8WIG+yfMD+Pc7PQSx5IaesKbZB2f8whUo9vWBPc/37sVag oTU4EnbSrkegdSVLyAm2PC5S2PqLD21T3nhPT9OzYEvhFmPE6KI8ocq9zC72cadTFPa3 AbiQrLWzIpOOzv99UPpCtakbA1h7lyr62oNOscrxZoBgWaLDsBQuRa29uY0MOxTW51W/ i8PZ9yF2BhcHt04501ebLSfWV5iF6gCQJ2peZqMjUQk8Cu7NUWRDRnj111j/Qechrjpd h84w== X-Gm-Message-State: AOAM532KGjB7PGHwZyE6IAR5VwOSnoUmxUsHSHGBVqmLuwnyDsqmyeeh b/uf63nMiiTtzywOmy+Nlj8qR3F+XjESbl+QN+U= X-Received: by 2002:ab0:6009:: with SMTP id j9mr7796950ual.87.1624564782956; Thu, 24 Jun 2021 12:59:42 -0700 (PDT) MIME-Version: 1.0 References: <20210623141033.27475-1-emmanuel.grumbach@intel.com> <20210623141033.27475-4-emmanuel.grumbach@intel.com> <87fsx7i416.fsf@codeaurora.org> In-Reply-To: <87fsx7i416.fsf@codeaurora.org> From: Emmanuel Grumbach Date: Thu, 24 Jun 2021 22:59:32 +0300 Message-ID: Subject: Re: [PATCH v3 4/4] iwlwifi: mvm: add vendor commands needed for iwlmei To: Kalle Valo Cc: Emmanuel Grumbach , "Coelho, Luciano" , linux-wireless , Ayala Beker Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, Jun 24, 2021 at 8:13 PM Kalle Valo wrote: > > Emmanuel Grumbach writes: > > > Add the vendor commands that must be used by the network manager > > to allow proper operation of iwlmei. > > > > * Send information on the AP CSME is connected to > > * Notify the userspace when roaming is forbidden > > * Allow the userspace to require ownership > > > > Co-Developed-by: Ayala Beker > > Signed-off-by: Emmanuel Grumbach > > --- > > drivers/net/wireless/intel/iwlwifi/Kconfig | 11 ++ > > .../net/wireless/intel/iwlwifi/mvm/Makefile | 1 + > > .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 + > > drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 9 +- > > .../wireless/intel/iwlwifi/mvm/vendor-cmd.c | 186 ++++++++++++++++++ > > 5 files changed, 203 insertions(+), 6 deletions(-) > > create mode 100644 drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c > > > > diff --git a/drivers/net/wireless/intel/iwlwifi/Kconfig b/drivers/net/wireless/intel/iwlwifi/Kconfig > > index 629aaa26a230..f91516d08b28 100644 > > --- a/drivers/net/wireless/intel/iwlwifi/Kconfig > > +++ b/drivers/net/wireless/intel/iwlwifi/Kconfig > > @@ -92,11 +92,22 @@ config IWLWIFI_BCAST_FILTERING > > If unsure, don't enable this option, as some programs might > > expect incoming broadcasts for their normal operations. > > > > +config IWLMVM_VENDOR_CMDS > > + bool "Enable vendor commands" > > + depends on IWLMVM > > + help > > + This option enables support for vendor commands, including some > > + that don't have their own Kconfig option. Other Kconfig options > > + depend on this one as well. > > + > > + This is not enabled by default, if unsure, say N. > > Why do we need a new Kconfig option? Why not always include it in the > compilation? I expect 99.9% of the users to want to disable this.VENDOR_CMDS adds a user space API and in a sense, it increases the attack surface. You can claim that I can reuse the IWLMEI Kconfig option, which is true, but we have other features that need VENDOR_CMDS that are not (yet) upstream. So the idea here is that any feature that needs the VENDOR_CMDS will select it and if none of them are enabled (for 99.9% of the use cases), then, we would disable VENDOR_CMDS and decrease the attack surface. Makes sense?