From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wr1-f65.google.com ([209.85.221.65]:34073 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728410AbeHMPVx (ORCPT ); Mon, 13 Aug 2018 11:21:53 -0400 Received: by mail-wr1-f65.google.com with SMTP id c13-v6so14165540wrt.1 for ; Mon, 13 Aug 2018 05:39:45 -0700 (PDT) Subject: Re: [PATCH] mt76: Enable NL80211_EXT_FEATURE_CQM_RSSI_LIST To: Lorenzo Bianconi References: <20180812145207.11395-1-kristian.evensen@gmail.com> <871sb3zc3v.fsf@kamboji.qca.qualcomm.com> <5B708025.4090906@broadcom.com> Cc: Kalle Valo , kristian.evensen@gmail.com, linux-wireless , netdev@vger.kernel.org From: Arend van Spriel Message-ID: <5B717C0F.5060302@broadcom.com> (sfid-20180813_144053_467634_4F7EBCE6) Date: Mon, 13 Aug 2018 14:39:43 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 8/13/2018 12:55 PM, Lorenzo Bianconi wrote: >> On 8/12/2018 8:14 PM, Kalle Valo wrote: >>> Kristian Evensen writes: >>> >>>> Enable the use of CQM with mt76-devices. >>>> >>>> Signed-off-by: Kristian Evensen >>>> --- >>>> drivers/net/wireless/mediatek/mt76/mac80211.c | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c >>>> index 029d54bc..3eb328ff 100644 >>>> --- a/drivers/net/wireless/mediatek/mt76/mac80211.c >>>> +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c >>>> @@ -305,6 +305,8 @@ int mt76_register_device(struct mt76_dev *dev, bool vht, >>>> >>>> wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR; >>>> >>>> + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); >>> >>> So have you tested this and with what devices? For example, does it work >>> with recently added USB devices? >> >> I was looking into this as it looks suspicious to me. From reading the >> description of this ext_feature flag it seems this is an extention of CQM: >> >> """ >> * @NL80211_EXT_FEATURE_CQM_RSSI_LIST: With this driver the >> * %NL80211_ATTR_CQM_RSSI_THOLD attribute accepts a list of zero or more >> * RSSI threshold values to monitor rather than exactly one threshold. >> """ >> >> Also looking at mt76x2_bss_info_changed() it does not handle >> BSS_CHANGED_CQM so I doubt it has support for it (yet). The driver does >> not use IEEE80211_VIF_SUPPORTS_CQM_RSSI which is a requirement for it. >> >> Regards, >> Arend >> > > According to my understanding (please correct me if I am wrong) > BSS_CHANGED_CQM is only needed if CQM_RSSI is handled > by the driver/fw, while if it is not set mac80211 will take care of that > in ieee80211_handle_beacon_sig routine. Yeah. That explains it. Seems like mac80211 could actually set the NL80211_EXT_FEATURE_CQM_RSSI_LIST flag is the driver does not set IEEE80211_VIF_SUPPORTS_CQM_RSSI. That way all mac80211 drivers support the list. Just a problem as the ext_feature is not a per-vif flag. Regards, Arend From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arend van Spriel Subject: Re: [PATCH] mt76: Enable NL80211_EXT_FEATURE_CQM_RSSI_LIST Date: Mon, 13 Aug 2018 14:39:43 +0200 Message-ID: <5B717C0F.5060302@broadcom.com> References: <20180812145207.11395-1-kristian.evensen@gmail.com> <871sb3zc3v.fsf@kamboji.qca.qualcomm.com> <5B708025.4090906@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Kalle Valo , kristian.evensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-wireless , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Lorenzo Bianconi Return-path: In-Reply-To: Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 8/13/2018 12:55 PM, Lorenzo Bianconi wrote: >> On 8/12/2018 8:14 PM, Kalle Valo wrote: >>> Kristian Evensen writes: >>> >>>> Enable the use of CQM with mt76-devices. >>>> >>>> Signed-off-by: Kristian Evensen >>>> --- >>>> drivers/net/wireless/mediatek/mt76/mac80211.c | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c >>>> index 029d54bc..3eb328ff 100644 >>>> --- a/drivers/net/wireless/mediatek/mt76/mac80211.c >>>> +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c >>>> @@ -305,6 +305,8 @@ int mt76_register_device(struct mt76_dev *dev, bool vht, >>>> >>>> wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR; >>>> >>>> + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); >>> >>> So have you tested this and with what devices? For example, does it work >>> with recently added USB devices? >> >> I was looking into this as it looks suspicious to me. From reading the >> description of this ext_feature flag it seems this is an extention of CQM: >> >> """ >> * @NL80211_EXT_FEATURE_CQM_RSSI_LIST: With this driver the >> * %NL80211_ATTR_CQM_RSSI_THOLD attribute accepts a list of zero or more >> * RSSI threshold values to monitor rather than exactly one threshold. >> """ >> >> Also looking at mt76x2_bss_info_changed() it does not handle >> BSS_CHANGED_CQM so I doubt it has support for it (yet). The driver does >> not use IEEE80211_VIF_SUPPORTS_CQM_RSSI which is a requirement for it. >> >> Regards, >> Arend >> > > According to my understanding (please correct me if I am wrong) > BSS_CHANGED_CQM is only needed if CQM_RSSI is handled > by the driver/fw, while if it is not set mac80211 will take care of that > in ieee80211_handle_beacon_sig routine. Yeah. That explains it. Seems like mac80211 could actually set the NL80211_EXT_FEATURE_CQM_RSSI_LIST flag is the driver does not set IEEE80211_VIF_SUPPORTS_CQM_RSSI. That way all mac80211 drivers support the list. Just a problem as the ext_feature is not a per-vif flag. Regards, Arend