Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan extend changes #12124

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9f89140
manifest: sdk-zephyr: Pull in Wi-Fi scan extension support
sachinthegreen Aug 10, 2023
4f08247
drivers: wifi: Update RPU patch to rev#4c28feaf389
srinivas1201 Jul 19, 2023
59ddb0f
drivers: wifi: Add support for scanning specific bands
sachinthegreen Jul 17, 2023
9b7e9c3
drivers: wifi: Add scan extension for active channel dwell times
sachinthegreen Jul 25, 2023
65dea42
drivers: wifi: Add scan extension for passive channel dwell times
sachinthegreen Jul 25, 2023
fd57a40
wifi: Move and rename the NRF700X_SCAN_LIMIT Kconfig parameter
sachinthegreen Jul 24, 2023
b01da0a
drivers: wifi: Override the WIFI_MGMT_SCAN_SSID_FILT_MAX param
sachinthegreen Jul 24, 2023
2d41137
drivers: wifi: Add scan extension for filtering SSIDs
sachinthegreen Jul 25, 2023
839639b
drivers: wifi: Add scan extension for specifying channels
sachinthegreen Jul 27, 2023
5a679d3
doc: Update relevant docs with scan extensions information
sachinthegreen Aug 2, 2023
83d7d79
drivers: wifi: Add scan extension for forcing passive scan
sachinthegreen Aug 9, 2023
d799d4d
samples: cellular: modem_shell: Fix gettopt for Wi-Fi builds
sachinthegreen Aug 21, 2023
8c6440f
samples: wifi: scan: Add extending scan changes
D-Triveni Aug 9, 2023
6acd673
samples: wifi: scan: Add changes to do force passive scan
D-Triveni Aug 11, 2023
e5bc96d
samples: wifi: scan: Add 2.4GHZ scan changes
D-Triveni Aug 11, 2023
becd623
samples: wifi: scan: Add 5GHZ scan changes
D-Triveni Aug 11, 2023
485ed67
samples: wifi: scan: Add changes to scan based on ssid
D-Triveni Aug 11, 2023
3dbec22
samples: wifi: scan: Add changes to scan in specific channels
D-Triveni Aug 11, 2023
256dbbd
samples: wifi: scan: Add scan extension for active channel dwell time
D-Triveni Aug 11, 2023
e943d24
samples: wifi: scan: Add scan extension for passive channel dwell time
D-Triveni Aug 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Wi-Fi
This can be done by using the ``NET_IF_NO_AUTO_START`` flag.
* Support for sending TWT sleep/wake events to applications.
* The nRF5340 HFCLK192M clock divider is set to the default value ``Div4`` for lower power consumption when the QSPI peripheral is idle.
* Extensions to the scan command to provide better control over some scan parameters.

Applications
============
Expand Down
8 changes: 4 additions & 4 deletions drivers/wifi/nrf700x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ config NRF700X_RX_MAX_DATA_SIZE
int "Maximum size of RX data"
default 1600

config NRF700X_SCAN_LIMIT
int "Maximum number of scan results returned to application. Use negative values for unlimited scan results."
default -1

config NRF700X_TX_DONE_WQ_ENABLED
bool "Enable TX done workqueue (impacts performance negatively)"

Expand Down Expand Up @@ -341,4 +337,8 @@ config NET_TC_TX_COUNT

endif # NETWORKING

# Override the Wi-Fi subsytems WIFI_MGMT_SCAN_SSID_FILT_MAX parameter,
# since we support a maximum of 2 SSIDs for scan result filtering.
config WIFI_MGMT_SCAN_SSID_FILT_MAX
default 2
endif
84 changes: 24 additions & 60 deletions drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fw/host_rpu_umac_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ enum nrf_wifi_band {
NRF_WIFI_BAND_5GHZ,
/** Unused */
NRF_WIFI_BAND_60GHZ,
/** Invalid */
NRF_WIFI_BAND_INVALID
};

