mbox series

[v3,0/7] v3: ath11k: MBSSID and EMA support in AP mode.

Message ID 20230405221648.17950-1-quic_alokad@quicinc.com
Headers show
Series v3: ath11k: MBSSID and EMA support in AP mode. | expand

Message

Aloka Dixit April 5, 2023, 10:16 p.m. UTC
Add support for multiple BSSID (MBSSID) and enhanced multi-BSSID
advertisements (EMA) features in AP mode.
Set the extended capabilities, WMI resource config parameters to
advertise the driver support.
Set the MBSSID profile parameter such as BSSID index, total BSS count.
Retrieve and propagate the EMA beacon templates to firmware.
Set the vif security parameters for the non-transmitting profiles.

This is the next version for the following series:
https://patchwork.kernel.org/project/linux-wireless/list/?series=695229&state=%2A&archive=both
- Added 'wifi: ' to the title in all patches.
- Patch [v2,01/10] mac80211: generate EMA beacons in AP mode is
merged hence no dependency.
- Patch [v2,05/10] ath11k: create a structure for WMI vdev up parameters
is deleted from this version as it was not adding much value.
- Patch [v2,09/10] ath11k: EMA beacon support is split into two patches,
  6/7 and 7/7 to make the EMA additions clearer.
- Patch [v2,10/10] ath11k: configure WPA and RSN parameters for
  nontransmitting interface is incorporated in 6/7 as it is required
  to complete the MBSSID related support.

Aloka Dixit (7):
  wifi: ath11k: driver settings for MBSSID and EMA
  wifi: ath11k: MBSSID configuration during vdev create/start
  wifi: ath11k: rename MBSSID fields in wmi_vdev_up_cmd
  wifi: ath11k: MBSSID parameter configuration in AP mode
  wifi: ath11k: refactor vif parameter configurations
  wifi: ath11k: MBSSID beacon support
  wifi: ath11k: EMA beacon support

 drivers/net/wireless/ath/ath11k/hw.c  |   3 +
 drivers/net/wireless/ath/ath11k/hw.h  |   1 +
 drivers/net/wireless/ath/ath11k/mac.c | 307 +++++++++++++++++++++++---
 drivers/net/wireless/ath/ath11k/wmi.c |  26 ++-
 drivers/net/wireless/ath/ath11k/wmi.h |  45 +++-
 5 files changed, 345 insertions(+), 37 deletions(-)


base-commit: bea046575a2e6d7d1cf63cc7ab032647a3585de5

Comments

Kalle Valo April 29, 2023, 5:37 a.m. UTC | #1
Aloka Dixit <quic_alokad@quicinc.com> writes:

> Include MBSSID parameters in WMI vdev up operation.
>
> Tested-on : IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
> Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
> Co-developed-by: John Crispin <john@phrozen.org>
> Signed-off-by: John Crispin <john@phrozen.org>
> ---

[...]

> @@ -7153,8 +7161,13 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
>  			ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
>  				    ret);
>  
> +		if (arvif->vif->mbssid_tx_vif)
> +			tx_arvif = (struct ath11k_vif *)arvif->vif->mbssid_tx_vif->drv_priv;

This had a warning:

drivers/net/wireless/ath/ath11k/mac.c:7200: line length of 92 exceeds 90 columns

In the pending branch I fixed it like this:

--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -7143,6 +7143,7 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
 {
        struct ath11k_base *ab = ar->ab;
        struct ath11k_vif *arvif, *tx_arvif = NULL;
+       struct ieee80211_vif *mbssid_tx_vif;
        int ret;
        int i;
        bool monitor_vif = false;
@@ -7196,8 +7197,10 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
                        ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
                                    ret);
 
-               if (arvif->vif->mbssid_tx_vif)
-                       tx_arvif = (struct ath11k_vif *)arvif->vif->mbssid_tx_vif->drv_priv;
+               mbssid_tx_vif = arvif->vif->mbssid_tx_vif;
+               if (mbssid_tx_vif)
+                       tx_arvif = (struct ath11k_vif *)mbssid_tx_vif->drv_priv;
+
                ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid,
                                         arvif->bssid,
                                         tx_arvif ? tx_arvif->bssid : NULL,

