Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp358557rwb; Mon, 26 Sep 2022 20:42:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5RgqV1dhoaqEPNwEUoLm12+/1dkUhe7dW69fImrzAuCnSCUJIP80SR3+uRWHSWGhrvlfo2 X-Received: by 2002:a17:907:6d9c:b0:783:a3b4:2cf5 with SMTP id sb28-20020a1709076d9c00b00783a3b42cf5mr5618386ejc.216.1664250144320; Mon, 26 Sep 2022 20:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664250144; cv=none; d=google.com; s=arc-20160816; b=muuxZqnQb1LT+Ao38JjskbuaJTozsXauMmiaAnincIeoo/1OESc22OOKpCpgzX4cPn MRfIYz3/SYVdMaORy7S1yT2qY7KjaQX6sU7Ue9pfolLLUWCHKgdX/LZNMWPa2SnF2yGl zkW36w6P9z4kLIXC53Qpn3lIDPLXkcUGfLvFWBd0EnfY5+GUV95PCXX701klkZ04BRY5 rvDmYLGs/BmFn19kfzBtsVZjGrMR9JUjt2HsEDNWpja67nCeFq83d9uiIyPhcnBJyTb0 GS3jhNo2bPF0nAB8eboDvDh9JOgAxLJD6zvs9uJ5T1NFckFd4zBj9apmKL1AqL6OPGHD Rjjw== 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 :mailrelay-external-outbound:dkim-signature; bh=telcJbkbgt+AJsWEeJRw20/5ZLN3+4iMIvppI6ynNs4=; b=Md2eDRZL/jf6r5fvBOyG1OaSXhud8NtgKqse+XT1heMdUaHbvQ7kjTZe6gB6pkmD+L evsw/HlUlgogNmRYZMkrr9ux6uJAYt6yd76k3+co92dlYU4OL0oaYlyqIm5a55lOMSxX ppaXD9Zqm4xbAUOgCxAUcmYua6dRXhSHm16UrKjX4mkO/KrvGqiiNX49zmkxvkSPguWt axJQv/8bMZpsIpyhSlcr56IRhq/4zBEUa2r98jkmkvIHSEJ/QEw0HjI/xVW9J6rzCf5x EBdPHoWIQYbFkNLeW287m59FTk9gcBZBUNDBnNkzcpT/ahz+vlMQng0dGTkxY5LyKnAT cuVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=PyqQDZ0o; 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 b19-20020a056402279300b0044648d791b4si471114ede.227.2022.09.26.20.42.09; Mon, 26 Sep 2022 20:42:24 -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=PyqQDZ0o; 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 S230152AbiI0Dl5 (ORCPT + 61 others); Mon, 26 Sep 2022 23:41:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbiI0Dlz (ORCPT ); Mon, 26 Sep 2022 23:41:55 -0400 Received: from smtp15.infineon.com (smtp15.infineon.com [217.10.52.161]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44AEDAD9A5 for ; Mon, 26 Sep 2022 20:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1664250113; x=1695786113; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VV0Rrh4cn4/2qBioJqMSXObJwlgp7EAifYshsGdRMZU=; b=PyqQDZ0o1qSFFFA41im89T6zbxKrNawMvIOQrGn/V6oqQOVY5I0ng+mm r0nd+rCxQN9sosz1Y1m8qInmirCUqSEYdCaq5LAwJNlK9cPtyBkTV5vuZ swe8TK8rhN4YQJcy9Ym8qkc9baI/S43jsHPFvNWuKSv96aLLGUKqRFEzd c=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="142910467" X-IronPort-AV: E=Sophos;i="5.93,348,1654552800"; d="scan'208";a="142910467" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp14.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 05:41:51 +0200 Received: from MUCSE814.infineon.com (MUCSE814.infineon.com [172.23.29.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv001.muc.infineon.com (Postfix) with ESMTPS for ; Tue, 27 Sep 2022 05:41:50 +0200 (CEST) Received: from MUCSE824.infineon.com (172.23.29.55) by MUCSE814.infineon.com (172.23.29.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 27 Sep 2022 05:41:50 +0200 Received: from mailrelay-cypress3.infineon.com (172.23.18.46) by SMTP-MailRelay3.infineon.com (172.23.29.16) with Microsoft SMTP Server id 15.2.986.29; Tue, 27 Sep 2022 05:41:50 +0200 mailrelay-external-outbound: True X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="263480692" X-IronPort-AV: E=Sophos;i="5.93,348,1654552800"; d="scan'208";a="263480692" Received: from unknown (HELO mail.spansion.com) ([10.248.30.8]) by mailrelay-cypress3.infineon.com with ESMTP; 27 Sep 2022 05:41:49 +0200 Received: from inf2.aus.cypress.com (10.248.80.6) by BIZ-EXHT102.spansion.com (10.248.30.8) with Microsoft SMTP Server id 14.3.498.0; Mon, 26 Sep 2022 22:41:48 -0500 Received: from iot-wlan-dev-u03.aus.cypress.com (iot-wlan-dev-u03 [10.248.81.193]) by inf2.aus.cypress.com (Postfix) with ESMTP id EF8B21004DF; Mon, 26 Sep 2022 22:41:48 -0500 (CDT) Received: by iot-wlan-dev-u03.aus.cypress.com (Postfix, from userid 27991) id EB0E89807FB; Mon, 26 Sep 2022 22:41:48 -0500 (CDT) From: Ian Lin To: CC: , , , , , , Subject: [PATCH v3 4/5] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer Date: Mon, 26 Sep 2022 22:41:37 -0500 Message-ID: <20220927034138.20463-5-ian.lin@infineon.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20220927034138.20463-1-ian.lin@infineon.com> References: <20220927034138.20463-1-ian.lin@infineon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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: Ian Lin --- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 6c37da42e61b..3560afe0ccfe 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -3003,6 +3003,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 = {}; + struct brcmf_tlv *ssid; if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) { bphy_err(drvr, "Bss info is larger than buffer. Discarding\n"); @@ -3032,6 +3033,13 @@ 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 = (struct brcmf_tlv *) + 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(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.25.0