mbox series

[0/8] wifi: ath12k: Introduce device group abstraction

Message ID 20240420083750.1545670-1-quic_hprem@quicinc.com
Headers show
Series wifi: ath12k: Introduce device group abstraction | expand

Message

Harshitha Prem April 20, 2024, 8:37 a.m. UTC
To support multi-link operation, multiple devices with different bands say
2 GHz or 5 GHz or 6 GHz can be combined together as a group and provide
an abstraction to mac80211.

Device group abstraction - when there are multiple devices that are
connected by any means of communication interface between them, then these
devices can be combined together as a single group using a group id to form
a group abstraction. In ath12k driver, this abstraction would be named as
ath12k_hw_group (ag).

Please find below illustration of device group abstraction with two
devices.

                 Grouping of multiple devices (in future)
+------------------------------------------------------------------------+
|  +-------------------------------------+       +-------------------+   |
|  |   +-----------+ | | +-----------+   |       |   +-----------+   |   |
|  |   | ar (2GHz) | | | | ar (5GHz) |   |       |   | ar (6GHz) |   |   |
|  |   +-----------+ | | +-----------+   |       |   +-----------+   |   |
|  |          ath12k_base (ab)           |       | ath12k_base (ab)  |   |
|  |         (Dual band device)          |       |                   |   |
|  +-------------------------------------+       +-------------------+   |
|                 ath12k_hw_group (ag) based on group id                 |
+------------------------------------------------------------------------+

Say for example, device 1 has two radios (2 GHz and 5 GHz band) and
device 2 has one radio (6 GHz).

In existing code -
        device 1 will have two hardware abstractions hw1 (2 GHz) and hw2
        (5 GHz) will be registered separately to mac80211 as phy0 and phy1
        respectively. Similarly, device 2 will register its hw (6GHz) as
        phy2 to mac80211.

In future, with multi-link abstraction

        combination 1 - Different group id for device1 and device 2
                Device 1 will create a single hardware abstraction hw1
                (2 GHz and  5 GHz) and will be registered to mac80211 as
                phy0. similarly, device 2 will register its hardware
                (6 GHz) to mac80211 as phy1.

        combination 2 - Same group id for device1 and device 2
                Both device details are combined together as a group, say
                group1, with single hardware abstraction of radios 2 GHz,
                5 GHz and 6 GHz band details and will be registered to
                mac80211 as phy0.

Add base infrastructure changes to add device grouping abstraction with
a single device.

This patch series brings the base code changes with following order:
        1. Refactor existing code which would facilitate in introducing
           device group abstraction.
        2. Create a device group abstraction during device probe.
        3. Start the device group only after QMI firmware ready event is
           received for all the devices that are combined in the group.
        4. Move the hardware abstractions (ath12k_hw - ah) from device
           (ath12k_base - ab) to device group abstraction (ag) as it would
           ease in having different combinations of group abstraction that
           can be registered to mac80211.


Depends-on:
        [PATCH 0/3] wifi: ath12k: Refactor the hardware recovery
procedures


Karthikeyan Periyasamy (8):
  wifi: ath12k: Refactor core start api
  wifi: ath12k: Add helpers to get or set ath12k_hw
  wifi: ath12k: Add ath12k_get_num_hw api
  wifi: ath12k: Introduce QMI firmware ready flag
  wifi: ath12k: move ATH12K_FLAG_REGISTERED flag set to mac_register api
  wifi: ath12k: Introduce device group abstraction
  wifi: ath12k: refactor core start based on hardware group
  wifi: ath12k: move ath12k_hw from per soc to group

 drivers/net/wireless/ath/ath12k/core.c | 428 +++++++++++++++++++++----
 drivers/net/wireless/ath/ath12k/core.h |  88 ++++-
 drivers/net/wireless/ath/ath12k/mac.c  | 111 +++++--
 drivers/net/wireless/ath/ath12k/mac.h  |   9 +-
 drivers/net/wireless/ath/ath12k/pci.c  |   1 +
 drivers/net/wireless/ath/ath12k/qmi.c  |  11 +-
 6 files changed, 530 insertions(+), 118 deletions(-)