Link to the commit:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=c884238009e778a0c8202a5eb0a7f68b13200bde
Aloka Dixit May 1, 2023, 5:41 p.m. UTC | #2
On 4/28/2023 10:37 PM, Kalle Valo wrote:
> Aloka Dixit <quic_alokad@quicinc.com> writes:
> 
>> Include MBSSID parameters in WMI vdev up operation.
>>
>> Tested-on : IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
>> Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
>> Co-developed-by: John Crispin <john@phrozen.org>
>> Signed-off-by: John Crispin <john@phrozen.org>
>> ---
> 
> [...]
> 
>> @@ -7153,8 +7161,13 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
>>   			ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
>>   				    ret);
>>   
>> +		if (arvif->vif->mbssid_tx_vif)
>> +			tx_arvif = (struct ath11k_vif *)arvif->vif->mbssid_tx_vif->drv_priv;
> 
> This had a warning:
> 
> drivers/net/wireless/ath/ath11k/mac.c:7200: line length of 92 exceeds 90 columns
> 
> In the pending branch I fixed it like this:
> 
> --- a/drivers/net/wireless/ath/ath11k/mac.c
> +++ b/drivers/net/wireless/ath/ath11k/mac.c
> @@ -7143,6 +7143,7 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
>   {
>          struct ath11k_base *ab = ar->ab;
>          struct ath11k_vif *arvif, *tx_arvif = NULL;
> +       struct ieee80211_vif *mbssid_tx_vif;
>          int ret;
>          int i;
>          bool monitor_vif = false;
> @@ -7196,8 +7197,10 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
>                          ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
>                                      ret);
>   
> -               if (arvif->vif->mbssid_tx_vif)
> -                       tx_arvif = (struct ath11k_vif *)arvif->vif->mbssid_tx_vif->drv_priv;
> +               mbssid_tx_vif = arvif->vif->mbssid_tx_vif;
> +               if (mbssid_tx_vif)
> +                       tx_arvif = (struct ath11k_vif *)mbssid_tx_vif->drv_priv;
> +
>                  ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid,
>                                           arvif->bssid,
>                                           tx_arvif ? tx_arvif->bssid : NULL,
> 
> Link to the commit:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=c884238009e778a0c8202a5eb0a7f68b13200bde
> 

Thank you.

I saw the warning but couldn't decide between adding a new pointer 
variable and letting 2 extra characters for just one assignment.

What are your thoughts on changing the scripts to allow up to 100?
Although nl80211 and mac80211 scripts also don't allow that long currently.
Kalle Valo May 5, 2023, 1:28 p.m. UTC | #3
Aloka Dixit <quic_alokad@quicinc.com> writes:

> On 4/28/2023 10:37 PM, Kalle Valo wrote:
>
>> Aloka Dixit <quic_alokad@quicinc.com> writes:
>>
>>> Include MBSSID parameters in WMI vdev up operation.
>>>
>>> Tested-on : IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
>>> Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
>>> Co-developed-by: John Crispin <john@phrozen.org>
>>> Signed-off-by: John Crispin <john@phrozen.org>
>>> ---
>>
>> [...]
>>
>>> @@ -7153,8 +7161,13 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
>>>   			ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
>>>   				    ret);
>>>   +		if (arvif->vif->mbssid_tx_vif)
>>> +			tx_arvif = (struct ath11k_vif *)arvif->vif->mbssid_tx_vif->drv_priv;
>>
>> This had a warning:
>>
>> drivers/net/wireless/ath/ath11k/mac.c:7200: line length of 92 exceeds 90 columns
>>
>> In the pending branch I fixed it like this:
>>
>> --- a/drivers/net/wireless/ath/ath11k/mac.c
>> +++ b/drivers/net/wireless/ath/ath11k/mac.c
>> @@ -7143,6 +7143,7 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
>>   {
>>          struct ath11k_base *ab = ar->ab;
>>          struct ath11k_vif *arvif, *tx_arvif = NULL;
>> +       struct ieee80211_vif *mbssid_tx_vif;
>>          int ret;
>>          int i;
>>          bool monitor_vif = false;
>> @@ -7196,8 +7197,10 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
>>                          ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
>>                                      ret);
>>   -               if (arvif->vif->mbssid_tx_vif)
>> -                       tx_arvif = (struct ath11k_vif *)arvif->vif->mbssid_tx_vif->drv_priv;
>> +               mbssid_tx_vif = arvif->vif->mbssid_tx_vif;
>> +               if (mbssid_tx_vif)
>> +                       tx_arvif = (struct ath11k_vif *)mbssid_tx_vif->drv_priv;
>> +
>>                  ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid,
>>                                           arvif->bssid,
>>                                           tx_arvif ? tx_arvif->bssid : NULL,
>>
>> Link to the commit:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=c884238009e778a0c8202a5eb0a7f68b13200bde
>>
>
> Thank you.
>
> I saw the warning but couldn't decide between adding a new pointer
> variable and letting 2 extra characters for just one assignment.

My scripts will fail loudly if any of the ath*0k-check scripts have
warnings, so just like with compiler warnings I have a zero warnings
policy :) It would become a mess otherwise to know which warnings are
new and which are old.

> What are your thoughts on changing the scripts to allow up to 100?
> Although nl80211 and mac80211 scripts also don't allow that long currently.

Yeah, the checkpatch default is 100 right now and I have understood that
what Linus prefers. I'm just worried that increasing the max to 100
makes our code even more convoluted, it's a challenge as is.