linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Update the channel list if the change in channel flags
@ 2022-12-22 12:05 Youghandhar Chintala
  2022-12-22 12:05 ` [PATCH 1/2] wifi: cfg80211: Add beacon hint notifier support Youghandhar Chintala
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Youghandhar Chintala @ 2022-12-22 12:05 UTC (permalink / raw)
  To: ath11k, johannes
  Cc: linux-wireless, linux-kernel, quic_mpubbise, Youghandhar Chintala

There are connection failures in hidden SSID case when the device is with
default reg domain WW.
For WW reg domain most of the 5 GHz channels are passive. When device
listens to the beacon on that channel, the driver is updating its channel
flag but firmware is not aware of it and firmware is not sending probes
on that channels.
Due to this, we are seeing connection failures when the device is tries to
connect with hidden SSID AP.
Whenever the driver detects a channel flag change, send the updated channel
list command to the firmware.

Youghandhae Chintala (2):
  wifi: cfg80211: Add beacon hint notifier support
  wifi: ath10k: update the channel list if change in channel flags.

 drivers/net/wireless/ath/ath10k/mac.c | 11 +++++++++++
 include/net/cfg80211.h                |  2 ++
 net/wireless/reg.c                    |  5 ++++-
 3 files changed, 17 insertions(+), 1 deletion(-)

-- 
2.38.0


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

* [PATCH 1/2] wifi: cfg80211: Add beacon hint notifier support
  2022-12-22 12:05 [PATCH 0/2] Update the channel list if the change in channel flags Youghandhar Chintala
@ 2022-12-22 12:05 ` Youghandhar Chintala
  2022-12-22 12:05 ` [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags Youghandhar Chintala
  2022-12-22 12:40 ` [PATCH 0/2] Update the channel list if the " Youghandhar Chintala (Temp)
  2 siblings, 0 replies; 8+ messages in thread
From: Youghandhar Chintala @ 2022-12-22 12:05 UTC (permalink / raw)
  To: ath11k, johannes
  Cc: linux-wireless, linux-kernel, quic_mpubbise, Youghandhar Chintala

There are connection failures in hidden SSID case when the device is
with default reg domain WW.
For WW reg domain most of the 5 GHz channels are passive. When device
listens to the beacon on that channel, the driver is updating its
channel flag but firmware is not aware of it and firmware is not
sending probes on that channels.
Due to this, we are seeing connection failures when the device is trying
to connect with hidden SSID AP.

In the case of devices using the ath10k driver, it is required to update
the change in channel flags to firmware as well. Therefore, we need a
mechanism to notify the driver from the regulatory core regarding the
channel flag changes.
Adding a beacon hint notifier logic, so that drivers can register
callbacks to get notified whenever there is a change in channel flags.

