2022-12-22 12:55:34

by Youghandhar Chintala

[permalink] [raw]
Subject: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.

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 <[email protected]>
---
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


2023-01-19 02:37:21

by Wen Gong

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.

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.

> ...

2023-01-19 06:17:09

by Youghandhar Chintala

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: ath10k: update the channel list if change in channel flags.


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