All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: Reset MBSSID parameters upon connection
@ 2022-04-27 18:23 Manikanta Pubbisetty
  2022-04-27 19:11 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Manikanta Pubbisetty @ 2022-04-27 18:23 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Manikanta Pubbisetty

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 <quic_mpubbise@quicinc.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: Reset MBSSID parameters upon connection
  2022-04-27 18:23 [PATCH] mac80211: Reset MBSSID parameters upon connection Manikanta Pubbisetty
@ 2022-04-27 19:11 ` Johannes Berg
  2022-04-28  5:30   ` Manikanta Pubbisetty
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2022-04-27 19:11 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: linux-wireless

On Wed, 2022-04-27 at 23:53 +0530, Manikanta Pubbisetty wrote:
> 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.

Oops. Please add (or at least provide) a Fixes line though.

johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: Reset MBSSID parameters upon connection
  2022-04-27 19:11 ` Johannes Berg
@ 2022-04-28  5:30   ` Manikanta Pubbisetty
  0 siblings, 0 replies; 3+ messages in thread
From: Manikanta Pubbisetty @ 2022-04-28  5:30 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 4/28/2022 12:41 AM, Johannes Berg wrote:
> On Wed, 2022-04-27 at 23:53 +0530, Manikanta Pubbisetty wrote:
>> 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.
> 
> Oops. Please add (or at least provide) a Fixes line though.
> 

Sure Johannes, just sent V2 patch with the Fixes line added.

Thanks,
Manikanta

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-28  5:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 18:23 [PATCH] mac80211: Reset MBSSID parameters upon connection Manikanta Pubbisetty
2022-04-27 19:11 ` Johannes Berg
2022-04-28  5:30   ` Manikanta Pubbisetty

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.