base-commit: c416602943dd36fbd13af7496430723935c867a3
prerequisite-patch-id: a4d62344b11368fb7e549c03b6a31f7ba4c9e2bb
prerequisite-patch-id: b4a1e18a85d8c1e337fa133c2bd2956c33b11046
prerequisite-patch-id: b16edd310baa35e2500267e338f60c9a2e6594e1

Comments

Kalle Valo April 23, 2024, 9:39 a.m. UTC | #1
Harshitha Prem <quic_hprem@quicinc.com> writes:

> To support multi-link operation, multiple devices with different bands say
> 2 GHz or 5 GHz or 6 GHz can be combined together as a group and provide
> an abstraction to mac80211.
>
> Device group abstraction - when there are multiple devices that are
> connected by any means of communication interface between them, then these
> devices can be combined together as a single group using a group id to form
> a group abstraction. In ath12k driver, this abstraction would be named as
> ath12k_hw_group (ag).
>
> Please find below illustration of device group abstraction with two
> devices.
>
>                  Grouping of multiple devices (in future)
> +------------------------------------------------------------------------+
> |  +-------------------------------------+       +-------------------+   |
> |  |   +-----------+ | | +-----------+   |       |   +-----------+   |   |
> |  |   | ar (2GHz) | | | | ar (5GHz) |   |       |   | ar (6GHz) |   |   |
> |  |   +-----------+ | | +-----------+   |       |   +-----------+   |   |
> |  |          ath12k_base (ab)           |       | ath12k_base (ab)  |   |
> |  |         (Dual band device)          |       |                   |   |
> |  +-------------------------------------+       +-------------------+   |
> |                 ath12k_hw_group (ag) based on group id                 |
> +------------------------------------------------------------------------+
>
> Say for example, device 1 has two radios (2 GHz and 5 GHz band) and
> device 2 has one radio (6 GHz).
>
> In existing code -
>         device 1 will have two hardware abstractions hw1 (2 GHz) and hw2
>         (5 GHz) will be registered separately to mac80211 as phy0 and phy1
>         respectively. Similarly, device 2 will register its hw (6GHz) as
>         phy2 to mac80211.
>
> In future, with multi-link abstraction
>
>         combination 1 - Different group id for device1 and device 2
>                 Device 1 will create a single hardware abstraction hw1
>                 (2 GHz and  5 GHz) and will be registered to mac80211 as
>                 phy0. similarly, device 2 will register its hardware
>                 (6 GHz) to mac80211 as phy1.
>
>         combination 2 - Same group id for device1 and device 2
>                 Both device details are combined together as a group, say
>                 group1, with single hardware abstraction of radios 2 GHz,
>                 5 GHz and 6 GHz band details and will be registered to
>                 mac80211 as phy0.
>
> Add base infrastructure changes to add device grouping abstraction with
> a single device.
>
> This patch series brings the base code changes with following order:
>         1. Refactor existing code which would facilitate in introducing
>            device group abstraction.
>         2. Create a device group abstraction during device probe.
>         3. Start the device group only after QMI firmware ready event is
>            received for all the devices that are combined in the group.
>         4. Move the hardware abstractions (ath12k_hw - ah) from device
>            (ath12k_base - ab) to device group abstraction (ag) as it would
>            ease in having different combinations of group abstraction that
>            can be registered to mac80211.
>
>
> Depends-on:
>         [PATCH 0/3] wifi: ath12k: Refactor the hardware recovery
> procedures

Are you referring to this patchset:

https://patchwork.kernel.org/project/linux-wireless/list/?series=821155&state=*&order=date

