All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtw88: set WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, mac80211 supports it
@ 2020-02-13  5:08 yhchuang
  2020-02-13  9:56 ` Arend Van Spriel
  0 siblings, 1 reply; 4+ messages in thread
From: yhchuang @ 2020-02-13  5:08 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, briannorris, anbeltra

From: Yan-Hsuan Chuang <yhchuang@realtek.com>

Set wiphy flag WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, because mac80211
actually supports it. With the flag set, driver can accept ROC
event from wpa_supplicant or some other user space tools.

Do note that driver is most used to run a station mode vif and is
using sw_scan instead of use_chan_ctx. So, if the driver is going
to use chan_ctx or hw_scan, must make sure that ROC can work.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 2845d2838f7b..38c77678fa5b 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1484,6 +1484,7 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw)
 				     BIT(NL80211_IFTYPE_MESH_POINT);
 
 	hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
+			    WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
 			    WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
 
 	hw->wiphy->features |= NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;
-- 
2.17.1


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

* Re: [PATCH] rtw88: set WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, mac80211 supports it
  2020-02-13  5:08 [PATCH] rtw88: set WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, mac80211 supports it yhchuang
@ 2020-02-13  9:56 ` Arend Van Spriel
  2020-02-13 10:02   ` Arend Van Spriel
  0 siblings, 1 reply; 4+ messages in thread
From: Arend Van Spriel @ 2020-02-13  9:56 UTC (permalink / raw)
  To: yhchuang, kvalo; +Cc: linux-wireless, briannorris, anbeltra



On 2/13/2020 6:08 AM, yhchuang@realtek.com wrote:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> 
> Set wiphy flag WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, because mac80211
> actually supports it. With the flag set, driver can accept ROC
> event from wpa_supplicant or some other user space tools.

This does not seem right. mac80211 does set this flag itself when the 
driver provides remain_on_channel callback. Does that mean you already 
have that callback? This patch is either wrong or unnecessary.

Regards,
Arend

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

* Re: [PATCH] rtw88: set WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, mac80211 supports it
  2020-02-13  9:56 ` Arend Van Spriel
@ 2020-02-13 10:02   ` Arend Van Spriel
  2020-02-18  8:01     ` Tony Chuang
  0 siblings, 1 reply; 4+ messages in thread
From: Arend Van Spriel @ 2020-02-13 10:02 UTC (permalink / raw)
  To: yhchuang, kvalo; +Cc: linux-wireless, briannorris, anbeltra

On 2/13/2020 10:56 AM, Arend Van Spriel wrote:
> 
> 
> On 2/13/2020 6:08 AM, yhchuang@realtek.com wrote:
>> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>>
>> Set wiphy flag WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, because mac80211
>> actually supports it. With the flag set, driver can accept ROC
>> event from wpa_supplicant or some other user space tools.
> 
> This does not seem right. mac80211 does set this flag itself when the 
> driver provides remain_on_channel callback. Does that mean you already 
> have that callback? This patch is either wrong or unnecessary.

Re-reading the commit message I guess it is ok to claim 
remain-on-channel support when using sw_scan. If this is true it seems 
better to extend the condition in ieee80211_alloc_hw_nm() for setting 
the flag.

Regards,
Arend

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

* RE: [PATCH] rtw88: set WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, mac80211 supports it
  2020-02-13 10:02   ` Arend Van Spriel
@ 2020-02-18  8:01     ` Tony Chuang
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Chuang @ 2020-02-18  8:01 UTC (permalink / raw)
  To: Arend Van Spriel, kvalo; +Cc: linux-wireless, briannorris, anbeltra

> On 2/13/2020 10:56 AM, Arend Van Spriel wrote:
> >
> >
> > On 2/13/2020 6:08 AM, yhchuang@realtek.com wrote:
> >> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> >>
> >> Set wiphy flag WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, because
> mac80211
> >> actually supports it. With the flag set, driver can accept ROC
> >> event from wpa_supplicant or some other user space tools.
> >
> > This does not seem right. mac80211 does set this flag itself when the
> > driver provides remain_on_channel callback. Does that mean you already
> > have that callback? This patch is either wrong or unnecessary.
> 
> Re-reading the commit message I guess it is ok to claim
> remain-on-channel support when using sw_scan. If this is true it seems
> better to extend the condition in ieee80211_alloc_hw_nm() for setting
> the flag.
> 

It looks like we can set the flag in ieee80211_alloc_hw_nm(). Such as:
if (!use_chan_ctx || (use_chan_ctx && ops->remain_on_channel)).

Yan-Hsuan

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

end of thread, other threads:[~2020-02-18  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13  5:08 [PATCH] rtw88: set WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, mac80211 supports it yhchuang
2020-02-13  9:56 ` Arend Van Spriel
2020-02-13 10:02   ` Arend Van Spriel
2020-02-18  8:01     ` Tony Chuang

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.