Signed-off-by: Youghandhar Chintala <quic_youghand@quicinc.com>
---
 include/net/cfg80211.h | 2 ++
 net/wireless/reg.c     | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 11a370e64143..07b2f2da77d6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -5386,6 +5386,8 @@ struct wiphy {
 	void (*reg_notifier)(struct wiphy *wiphy,
 			     struct regulatory_request *request);
 
+	void (*beacon_hint_notifier)(struct wiphy *wiphy);
+
 	/* fields below are read-only, assigned by cfg80211 */
 
 	const struct ieee80211_regdomain __rcu *regd;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index c3d950d29432..6ea2455d4964 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2219,8 +2219,11 @@ static void handle_reg_beacon(struct wiphy *wiphy, unsigned int chan_idx,
 		channel_changed = true;
 	}
 
-	if (channel_changed)
+	if (channel_changed) {
 		nl80211_send_beacon_hint_event(wiphy, &chan_before, chan);
+		if (wiphy->beacon_hint_notifier)
+			wiphy->beacon_hint_notifier(wiphy);
+	}
 }
 
 /*
-- 
2.38.0


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

* [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.
  2022-12-22 12:05 [PATCH 0/2] Update the channel list if the change in channel flags Youghandhar Chintala
  2022-12-22 12:05 ` [PATCH 1/2] wifi: cfg80211: Add beacon hint notifier support Youghandhar Chintala
@ 2022-12-22 12:05 ` Youghandhar Chintala
  2022-12-22 13:38   ` Kalle Valo
  2022-12-22 12:40 ` [PATCH 0/2] Update the channel list if the " Youghandhar Chintala (Temp)
  2 siblings, 1 reply; 8+ messages in thread
From: Youghandhar Chintala @ 2022-12-22 12:05 UTC (permalink / raw)
  To: ath11k, johannes
  Cc: linux-wireless, linux-kernel, quic_mpubbise, Youghandhar Chintala

There are connection failures in hidden SSID case when the device is
with default reg domain WW.
For WW reg domain most of the 5 GHz channels are passive. When device
listens to the beacon on that channel, the driver is updating its
channel flag but firmware is not aware of it and firmware is not
sending probes on that channels.
Due to this, we are seeing connection failures when a device is trying
to connect with hidden SSID AP.
Register beacon hint notifier to the regulatory core so that driver get
notified when there is a change in channel flags. Driver's notifier
callback will send the updated flags to the firmware.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2.c10-00754-QCAHLSWMTPL-1
Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00174

Signed-off-by: Youghandhar Chintala <quic_youghand@quicinc.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index ec8d5b29bc72..91a957295456 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3534,6 +3534,15 @@ static void ath10k_mac_update_channel_list(struct ath10k *ar,
 	}
 }
 
+static void ath10k_mac_beacon_notifier(struct wiphy *wiphy)
+{
+	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
+	struct ath10k *ar = hw->priv;
+
+	if (ath10k_update_channel_list(ar))
+		ath10k_warn(ar, "failed to update channel list\n");
+}
+
 static void ath10k_reg_notifier(struct wiphy *wiphy,
 				struct regulatory_request *request)
 {
@@ -10286,6 +10295,8 @@ int ath10k_mac_register(struct ath10k *ar)
 			goto err_unregister;
 	}
 
+	ar->hw->wiphy->beacon_hint_notifier = ath10k_mac_beacon_notifier;
+
 	return 0;
 
 err_unregister:
-- 
2.38.0


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

* Re: [PATCH 0/2] Update the channel list if the change in channel flags
  2022-12-22 12:05 [PATCH 0/2] Update the channel list if the change in channel flags Youghandhar Chintala
  2022-12-22 12:05 ` [PATCH 1/2] wifi: cfg80211: Add beacon hint notifier support Youghandhar Chintala
  2022-12-22 12:05 ` [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags Youghandhar Chintala
@ 2022-12-22 12:40 ` Youghandhar Chintala (Temp)
  2 siblings, 0 replies; 8+ messages in thread
From: Youghandhar Chintala (Temp) @ 2022-12-22 12:40 UTC (permalink / raw)
  To: ath11k, johannes; +Cc: linux-wireless, linux-kernel, quic_mpubbise


On 12/22/2022 5:35 PM, Youghandhar Chintala wrote:
> There are connection failures in hidden SSID case when the device is with
> default reg domain WW.
> For WW reg domain most of the 5 GHz channels are passive. When device
> listens to the beacon on that channel, the driver is updating its channel
> flag but firmware is not aware of it and firmware is not sending probes
> on that channels.
> Due to this, we are seeing connection failures when the device is tries to
> connect with hidden SSID AP.
> Whenever the driver detects a channel flag change, send the updated channel
> list command to the firmware.
>
> Youghandhae Chintala (2):
>    wifi: cfg80211: Add beacon hint notifier support
>    wifi: ath10k: update the channel list if change in channel flags.
>
>   drivers/net/wireless/ath/ath10k/mac.c | 11 +++++++++++
>   include/net/cfg80211.h                |  2 ++
>   net/wireless/reg.c                    |  5 ++++-
>   3 files changed, 17 insertions(+), 1 deletion(-)

Hi All,

My bad. Wrong list added. Please ignore this series. I will resend to 
right list.

Regards,

Youghandhar


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

* Re: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.
  2022-12-22 12:05 ` [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags Youghandhar Chintala
@ 2022-12-22 13:38   ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-12-22 13:38 UTC (permalink / raw)
  To: Youghandhar Chintala
  Cc: ath11k, johannes, linux-wireless, linux-kernel, quic_mpubbise, ath10k

Youghandhar Chintala <quic_youghand@quicinc.com> writes:

> There are connection failures in hidden SSID case when the device is
> with default reg domain WW.
> For WW reg domain most of the 5 GHz channels are passive. When device
> listens to the beacon on that channel, the driver is updating its
> channel flag but firmware is not aware of it and firmware is not
> sending probes on that channels.
> Due to this, we are seeing connection failures when a device is trying
> to connect with hidden SSID AP.
> Register beacon hint notifier to the regulatory core so that driver get
> notified when there is a change in channel flags. Driver's notifier
> callback will send the updated flags to the firmware.
>
> Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2.c10-00754-QCAHLSWMTPL-1
> Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00174
>
> Signed-off-by: Youghandhar Chintala <quic_youghand@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c | 11 +++++++++++

Please send ath10k patches to the ath10k list. I added that list now,
but no need to resend because of this.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.
  2023-01-19  2:26   ` Wen Gong
@ 2023-01-19  5:47     ` Youghandhar Chintala (Temp)
  0 siblings, 0 replies; 8+ messages in thread
From: Youghandhar Chintala (Temp) @ 2023-01-19  5:47 UTC (permalink / raw)
  To: Wen Gong, ath10k, johannes; +Cc: linux-wireless, linux-kernel, quic_mpubbise


On 1/19/2023 7:56 AM, Wen Gong wrote:
> On 12/22/2022 8:42 PM, Youghandhar Chintala wrote:
> ...
>>   +static void ath10k_mac_beacon_notifier(struct wiphy *wiphy)
>> +{
>> +    struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
>> +    struct ath10k *ar = hw->priv;
>> +
>> +    if (ath10k_update_channel_list(ar))
>> +        ath10k_warn(ar, "failed to update channel list\n");
>> +}
>> +
>
> Will this called while scan is running?
> On ath11k, if send channel list to firmware, then the running scan 
> will be cancel and removed.
> I guess this is same for ath10k.
>
>> ...

Yes Wen. You are right.

Regards,

Youghandhar


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

* Re: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.
  2022-12-22 12:42 ` [PATCH 2/2] wifi: ath10k: update the channel list if " Youghandhar Chintala
@ 2023-01-19  2:26   ` Wen Gong
  2023-01-19  5:47     ` Youghandhar Chintala (Temp)
  0 siblings, 1 reply; 8+ messages in thread
From: Wen Gong @ 2023-01-19  2:26 UTC (permalink / raw)
  To: Youghandhar Chintala, ath10k, johannes
  Cc: linux-wireless, linux-kernel, quic_mpubbise

On 12/22/2022 8:42 PM, Youghandhar Chintala wrote:
...
>   
> +static void ath10k_mac_beacon_notifier(struct wiphy *wiphy)
> +{
> +	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
> +	struct ath10k *ar = hw->priv;
> +
> +	if (ath10k_update_channel_list(ar))
> +		ath10k_warn(ar, "failed to update channel list\n");
> +}
> +

Will this called while scan is running?
On ath11k, if send channel list to firmware, then the running scan will 
be cancel and removed.
I guess this is same for ath10k.

> ...

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

* [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.
  2022-12-22 12:42 Youghandhar Chintala
@ 2022-12-22 12:42 ` Youghandhar Chintala
  2023-01-19  2:26   ` Wen Gong
  0 siblings, 1 reply; 8+ messages in thread
From: Youghandhar Chintala @ 2022-12-22 12:42 UTC (permalink / raw)
  To: ath10k, johannes
  Cc: linux-wireless, linux-kernel, quic_mpubbise, Youghandhar Chintala

There are connection failures in hidden SSID case when the device is
with default reg domain WW.
For WW reg domain most of the 5 GHz channels are passive. When device
listens to the beacon on that channel, the driver is updating its
channel flag but firmware is not aware of it and firmware is not
sending probes on that channels.
Due to this, we are seeing connection failures when a device is trying
to connect with hidden SSID AP.
Register beacon hint notifier to the regulatory core so that driver get
notified when there is a change in channel flags. Driver's notifier
callback will send the updated flags to the firmware.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2.c10-00754-QCAHLSWMTPL-1
Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00174

Signed-off-by: Youghandhar Chintala <quic_youghand@quicinc.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index ec8d5b29bc72..91a957295456 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3534,6 +3534,15 @@ static void ath10k_mac_update_channel_list(struct ath10k *ar,
 	}
 }
 
+static void ath10k_mac_beacon_notifier(struct wiphy *wiphy)
+{
+	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
+	struct ath10k *ar = hw->priv;
+
+	if (ath10k_update_channel_list(ar))
+		ath10k_warn(ar, "failed to update channel list\n");
+}
+
 static void ath10k_reg_notifier(struct wiphy *wiphy,
 				struct regulatory_request *request)
 {
@@ -10286,6 +10295,8 @@ int ath10k_mac_register(struct ath10k *ar)
 			goto err_unregister;
 	}
 
+	ar->hw->wiphy->beacon_hint_notifier = ath10k_mac_beacon_notifier;
+
 	return 0;
 
 err_unregister:
-- 
2.38.0


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

end of thread, other threads:[~2023-01-19  5:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 12:05 [PATCH 0/2] Update the channel list if the change in channel flags Youghandhar Chintala
2022-12-22 12:05 ` [PATCH 1/2] wifi: cfg80211: Add beacon hint notifier support Youghandhar Chintala
2022-12-22 12:05 ` [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags Youghandhar Chintala
2022-12-22 13:38   ` Kalle Valo
2022-12-22 12:40 ` [PATCH 0/2] Update the channel list if the " Youghandhar Chintala (Temp)
2022-12-22 12:42 Youghandhar Chintala
2022-12-22 12:42 ` [PATCH 2/2] wifi: ath10k: update the channel list if " Youghandhar Chintala
2023-01-19  2:26   ` Wen Gong
2023-01-19  5:47     ` Youghandhar Chintala (Temp)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).