That was sent three months ago and at least I couldn't find a newer
version. So I'll just drop this patchset for now without even looking at
it.
Jeff Johnson April 23, 2024, 9:24 p.m. UTC | #2
On 4/23/2024 2:39 AM, Kalle Valo wrote:
> Harshitha Prem <quic_hprem@quicinc.com> writes:
> 
>> To support multi-link operation, multiple devices with different bands say
>> 2 GHz or 5 GHz or 6 GHz can be combined together as a group and provide
>> an abstraction to mac80211.
>>
>> Device group abstraction - when there are multiple devices that are
>> connected by any means of communication interface between them, then these
>> devices can be combined together as a single group using a group id to form
>> a group abstraction. In ath12k driver, this abstraction would be named as
>> ath12k_hw_group (ag).
>>
>> Please find below illustration of device group abstraction with two
>> devices.
>>
>>                  Grouping of multiple devices (in future)
>> +------------------------------------------------------------------------+
>> |  +-------------------------------------+       +-------------------+   |
>> |  |   +-----------+ | | +-----------+   |       |   +-----------+   |   |
>> |  |   | ar (2GHz) | | | | ar (5GHz) |   |       |   | ar (6GHz) |   |   |
>> |  |   +-----------+ | | +-----------+   |       |   +-----------+   |   |
>> |  |          ath12k_base (ab)           |       | ath12k_base (ab)  |   |
>> |  |         (Dual band device)          |       |                   |   |
>> |  +-------------------------------------+       +-------------------+   |
>> |                 ath12k_hw_group (ag) based on group id                 |
>> +------------------------------------------------------------------------+
>>
>> Say for example, device 1 has two radios (2 GHz and 5 GHz band) and
>> device 2 has one radio (6 GHz).
>>
>> In existing code -
>>         device 1 will have two hardware abstractions hw1 (2 GHz) and hw2
>>         (5 GHz) will be registered separately to mac80211 as phy0 and phy1
>>         respectively. Similarly, device 2 will register its hw (6GHz) as
>>         phy2 to mac80211.
>>
>> In future, with multi-link abstraction
>>
>>         combination 1 - Different group id for device1 and device 2
>>                 Device 1 will create a single hardware abstraction hw1
>>                 (2 GHz and  5 GHz) and will be registered to mac80211 as
>>                 phy0. similarly, device 2 will register its hardware
>>                 (6 GHz) to mac80211 as phy1.
>>
>>         combination 2 - Same group id for device1 and device 2
>>                 Both device details are combined together as a group, say
>>                 group1, with single hardware abstraction of radios 2 GHz,
>>                 5 GHz and 6 GHz band details and will be registered to
>>                 mac80211 as phy0.
>>
>> Add base infrastructure changes to add device grouping abstraction with
>> a single device.
>>
>> This patch series brings the base code changes with following order:
>>         1. Refactor existing code which would facilitate in introducing
>>            device group abstraction.
>>         2. Create a device group abstraction during device probe.
>>         3. Start the device group only after QMI firmware ready event is
>>            received for all the devices that are combined in the group.
>>         4. Move the hardware abstractions (ath12k_hw - ah) from device
>>            (ath12k_base - ab) to device group abstraction (ag) as it would
>>            ease in having different combinations of group abstraction that
>>            can be registered to mac80211.
>>
>>
>> Depends-on:
>>         [PATCH 0/3] wifi: ath12k: Refactor the hardware recovery
>> procedures
> 
> Are you referring to this patchset:
> 
> https://patchwork.kernel.org/project/linux-wireless/list/?series=821155&state=*&order=date
> 
> That was sent three months ago and at least I couldn't find a newer
> version. So I'll just drop this patchset for now without even looking at
> it.
> 

Yes, I'm stumped as well. the patch specifies:
>base-commit: c416602943dd36fbd13af7496430723935c867a3
>prerequisite-patch-id: a4d62344b11368fb7e549c03b6a31f7ba4c9e2bb
>prerequisite-patch-id: b4a1e18a85d8c1e337fa133c2bd2956c33b11046
>prerequisite-patch-id: b16edd310baa35e2500267e338f60c9a2e6594e1

