drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c- Extension
.c- Size
- 12418 bytes
- Lines
- 441
- 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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/cfg80211.hlinux/etherdevice.hmvm.hconstants.h
Detected Declarations
struct iwl_mvm_pasn_stastruct iwl_mvm_pasn_hltk_datafunction iwl_mvm_ftm_responder_set_bw_v1function iwl_mvm_ftm_responder_set_bw_v2function iwl_mvm_ftm_responder_set_ndpfunction iwl_mvm_ftm_responder_cmdfunction iwl_mvm_ftm_responder_dyn_cfg_v2function iwl_mvm_ftm_responder_dyn_cfg_v3function iwl_mvm_ftm_responder_dyn_cfg_cmdfunction iwl_mvm_resp_del_pasn_stafunction iwl_mvm_ftm_start_responderfunction iwl_mvm_ftm_responder_clearfunction iwl_mvm_ftm_restart_responderfunction iwl_mvm_ftm_responder_stats
Annotated Snippet
struct iwl_mvm_pasn_sta {
struct list_head list;
struct iwl_mvm_int_sta int_sta;
u8 addr[ETH_ALEN];
/* must be last as it followed by buffer holding the key */
struct ieee80211_key_conf keyconf;
};
struct iwl_mvm_pasn_hltk_data {
u8 *addr;
u8 cipher;
u8 *hltk;
};
static int iwl_mvm_ftm_responder_set_bw_v1(struct cfg80211_chan_def *chandef,
u8 *bw, u8 *ctrl_ch_position)
{
switch (chandef->width) {
case NL80211_CHAN_WIDTH_20_NOHT:
*bw = IWL_TOF_BW_20_LEGACY;
break;
case NL80211_CHAN_WIDTH_20:
*bw = IWL_TOF_BW_20_HT;
break;
case NL80211_CHAN_WIDTH_40:
*bw = IWL_TOF_BW_40;
*ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef);
break;
case NL80211_CHAN_WIDTH_80:
*bw = IWL_TOF_BW_80;
*ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef);
break;
default:
return -EOPNOTSUPP;
}
return 0;
}
static int iwl_mvm_ftm_responder_set_bw_v2(struct cfg80211_chan_def *chandef,
u8 *format_bw, u8 *ctrl_ch_position,
u8 cmd_ver)
{
switch (chandef->width) {
case NL80211_CHAN_WIDTH_20_NOHT:
*format_bw = u8_encode_bits(IWL_LOCATION_FRAME_FORMAT_LEGACY,
IWL_LOCATION_FMT_BW_FORMAT);
*format_bw |= u8_encode_bits(IWL_LOCATION_BW_20MHZ,
IWL_LOCATION_FMT_BW_BANDWIDTH);
break;
case NL80211_CHAN_WIDTH_20:
*format_bw = u8_encode_bits(IWL_LOCATION_FRAME_FORMAT_HT,
IWL_LOCATION_FMT_BW_FORMAT);
*format_bw |= u8_encode_bits(IWL_LOCATION_BW_20MHZ,
IWL_LOCATION_FMT_BW_BANDWIDTH);
break;
case NL80211_CHAN_WIDTH_40:
*format_bw = u8_encode_bits(IWL_LOCATION_FRAME_FORMAT_HT,
IWL_LOCATION_FMT_BW_FORMAT);
*format_bw |= u8_encode_bits(IWL_LOCATION_BW_40MHZ,
IWL_LOCATION_FMT_BW_BANDWIDTH);
*ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef);
break;
case NL80211_CHAN_WIDTH_80:
*format_bw = u8_encode_bits(IWL_LOCATION_FRAME_FORMAT_VHT,
IWL_LOCATION_FMT_BW_FORMAT);
*format_bw |= u8_encode_bits(IWL_LOCATION_BW_80MHZ,
IWL_LOCATION_FMT_BW_BANDWIDTH);
*ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef);
break;
case NL80211_CHAN_WIDTH_160:
if (cmd_ver >= 9) {
*format_bw = u8_encode_bits(IWL_LOCATION_FRAME_FORMAT_HE,
IWL_LOCATION_FMT_BW_FORMAT);
*format_bw |= u8_encode_bits(IWL_LOCATION_BW_160MHZ,
IWL_LOCATION_FMT_BW_BANDWIDTH);
*ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef);
break;
}
fallthrough;
default:
return -EOPNOTSUPP;
}
return 0;
}
static void
iwl_mvm_ftm_responder_set_ndp(struct iwl_mvm *mvm,
Annotation
- Immediate include surface: `net/cfg80211.h`, `linux/etherdevice.h`, `mvm.h`, `constants.h`.
- Detected declarations: `struct iwl_mvm_pasn_sta`, `struct iwl_mvm_pasn_hltk_data`, `function iwl_mvm_ftm_responder_set_bw_v1`, `function iwl_mvm_ftm_responder_set_bw_v2`, `function iwl_mvm_ftm_responder_set_ndp`, `function iwl_mvm_ftm_responder_cmd`, `function iwl_mvm_ftm_responder_dyn_cfg_v2`, `function iwl_mvm_ftm_responder_dyn_cfg_v3`, `function iwl_mvm_ftm_responder_dyn_cfg_cmd`, `function iwl_mvm_resp_del_pasn_sta`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.