Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp623779rwl; Wed, 9 Aug 2023 21:47:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyIOetQzvv1BxzxKohPr+duYEHidix+vdrjpXysrN5l/niWB0Xd7BDxmwjVBoAIGtp4M14 X-Received: by 2002:a05:6a20:7d88:b0:13e:a442:c899 with SMTP id v8-20020a056a207d8800b0013ea442c899mr2113624pzj.37.1691642860812; Wed, 09 Aug 2023 21:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691642860; cv=none; d=google.com; s=arc-20160816; b=DqlpaIEr+3HLiNqDOPOweKM26p4IOBvy5RkH28tO+j+KFn2EltzKsKppJJsugodr8d epK1InSQ1XppF3vjO6o8RKzUftAEtJB7U0We+MTi6EyWi3kHeVOoVFBX8XUgEviQPoZh B44fFdxGzqTWGWm3loMulIVbom3aotN5kBDckFfpnpHWRnhoe9aaKFXw4m2OV/5eEADx cGO2F6Xziw9SRw6+AQrE4maGEYoMCfRV2mQnOfdYKrm4PBnZ/wuTZLNXWHEg19GTQ/g0 ID0OAC1/7oQcQw4ijlO21hfPSqQTXcr4AtnYwCbgg8q2VX3elkQZEl6srPj3HtpxegU0 z6pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=GnrAdkam2sTuy+Err4uBdKhh0nsjiTJMSIrw9LGBlaY=; fh=2DFtYKSEp1uYZKaY/PNrUa0sItp+5UtP9x11rAIwHuA=; b=VBOMflTjoo84EZtA/ocHONQ9QwfKO9w3KbsLeWUGXI4SvIRBnsa9Hlk803DgW4he2X ngKy2fNIDH+jmSADnY8cJEWNHVIoX9RKx6pyWHvNb/SEPclJlgD0agFPUG64HzFUVEph qiF+qt49nKPdvN0j+9jnvndPObK1LU64B8CRWtp93kuA8rYLplEVZdLxt4FaDM7RuiNB 2vzEEWXz7Xhr0LJJHZeFxslDEwT5DkmHB4rK2gdwb+Juvme+q/MIpMxcV5VbHQ7NrKOr ejnoXgQ7iS8TgmixRCP+lUKfYRdopuJuvV8VGENf/vRy0UKq4Qp72iWv2OZtKIpp+4Pb N+HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ILENdeIq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a636c08000000b005633b3c6d44si752977pgc.655.2023.08.09.21.47.30; Wed, 09 Aug 2023 21:47:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ILENdeIq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231921AbjHJD1K (ORCPT + 56 others); Wed, 9 Aug 2023 23:27:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbjHJD1J (ORCPT ); Wed, 9 Aug 2023 23:27:09 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAD60FE for ; Wed, 9 Aug 2023 20:27:08 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37A3DbAH010592; Thu, 10 Aug 2023 03:27:05 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=GnrAdkam2sTuy+Err4uBdKhh0nsjiTJMSIrw9LGBlaY=; b=ILENdeIqZcpuJRv/OIScZWyJUDRcSxSHdLWp99xZkM4kihR4OyVmT2V8ADglldoEWibW tCOiUHD+GcvYgzfzfay10/bkpzsXYpA/OLf4GGshFuq+G5xM7dA/SRW7aJSpeM8x7sgr qjQ3+2zuXxKZcOGpbhKVwP6NyJmMQCL5KlJOlxiXKGSmlRzkOapZIHm0o65JvXs3OIjZ jbB9xwVNt+t9jBrvdlfNoc8hmALyAi2LjlU+Id8KHaljpQRwxcMC3cViZDBfuqY63avK l98B/6jeZglYEGM6MdLub+ERGRAmj5Yw39lJeYgt9u77udetjax5n17e1If1kHFKtb+0 dg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sc5ffab8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Aug 2023 03:27:05 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37A3R4lr031397 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Aug 2023 03:27:04 GMT Received: from [10.111.180.219] (10.49.16.6) 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.30; Wed, 9 Aug 2023 20:27:03 -0700 Message-ID: <2a069aea-7b5d-ed12-c5ec-9c1de3b6a9ac@quicinc.com> Date: Wed, 9 Aug 2023 20:27:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] wifi: mwifiex: added code to support host mlme. Content-Language: en-US To: David Lin , "linux-wireless@vger.kernel.org" CC: Sharvari Harisangam , Pete Hsieh References: From: Jeff Johnson In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) 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: mDykZmzimbhkqquW0kKXXiYK3D4CNmbC X-Proofpoint-GUID: mDykZmzimbhkqquW0kKXXiYK3D4CNmbC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-10_01,2023-08-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 priorityscore=1501 bulkscore=0 spamscore=0 impostorscore=0 mlxlogscore=886 mlxscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308100028 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 8/9/2023 7:39 PM, David Lin wrote: snip > @@ -491,6 +511,17 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, > sizeof(struct mwifiex_chan_scan_param_set); > } > > + if (priv->adapter->host_mlme) { > + host_mlme_tlv = (struct mwifiex_ie_types_host_mlme *)pos; > + host_mlme_tlv->header.type = cpu_to_le16(TLV_TYPE_HOST_MLME); > + host_mlme_tlv->header.len = sizeof(host_mlme_tlv->host_mlme); cpu_to_le16(sizeof(host_mlme_tlv->host_mlme)) ?? > + host_mlme_tlv->host_mlme = 1; > + pos += sizeof(host_mlme_tlv->header) + > + host_mlme_tlv->header.len; le16_to_cpu(host_mlme_tlv->header.len) ?? or just use sizeof(host_mlme_tlv->host_mlme) > + host_mlme_tlv->header.len = > + cpu_to_le16(host_mlme_tlv->header.len); The approach currently being taken doesn't look sparse-compliant. You should write an le16 into a __le16 member; writing a cpu16 into a __le16 member and then converting in place using cpu_to_le16() is broken. > + } > + The above jumped out at me while scanning your patch -- it failed my mental pattern matching. /jeff