* [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
@ 2017-01-19 10:01 Arend van Spriel
2017-01-19 12:00 ` Luca Coelho
0 siblings, 1 reply; 8+ messages in thread
From: Arend van Spriel @ 2017-01-19 10:01 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Arend van Spriel, Luciano Coelho
For wowlan netdetect a separate limit is defined for the number of
matchsets. Currently, this limit is ignored and the regular limit
for scheduled scan matchsets, ie. struct wiphy::max_match_sets, is
used for the net-detect case as well.
Cc: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
net/wireless/nl80211.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b4e7bdd..df0675d 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6852,7 +6852,7 @@ static int nl80211_abort_scan(struct sk_buff *skb, struct genl_info *info)
static struct cfg80211_sched_scan_request *
nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct nlattr **attrs)
+ struct nlattr **attrs, int max_match_sets)
{
struct cfg80211_sched_scan_request *request;
struct nlattr *attr;
@@ -6917,7 +6917,7 @@ static int nl80211_abort_scan(struct sk_buff *skb, struct genl_info *info)
if (!n_match_sets && default_match_rssi != NL80211_SCAN_RSSI_THOLD_OFF)
n_match_sets = 1;
- if (n_match_sets > wiphy->max_match_sets)
+ if (n_match_sets > max_match_sets)
return ERR_PTR(-EINVAL);
if (attrs[NL80211_ATTR_IE])
@@ -7217,7 +7217,8 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
return -EINPROGRESS;
sched_scan_req = nl80211_parse_sched_scan(&rdev->wiphy, wdev,
- info->attrs);
+ info->attrs,
+ rdev->wiphy.max_match_sets);
err = PTR_ERR_OR_ZERO(sched_scan_req);
if (err)
@@ -10030,7 +10031,8 @@ static int nl80211_parse_wowlan_nd(struct cfg80211_registered_device *rdev,
if (err)
goto out;
- trig->nd_config = nl80211_parse_sched_scan(&rdev->wiphy, NULL, tb);
+ trig->nd_config = nl80211_parse_sched_scan(&rdev->wiphy, NULL, tb,
+ wowlan->max_nd_match_sets);
err = PTR_ERR_OR_ZERO(trig->nd_config);
if (err)
trig->nd_config = NULL;
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
2017-01-19 10:01 [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect Arend van Spriel
@ 2017-01-19 12:00 ` Luca Coelho
2017-01-19 13:08 ` Arend Van Spriel
0 siblings, 1 reply; 8+ messages in thread
From: Luca Coelho @ 2017-01-19 12:00 UTC (permalink / raw)
To: Arend van Spriel, Johannes Berg; +Cc: linux-wireless
On Thu, 2017-01-19 at 10:01 +0000, Arend van Spriel wrote:
> For wowlan netdetect a separate limit is defined for the number of
> matchsets. Currently, this limit is ignored and the regular limit
> for scheduled scan matchsets, ie. struct wiphy::max_match_sets, is
> used for the net-detect case as well.
>
> Cc: Luciano Coelho <luciano.coelho@intel.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> ---
What?! You don't have the same number of matchsets for both? :P
Looks good.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
--
Luca.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
2017-01-19 12:00 ` Luca Coelho
@ 2017-01-19 13:08 ` Arend Van Spriel
2017-01-24 8:57 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: Arend Van Spriel @ 2017-01-19 13:08 UTC (permalink / raw)
To: Luca Coelho, Johannes Berg; +Cc: linux-wireless
On 19-1-2017 13:00, Luca Coelho wrote:
> On Thu, 2017-01-19 at 10:01 +0000, Arend van Spriel wrote:
>> For wowlan netdetect a separate limit is defined for the number of
>> matchsets. Currently, this limit is ignored and the regular limit
>> for scheduled scan matchsets, ie. struct wiphy::max_match_sets, is
>> used for the net-detect case as well.
>>
>> Cc: Luciano Coelho <luciano.coelho@intel.com>
>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>> ---
>
> What?! You don't have the same number of matchsets for both? :P
Actually I have, but your comment mentioned they do not have to be the
same. brcmfmac actually did not set max_nd_match_sets so I was surprised
it worked. That said this patch will result in regression in brcmfmac
:-p Not sure about other drivers supporting net-detect.
Regards,
Arend
> Looks good.
>
> Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
>
> --
> Luca.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
2017-01-19 13:08 ` Arend Van Spriel
@ 2017-01-24 8:57 ` Johannes Berg
2017-01-24 11:28 ` Arend Van Spriel
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2017-01-24 8:57 UTC (permalink / raw)
To: Arend Van Spriel, Luca Coelho; +Cc: linux-wireless
On Thu, 2017-01-19 at 14:08 +0100, Arend Van Spriel wrote:
>
> On 19-1-2017 13:00, Luca Coelho wrote:
> > On Thu, 2017-01-19 at 10:01 +0000, Arend van Spriel wrote:
> > > For wowlan netdetect a separate limit is defined for the number
> > > of
> > > matchsets. Currently, this limit is ignored and the regular limit
> > > for scheduled scan matchsets, ie. struct wiphy::max_match_sets,
> > > is
> > > used for the net-detect case as well.
> > >
> > > Cc: Luciano Coelho <luciano.coelho@intel.com>
> > > Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> > > ---
> >
> > What?! You don't have the same number of matchsets for both? :P
>
> Actually I have, but your comment mentioned they do not have to be
> the
> same. brcmfmac actually did not set max_nd_match_sets so I was
> surprised
> it worked. That said this patch will result in regression in brcmfmac
> :-p Not sure about other drivers supporting net-detect.
So do you want to submit a patch to brcmfmac first, and then I'll apply
this later? I can apply it and break it, but now that we already know
...?
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
2017-01-24 8:57 ` Johannes Berg
@ 2017-01-24 11:28 ` Arend Van Spriel
2017-01-27 11:25 ` Arend Van Spriel
0 siblings, 1 reply; 8+ messages in thread
From: Arend Van Spriel @ 2017-01-24 11:28 UTC (permalink / raw)
To: Johannes Berg, Luca Coelho; +Cc: linux-wireless
On 24-1-2017 9:57, Johannes Berg wrote:
> On Thu, 2017-01-19 at 14:08 +0100, Arend Van Spriel wrote:
>>
>> On 19-1-2017 13:00, Luca Coelho wrote:
>>> On Thu, 2017-01-19 at 10:01 +0000, Arend van Spriel wrote:
>>>> For wowlan netdetect a separate limit is defined for the number
>>>> of
>>>> matchsets. Currently, this limit is ignored and the regular limit
>>>> for scheduled scan matchsets, ie. struct wiphy::max_match_sets,
>>>> is
>>>> used for the net-detect case as well.
>>>>
>>>> Cc: Luciano Coelho <luciano.coelho@intel.com>
>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>> ---
>>>
>>> What?! You don't have the same number of matchsets for both? :P
>>
>> Actually I have, but your comment mentioned they do not have to be
>> the
>> same. brcmfmac actually did not set max_nd_match_sets so I was
>> surprised
>> it worked. That said this patch will result in regression in brcmfmac
>> :-p Not sure about other drivers supporting net-detect.
>
> So do you want to submit a patch to brcmfmac first, and then I'll apply
> this later? I can apply it and break it, but now that we already know
> ...?
I have a brcmfmac patch in the queue. I will look at the other scheduled
scan supporting drivers.
Regards,
Arend
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
2017-01-24 11:28 ` Arend Van Spriel
@ 2017-01-27 11:25 ` Arend Van Spriel
2017-01-27 11:27 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: Arend Van Spriel @ 2017-01-27 11:25 UTC (permalink / raw)
To: Johannes Berg, Luca Coelho; +Cc: linux-wireless
On 24-1-2017 12:28, Arend Van Spriel wrote:
> On 24-1-2017 9:57, Johannes Berg wrote:
>> On Thu, 2017-01-19 at 14:08 +0100, Arend Van Spriel wrote:
>>>
>>> On 19-1-2017 13:00, Luca Coelho wrote:
>>>> On Thu, 2017-01-19 at 10:01 +0000, Arend van Spriel wrote:
>>>>> For wowlan netdetect a separate limit is defined for the number
>>>>> of
>>>>> matchsets. Currently, this limit is ignored and the regular limit
>>>>> for scheduled scan matchsets, ie. struct wiphy::max_match_sets,
>>>>> is
>>>>> used for the net-detect case as well.
>>>>>
>>>>> Cc: Luciano Coelho <luciano.coelho@intel.com>
>>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>> ---
>>>>
>>>> What?! You don't have the same number of matchsets for both? :P
>>>
>>> Actually I have, but your comment mentioned they do not have to be
>>> the
>>> same. brcmfmac actually did not set max_nd_match_sets so I was
>>> surprised
>>> it worked. That said this patch will result in regression in brcmfmac
>>> :-p Not sure about other drivers supporting net-detect.
>>
>> So do you want to submit a patch to brcmfmac first, and then I'll apply
>> this later? I can apply it and break it, but now that we already know
>> ...?
>
> I have a brcmfmac patch in the queue. I will look at the other scheduled
> scan supporting drivers.
Hi Johannes,
I actually have two dependent brcmfmac patches. Do you expect conflict
if Kalle takes all?
Regards,
Arend
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
2017-01-27 11:25 ` Arend Van Spriel
@ 2017-01-27 11:27 ` Johannes Berg
2017-01-27 11:29 ` Arend Van Spriel
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2017-01-27 11:27 UTC (permalink / raw)
To: Arend Van Spriel, Luca Coelho; +Cc: linux-wireless
> I actually have two dependent brcmfmac patches. Do you expect
> conflict if Kalle takes all?
Not really, if that's somehow easier we can do that.
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect
2017-01-27 11:27 ` Johannes Berg
@ 2017-01-27 11:29 ` Arend Van Spriel
0 siblings, 0 replies; 8+ messages in thread
From: Arend Van Spriel @ 2017-01-27 11:29 UTC (permalink / raw)
To: Johannes Berg, Luca Coelho; +Cc: linux-wireless
On 27-1-2017 12:27, Johannes Berg wrote:
>
>> I actually have two dependent brcmfmac patches. Do you expect
>> conflict if Kalle takes all?
>
> Not really, if that's somehow easier we can do that.
Will do. I checked the other drivers. All those supporting wowl
netdetect did provide max_nd_matchsets except for brcmfmac.
Regards,
Arend
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-01-27 11:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19 10:01 [PATCH] nl80211: fix validation of scheduled scan info for wowlan netdetect Arend van Spriel
2017-01-19 12:00 ` Luca Coelho
2017-01-19 13:08 ` Arend Van Spriel
2017-01-24 8:57 ` Johannes Berg
2017-01-24 11:28 ` Arend Van Spriel
2017-01-27 11:25 ` Arend Van Spriel
2017-01-27 11:27 ` Johannes Berg
2017-01-27 11:29 ` Arend Van Spriel
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.