Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp52305imu; Thu, 8 Nov 2018 14:37:40 -0800 (PST) X-Google-Smtp-Source: AJdET5dKf/Mg6gLvnbxm3UBevy1VekVRWYiN93OE6XkCdiZGLSQNv4xDvks88Qcj5ukzK8xSg65V X-Received: by 2002:a17:902:8486:: with SMTP id c6-v6mr6172231plo.119.1541716660121; Thu, 08 Nov 2018 14:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716660; cv=none; d=google.com; s=arc-20160816; b=iCYT19G+a7cqBWPZv/tT6iGzKBmRUMQ88NApTMs8eIfeSxFlGpOREwppk3ZVk6Enof M+WTtNiHPDrumaWWiaKb1DyBcKO4pqtLgdZahVpKztJnXPgNfBnP4khL9WrVpMua5ZVV lPduUtdVT6YZPAaEfnA61+o1cOG9dsHyOL1Ke3gZ0jQLN7b7OfF0fuSDiVbFJVJqhBJW 48H7J5HE3NLdm6Zlzos0Nj7lmlhXY+oh/TOS3RfVDRp+PC94wI8uvq89iGC9BgRG+ceZ OJz7wfrNMgemiR65g4breTY7Pxj1HVAnAm5RBH2eHhrzimhYkc59qjUM2vlSTXAGYKsr 1CKw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ExmSJybt4L/OONIP/7ZhXP/30GLVK0KvwIOiz5ACzaI=; b=zbspCW8wWi2ZhdB1YkhF1GK9PCkrYl7mKVAVDeV2B/KIUJTxxOHFDp8XLW2WF/BaRs /0AKYlWG1jcBe0To3MQouMby1IMi96mXCR07y80HXnmtJdK7XDiPy5DFi09Y2cVfnqpk A/CWA2Jfr7x9rj6U0VD4rMca/q5QFcpapUtbN17F1XF65xhBWy/+fIwoSQzzQJ/3sHSI ghRReqi3vdMCsVpESqvlrJ0c8lkx6UZF1h9BOSFMgGgjgt7P2engAmbjiVJ9sneN5q/N OaIwRsY+cuGADB8pO2Xz/mg3w2W9mpEepMFfB6z/cIZ6gMvZMfymqwszCBFzOIJG+c/R hpGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fsLDJjK1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si4654532pgl.471.2018.11.08.14.37.24; Thu, 08 Nov 2018 14:37:40 -0800 (PST) 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=@kernel.org header.s=default header.b=fsLDJjK1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729808AbeKIHgU (ORCPT + 99 others); Fri, 9 Nov 2018 02:36:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:53628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728347AbeKIHgU (ORCPT ); Fri, 9 Nov 2018 02:36:20 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F30E120818; Thu, 8 Nov 2018 21:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714332; bh=5VajW6TfF6dNEUgbBYnPfm4/HT215jNlYOeUFGHeaiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fsLDJjK15dKXGXGTVKsZZyzkgJG9ecHplQzeRSnFWyzwoM+geJKJ8B9r/m6W0DyLD 9uVyzekyj1DJ7/MMOgLSpLn+mnk3VDetHWhD3SpzpBRVbxOmevDlw85xFtR7ZKs9jw 7vyM2f0kjflQx5MnXyG9wkxfVUYq9KNLgSLwJy2A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Willi , Johannes Berg , Sasha Levin Subject: [PATCH 4.4 007/114] mac80211_hwsim: do not omit multicast announce of first added radio Date: Thu, 8 Nov 2018 13:50:22 -0800 Message-Id: <20181108215059.613565346@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 28ef8b49a338dc1844e86b7954cfffc7dfa2660a ] The allocation of hwsim radio identifiers uses a post-increment from 0, so the first radio has idx 0. This idx is explicitly excluded from multicast announcements ever since, but it is unclear why. Drop that idx check and announce the first radio as well. This makes userspace happy if it relies on these events. Signed-off-by: Martin Willi Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/mac80211_hwsim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index c98cb962b454..05413176a5d6 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -2547,8 +2547,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, list_add_tail(&data->list, &hwsim_radios); spin_unlock_bh(&hwsim_radio_lock); - if (idx > 0) - hwsim_mcast_new_radio(idx, info, param); + hwsim_mcast_new_radio(idx, info, param); return idx; -- 2.17.1