All of lore.kernel.org
 help / color / mirror / Atom feed
* Realtek 8822ce p2p support
@ 2023-11-21 17:18 Jay Sweat
  2023-11-22  1:29 ` Ping-Ke Shih
  0 siblings, 1 reply; 7+ messages in thread
From: Jay Sweat @ 2023-11-21 17:18 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org

Hello,
I am trying to enable miracast via gnome network displays, which requires p2p, on my arch linux device with a soldered realtek 8822ce adapter. As far as I can tell, then hardware supports p2p ( linux says so and miracast works in windows) but it is not enabled and/or implemented in the driver. I was just wondering if this was a feature that would be added or if I am just wasting my time. 
Thanks! 

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

* RE: Realtek 8822ce p2p support
  2023-11-21 17:18 Realtek 8822ce p2p support Jay Sweat
@ 2023-11-22  1:29 ` Ping-Ke Shih
  2023-11-22 17:32   ` Jay Sweat
  0 siblings, 1 reply; 7+ messages in thread
From: Ping-Ke Shih @ 2023-11-22  1:29 UTC (permalink / raw)
  To: Jay Sweat, linux-wireless@vger.kernel.org



> -----Original Message-----
> From: Jay Sweat <jjsweat@outlook.com>
> Sent: Wednesday, November 22, 2023 1:18 AM
> To: linux-wireless@vger.kernel.org
> Subject: Realtek 8822ce p2p support
> 
> Hello,
> I am trying to enable miracast via gnome network displays, which requires p2p, on my arch linux device with
> a soldered realtek 8822ce adapter. As far as I can tell, then hardware supports p2p ( linux says so and
> miracast works in windows) but it is not enabled and/or implemented in the driver. I was just wondering
> if this was a feature that would be added or if I am just wasting my time.

8822ce can play as STA or AP role, so it is possible to support P2P basically. 
Are you interested in this work?

Ping-Ke 


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

* Re: Realtek 8822ce p2p support
  2023-11-22  1:29 ` Ping-Ke Shih
@ 2023-11-22 17:32   ` Jay Sweat
  2023-11-23  0:30     ` Ping-Ke Shih
  0 siblings, 1 reply; 7+ messages in thread
From: Jay Sweat @ 2023-11-22 17:32 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: linux-wireless@vger.kernel.org

I am interesting, but Im not sure how much help I can be. I only have a basic knowledge of linux and next to no development skills.

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

* RE: Realtek 8822ce p2p support
  2023-11-22 17:32   ` Jay Sweat
@ 2023-11-23  0:30     ` Ping-Ke Shih
  2023-11-28 19:49       ` Jay Sweat
  0 siblings, 1 reply; 7+ messages in thread
From: Ping-Ke Shih @ 2023-11-23  0:30 UTC (permalink / raw)
  To: Jay Sweat; +Cc: linux-wireless@vger.kernel.org



> -----Original Message-----
> From: Jay Sweat <jjsweat@outlook.com>
> Sent: Thursday, November 23, 2023 1:32 AM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: linux-wireless@vger.kernel.org
> Subject: Re: Realtek 8822ce p2p support
> 
> I am interesting, but Im not sure how much help I can be. I only have a basic knowledge of linux and next
> to no development skills.

First step is to download Linux kernel source and build rtw88 driver or whole kernel.
Also, you need a user-space application called wpa_supplicant [1] to make P2P connection.

Declare P2P capability by below patch, and then see how it works and debug... 

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 4a33d2e47f33..ad988d6b204b 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/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);
        }
 };

@@ -2232,7 +2234,9 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw)
        hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
                                     BIT(NL80211_IFTYPE_AP) |
                                     BIT(NL80211_IFTYPE_ADHOC) |
-                                    BIT(NL80211_IFTYPE_MESH_POINT);
+                                    BIT(NL80211_IFTYPE_MESH_POINT) |
+                                    BIT(NL80211_IFTYPE_P2P_CLIENT) |
+                                    BIT(NL80211_IFTYPE_P2P_GO);
        hw->wiphy->available_antennas_tx = hal->antenna_tx;
        hw->wiphy->available_antennas_rx = hal->antenna_rx;


[1] https://w1.fi/cvs.html



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

* Re: Realtek 8822ce p2p support
  2023-11-23  0:30     ` Ping-Ke Shih
@ 2023-11-28 19:49       ` Jay Sweat
  2023-11-29  0:33         ` Ping-Ke Shih
  0 siblings, 1 reply; 7+ messages in thread
From: Jay Sweat @ 2023-11-28 19:49 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: linux-wireless@vger.kernel.org

That seems to have worked. P2P is now listed under supported interface modes and gnome-network-displays works without issue. Havent noticed any other changes or any issues with P2P, but I only have the one app to test with.

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

* RE: Realtek 8822ce p2p support
  2023-11-28 19:49       ` Jay Sweat
@ 2023-11-29  0:33         ` Ping-Ke Shih
  2024-05-17 14:20           ` Giovanni Santini
  0 siblings, 1 reply; 7+ messages in thread
From: Ping-Ke Shih @ 2023-11-29  0:33 UTC (permalink / raw)
  To: Jay Sweat; +Cc: linux-wireless@vger.kernel.org



> -----Original Message-----
> From: Jay Sweat <jjsweat@outlook.com>
> Sent: Wednesday, November 29, 2023 3:50 AM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: linux-wireless@vger.kernel.org
> Subject: Re: Realtek 8822ce p2p support
> 
> That seems to have worked. P2P is now listed under supported interface modes and gnome-network-displays
> works without issue. Havent noticed any other changes or any issues with P2P, but I only have the one app
> to test with.

Good to hear the news. More tests you can do are to make connection with
various devices, and try to play as GO and GC respectively. This can set
p2p_go_intent (0~15) in wpa_supplicant.conf to decide how a device
intents to be a GO. Then, use 'iw info' to check the role.

An advance test is to configure peer as concurrency that connects to an
AP, and the make another interface as P2P. A simple way is to take an
Android phone, and enter P2P connection setting page to make P2P connection
first, and then connect to an AP. The order of connection is important,
because different connected channels of P2P and AP make thing complicated,
and I suppose current code can't handle this case properly. Also, try
to be GO and GC in this scenario. 

Ping-Ke


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

* RE: Realtek 8822ce p2p support
  2023-11-29  0:33         ` Ping-Ke Shih
@ 2024-05-17 14:20           ` Giovanni Santini
  0 siblings, 0 replies; 7+ messages in thread
From: Giovanni Santini @ 2024-05-17 14:20 UTC (permalink / raw)
  To: pkshih; +Cc: jjsweat, linux-wireless

Hi everyone,

I would love to get P2P working on my laptop WiFi card.

How can I help this to progress?
I suppose the steps would be:

1. Make the mentioned diff as a patch file

2. Perform tests (need some inputs on them)

3. ??? Profit?

Let me know :)

Bests,

-- 
Giovanni Santini


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

end of thread, other threads:[~2024-05-17 14:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-21 17:18 Realtek 8822ce p2p support Jay Sweat
2023-11-22  1:29 ` Ping-Ke Shih
2023-11-22 17:32   ` Jay Sweat
2023-11-23  0:30     ` Ping-Ke Shih
2023-11-28 19:49       ` Jay Sweat
2023-11-29  0:33         ` Ping-Ke Shih
2024-05-17 14:20           ` Giovanni Santini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.