Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3406511ybd; Tue, 25 Jun 2019 01:57:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHgiTM+NajaDIV4PX82isuFCkkfXMn1VGEcOvvgdEoSf19NmsJ6Eo9HLWVyCRKGZEn9ph0 X-Received: by 2002:a17:902:2a68:: with SMTP id i95mr155747795plb.167.1561453055307; Tue, 25 Jun 2019 01:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561453055; cv=none; d=google.com; s=arc-20160816; b=mfwCy566p4nQLmXHqOu7dxUIba1P85IRsOsf+G7hdtJaawe7XtX7S66WVlGx0XRJzk nT/hQEBC8bTl/RkBPCwc67jaxR3sKRYDPoaxzp8z0WmgPYMcWg+DtEAKUB3FIfqvWuNy IaBWx7oKb52zG1dcc2y4dIBJqm2kcbHJtR8A1j1yrXdIU7WM3gTeS3AyL40El5KmB5gz RqIdHx78bGVg4scf+ejOF2w1lEb8NqJCXktdou8DRNUTOsyiBRY3RVb3N0kAJyIRO1Ci J2hJdlZoujYShCR0xeq0dkCK0AGSjJQg04ct7/B1kxnNl4nGrCPedOKhs9DntW/Ys+2j Ne0w== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=O54HPskK78nRWjbEU9U57j8aKCfsNL7JehscZAlno5A=; b=XtVCWshfL5yOsXFjoPznRn03EFx+iPqn2rHULFuimCdjkdXJGWnMViULIL446PTC1O KCawYezOkIdYofbpYJQhqNu9DNccS+cKqsQN9KcP0VQiK6JOY/DIL/Bc6pwFeIuCBOvQ MvCZdbqty/eyFXjRRnfmTCwuFXOuQefJe8yhKRWbv2sl1NrVLgIwhD658wZwKFxINGPv mqwr2XW3WyqZ5zCL9L/3RpBwt+IpyPvqCI9MopiGPUmUvKrMHJWBT+vFfvb2VnqP3bZ1 xfiWHgtknzzqNllhMgMETRtegCFG9ovNnLLT3j8G1z5bntAapBSa2h2mz9nepnn2EQi7 QlmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=SGdi2lfP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si2987809pgv.139.2019.06.25.01.57.19; Tue, 25 Jun 2019 01:57:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=SGdi2lfP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731165AbfFYI4o (ORCPT + 99 others); Tue, 25 Jun 2019 04:56:44 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54453 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730791AbfFYI4n (ORCPT ); Tue, 25 Jun 2019 04:56:43 -0400 Received: by mail-wm1-f65.google.com with SMTP id g135so1942058wme.4 for ; Tue, 25 Jun 2019 01:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=O54HPskK78nRWjbEU9U57j8aKCfsNL7JehscZAlno5A=; b=SGdi2lfP9LNdabm3TNsJ3sK0YrDDDjwaEDyUcxVGiOvPEdiOfRe1qLn1YK/u/cdQK5 +cCoahY+Hnwrmw3hvRUOaLj2sLzDGziRCP5T/cpfPfhbs6G2q8iBlsUjtbCTQKs2pLm8 gmysgaamVadEcHrfCRQU5tzq3qSlF8ma3gdJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=O54HPskK78nRWjbEU9U57j8aKCfsNL7JehscZAlno5A=; b=j8ddfLICqj4H0Fa986X0hFHuTRoHm/IdVt9+f7XioddMFJiyp5qRBuTzTOTi7nz5pG 7H7rVmlvStxkX57uWP5O/ZVxdgR+dv1XHOLWCSSaJ052TjTRUuO5qMo2isbTwEFjxLuI 8D+ZMAzBFE+f8e8JtpOlfEv2IFeDzxP16PWp5Ipbe0wIgl8HaoZiqRtIbdWKAM9zNi9i BDIEaQGFX5wU93BRqKOV7T6X3vP4/apeswo9jRqfFWWvZK/y2G+krubHkhpDb34JUyUS zZ17iQ+LStljWFjkEQCzmRQ2ZQGqwV94wIy6m6Vj6N48mOeHbNJt6HMZgfxhGf68//Dx UWfA== X-Gm-Message-State: APjAAAUd4VHESaVchCEjaAYOKy8H0HNwtGREi697CuX3zKDw0oDjKQ8e pmfEC+kU3pLl8x/om42Ygh3jXQ== X-Received: by 2002:a1c:e108:: with SMTP id y8mr18567373wmg.65.1561453001499; Tue, 25 Jun 2019 01:56:41 -0700 (PDT) Received: from [10.176.68.244] ([192.19.248.250]) by smtp.gmail.com with ESMTPSA id n3sm13039809wro.59.2019.06.25.01.56.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 01:56:40 -0700 (PDT) Subject: Re: nl80211 wlcore regression in next To: Johannes Berg , Tony Lindgren Cc: Kalle Valo , Eyal Reizer , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org References: <20190625073837.GG5447@atomide.com> <2570f4087d6e3356df34635a0380ec8ce06c9159.camel@sipsolutions.net> <20190625080019.GH5447@atomide.com> <7f74087fef1e554e0aeb82a6cec4113727487928.camel@sipsolutions.net> From: Arend Van Spriel Message-ID: Date: Tue, 25 Jun 2019 10:56:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <7f74087fef1e554e0aeb82a6cec4113727487928.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/25/2019 10:02 AM, Johannes Berg wrote: > On Tue, 2019-06-25 at 01:00 -0700, Tony Lindgren wrote: >> Hi, >> >> * Johannes Berg [190625 07:47]: >>> On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: >>>> Hi, >>>> >>>> Looks like at least drivers/net/wireless/ti wlcore driver has stopped >>>> working in Linux next with commit 901bb9891855 ("nl80211: require and >>>> validate vendor command policy"). Reverting the commit above makes it >>>> work again. >>>> >>>> It fails with the warning below, any ideas what goes wrong? >>> >>> Oops. For some reason, I neglected to check the vendor command usage >>> beyond hwsim. >>> >>> The patch below should work? >> >> Yeah thanks that fixes the issue for me: >> >> Tested-by: Tony Lindgren > > Thanks, I'll drop that into my tree and hopefully will remember to send > it on soon. Hi Johannes, By chance noticed the patch included brcmfmac. So I tried, but I get compile issue below. It is because ERR_PTR really is an inline function so that is not working. So also need to patch that. I left the extra braces around the error code although not strictly necessary. Regards, Arend --- diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 2d17e32..da8249b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -4172,7 +4172,7 @@ struct sta_opmode_info { u8 rx_nss; }; -#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) +#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)(-ENODATA)) /** * struct wiphy_vendor_command - vendor command definition ---8<-------------------------------------------------------------------- CC [M] drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.o In file included from drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:18:0: ./include/net/cfg80211.h:4175:29: error: initializer element is not constant #define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) ^ drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:126:13: note: in expansion of macro \u2018VENDOR_CMD_RAW_DATA\u2019 .policy = VENDOR_CMD_RAW_DATA, ^ ./include/net/cfg80211.h:4175:29: note: (near initialization for \u2018brcmf_vendor_cmds[0].policy\u2019) #define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) ^ drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:126:13: note: in expansion of macro \u2018VENDOR_CMD_RAW_DATA\u2019 .policy = VENDOR_CMD_RAW_DATA, ^ make[3]: *** [drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.o] Error 1