Return-path: Received: from mail-pg0-f50.google.com ([74.125.83.50]:35056 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752075AbcKULTV (ORCPT ); Mon, 21 Nov 2016 06:19:21 -0500 Received: by mail-pg0-f50.google.com with SMTP id p66so129688510pga.2 for ; Mon, 21 Nov 2016 03:19:21 -0800 (PST) To: Johannes Berg , "Coelho, Luciano" Cc: linux-wireless From: Arend Van Spriel Subject: scheduled scan interval Message-ID: (sfid-20161121_121925_232061_A6D5C8A4) Date: Mon, 21 Nov 2016 12:19:16 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi Johannes, Luca, The gscan work made me look at scheduled scan and the implementation of it in brcmfmac. The driver ignored the interval parameter from user-space. Now I am fixing that. One thing is that our firmware has a minimum interval which can not be indicated in struct wiphy. The other issue is how the maximum interval is used in the nl80211.c. In nl80211_parse_sched_scan_plans() it is used against value passed in NL80211_ATTR_SCHED_SCAN_INTERVAL and NL80211_SCHED_SCAN_PLAN_INTERVAL. For the first one it caps the value to the maximum, but for the second one it returns -EINVAL. I suspect this is done because maximum interval was introduced with schedule scan plans, but it feels inconsistent. Thoughts? Regards, Arend