linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RFC: Universal scan proposal
@ 2016-11-16 22:47 dimitrysh
  2016-11-17 20:56 ` Arend Van Spriel
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: dimitrysh @ 2016-11-16 22:47 UTC (permalink / raw)
  To: linux-wireless

 From 68a9d37a4c7e9dc7a90a6e922cdea52737a98d66 Mon Sep 17 00:00:00 2001
From: Dmitry Shmidt <dimitrysh@google.com>
Date: Wed, 16 Nov 2016 14:27:26 -0800
Subject: [PATCH] RFC: Universal scan proposal

   Currently we have sched scan with possibility of various
intervals. We would like to extend it to support also
different types of scan.
   In case of powerful wlan CPU, all this functionality
can be offloaded.
   In general case FW processes additional scan requests
and puts them into queue based on start time and interval.
Once current request is fulfilled, FW adds it (if interval != 0)
again to the queue with proper interval. If requests are
overlapping, new request can be combined with either one before,
or one after, assuming that requests are not mutually exclusive.
   Combining requests is done by combining scan channels, ssids,
bssids and types of scan result. Once combined request was fulfilled
it will be reinserted as two (or three) different requests based on
their type and interval.
   Each request has attribute:
Type: connectivity / location
Report: none / batch / immediate
   Request may have priority and can be inserted into
the head of the queue.
   Types of scans:
- Normal scan
- Scheduled scan
- Hotlist (BSSID scan)
- Roaming
- AutoJoin

Change-Id: I9f3e4c975784f1c1c5156887144d80fc5a26bffa
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
  include/net/cfg80211.h | 37 +++++++++++++++++++++++++++++++------
  1 file changed, 31 insertions(+), 6 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 14b51d7..1ae2570 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1602,8 +1602,10 @@ struct cfg80211_sched_scan_plan {
   *	cycle.  The driver may ignore this parameter and start
   *	immediately (or at any other time), if this feature is not
   *	supported.
+ * @uscan_type: uscan type (scan, sched_scan, hotlist, scan_history,  
roaming)
+ * @uscan_results: uscan results report (none/batch/immediate)
   */
-struct cfg80211_sched_scan_request {
+struct cfg80211_uscan_request {
  	struct cfg80211_ssid *ssids;
  	int n_ssids;
  	u32 n_channels;
@@ -1621,6 +1623,10 @@ struct cfg80211_sched_scan_request {
  	u8 mac_addr[ETH_ALEN] __aligned(2);
  	u8 mac_addr_mask[ETH_ALEN] __aligned(2);

+	/* universal scan fields */
+	u32 uscan_type;
+	u32 uscan_results;
+
  	/* internal */
  	struct wiphy *wiphy;
  	struct net_device *dev;
@@ -1633,6 +1639,21 @@ struct cfg80211_sched_scan_request {
  };

  /**
+ * struct cfg80211_uscan_capa - universal scan capabilities
+ *
+ * @uscan_type: uscan type (scan, sched_scan, hotlist, scan_history,  
roaming)
+ * @max_ssids: max amount of ssids in sched scan
+ * @max_hotlist: max amount of bssids in hotlist
+ * @max_history: max amount of records in history
+ */
+struct cfg80211_uscan_capa {
+	u32 uscan_type;
+	u32 max_ssids;
+	u32 max_hotlist;
+	u32 max_history;
+};
+
+/**
   * enum cfg80211_signal_type - signal type
   *
   * @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available
@@ -2898,10 +2919,13 @@ struct cfg80211_ops {
  	int	(*set_antenna)(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
  	int	(*get_antenna)(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);

-	int	(*sched_scan_start)(struct wiphy *wiphy,
+	int	(*uscan_get_capa)(struct wiphy *wiphy, struct net_device *dev,
+				struct cfg80211_uscan_capa *uscan_capa);
+	int	(*uscan_start)(struct wiphy *wiphy,
  				struct net_device *dev,
-				struct cfg80211_sched_scan_request *request);
-	int	(*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev);
+				struct cfg80211_uscan_request *request);
+	int	(*uscan_stop)(struct wiphy *wiphy, struct net_device *dev,
+				int uscan_id);

  	int	(*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev,
  				  struct cfg80211_gtk_rekey_data *data);
@@ -4305,11 +4329,12 @@ void cfg80211_scan_done(struct  
cfg80211_scan_request *request,
  			struct cfg80211_scan_info *info);

  /**
- * cfg80211_sched_scan_results - notify that new scan results are available
+ * cfg80211_uscan_results - notify that new uscan results are available
   *
   * @wiphy: the wiphy which got scheduled scan results
+ * @uscan_id: type of scan results
   */
-void cfg80211_sched_scan_results(struct wiphy *wiphy);
+void cfg80211_sched_scan_results(struct wiphy *wiphy, int uscan_id);

  /**
   * cfg80211_sched_scan_stopped - notify that the scheduled scan has stopped
-- 
2.8.0.rc3.226.g39d4020

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

end of thread, other threads:[~2017-01-11 13:14 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 22:47 [PATCH] RFC: Universal scan proposal dimitrysh
2016-11-17 20:56 ` Arend Van Spriel
2016-11-18 23:53   ` Dmitry Shmidt
2016-11-22  7:24 ` Luca Coelho
2016-11-22 17:29   ` Dmitry Shmidt
2016-11-22 20:41     ` Arend Van Spriel
2016-11-22 20:54       ` Dmitry Shmidt
2016-11-23  8:43         ` Arend Van Spriel
2016-11-28 19:25           ` Dmitry Shmidt
2016-12-05 14:28 ` Johannes Berg
2016-12-05 18:32   ` Dmitry Shmidt
2016-12-07  6:44     ` Johannes Berg
2016-12-07 18:39       ` Dmitry Shmidt
2016-12-07 20:51         ` Arend Van Spriel
2016-12-08 22:35           ` Dmitry Shmidt
2016-12-09 11:10             ` Arend Van Spriel
2016-12-13 16:06             ` Johannes Berg
2017-01-03 20:45               ` Dmitry Shmidt
2017-01-04 13:28                 ` Johannes Berg
2017-01-04 20:32                   ` Dmitry Shmidt
2017-01-05 11:46                     ` Johannes Berg
2017-01-05 13:39                       ` Arend Van Spriel
2017-01-05 13:44                         ` Johannes Berg
2017-01-05 19:59                           ` Arend Van Spriel
2017-01-09 10:48                             ` Johannes Berg
2017-01-09 12:07                               ` Arend Van Spriel
2017-01-11 13:14                                 ` Johannes Berg
2017-01-05 20:45                       ` Dmitry Shmidt
2017-01-09 10:45                         ` Johannes Berg
2017-01-09 11:19                           ` Arend Van Spriel
2016-12-13 16:04         ` Johannes Berg
2016-12-21 10:20           ` [RFC] nl80211: allow multiple active scheduled scan requests Arend van Spriel
2017-01-02 10:44             ` Johannes Berg
2017-01-03 12:25               ` Arend Van Spriel
2017-01-04  9:59                 ` Johannes Berg
2017-01-04 10:20                   ` Arend Van Spriel
2017-01-04 10:30                     ` Johannes Berg
2017-01-04 10:34                       ` Arend Van Spriel

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).