Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5586504img; Wed, 27 Mar 2019 11:11:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV9ozdOON8Q6eFN64aUt8eyWYu5lJM5YkPunyDaZNutEwbDYp1KGHx5mMiMfq4yxZ4uzM0 X-Received: by 2002:a62:7049:: with SMTP id l70mr36822250pfc.78.1553710291976; Wed, 27 Mar 2019 11:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553710291; cv=none; d=google.com; s=arc-20160816; b=YvmSvy/WdfaKbcHuUubrh4ZZTELlVAiokpjZI+d3lRjHwGwETs2zB1JMVmEQj4UPV4 GbbcphBeT3q9UJ0wXbbDv7eWpmeKm+QfsivwbjG152FoosXNT6SNdw3B/XqGlDOnBCrm 8Jpwt4jbq2O+lCIfAurPYLoKvf2P1U2s1z4j1WFCvlrymjFIBM9nEfD99Fcoc5Z12HXs 69yTj5tULiiApNajmoKeBhMewIc5LUOY7RLVOb7+fBTkVDJmeSZVixRQY0AXo3+xpdjy Yd+gf7CD/vKrnmuEWkvsecej06H6+38YauI0S8Yfcj9ALv3V/zuSdgDWFAihVRnQiHKs J/5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Npju4SxUJ0U47mgz38YlqnxeUTW5KvOkHejF21m5IVY=; b=c0K+tNdSlrrEAnIQVwH9Bolzu4yxlanPeYq7fkbec7DghKQJUIrFOQA/tIjLBz2clr 1u7EyPjeoNwQMgXCmZ+rL/aKng0PjrE5WvgYM8So0LJvw3hKPHpFm8/TFms85+xy1wUp 8tRaEBQb09t+jSE3VtnYiwZASzTfswmDTy34nh0BFbRSFnEo6QERcrugGEUDP4TLveHH c8W7QUvIEzo2mqUkjFN7EiyFWBz5XytNDHW4PPL0OJ0D04otkoPIVgkNyYP8mKGgnFMj k0BbSnqq7AzOZhCE6RGyNZo4sueFARgbX+6fxWrUM1h+OtDe8jt+M3J4xR1UrK+PPL2g RacA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jbkrirWU; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si16067618plt.332.2019.03.27.11.11.16; Wed, 27 Mar 2019 11:11:31 -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=@chromium.org header.s=google header.b=jbkrirWU; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388045AbfC0SJD (ORCPT + 99 others); Wed, 27 Mar 2019 14:09:03 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36640 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388465AbfC0SI7 (ORCPT ); Wed, 27 Mar 2019 14:08:59 -0400 Received: by mail-lj1-f194.google.com with SMTP id r24so14205650ljg.3 for ; Wed, 27 Mar 2019 11:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Npju4SxUJ0U47mgz38YlqnxeUTW5KvOkHejF21m5IVY=; b=jbkrirWUy7gUKHB/nLOWdxyCTyJdtE65evx3Fea+5F7BPDzM+pLlNzRTTidrlkDkyo 3wbkddSyt+sJ74dQkDCVC9bmMeFRsetnq+S5IOoKRU4Pb7EjN5ED+4fT4dHx65q3xOUX hQVmTy4mAip0bqlUmfGy8g+0iV5jwUD2bmhMo= 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=Npju4SxUJ0U47mgz38YlqnxeUTW5KvOkHejF21m5IVY=; b=P2iqSsmyozeUs0lWfPIsog7oLVnTOPpj/f+WGSshPDnxD2FnrOF5ePRyYDEInrJUuQ s6sONhNkSmjmQ81soalVyy+MJ5QFbdZ59rzgr4a+iZpSyzhQSELZdNDaEXCceVDnTuDJ qrXjGIO1Ph37e93xjb7VOqGWFOigh6vewZfBwdIiAlMHm3SjqJVo30YQuYbY/k/+fvfz AlTz0RfmS5qMbmaulQu/d+VErgSYLY0c5AykqvSW/2AigambWWZI3rickP+sVnRZf9li 0omlHqCvHVcuhffzNM1j4n3B+oJ7p+HYXRyZV3hGFfLfpbCCWkuIj0my50X0ldqCz1+Y 4TJw== X-Gm-Message-State: APjAAAWLJo4iQGfB32D6oYEcfAWfFk/WceWfAeLi4+eEU8Yqk5EZA+md wBaeGV9Z8rEgKiavhe3kmsi5wDAiTsw= X-Received: by 2002:a2e:9457:: with SMTP id o23mr18937526ljh.71.1553710136582; Wed, 27 Mar 2019 11:08:56 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id f25sm2162303lfc.46.2019.03.27.11.08.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 11:08:55 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id a6so12078991lfl.5 for ; Wed, 27 Mar 2019 11:08:55 -0700 (PDT) X-Received: by 2002:ac2:569b:: with SMTP id 27mr20621267lfr.24.1553710135430; Wed, 27 Mar 2019 11:08:55 -0700 (PDT) MIME-Version: 1.0 References: <20190327180158.10245-1-sashal@kernel.org> <20190327180158.10245-116-sashal@kernel.org> In-Reply-To: <20190327180158.10245-116-sashal@kernel.org> From: Brian Norris Date: Wed, 27 Mar 2019 11:08:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH AUTOSEL 5.0 116/262] mwifiex: don't advertise IBSS features without FW support To: Sasha Levin Cc: Linux Kernel , stable , Kalle Valo , linux-wireless , "" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 27, 2019 at 11:05 AM Sasha Levin wrote: > > From: Brian Norris > > [ Upstream commit 6f21ab30469d670de620f758330aca9f3433f693 ] > > As it is, doing something like > > # iw phy phy0 interface add foobar type ibss > > on a firmware that doesn't have ad-hoc support just yields failures of > HostCmd_CMD_SET_BSS_MODE, which happened to return a '-1' error code > (-EPERM? not really right...) and sometimes may even crash the firmware > along the way. > > Let's parse the firmware capability flag while registering the wiphy, so > we don't allow attempting IBSS at all, and we get a proper -EOPNOTSUPP > from nl80211 instead. > > Fixes: e267e71e68ae ("mwifiex: Disable adhoc feature based on firmware capability") > Signed-off-by: Brian Norris > Signed-off-by: Kalle Valo > Signed-off-by: Sasha Levin The backport seems valid and useful: Reviewed-by: Brian Norris