drivers/net/wireless/intel/iwlwifi/mld/scan.c

Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/scan.c

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/intel/iwlwifi/mld/scan.c
Extension
.c
Size
65811 bytes
Lines
2323
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct iwl_mld_scan_timing_params {
	u32 suspend_time;
	u32 max_out_time;
};

static const struct iwl_mld_scan_timing_params scan_timing[] = {
	[IWL_SCAN_TYPE_UNASSOC] = {
		.suspend_time = 0,
		.max_out_time = 0,
	},
	[IWL_SCAN_TYPE_WILD] = {
		.suspend_time = 30,
		.max_out_time = 120,
	},
	[IWL_SCAN_TYPE_MILD] = {
		.suspend_time = 120,
		.max_out_time = 120,
	},
	[IWL_SCAN_TYPE_FRAGMENTED] = {
		.suspend_time = 95,
		.max_out_time = 44,
	},
	[IWL_SCAN_TYPE_FAST_BALANCE] = {
		.suspend_time = 30,
		.max_out_time = 37,
	},
};

struct iwl_mld_scan_params {
	enum iwl_mld_scan_type type;
	u32 n_channels;
	u16 delay;
	int n_ssids;
	struct cfg80211_ssid *ssids;
	struct ieee80211_channel **channels;
	u32 flags;
	u8 *mac_addr;
	u8 *mac_addr_mask;
	bool no_cck;
	bool pass_all;
	int n_match_sets;
	struct iwl_scan_probe_req preq;
	struct cfg80211_match_set *match_sets;
	int n_scan_plans;
	struct cfg80211_sched_scan_plan *scan_plans;
	bool iter_notif;
	bool respect_p2p_go;
	u8 fw_link_id;
	struct cfg80211_scan_6ghz_params *scan_6ghz_params;
	u32 n_6ghz_params;
	bool scan_6ghz;
	bool enable_6ghz_passive;
	u8 bssid[ETH_ALEN] __aligned(2);
};

struct iwl_scan_req_params_ptrs {
	struct iwl_scan_general_params_v11 *general_params;
	struct iwl_scan_channel_params_v8 *channel_params;
	struct iwl_scan_periodic_parms_v1 *periodic_params;
	struct iwl_scan_probe_params_v4 *probe_params;
};

struct iwl_mld_scan_respect_p2p_go_iter_data {
	struct ieee80211_vif *current_vif;
	bool p2p_go;
};

static void iwl_mld_scan_respect_p2p_go_iter(void *_data, u8 *mac,
					     struct ieee80211_vif *vif)
{
	struct iwl_mld_scan_respect_p2p_go_iter_data *data = _data;

	/* exclude the given vif */
	if (vif == data->current_vif)
		return;

	/* TODO: CDB check the band of the GO */
	if (ieee80211_vif_type_p2p(vif) == NL80211_IFTYPE_P2P_GO &&
	    iwl_mld_vif_from_mac80211(vif)->ap_ibss_active)
		data->p2p_go = true;
}

static bool iwl_mld_get_respect_p2p_go(struct iwl_mld *mld,
				       struct ieee80211_vif *vif,
				       bool low_latency)
{
	struct iwl_mld_scan_respect_p2p_go_iter_data data = {
		.current_vif = vif,
		.p2p_go = false,
	};

Annotation

Implementation Notes