Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4814912ioa; Wed, 27 Apr 2022 11:42:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq2rMiNe0VqNbvrcGBB30niOAGzefmr56OHVqkIOPCoPm6RPLja6ewJkBBPvs/FX3qgREE X-Received: by 2002:a50:baa1:0:b0:418:849a:c66a with SMTP id x30-20020a50baa1000000b00418849ac66amr32649209ede.234.1651084952521; Wed, 27 Apr 2022 11:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651084952; cv=none; d=google.com; s=arc-20160816; b=ZeJXpbR0VGfJzqe6Jvh7xaMc9V2Y0lueoq1/28T4JIZiOU5GkhonxON2ruUT9p5iEJ UfLwwjacZ8jgszY1uMxfiZIK8EXU+NBz9QKDrKo1M42l8op/zY2ODZuh+RaCd0E8sz3M gAUImxW1UbgBB5Z5gIUhEW20EvfbCA2zItzK7lo+oz1zEB60Bj0o9GlrSld/ecIN0NM2 MuFfA9+w0OZNQBv6lh09kED7JVMTahdXv3xyFOPcSpKRqvBV1HXpyo5gp131lb1gIt4T VslKyZwaDu7k3S5mHcCCqzQVKEOCDflWsu6JwAw+UE/HCLADeAAFmCT3I2aWgUDRITul pWOw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=GWD6I3nWyhMhEIhGza5hKKxTz8/Uc/bHDPFJhYpifKY=; b=hpuTroM2KuCyBDOlOQijOZkagMzzc8oq+xSC1sAe+9wwhahigTPwP1RlGuf7aylAyM Vqn6crZCM0SDV7uwIA44b1C/NkOmQSnKAk6NlKTqmS5UBLAsuUUKVLEPftMzv3hj+UZQ 2GZ8hXOBXU1bEZqCO473fNN8I0usluaZIKIZLtgBe07sBT76vwrWY/ZrVnC7Xxj57phI oYufyerQjnViJoUbl/upsK2ZyFiZKTcMKutQBWjqjybpL8ZxlzXJ5tFhgX6BaEVzjf18 7TihQ5YntD5Pcw9kSd+ncCEA4JDgUpG7N3bk6KkFaFhrNYVbC9VN1+rSXjDs/NzeQT+3 UFPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=S6uA8+4K; 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 lr25-20020a170906fb9900b006f3ab6a51dasi1742567ejb.661.2022.04.27.11.42.09; Wed, 27 Apr 2022 11:42:32 -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=qcdkim header.b=S6uA8+4K; 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 S229445AbiD0Snv (ORCPT + 68 others); Wed, 27 Apr 2022 14:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230001AbiD0SnR (ORCPT ); Wed, 27 Apr 2022 14:43:17 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48953A76E7 for ; Wed, 27 Apr 2022 11:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651083865; x=1682619865; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GWD6I3nWyhMhEIhGza5hKKxTz8/Uc/bHDPFJhYpifKY=; b=S6uA8+4KPzj9NLDwvm6LoNNtTfjdLKV000FpRQ0eKBQtqFZLscK19jMI kniLG4tXTq9cTK6UWrG3sLsVWJfWHmKi17vha/FHmvTOUXpj9t6uYLQ6m gNuiBRiwx+MdGolirXQJgifobPuhG99Up1XDbnQdfE4RY18ojhdGw5kDz A=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 27 Apr 2022 11:23:24 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 11:23:24 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 27 Apr 2022 11:23:24 -0700 Received: from mpubbise-linux.qualcomm.com (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.986.22; Wed, 27 Apr 2022 11:23:22 -0700 From: Manikanta Pubbisetty To: CC: , Manikanta Pubbisetty Subject: [PATCH] mac80211: Reset MBSSID parameters upon connection Date: Wed, 27 Apr 2022 23:53:05 +0530 Message-ID: <20220427182305.11703-1-quic_mpubbise@quicinc.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Currently MBSSID parameters in struct ieee80211_bss_conf are not reset upon connection. This could be problematic with some drivers in a scenario where the device first connects to a non-transmit BSS and then connects to a transmit BSS of a Multi BSS AP. The MBSSID parameters which are set after connecting to a non-transmit BSS will not be reset and the same parameters will be passed on to the driver during the subsequent connection to a transmit BSS of a Multi BSS AP. For example, firmware running on the ath11k device uses the Multi BSS data for tracking the beacon of a non-transmit BSS and reports the driver when there is a beacon miss. If we do not reset the MBSSID parameters during the subsequent connection to a transmit BSS, then the driver would have wrong MBSSID data and FW would be looking for an incorrect BSSID in the MBSSID beacon of a Multi BSS AP and reports beacon loss leading to an unstable connection. Reset the MBSSID parameters upon every connection to solve this problem. Signed-off-by: Manikanta Pubbisetty --- net/mac80211/mlme.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b857915881e0..07a96f7c5dc3 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3657,6 +3657,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, cbss->transmitted_bss->bssid); bss_conf->bssid_indicator = cbss->max_bssid_indicator; bss_conf->bssid_index = cbss->bssid_index; + } else { + bss_conf->nontransmitted = false; + memset(bss_conf->transmitter_bssid, 0, + sizeof(bss_conf->transmitter_bssid)); + bss_conf->bssid_indicator = 0; + bss_conf->bssid_index = 0; } /* -- 2.35.1