Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp326994rwb; Thu, 22 Sep 2022 19:06:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6fGclbsCf8yjJWpvpuIfVcL3olUd7fa3NHuW1BjB3SvTepIUEnqHcoCBXt5rop57u7H72W X-Received: by 2002:a05:6402:1445:b0:44d:844d:e76e with SMTP id d5-20020a056402144500b0044d844de76emr5886903edx.313.1663898788092; Thu, 22 Sep 2022 19:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663898788; cv=none; d=google.com; s=arc-20160816; b=OP5BXeIU0uHwV2LFN31EkGemeOuEP+hBuJtKkinn1Ar4UpsQDOMh1hobhauax1qMWW DJ9HwlIxsdIrLJ5PG9ak3HUbTKxG49qoFP9vqLFtCBTJAqJiD6lah6kXLjiIrr8ejFPN Nms+CeRfYdAdRn0wMHTBjMwjE5a7kooHKYbdI8uZeZN0hyjs/82Ec1yzYme7n3RksUNb f7o5cTAfyJpjUrcMsoCWnTgG56gHY1MVaLt5lE9XneL9DTYsq2IztH+hM7/ttITd3lIk iVvPI3XZ2GWFfEdlgaka0NW6FHcpCfNTFVWkCtv1SQ9RYndkD75YwFbDbL2/vQY0CLLq 2XNQ== 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=8123KZe9nibiH0VALhEiZ6fCn/Vzt2VO8QxFbdJF8x0=; b=THkfJqDdx/n1ZfaPZxE9mt34cyFxcLnZA312Rlr4MiyrcV0J9R9w76BvlztcGw2Rj7 JzvQUgbdSgNqJb34UneC068HNM1/f92t/3p44V2MZexuKSc6MipMQZ+x/BdWHVJ3P1gU nDHJXCBqUFFNAzE6HVNfu9gg/SVC+Y3JvmHkBYRPGwAZItLW1OtFgHKja3nPUPCuxfdT 2lQ/x0znFtOlV0fVSiEKQx3M1zMKlIjgBqhRijNpPn8c8LXkWIU/iFzKruXcFrL/lcZ6 vp4BY/8VMTVSUZQ5g0HGd1EKOXV7xmtn9JR28ZxF+XZEab6jBHKVWymOrD4MdP0Nh6aI QTDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=p1BWkp9V; 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=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w6-20020a170906130600b00775bde41c57si5742960ejb.171.2022.09.22.19.06.06; Thu, 22 Sep 2022 19:06:28 -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=fail header.i=@infineon.com header.s=IFXMAIL header.b=p1BWkp9V; 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=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbiIWBxu (ORCPT + 62 others); Thu, 22 Sep 2022 21:53:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbiIWBxt (ORCPT ); Thu, 22 Sep 2022 21:53:49 -0400 X-Greylist: delayed 63 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 22 Sep 2022 18:53:48 PDT Received: from smtp14.infineon.com (smtp14.infineon.com [IPv6:2a00:18f0:1e00:4::6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 449C210BB16 for ; Thu, 22 Sep 2022 18:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1663898028; x=1695434028; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=56P1Ub0+ik13tMcQKH15COHthy7QBLkDpcZ+w9V1b1I=; b=p1BWkp9VAo7t7SEgSF5lc6/N/qrni5w3WVT0gWGpEchSWmH3EMmdOIYx ed6lB73MbUt85LfqEX/hcx+qt7u6ot8sNYDywQzJ7kNxLvtkOtROgPUiu Ip9jjK1PzeLMt+8ShzfYyJNHsCHfsZaA89F8Wpsqy9MxMAtMuAj4P4fom 0=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="142461621" X-IronPort-AV: E=Sophos;i="5.93,337,1654552800"; d="scan'208";a="142461621" Received: from unknown (HELO mucxv003.muc.infineon.com) ([172.23.11.20]) by smtp14.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 03:52:43 +0200 Received: from MUCSE819.infineon.com (MUCSE819.infineon.com [172.23.29.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv003.muc.infineon.com (Postfix) with ESMTPS; Fri, 23 Sep 2022 03:52:43 +0200 (CEST) Received: from MUCSE835.infineon.com (172.23.7.107) by MUCSE819.infineon.com (172.23.29.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 23 Sep 2022 03:52:43 +0200 Received: from [10.234.36.68] (10.234.36.68) by MUCSE835.infineon.com (172.23.7.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 23 Sep 2022 03:52:40 +0200 Message-ID: Date: Fri, 23 Sep 2022 09:52:38 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH 4/5] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer Content-Language: en-US To: Kalle Valo CC: , , , , , References: <20220914033620.12742-1-ian.lin@infineon.com> <20220914033620.12742-5-ian.lin@infineon.com> <87tu506mre.fsf@kernel.org> From: "Lin Ian (CSSITB CSS ICW SW WFS / EE)" In-Reply-To: <87tu506mre.fsf@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.234.36.68] X-ClientProxiedBy: MUCSE822.infineon.com (172.23.29.53) To MUCSE835.infineon.com (172.23.7.107) X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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 9/22/2022 12:44 PM, Kalle Valo wrote: > Ian Lin writes: > >> From: Syed Rafiuddeen >> >> cfg80211 layer on DUT STA is disconnecting ongoing connection attempt after >> receiving association response, because cfg80211 layer does not have valid >> AP bss information. On association response event, brcmfmac communicates >> the AP bss information to cfg80211 layer, but SSID seem to be empty in AP >> bss information, and cfg80211 layer prints kernel warning and then >> disconnects the ongoing connection attempt. >> >> SSID is empty in SSID IE, but 'bi->SSID' contains a valid SSID, so >> updating the SSID for hidden AP while informing its bss information >> to cfg80211 layer. >> >> Signed-off-by: Syed Rafiuddeen > Syed's email address in From does not match with s-o-b. > >> @@ -3032,6 +3033,12 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, >> notify_ielen = le32_to_cpu(bi->ie_length); >> bss_data.signal = (s16)le16_to_cpu(bi->RSSI) * 100; >> >> + ssid = brcmf_parse_tlvs(notify_ie, notify_ielen, WLAN_EID_SSID); >> + if (ssid && ssid->data[0] == '\0' && ssid->len == bi->SSID_len) { >> + /* Update SSID for hidden AP */ >> + memcpy((u8 *)ssid->data, bi->SSID, bi->SSID_len); >> + } > memcpy() takes a void pointer so the cast is not needed. There should be a type casting since 'ssid' is a const pointer. As you saw there will be build warning in PATCH v2 (sorry I didn't notice that locally) I will send PATCH v3 to restore type casting, is that ok?