Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3303291rdh; Mon, 27 Nov 2023 10:38:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEV5OpEAezgKfSQMs59+Mh7J2e49mme3FHYAZySs/MEt2BrxfqMG/PvlR5QRfPqWQNSHLsa X-Received: by 2002:a17:902:7e84:b0:1cf:c401:1da2 with SMTP id z4-20020a1709027e8400b001cfc4011da2mr4271078pla.60.1701110332813; Mon, 27 Nov 2023 10:38:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701110332; cv=none; d=google.com; s=arc-20160816; b=y68bEpy5H76VOrsTHSGdIkHYtBgailglw/2fZ0Aj2bQT/5JISsa28ftMwktyjzeY6D 3aXpfOb+hBb98S/wqzGZOj0uw49UVVZ/j2GiBC+zZWCtPgz8A9NiGHDosT2M7nXV/TeX rKC6dfMcIAs2PmJyNa29LoNmp3c070bWsudRQzlQn0cYGZPoJJ4rDqQoMaru92+t/O37 TCUOlbumEUcE42GwaiD9T7TcQ37sSvGiivV/59x0dTql7HV6TAyrifakvHoBaH9anSlG rNccIKWBn/t6L1Fw2r7lOYetDIszeIbfnGD2phYrgH9Zf6hjpJdc+wFXk6/aRsroWB45 g+4A== ARC-Message-Signature: i=1; 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=rYybWgokpVv90qBdPZiA3EOFqVOw/Kv9mBFSMTnnoE0=; fh=39tfZeL6l0YUIIAIZzYqZ5t5qjh6UzkSmtmu054130U=; b=YjEsYJ1I2F6aZMs6e/jgFWlb00mQC4P3oaD1NyrKJRLwZNZEG4f+LvXJxVGOqHy1B/ uD2XIAH37nY4z3kK5XuGK1kPI9jTSA3yeWq+Pcj1Pl+9U4NBVjPPz+xRdh/FzXyP2Ar9 9g+2deY7OLbR4ByoGLzYd/AKEsSFHG4fw1VS8iYFFUaliJqwi8xzYJHhlaBBr0D+qOUq s11z37frVqFHM2Li0cK49ohb+Zi+7LgU7ZVHB9eE5+30JIl7/ApuRXk+r29ARyhjJxbm +JssBeV4bPmdcyHd0PKIv2AsrSbAvkPtkPQEhejUq/UW4/oCwWTmNpgVfKeSiv9bFCD+ q09Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JJLNC+IS; spf=pass (google.com: domain of linux-wireless+bounces-122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-122-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a17-20020a170902b59100b001cc2ef72ab2si9629092pls.68.2023.11.27.10.38.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 10:38:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JJLNC+IS; spf=pass (google.com: domain of linux-wireless+bounces-122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-122-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 30B79B21010 for ; Mon, 27 Nov 2023 18:38:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BD523175F; Mon, 27 Nov 2023 18:38:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="JJLNC+IS" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E83A1; Mon, 27 Nov 2023 10:38:44 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ARIPxdY011556; Mon, 27 Nov 2023 18:38:38 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=rYybWgokpVv90qBdPZiA3EOFqVOw/Kv9mBFSMTnnoE0=; b=JJLNC+ISB0x0FWeA4eViD10ZH3IkY/3cPuB/fhMFCbFS0o2RJX04zlpd6N3k833qZFc0 rbIjTtFm054fXB+yC7V0Jkg5wdr1Lbub2D28xp3fLZ5mlNDO/F750LF91q88lehf9bDr SNi8RE9xf9Ljo89J585s9+H8Nr9u7TgB8+U5yjTPXI4lO6Iv8GdvbCrDB2eOTYXwXc2j NuGdaWOsN0eokPcbqMdusZhh7iJQHIduW59Ox5afA2kI7SXlDvs3RByI80yPIi8P5d5H 8txNRPfIUUnDIwfRi5ukvtUfND5ulPL2iCz3bLX4Lh0EN21BEvsQJO8wFynAgxNShk29 Jg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3umwn5rkxk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Nov 2023 18:38:25 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3ARIcPlG005701 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Nov 2023 18:38:25 GMT Received: from [10.110.63.243] (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; Mon, 27 Nov 2023 10:38:24 -0800 Message-ID: Date: Mon, 27 Nov 2023 10:38:24 -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: ath11k: fix layout of scan_flags in struct scan_req_params Content-Language: en-US To: Nicolas Escande , Kalle Valo CC: , , References: <20231127180559.1696041-1-nico.escande@gmail.com> From: Jeff Johnson In-Reply-To: <20231127180559.1696041-1-nico.escande@gmail.com> 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-ORIG-GUID: RXxqDYP-mVAtsxhbjw4eJ6K8kykjEYWV X-Proofpoint-GUID: RXxqDYP-mVAtsxhbjw4eJ6K8kykjEYWV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-27_16,2023-11-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=892 adultscore=0 spamscore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311270129 On 11/27/2023 10:05 AM, Nicolas Escande wrote: > The is a layout mismatch between the bitfield representing scan_flags in > struct scan_req_params & the bits as defined in the WMI_SCAN_XXX macros. > Lets fix it by making the struct match the #defines. > > I tried to correct it by making the struct match the #define and it > worked for WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS / scan_f_force_active_dfs_chn > so I'm assuming this is the right thing to do. > > Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Nicolas Escande > --- > drivers/net/wireless/ath/ath11k/wmi.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h > index 100bb816b592..0b4e6c2f7860 100644 > --- a/drivers/net/wireless/ath/ath11k/wmi.h > +++ b/drivers/net/wireless/ath/ath11k/wmi.h > @@ -3348,17 +3348,17 @@ struct scan_req_params { > scan_f_filter_prb_req:1, > scan_f_bypass_dfs_chn:1, > scan_f_continue_on_err:1, > + scan_f_promisc_mode:1, > + scan_f_force_active_dfs_chn:1, > + scan_f_add_tpc_ie_in_probe:1, > + scan_f_add_ds_ie_in_probe:1, > + scan_f_add_spoofed_mac_in_probe:1, > scan_f_offchan_mgmt_tx:1, > scan_f_offchan_data_tx:1, > - scan_f_promisc_mode:1, > scan_f_capture_phy_err:1, > scan_f_strict_passive_pch:1, > scan_f_half_rate:1, > scan_f_quarter_rate:1, > - scan_f_force_active_dfs_chn:1, > - scan_f_add_tpc_ie_in_probe:1, > - scan_f_add_ds_ie_in_probe:1, > - scan_f_add_spoofed_mac_in_probe:1, > scan_f_add_rand_seq_in_probe:1, > scan_f_en_ie_whitelist_in_probe:1, > scan_f_forced:1, You are convoluting two different data structures. struct scan_req_params is used to represent a scan request within the host driver. This does not use the WMI_SCAN_XXX macros. struct wmi_start_scan_cmd is used to represent the scan request command sent to firmware. This struct uses the WMI_SCAN_XXX macros to fill some members of this struct in ath11k_wmi_copy_scan_event_cntrl_flags(). So your change has no effect on the driver operation and incorrectly tries to foist the firmware definition upon the host internal representation. So NAK to this patch. /jeff