Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp361259rdb; Thu, 1 Feb 2024 10:29:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHl7kSQcYtGIt0Vpu76wHXRU2b5dt+IfYZkmm4i4z9l4a1iGf4u/bJTmP5ahM6Ha07VEREm X-Received: by 2002:a17:906:eb0e:b0:a34:abc2:3627 with SMTP id mb14-20020a170906eb0e00b00a34abc23627mr3627923ejb.24.1706812140167; Thu, 01 Feb 2024 10:29:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706812140; cv=pass; d=google.com; s=arc-20160816; b=JdNMOuBYZmJSO8UvnNoH7esHCgBo/RZSX08ufutPssQJ4Eg39cTzPhNBmXFOwfumNk o8wailrbe3nrmAMPPvIxT0Va126o5oTZFfRQFXmUBrXUwC7gWDdWA1YVmFyzSl4F7a0V x/FriN5XX+XBsH0bdlE0CCSZAaU7/AZdESVkRYhZiD0tpUvWOiKX76HLlILMvBGFE+Iv 9t20N1rwoxBpML9So5UoKk4gIkZgKDHL0yXczflf09cHcsLTY3ujIosU70aNvU0JKmSq vbx7Bz4HfiLCPottPzneWCRtIZGGnJIGdJ162g4TiLrhBVSUrMVRk6O5rIgir/BofDE+ o8dA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=jpV/wJjP2ulgbk3dO9M8ZtNEeMsESVfaPjl1w/A+aX4=; fh=Ws3EA/PZmkdiaDA3GtajMaSQ6k0U9nYzbBpWNn/8hBw=; b=PR1StuS21DvOHkp+FSmk7SgKM851ZwqWpI/kzwMj8gq2oEkYxhQTuihH1pqShB0ZTe VauCPra114B3rtaumLiIBdcdorl5ASwuG6oq8LP/H71ehYdgCMcDFkvp2se691PxToml vrZATarEf46MLP26X4KSvYtRMdn+g+7iweo9GmwtYTnw45n5SiIOeMiqfJ1oBcy75dfK WTIok0If+6i0I+x4bokOsZGxN4xUvEInyhUmHoT1zSrMnGCpWY7SzR4k7EhhSDZZS1XG sonjwvL3w38G/I6UMCWoLzowNiglTz6K9+SJDDB2XgP9PsFzm0dkokFq0AePYQP8XEkv s8Ug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OP0HNziF; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-2972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCWT0v4wkmt/m3sTrYNKabjf6nl5iK1QUV4yRnplAl3yLJknfrKl4RyTRPoBMsVDMXyEu5OA5x/XREmyP7oNVPJriSeZV+OFuKevFLzxXQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qc8-20020a170906d8a800b00a352247f161si38983ejb.545.2024.02.01.10.29.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 10:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OP0HNziF; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-2972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E4A661F2349C for ; Thu, 1 Feb 2024 18:28:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A46F612FB29; Thu, 1 Feb 2024 18:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="OP0HNziF" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0DD17C6D0 for ; Thu, 1 Feb 2024 18:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706812137; cv=none; b=FTOIoHW0rNUfrF/DAkHRLAHLGq5mv9+QTr+vEreXT9hNju+hJl5f3nPsHrazYXTpYUz6hndAwuKq96ZfY70Zke2IkoEqCTFxpddPTzBv5ZC0x/voG1XIEhc8lJNOPum7S/YXOvYwy+8KGsKtJaEIYPCMZY/2bvP8L4airYQQD5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706812137; c=relaxed/simple; bh=QANjAiAoVt9IhYISZuxDeZeTodKH0j8t8wHAP5jA620=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ulBZslGnwheToD90PqylR8+AbZIK47GsK4ZoEQcjMlkGt+zMYVP2n3dWeIOgZttdN0W3ztUscb6OZiYsgSOJeOcjHUI5CnYNrbRdXzQxR2nHxfeJS2OFpnGwvP3h0mLdTFfM2My64UI/uAYRwrgpRoad1J2FVkQ/y/0Mf6ydIFo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=OP0HNziF; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 411Af26V029719; Thu, 1 Feb 2024 18:28:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=jpV/wJjP2ulgbk3dO9M8ZtNEeMsESVfaPjl1w/A+aX4=; b=OP 0HNziFQRKAgC+41TUAkRHQb5tluP2e4TuRm6Vrpz8+XvoCyhx9xZz3RbIl4KnioC Ta1vgsvqJunq/4mpvOKkkc+YaDi+LTp24RAnz/BPipwyFuxq+8fCpwxFSZNVdzux MRQ+ZX+6FCUoF25UT0OYL0qfXOTH+9g5N6VPJr565LXf6IihoRGXyVaVpaqLjtWW tsEc6cyYjd4W8JajMPKm5xc56x9dfZB8yoxSRnxYxFT+XWo1+wAkeJEWxYozEyHd qMdZEDDurP7pgzStp8vlqeO9ZcATDXiPwaEj+fgo7daKXyszaPEOtbK+o4TJOvrG 52DoDsfBOmcYAu4MxMLQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w06mnsr4x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Feb 2024 18:28:49 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 411ISAjM001719 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Feb 2024 18:28:10 GMT Received: from [10.110.16.197] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 1 Feb 2024 10:28:09 -0800 Message-ID: <39db19fd-c75b-4467-ad74-ce52a039a159@quicinc.com> Date: Thu, 1 Feb 2024 10:28:08 -0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: mac80211: fix unsolicited broadcast probe config Content-Language: en-US To: Johannes Berg , CC: Johannes Berg , Aloka Dixit References: <20240129195729.965b0740bf80.I6bc6f5236863f686c17d689be541b1dd2633c417@changeid> From: Jeff Johnson In-Reply-To: <20240129195729.965b0740bf80.I6bc6f5236863f686c17d689be541b1dd2633c417@changeid> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: PKXVkY1nFXW5g5GTCcVyvf_j7CM-KHud X-Proofpoint-ORIG-GUID: PKXVkY1nFXW5g5GTCcVyvf_j7CM-KHud X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-01_05,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 impostorscore=0 phishscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=947 clxscore=1015 malwarescore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2402010142 On 1/29/2024 10:57 AM, Johannes Berg wrote: > From: Johannes Berg > > There's a bug in ieee80211_set_unsol_bcast_probe_resp(), it tries > to return BSS_CHANGED_UNSOL_BCAST_PROBE_RESP (which has the value > 1<<31) in an int, which makes it negative and considered an error. > Fix this by passing the changed flags to set separately. > > Fixes: 3b1c256eb4ae ("wifi: mac80211: fixes in FILS discovery updates") > Signed-off-by: Johannes Berg Reviewed-by: Jeff Johnson > --- > net/mac80211/cfg.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c > index 321698012e12..327682995c92 100644 > --- a/net/mac80211/cfg.c > +++ b/net/mac80211/cfg.c > @@ -5,7 +5,7 @@ > * Copyright 2006-2010 Johannes Berg > * Copyright 2013-2015 Intel Mobile Communications GmbH > * Copyright (C) 2015-2017 Intel Deutschland GmbH > - * Copyright (C) 2018-2022 Intel Corporation > + * Copyright (C) 2018-2024 Intel Corporation > */ > > #include > @@ -987,7 +987,8 @@ static int > ieee80211_set_unsol_bcast_probe_resp(struct ieee80211_sub_if_data *sdata, > struct cfg80211_unsol_bcast_probe_resp *params, > struct ieee80211_link_data *link, > - struct ieee80211_bss_conf *link_conf) > + struct ieee80211_bss_conf *link_conf, > + u64 *changed) > { > struct unsol_bcast_probe_resp_data *new, *old = NULL; > > @@ -1011,7 +1012,8 @@ ieee80211_set_unsol_bcast_probe_resp(struct ieee80211_sub_if_data *sdata, > RCU_INIT_POINTER(link->u.ap.unsol_bcast_probe_resp, NULL); > } > > - return BSS_CHANGED_UNSOL_BCAST_PROBE_RESP; > + *changed |= BSS_CHANGED_UNSOL_BCAST_PROBE_RESP; > + return 0; > } > > static int ieee80211_set_ftm_responder_params( > @@ -1450,10 +1452,9 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, > > err = ieee80211_set_unsol_bcast_probe_resp(sdata, > ¶ms->unsol_bcast_probe_resp, > - link, link_conf); > + link, link_conf, &changed); > if (err < 0) > goto error; > - changed |= err; > > err = drv_start_ap(sdata->local, sdata, link_conf); > if (err) { > @@ -1525,10 +1526,9 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, > > err = ieee80211_set_unsol_bcast_probe_resp(sdata, > ¶ms->unsol_bcast_probe_resp, > - link, link_conf); > + link, link_conf, &changed); > if (err < 0) > return err; > - changed |= err; > > if (beacon->he_bss_color_valid && > beacon->he_bss_color.enabled != link_conf->he_bss_color.enabled) {