linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: Fix non-working BSS STA mode
@ 2018-12-12  5:13 Kai-Heng Feng
  2018-12-13  0:35 ` Pkshih
  2018-12-20  6:42 ` Kalle Valo
  0 siblings, 2 replies; 7+ messages in thread
From: Kai-Heng Feng @ 2018-12-12  5:13 UTC (permalink / raw)
  To: pkshih; +Cc: kvalo, davem, linux-wireless, netdev, linux-kernel, Kai-Heng Feng

Once BSS STA mode gets started, it can be scanned by other clients but
cannot entablish a connection.

Turns out the set_bcn_reg() and its *_set_beacon_related_registers()
callbacks never get called so it has problem beaconing.

Enable the function in rtl_op_bss_info_changed() can make BSS STA mode
start to work.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 4bf7967590ca..11d27a5cc576 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1054,7 +1054,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 					 "BSS_CHANGED_BEACON_ENABLED\n");
 
 				/*start hw beacon interrupt. */
-				/*rtlpriv->cfg->ops->set_bcn_reg(hw); */
+				rtlpriv->cfg->ops->set_bcn_reg(hw);
 				mac->beacon_enabled = 1;
 				rtlpriv->cfg->ops->update_interrupt_mask(hw,
 						rtlpriv->cfg->maps
-- 
2.17.1


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

* Re: [PATCH] rtlwifi: Fix non-working BSS STA mode
  2018-12-12  5:13 [PATCH] rtlwifi: Fix non-working BSS STA mode Kai-Heng Feng
@ 2018-12-13  0:35 ` Pkshih
  2018-12-13  5:36   ` Kai Heng Feng
  2018-12-20  6:42 ` Kalle Valo
  1 sibling, 1 reply; 7+ messages in thread
From: Pkshih @ 2018-12-13  0:35 UTC (permalink / raw)
  To: kai.heng.feng; +Cc: linux-wireless, kvalo, davem, netdev, linux-kernel

On Wed, 2018-12-12 at 13:13 +0800, Kai-Heng Feng wrote:
> Once BSS STA mode gets started, it can be scanned by other clients but
> cannot entablish a connection.
         ^^^ typo: establish
> 
> Turns out the set_bcn_reg() and its *_set_beacon_related_registers()
> callbacks never get called so it has problem beaconing.
> 
> Enable the function in rtl_op_bss_info_changed() can make BSS STA mode
> start to work.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c
> b/drivers/net/wireless/realtek/rtlwifi/core.c
> index 4bf7967590ca..11d27a5cc576 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/core.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/core.c
> @@ -1054,7 +1054,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw
> *hw,
>  					 "BSS_CHANGED_BEACON_ENABLED\n");
>  
>  				/*start hw beacon interrupt. */
> -				/*rtlpriv->cfg->ops->set_bcn_reg(hw); */
> +				rtlpriv->cfg->ops->set_bcn_reg(hw);
>  				mac->beacon_enabled = 1;
>  				rtlpriv->cfg->ops->update_interrupt_mask(hw,
>  						rtlpriv->cfg->maps

Which wifi chip do you use? And, please share your test scenario.

Thanks


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

* Re: [PATCH] rtlwifi: Fix non-working BSS STA mode
  2018-12-13  0:35 ` Pkshih
@ 2018-12-13  5:36   ` Kai Heng Feng
  2018-12-13  7:39     ` Pkshih
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Heng Feng @ 2018-12-13  5:36 UTC (permalink / raw)
  To: Pkshih; +Cc: linux-wireless, kvalo, davem, netdev, linux-kernel



> On Dec 13, 2018, at 08:35, Pkshih <pkshih@realtek.com> wrote:
> 
> On Wed, 2018-12-12 at 13:13 +0800, Kai-Heng Feng wrote:
>> Once BSS STA mode gets started, it can be scanned by other clients but
>> cannot entablish a connection.
>          ^^^ typo: establish
>> 
>> Turns out the set_bcn_reg() and its *_set_beacon_related_registers()
>> callbacks never get called so it has problem beaconing.
>> 
>> Enable the function in rtl_op_bss_info_changed() can make BSS STA mode
>> start to work.
>> 
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> ---
>>  drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c
>> b/drivers/net/wireless/realtek/rtlwifi/core.c
>> index 4bf7967590ca..11d27a5cc576 100644
>> --- a/drivers/net/wireless/realtek/rtlwifi/core.c
>> +++ b/drivers/net/wireless/realtek/rtlwifi/core.c
>> @@ -1054,7 +1054,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw
>> *hw,
>>  					 "BSS_CHANGED_BEACON_ENABLED\n");
>>  
>>  				/*start hw beacon interrupt. */
>> -				/*rtlpriv->cfg->ops->set_bcn_reg(hw); */
>> +				rtlpriv->cfg->ops->set_bcn_reg(hw);
>>  				mac->beacon_enabled = 1;
>>  				rtlpriv->cfg->ops->update_interrupt_mask(hw,
>>  						rtlpriv->cfg->maps
> 
> Which wifi chip do you use? And, please share your test scenario.

It’s Realtek 8723DE, which is currently not supported in mainline so I use rtl8723de in rtlwifi_new [1] to test it out.

The test scenario is simply enable hotspot through network manager, which uses wpa_supplicant to do the work.

[1] https://github.com/lwfinger/rtlwifi_new

Kai-Heng

> 
> Thanks
> 


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

* Re: [PATCH] rtlwifi: Fix non-working BSS STA mode
  2018-12-13  5:36   ` Kai Heng Feng
@ 2018-12-13  7:39     ` Pkshih
  2018-12-13  8:03       ` Kai Heng Feng
  0 siblings, 1 reply; 7+ messages in thread
From: Pkshih @ 2018-12-13  7:39 UTC (permalink / raw)
  To: kai.heng.feng; +Cc: linux-wireless, kvalo, davem, netdev, linux-kernel

On Thu, 2018-12-13 at 13:36 +0800, Kai Heng Feng wrote:
> > On Dec 13, 2018, at 08:35, Pkshih <pkshih@realtek.com> wrote:
> > 
> > On Wed, 2018-12-12 at 13:13 +0800, Kai-Heng Feng wrote:
> >> Once BSS STA mode gets started, it can be scanned by other clients but
> >> cannot entablish a connection.
> >          ^^^ typo: establish
> >> 
> >> Turns out the set_bcn_reg() and its *_set_beacon_related_registers()
> >> callbacks never get called so it has problem beaconing.
> >> 
> >> Enable the function in rtl_op_bss_info_changed() can make BSS STA mode
> >> start to work.
> >> 
> >> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> >> ---
> >>  drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c
> >> b/drivers/net/wireless/realtek/rtlwifi/core.c
> >> index 4bf7967590ca..11d27a5cc576 100644
> >> --- a/drivers/net/wireless/realtek/rtlwifi/core.c
> >> +++ b/drivers/net/wireless/realtek/rtlwifi/core.c
> >> @@ -1054,7 +1054,7 @@ static void rtl_op_bss_info_changed(struct
> ieee80211_hw
> >> *hw,
> >>  					 "BSS_CHANGED_BEACON_ENABLED\n");
> >>  
> >>  				/*start hw beacon interrupt. */
> >> -				/*rtlpriv->cfg->ops->set_bcn_reg(hw); */
> >> +				rtlpriv->cfg->ops->set_bcn_reg(hw);
> >>  				mac->beacon_enabled = 1;
> >>  				rtlpriv->cfg->ops-
> >update_interrupt_mask(hw,
> >>  						rtlpriv->cfg->maps
> > 
> > Which wifi chip do you use? And, please share your test scenario.
> 
> It’s Realtek 8723DE, which is currently not supported in mainline so I use
> rtl8723de in rtlwifi_new [1] to test it out.
> 
> The test scenario is simply enable hotspot through network manager, which uses
> wpa_supplicant to do the work.
> 
> [1] https://github.com/lwfinger/rtlwifi_new
> 

Since rtl8723de isn't supported yet, this patch would be pending.
I'll take time to check whether it works on existing chips.

Thanks
PK

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

* Re: [PATCH] rtlwifi: Fix non-working BSS STA mode
  2018-12-13  7:39     ` Pkshih
@ 2018-12-13  8:03       ` Kai Heng Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Kai Heng Feng @ 2018-12-13  8:03 UTC (permalink / raw)
  To: Pkshih; +Cc: linux-wireless, kvalo, davem, netdev, linux-kernel



> On Dec 13, 2018, at 15:39, Pkshih <pkshih@realtek.com> wrote:
> 
> On Thu, 2018-12-13 at 13:36 +0800, Kai Heng Feng wrote:
>>> On Dec 13, 2018, at 08:35, Pkshih <pkshih@realtek.com> wrote:
>>>  
>>> On Wed, 2018-12-12 at 13:13 +0800, Kai-Heng Feng wrote:
>>>> Once BSS STA mode gets started, it can be scanned by other clients but
>>>> cannot entablish a connection.
>>>           ^^^ typo: establish
>>>>  
>>>> Turns out the set_bcn_reg() and its *_set_beacon_related_registers()
>>>> callbacks never get called so it has problem beaconing.
>>>>  
>>>> Enable the function in rtl_op_bss_info_changed() can make BSS STA mode
>>>> start to work.
>>>>  
>>>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>>>> ---
>>>>   drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>  
>>>> diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c
>>>> b/drivers/net/wireless/realtek/rtlwifi/core.c
>>>> index 4bf7967590ca..11d27a5cc576 100644
>>>> --- a/drivers/net/wireless/realtek/rtlwifi/core.c
>>>> +++ b/drivers/net/wireless/realtek/rtlwifi/core.c
>>>> @@ -1054,7 +1054,7 @@ static void rtl_op_bss_info_changed(struct
>> ieee80211_hw
>>>> *hw,
>>>>   					 "BSS_CHANGED_BEACON_ENABLED\n");
>>>>   
>>>>   				/*start hw beacon interrupt. */
>>>> -				/*rtlpriv->cfg->ops->set_bcn_reg(hw); */
>>>> +				rtlpriv->cfg->ops->set_bcn_reg(hw);
>>>>   				mac->beacon_enabled = 1;
>>>>   				rtlpriv->cfg->ops-
>>> update_interrupt_mask(hw,
>>>>   						rtlpriv->cfg->maps
>>>  
>>> Which wifi chip do you use? And, please share your test scenario.
>> 
>> It’s Realtek 8723DE, which is currently not supported in mainline so I use
>> rtl8723de in rtlwifi_new [1] to test it out.
>> 
>> The test scenario is simply enable hotspot through network manager, which uses
>> wpa_supplicant to do the work.
>> 
>> [1] https://github.com/lwfinger/rtlwifi_new
>> 
> 
> Since rtl8723de isn't supported yet, this patch would be pending.
> I'll take time to check whether it works on existing chips.

Thanks, that will be great.

Unrelated question:
Is it possible to use a DMI table to select correct ant_sel for affected HP laptops?
This can bring better out-of-the-box experience for users.

Kai-Heng

> 
> Thanks
> PK


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

* Re: [PATCH] rtlwifi: Fix non-working BSS STA mode
  2018-12-12  5:13 [PATCH] rtlwifi: Fix non-working BSS STA mode Kai-Heng Feng
  2018-12-13  0:35 ` Pkshih
@ 2018-12-20  6:42 ` Kalle Valo
  2018-12-20 12:56   ` Kai Heng Feng
  1 sibling, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2018-12-20  6:42 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: pkshih, davem, linux-wireless, netdev, linux-kernel, Kai-Heng Feng

Kai-Heng Feng <kai.heng.feng@canonical.com> wrote:

> Once BSS STA mode gets started, it can be scanned by other clients but
> cannot entablish a connection.
> 
> Turns out the set_bcn_reg() and its *_set_beacon_related_registers()
> callbacks never get called so it has problem beaconing.
> 
> Enable the function in rtl_op_bss_info_changed() can make BSS STA mode
> start to work.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

The commit log is quite misleading. It implies that the client mode is broken
for all rtlwifi hardware and that can't be the case, otherwise we would be
flooded by bug reports. So please improve the commit log and describe clearly
the problem you are solving.

-- 
https://patchwork.kernel.org/patch/10725537/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

* Re: [PATCH] rtlwifi: Fix non-working BSS STA mode
  2018-12-20  6:42 ` Kalle Valo
@ 2018-12-20 12:56   ` Kai Heng Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Kai Heng Feng @ 2018-12-20 12:56 UTC (permalink / raw)
  To: Kalle Valo; +Cc: pkshih, davem, linux-wireless, netdev, linux-kernel



> On Dec 20, 2018, at 14:42, Kalle Valo <kvalo@codeaurora.org> wrote:
> 
> Kai-Heng Feng <kai.heng.feng@canonical.com> wrote:
> 
>> Once BSS STA mode gets started, it can be scanned by other clients but
>> cannot entablish a connection.
>> 
>> Turns out the set_bcn_reg() and its *_set_beacon_related_registers()
>> callbacks never get called so it has problem beaconing.
>> 
>> Enable the function in rtl_op_bss_info_changed() can make BSS STA mode
>> start to work.
>> 
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> 
> The commit log is quite misleading. It implies that the client mode is broken
> for all rtlwifi hardware and that can't be the case, otherwise we would be
> flooded by bug reports. So please improve the commit log and describe clearly
> the problem you are solving.

You are right. I'll wait for PKShih’s test result and update commit log afterwards.

Kai-Heng

> 
> -- 
> https://patchwork.kernel.org/patch/10725537/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
> 


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

end of thread, other threads:[~2018-12-20 12:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-12  5:13 [PATCH] rtlwifi: Fix non-working BSS STA mode Kai-Heng Feng
2018-12-13  0:35 ` Pkshih
2018-12-13  5:36   ` Kai Heng Feng
2018-12-13  7:39     ` Pkshih
2018-12-13  8:03       ` Kai Heng Feng
2018-12-20  6:42 ` Kalle Valo
2018-12-20 12:56   ` Kai Heng Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).