/**
Expand Down Expand Up @@ -645,68 +647,42 @@ struct nrf_wifi_channel {
signed char nrf_wifi_beacon_found;
} __NRF_WIFI_PKD;

#define NRF_WIFI_SCAN_PARAMS_2GHZ_BAND_VALID (1 << 0)
#define NRF_WIFI_SCAN_PARAMS_5GHZ_BAND_VALID (1 << 1)
#define NRF_WIFI_SCAN_PARAMS_60GHZ_BAND_VALID (1 << 2)
#define NRF_WIFI_SCAN_PARAMS_MAC_ADDR_VALID (1 << 3)
#define NRF_WIFI_SCAN_PARAMS_MAC_ADDR_MASK_VALID (1 << 4)
#define NRF_WIFI_SCAN_PARAMS_SCAN_FLAGS_VALID (1 << 5)
#define NRF_WIFI_SCAN_PARAMS_SUPPORTED_RATES_VALID (1 << 6)


#define NRF_WIFI_SCAN_MAX_NUM_SSIDS 2
#define NRF_WIFI_SCAN_MAX_NUM_FREQUENCIES 64
#define MAX_NUM_CHANNELS 42

#define NRF_WIFI_SCAN_FLAG_LOW_PRIORITY (1 << 0)
#define NRF_WIFI_SCAN_FLAG_FLUSH (1 << 1)
#define NRF_WIFI_SCAN_FLAG_AP (1 << 2)
#define NRF_WIFI_SCAN_FLAG_RANDOM_ADDR (1 << 3)
#define NRF_WIFI_SCAN_FLAG_FILS_MAX_CHANNEL_TIME (1 << 4)
#define NRF_WIFI_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP (1 << 5)
#define NRF_WIFI_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE (1 << 6)
#define NRF_WIFI_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION (1 << 7)
#define NRF_WIFI_SCAN_FLAG_LOW_SPAN (1 << 8)
#define NRF_WIFI_SCAN_FLAG_LOW_POWER (1 << 9)
#define NRF_WIFI_SCAN_FLAG_HIGH_ACCURACY (1 << 10)
#define NRF_WIFI_SCAN_FLAG_RANDOM_SN (1 << 11)
#define NRF_WIFI_SCAN_FLAG_MIN_PREQ_CONTENT (1 << 12)

#define NRF_WIFI_SCAN_BAND_2GHZ (1 << 0)
#define NRF_WIFI_SCAN_BAND_5GHZ (1 << 1)
#define NRF_WIFI_SCAN_BAND_6GHZ (1 << 2)

/**
* @brief This structure provides details about the parameters required for a scan request.
*
*/

struct nrf_wifi_scan_params {
/** Indicate which of the following parameters are valid */
unsigned int valid_fields;
/** Number of ssids valid in scan_ssids parameter */
/** If 0x1, RPU force passive scan on all channels */
unsigned short passive_scan;
/** Number of ssid's in scan_ssids parameter */
unsigned char num_scan_ssids;
/** Number of channels to be scanned */
unsigned char num_scan_channels;
/** Scan request control flags (u32). Bit values
* (NRF_WIFI_SCAN_FLAG_LOW_PRIORITY/NRF_WIFI_SCAN_FLAG_RANDOM_ADDR...)
*/
unsigned int scan_flags;
/** ssid info @ref nrf_wifi_ssid */
/** Specific SSID's to scan for */
struct nrf_wifi_ssid scan_ssids[NRF_WIFI_SCAN_MAX_NUM_SSIDS];
/** used to send probe requests at non CCK rate in 2GHz band */
unsigned char no_cck;
/** Bitmap of bands to be scanned. Value Zero will scan both 2.4 and 5 GHZ */
unsigned char bands;
/** Information element(s) data @ref nrf_wifi_ie*/
struct nrf_wifi_ie ie;
/** Supported rates @ref nrf_wifi_supp_rates */
struct nrf_wifi_supp_rates supp_rates;
/** MAC address */
unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN];
/** MAC address mask */
unsigned char mac_addr_mask[NRF_WIFI_ETH_ADDR_LEN];
/** used to send probe requests at non CCK rate in 2GHz band */
unsigned char no_cck;
/** Operating channel duration when STA is connected to AP */
unsigned short oper_ch_duration;
/** Max scan duration in TU */
unsigned short scan_duration[MAX_NUM_CHANNELS];
/** Max probe count in channels */
unsigned char probe_cnt[MAX_NUM_CHANNELS];
/** channels to be scanned @ref nrf_wifi_channel */
struct nrf_wifi_channel channels[0];
/** Max scan duration in active scan. If zero rpu programs 50msec */
unsigned short dwell_time_active;
/** Max scan duration in passive scan. If zero rpu programs 150msec */
unsigned short dwell_time_passive;
/** Number of channels to be scanned */
unsigned short num_scan_channels;
/** specific channels to be scanned */
unsigned int center_frequency[0];
} __NRF_WIFI_PKD;

#define NRF_WIFI_HT_CAPABILITY_VALID (1 << 0)
Expand Down Expand Up @@ -1116,16 +1092,7 @@ struct nrf_wifi_umac_key_info {
unsigned char key_idx;
} __NRF_WIFI_PKD;

/**
* @brief This enum represents the various types of scanning operations.
*
*/
enum scan_mode {
/** auto or legacy scan operation */
AUTO_SCAN = 0,
/** Mapped scan. Host will control channels */
CHANNEL_MAPPING_SCAN
};


/**
* @brief This enum describes the different types of scan.
Expand All @@ -1142,10 +1109,7 @@ enum scan_reason {
* @brief This structure contains details about scan request information.
*
*/

struct nrf_wifi_umac_scan_info {
/** scan mode @ref scan_mode */
signed int scan_mode;
/** scan type see &enum scan_reason */
signed int scan_reason;
/** scan parameters @ref nrf_wifi_scan_params */
Expand Down
Loading
Loading