2023-12-09 14:52:39

by marco.rodolfi

[permalink] [raw]
Subject: Wireless P2P support for rtw88 families cards

I have seen in the past that this feature was already requested and Ping-Ke was trying to see what was needed to be implemented. I also have seen that this has been implemented in rtw89 family of drivers around one year ago.

Is there any progress on this feature?


2023-12-09 18:34:49

by Larry Finger

[permalink] [raw]
Subject: Re: Wireless P2P support for rtw88 families cards

On 12/9/23 08:52, [email protected] wrote:
> I have seen in the past that this feature was already requested and Ping-Ke was trying to see what was needed to be implemented. I also have seen that this has been implemented in rtw89 family of drivers around one year ago.
>
> Is there any progress on this feature?
>

I added the tentative patch that Ping-Ke suggested to the rtw88 repo at
https://github.com/lwfinger/rtw88.git. If you pull that repo, you will get the
changes.

Larry


2023-12-09 18:55:26

by marco.rodolfi

[permalink] [raw]
Subject: Re: Wireless P2P support for rtw88 families cards

Oh, so there is already a test in. It's not in the main driver since it's missing testing or it's not that much stable?

Thanks by the way Larry,

Marco.

9 dic 2023, 19:34 da [email protected]:

> On 12/9/23 08:52, [email protected] wrote:
>
>> I have seen in the past that this feature was already requested and Ping-Ke was trying to see what was needed to be implemented. I also have seen that this has been implemented in rtw89 family of drivers around one year ago.
>>
>> Is there any progress on this feature?
>>
>
> I added the tentative patch that Ping-Ke suggested to the rtw88 repo at https://github.com/lwfinger/rtw88.git. If you pull that repo, you will get the changes.
>
> Larry
>

2023-12-11 01:30:19

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Wireless P2P support for rtw88 families cards



> -----Original Message-----
> From: [email protected] <[email protected]>
> Sent: Sunday, December 10, 2023 2:55 AM
> To: Larry Finger <[email protected]>
> Cc: Linux Wireless <[email protected]>; Ping-Ke Shih <[email protected]>
> Subject: Re: Wireless P2P support for rtw88 families cards
>
> Oh, so there is already a test in. It's not in the main driver since it's missing testing or it's not that
> much stable?
>

I don't have time to develop and test P2P on rtw88 that contains many chips.

As thread [1], I did suggest some test cases, and I think Jay is testing.

[1] https://lore.kernel.org/linux-wireless/[email protected]/

2024-02-09 16:22:55

by marco.rodolfi

[permalink] [raw]
Subject: RE: Wireless P2P support for rtw88 families cards

Just recently managed to run a couple of tests on lwfinger fork of the driver, which still required a small modification to expose P2P to the host like:
diff --git a/main.c b/main.cindex f589029..e8d7079 100644--- a/main.c+++ b/main.c@@ -110,7 +110,9 @@ static const struct ieee80211_iface_limit rtw_iface_limits[] = { }, { .max = 1,- .types = BIT(NL80211_IFTYPE_AP),+ .types = BIT(NL80211_IFTYPE_AP) |+ BIT(NL80211_IFTYPE_P2P_CLIENT) |+ BIT(NL80211_IFTYPE_P2P_GO), } }; @@ -2366,6 +2368,9 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw) if (rtwdev->chip->id == RTW_CHIP_TYPE_8822C) { hw->wiphy->iface_combinations = rtw_iface_combs; hw->wiphy->n_iface_combinations = ARRAY_SIZE(rtw_iface_combs);+ hw->wiphy->interface_modes = hw->wiphy->interface_modes |+ BIT(NL80211_IFTYPE_P2P_CLIENT) |+ BIT(NL80211_IFTYPE_P2P_GO); } wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
I've limited this only on my specific chipset instead of all the supported chips, since just below there was a filter on the 8822c chip.

Initial tests seems good to me, P2P is exposed to userspace and a short test using wpa_supplicant show activity + my android phone seems to see the wireless direct network just fine and the connect prompts come in the wpa_supplicant logs, but pairing seems to always failing even inserting the code shown in the console. Not sure if I have to whitelist stuff from wpa_cli, can't really find much as user guide on the web regarding Wireless Direct.

I've tried mirrorcast as another usecase, but I can't seem to get it working correctly, the wpa_supplicant logs just claim that it can't be enabled on a non active interface during initialization (might just be an issue with mirrorcast itself rather than anything else tho).

I've posted this to a Deck user forums where other people had expressed their desire to test this, so I might get additional feedback to say if this is all that's needed to the driver or if it requires other stuff to be added.

No dmesg errors are printed anywhere, so this looks already quite good to me for now.

I'll probably follow this up soon as more data comes in,

Marco.


Dec 11, 2023, 02:30 by [email protected]:

>
>
>> -----Original Message-----
>> From: [email protected] <[email protected]>
>> Sent: Sunday, December 10, 2023 2:55 AM
>> To: Larry Finger <[email protected]>
>> Cc: Linux Wireless <[email protected]>; Ping-Ke Shih <[email protected]>
>> Subject: Re: Wireless P2P support for rtw88 families cards
>>
>> Oh, so there is already a test in. It's not in the main driver since it's missing testing or it's not that
>> much stable?
>>
>
> I don't have time to develop and test P2P on rtw88 that contains many chips.
>
> As thread [1], I did suggest some test cases, and I think Jay is testing.
>
> [1] https://lore.kernel.org/linux-wireless/[email protected]/
>