Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp23461imu; Thu, 8 Nov 2018 14:05:19 -0800 (PST) X-Google-Smtp-Source: AJdET5dk+mQtfp1Er2rR5L5CmS4Gz8bDV0IYX9R6p8YdMkVfUxkZ35niLOgAnBdIT0y1xPmxyl3D X-Received: by 2002:a63:525e:: with SMTP id s30-v6mr5256226pgl.436.1541714719630; Thu, 08 Nov 2018 14:05:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541714719; cv=none; d=google.com; s=arc-20160816; b=oeuUJEl7FkDlCBn67b9YxWIWKNB/XKXSlzH7g/050dahI80PqTDjGN5BMNblJdOvI1 dOEipHaZeOYewEPNAvk4EHpKSiwB+ivX9ngAUVQZVmk+ETLoORFEO1RuJeJOfWWnLMzM QzjE8tgQY+LpfjF86am43Q7dklN9HHpedKvpd/rpHRvjgGqbdFg256fpeSSxfvfOBbwe Z7MvECQXEJknZu0qBRbeql9+2OsFPwp22kuu7GG8q4oQSZElez1xKrqW/kX1d2eH/ASe /VFI0OxrIekZUVMaLHAs9J6emy4C32uzyBedzKU0ZWKn1cLE+I6L3U0erUANXtJ0C9Cr h6hQ== 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=m5Iv38XM5dXu5V/eRsbNBjmgQ7ovzez3DihktpT5gxM=; b=AeCFP2Iq/9iGQrMtjlZPX/NTOZcgkWqAGWo+cmPzoY/JdH+Ff1DdRELF8YHSLpoDeZ BYjeUoGftYH1xtT+EF9S86hvtsP0NcU/+GMmBJssJru4oVWqZsHtYKqsuaV3wUMMNJQG FWX3bJPVacYVUePFgUqoWnIEPb3pVbzia30+MoslIGDZHyN2q7awm67vfOIddiUy9CQe 3MMHZkeRh+Jjmy/HKALzu2Yaa5pELPwLZepQsbCkARzh9oE9ZvFstWuibJuVtTcJlZUR kb21mpy5J6VNiITyBKesAQvq/4VXanFjL5m7zcFZmxuhnTIXlM3Soe8E+4JlePGs5QgG Aw5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JLgC+sxt; 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 u5-v6si5366047plj.98.2018.11.08.14.05.02; Thu, 08 Nov 2018 14:05:19 -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=JLgC+sxt; 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 S1731159AbeKIHkh (ORCPT + 99 others); Fri, 9 Nov 2018 02:40:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:60328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731153AbeKIHkg (ORCPT ); Fri, 9 Nov 2018 02:40:36 -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 EB76D20844; Thu, 8 Nov 2018 22:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714587; bh=l2KaRL6xiwoCINiUgVLIwghPBRh099PjVlgrwjIoMJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JLgC+sxtUL9d+XguDfQ099xzhXYriqnQig9C7Wg4+hSvb/RE8U/S4OoFnk0IpcCbr spmNs6jufWdmvFgc0AKk7xDhBnWLRCxrA1COQ+BGiObhO1rjJ7aRvqdI5Tyh3afUQK /gcB73+OcgnDEZ60YXFx6g/xiXoDBrvWXT56AS8A= 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.9 015/171] mac80211_hwsim: do not omit multicast announce of first added radio Date: Thu, 8 Nov 2018 13:49:45 -0800 Message-Id: <20181108215128.372499826@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215127.257643509@linuxfoundation.org> References: <20181108215127.257643509@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.9-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 4bb36dc73433..cbb3e902e347 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -2665,8 +2665,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