Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp557335imi; Fri, 22 Jul 2022 04:59:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vMuMxvDnnOUx4bDbSo2ZgA6jEv4zbm0kBYcweWIRiy1N18sGALEOdzT9j+MZRApBvDFzKW X-Received: by 2002:a05:6402:1e92:b0:43a:7cd0:6bed with SMTP id f18-20020a0564021e9200b0043a7cd06bedmr235742edf.423.1658491152124; Fri, 22 Jul 2022 04:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658491152; cv=none; d=google.com; s=arc-20160816; b=I3VmBOCSWIZGZ7DEqiaoWQsWpR/1N40jpmbetOqotIV9iY1azMeTxp3qnjiD27iWV0 bYyok6iEl0mDDVb37i27+8XX7055UdwuO4+S/r2ZS5MBPaGAAv9pPfTS3YzhUwrb1cs9 /UdeMk9LUTVNjRfyblEPMLuylU0gk8nlkaZHdylyo8A7RbxQlOp/nVwo9I65e/gXPYiy WYJBxyCxik1+Q46XAy1Q+A6GZjibEuVkqVlnfWLVBjGQhj+IG9go/sH/DvZeDPap7sHM O6Z0fFQhE3ufYin9SYxjak5VP3DyU1vldYiJcu+kugNoTXfXau0VtaTbQvh1zrG+zVZD OarQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kU972/Ti7378lz0X9ZqJvIJG14FXu8vb+YycDZtlNEs=; b=zeiga+uywg0BZSGGhBO7BszL9v4R2ROX+KwLchubo3KYXBVupjTegRUSEcdDiqg4aK JhMoug5AHW26JGZ0hFTV01S3uEyl6LGBO5ble7KzPhuH8hVUku9JTIuLFjiufyBUTEKc 7u5FacKykqU/3o5bm0HzLeCGa4fTsNMEbw26MBtKV24N/LKjUNH2VQLIl2z+yCERXFvY GVPM84WSWau5aiWVVXeBfGT+/VtG/41NJcBQ+qnTcEu7gY78xNJpYGn6ofwTEZ3DokmJ 8uiSNvI6wBoe6VJ5zbu+wa60D1CSvWwlq8GU4NRDb14UALClUwbc6Qq3tsuXjv9U/6z6 aRCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=iaadc3k9; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l21-20020a056402125500b0042dbc7920d7si5145227edw.126.2022.07.22.04.58.54; Fri, 22 Jul 2022 04:59:12 -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=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=iaadc3k9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234435AbiGVL5H (ORCPT + 65 others); Fri, 22 Jul 2022 07:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235055AbiGVL5C (ORCPT ); Fri, 22 Jul 2022 07:57:02 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1666EBB216 for ; Fri, 22 Jul 2022 04:57:01 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id r6so5531610edd.7 for ; Fri, 22 Jul 2022 04:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kU972/Ti7378lz0X9ZqJvIJG14FXu8vb+YycDZtlNEs=; b=iaadc3k9Vb0dBlWleTRhgOHE6k6K/BUKoYvG4LQcVV5ajYnFAsC+LpC+Jc7o4B1pEq u+KUMNvcKJHB/o5l8QuMtG6FOxGNQQR0mQQ5F32d2TcNcjPwp5St9bqUvHzzyH+8Ojfm 5iMygMxWNc2uhYkJPOjE07sglSlOJO4tJzwHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kU972/Ti7378lz0X9ZqJvIJG14FXu8vb+YycDZtlNEs=; b=309Ckr3F8tdpe6JLfD9lEdqcK2fYQSc78otZPhkUnG5EAGjCoHizqPCzhmAfdx2DXn PJdyBrg33E/biIo23aBbuth/n1HiRYgf7IvZim8EGJp55myKmXQacojzv4U3qXqSohsC odQgkZO6rXlkrDmbjritIORZtLl2AKCNQ6+VNcrVXC1Vj6nZGEUFA6hh5jtSgPahXjP6 ExQbstUVxvMs3/sjvNpmXhdujkDRqaUSqK+OGqU2wBtDpVmUZojgs8/AigakLFeP/r2d ZRGK+dVMZON79yIkyMHvD9Ush+CrkvB9GbBA2GEHBAyUOxOj854kYx4sQmfcrtbyC4MZ 12eg== X-Gm-Message-State: AJIora90hcrWxSa8h62G0EyCOm+N8lBn74Y2Ku13vSiaAYbPVNVFzJF5 u+ae57+8fgqMlZ06U2gALneAoQ== X-Received: by 2002:a05:6402:48c:b0:43a:8bc7:f440 with SMTP id k12-20020a056402048c00b0043a8bc7f440mr297826edv.8.1658491020686; Fri, 22 Jul 2022 04:57:00 -0700 (PDT) Received: from localhost.localdomain (80.71.142.18.ipv4.parknet.dk. [80.71.142.18]) by smtp.gmail.com with ESMTPSA id kx6-20020a170907774600b0072b3182368fsm1934370ejc.77.2022.07.22.04.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 04:57:00 -0700 (PDT) From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= To: Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Syed Rafiuddeen , Syed Rafiuddeen , Chung-Hsien Hsu , Chi-hsien Lin , =?UTF-8?q?Alvin=20=C5=A0ipraga?= , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer Date: Fri, 22 Jul 2022 13:56:31 +0200 Message-Id: <20220722115632.620681-7-alvin@pqrs.dk> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220722115632.620681-1-alvin@pqrs.dk> References: <20220722115632.620681-1-alvin@pqrs.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=no 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 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 Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin Signed-off-by: Alvin Šipraga --- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 6ef574d69755..d6127b855060 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2989,6 +2989,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, u8 *notify_ie; size_t notify_ielen; struct cfg80211_inform_bss bss_data = {}; + const struct brcmf_tlv *ssid = NULL; if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) { bphy_err(drvr, "Bss info is larger than buffer. Discarding\n"); @@ -3018,6 +3019,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); + } + brcmf_dbg(CONN, "bssid: %pM\n", bi->BSSID); brcmf_dbg(CONN, "Channel: %d(%d)\n", channel, freq); brcmf_dbg(CONN, "Capability: %X\n", notify_capability); -- 2.37.0