but lore is unable to find those prerequisite patch-ids, which leads me to
believe that they were rebased internally but never posted.

I tried to apply the January series on top of the base-commit:
c416602943dd36fbd13af7496430723935c867a3 but it doesn't apply cleanly.

So I think we need to have a rebased and updated "Refactor the hardware
recovery procedures" first.

/jeff
Kalle Valo April 24, 2024, 4:39 a.m. UTC | #3
Jeff Johnson <quic_jjohnson@quicinc.com> writes:

>>> Depends-on:
>>>         [PATCH 0/3] wifi: ath12k: Refactor the hardware recovery
>>> procedures
>> 
>> Are you referring to this patchset:
>> 
>> https://patchwork.kernel.org/project/linux-wireless/list/?series=821155&state=*&order=date
>> 
>> That was sent three months ago and at least I couldn't find a newer
>> version. So I'll just drop this patchset for now without even looking at
>> it.
>> 
>
> Yes, I'm stumped as well. the patch specifies:
>>base-commit: c416602943dd36fbd13af7496430723935c867a3
>>prerequisite-patch-id: a4d62344b11368fb7e549c03b6a31f7ba4c9e2bb
>>prerequisite-patch-id: b4a1e18a85d8c1e337fa133c2bd2956c33b11046
>>prerequisite-patch-id: b16edd310baa35e2500267e338f60c9a2e6594e1
>
> but lore is unable to find those prerequisite patch-ids, which leads me to
> believe that they were rebased internally but never posted.
>
> I tried to apply the January series on top of the base-commit:
> c416602943dd36fbd13af7496430723935c867a3 but it doesn't apply cleanly.
>
> So I think we need to have a rebased and updated "Refactor the hardware
> recovery procedures" first.

Yeah, it's waste of everyone's time to submit patches like this which
don't even apply at all due to missing dependencies. Please don't do
that.
Harshitha Prem April 24, 2024, 4:47 a.m. UTC | #4
On 4/24/2024 10:09 AM, Kalle Valo wrote:
> Jeff Johnson <quic_jjohnson@quicinc.com> writes:
> 
>>>> Depends-on:
>>>>          [PATCH 0/3] wifi: ath12k: Refactor the hardware recovery
>>>> procedures
>>>
>>> Are you referring to this patchset:
>>>
>>> https://patchwork.kernel.org/project/linux-wireless/list/?series=821155&state=*&order=date
>>>
>>> That was sent three months ago and at least I couldn't find a newer
>>> version. So I'll just drop this patchset for now without even looking at
>>> it.
>>>
>>
>> Yes, I'm stumped as well. the patch specifies:
>>> base-commit: c416602943dd36fbd13af7496430723935c867a3
>>> prerequisite-patch-id: a4d62344b11368fb7e549c03b6a31f7ba4c9e2bb
>>> prerequisite-patch-id: b4a1e18a85d8c1e337fa133c2bd2956c33b11046
>>> prerequisite-patch-id: b16edd310baa35e2500267e338f60c9a2e6594e1
>>
>> but lore is unable to find those prerequisite patch-ids, which leads me to
>> believe that they were rebased internally but never posted.
>>
>> I tried to apply the January series on top of the base-commit:
>> c416602943dd36fbd13af7496430723935c867a3 but it doesn't apply cleanly.
>>
>> So I think we need to have a rebased and updated "Refactor the hardware
>> recovery procedures" first.
> 
> Yeah, it's waste of everyone's time to submit patches like this which
> don't even apply at all due to missing dependencies. Please don't do
> that.
> 
Sure. Sorry Jeff and Kalle, My bad!. yes,the dependent patch should be 
rebased. Will respawn this series after the dependencies are at the latest.

Thanks,
Harshitha