linux/drivers/net/wireless/intel/iwlwifi/dvm/scan.c

// SPDX-License-Identifier: GPL-2.0-only
/******************************************************************************
 *
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2018        Intel Corporation
 *****************************************************************************/
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/etherdevice.h>
#include <net/mac80211.h>

#include "dev.h"
#include "agn.h"

/* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after
 * sending probe req.  This should be set long enough to hear probe responses
 * from more than one AP.  */
#define IWL_ACTIVE_DWELL_TIME_24
#define IWL_ACTIVE_DWELL_TIME_52

#define IWL_ACTIVE_DWELL_FACTOR_24GHZ
#define IWL_ACTIVE_DWELL_FACTOR_52GHZ

/* For passive scan, listen PASSIVE_DWELL_TIME (msec) on each channel.
 * Must be set longer than active dwell time.
 * For the most reliable scan, set > AP beacon interval (typically 100msec). */
#define IWL_PASSIVE_DWELL_TIME_24
#define IWL_PASSIVE_DWELL_TIME_52
#define IWL_PASSIVE_DWELL_BASE
#define IWL_CHANNEL_TUNE_TIME
#define MAX_SCAN_CHANNEL

/* For reset radio, need minimal dwell time only */
#define IWL_RADIO_RESET_DWELL_TIME

static int iwl_send_scan_abort(struct iwl_priv *priv)
{}

static void iwl_complete_scan(struct iwl_priv *priv, bool aborted)
{}

static void iwl_process_scan_complete(struct iwl_priv *priv)
{}

void iwl_force_scan_end(struct iwl_priv *priv)
{}

static void iwl_do_scan_abort(struct iwl_priv *priv)
{}

/*
 * iwl_scan_cancel - Cancel any currently executing HW scan
 */
int iwl_scan_cancel(struct iwl_priv *priv)
{}

/*
 * iwl_scan_cancel_timeout - Cancel any currently executing HW scan
 * @ms: amount of time to wait (in milliseconds) for scan to abort
 */
void iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms)
{}

/* Service response to REPLY_SCAN_CMD (0x80) */
static void iwl_rx_reply_scan(struct iwl_priv *priv,
			      struct iwl_rx_cmd_buffer *rxb)
{}

/* Service SCAN_START_NOTIFICATION (0x82) */
static void iwl_rx_scan_start_notif(struct iwl_priv *priv,
				    struct iwl_rx_cmd_buffer *rxb)
{}

/* Service SCAN_RESULTS_NOTIFICATION (0x83) */
static void iwl_rx_scan_results_notif(struct iwl_priv *priv,
				      struct iwl_rx_cmd_buffer *rxb)
{}

/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */
static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
				       struct iwl_rx_cmd_buffer *rxb)
{}

void iwl_setup_rx_scan_handlers(struct iwl_priv *priv)
{}

static u16 iwl_get_active_dwell_time(struct iwl_priv *priv,
				     enum nl80211_band band, u8 n_probes)
{}

static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time)
{}

static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
				      enum nl80211_band band)
{}

/* Return valid, unused, channel for a passive scan to reset the RF */
static u8 iwl_get_single_channel_number(struct iwl_priv *priv,
					enum nl80211_band band)
{}

static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
					  struct ieee80211_vif *vif,
					  enum nl80211_band band,
					  struct iwl_scan_channel *scan_ch)
{}

static int iwl_get_channels_for_scan(struct iwl_priv *priv,
				     struct ieee80211_vif *vif,
				     enum nl80211_band band,
				     u8 is_active, u8 n_probes,
				     struct iwl_scan_channel *scan_ch)
{}

/*
 * iwl_fill_probe_req - fill in all required fields and IE for probe request
 */
static u16 iwl_fill_probe_req(struct ieee80211_mgmt *frame, const u8 *ta,
			      const u8 *ies, int ie_len, const u8 *ssid,
			      u8 ssid_len, int left)
{}

static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
{}

void iwl_init_scan_params(struct iwl_priv *priv)
{}

int __must_check iwl_scan_initiate(struct iwl_priv *priv,
				   struct ieee80211_vif *vif,
				   enum iwl_scan_type scan_type,
				   enum nl80211_band band)
{}


/*
 * internal short scan, this function should only been called while associated.
 * It will reset and tune the radio to prevent possible RF related problem
 */
void iwl_internal_short_hw_scan(struct iwl_priv *priv)
{}

static void iwl_bg_start_internal_scan(struct work_struct *work)
{}

static void iwl_bg_scan_check(struct work_struct *data)
{}

static void iwl_bg_abort_scan(struct work_struct *work)
{}

static void iwl_bg_scan_completed(struct work_struct *work)
{}

void iwl_setup_scan_deferred_work(struct iwl_priv *priv)
{}

void iwl_cancel_scan_deferred_work(struct iwl_priv *priv)
{}