drivers/net/wireless/quantenna/qtnfmac/commands.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/quantenna/qtnfmac/commands.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/quantenna/qtnfmac/commands.c- Extension
.c- Size
- 73179 bytes
- Lines
- 2766
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/skbuff.hcfg80211.hcore.hqlink.hqlink_util.hbus.hcommands.h
Detected Declarations
function qtnf_cmd_check_reply_headerfunction qtnf_cmd_resp_result_decodefunction qtnf_cmd_send_with_replyfunction qtnf_cmd_sendfunction qtnf_cmd_tlv_ie_set_addfunction qtnf_cmd_start_ap_can_fitfunction qtnf_cmd_tlv_ie_ext_addfunction qtnf_cmd_send_start_apfunction qtnf_cmd_send_stop_apfunction qtnf_cmd_send_register_mgmtfunction qtnf_cmd_send_framefunction qtnf_cmd_send_mgmt_set_appiefunction qtnf_sta_info_parse_ratefunction qtnf_sta_info_parse_flagsfunction qtnf_cmd_sta_info_parsefunction qlink_for_each_tlvfunction qtnf_cmd_get_sta_infofunction qtnf_cmd_send_add_change_intffunction qtnf_cmd_send_add_intffunction qtnf_cmd_send_change_intf_typefunction qtnf_cmd_send_del_intffunction qtnf_cmd_resp_proc_hw_infofunction qlink_for_each_tlvfunction qtnf_parse_wowlan_infofunction qtnf_parse_variable_mac_infofunction qlink_for_each_tlvfunction qtnf_cmd_resp_proc_mac_infofunction qtnf_cmd_resp_band_fill_htcapfunction qtnf_cmd_resp_band_fill_vhtcapfunction qtnf_cmd_conv_iftypefunction qtnf_cmd_band_fill_iftypefunction qtnf_cmd_resp_fill_band_infofunction qlink_for_each_tlvfunction qtnf_cmd_get_mac_infofunction qtnf_cmd_get_hw_infofunction qtnf_cmd_band_info_getfunction qtnf_cmd_send_update_phy_paramsfunction qtnf_cmd_send_init_fwfunction qtnf_cmd_send_deinit_fwfunction qtnf_cmd_send_add_keyfunction qtnf_cmd_send_del_keyfunction qtnf_cmd_send_set_default_keyfunction qtnf_cmd_send_set_default_mgmt_keyfunction qtnf_encode_sta_flagsfunction qtnf_cmd_send_change_stafunction qtnf_cmd_send_del_stafunction qtnf_cmd_channel_tlv_addfunction qtnf_cmd_randmac_tlv_add
Annotated Snippet
switch (le16_to_cpu(tlv->type)) {
case QTN_TLV_ID_BITMAP:
map_len = tlv_len;
map = tlv->val;
break;
case QTN_TLV_ID_STA_STATS:
stats_len = tlv_len;
stats = (const struct qlink_sta_stats *)tlv->val;
break;
default:
break;
}
}
if (!qlink_tlv_parsing_ok(tlv, data, resp_size)) {
pr_err("Malformed TLV buffer\n");
return;
}
if (!map || !stats)
return;
if (qtnf_sta_stat_avail(inactive_time, QLINK_STA_INFO_INACTIVE_TIME)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_INACTIVE_TIME);
sinfo->inactive_time = le32_to_cpu(stats->inactive_time);
}
if (qtnf_sta_stat_avail(connected_time,
QLINK_STA_INFO_CONNECTED_TIME)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_CONNECTED_TIME);
sinfo->connected_time = le32_to_cpu(stats->connected_time);
}
if (qtnf_sta_stat_avail(signal, QLINK_STA_INFO_SIGNAL)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
sinfo->signal = stats->signal - QLINK_RSSI_OFFSET;
}
if (qtnf_sta_stat_avail(signal_avg, QLINK_STA_INFO_SIGNAL_AVG)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG);
sinfo->signal_avg = stats->signal_avg - QLINK_RSSI_OFFSET;
}
if (qtnf_sta_stat_avail(rxrate, QLINK_STA_INFO_RX_BITRATE)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BITRATE);
qtnf_sta_info_parse_rate(&sinfo->rxrate, &stats->rxrate);
}
if (qtnf_sta_stat_avail(txrate, QLINK_STA_INFO_TX_BITRATE)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
qtnf_sta_info_parse_rate(&sinfo->txrate, &stats->txrate);
}
if (qtnf_sta_stat_avail(sta_flags, QLINK_STA_INFO_STA_FLAGS)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_STA_FLAGS);
qtnf_sta_info_parse_flags(&sinfo->sta_flags, &stats->sta_flags);
}
if (qtnf_sta_stat_avail(rx_bytes, QLINK_STA_INFO_RX_BYTES)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BYTES);
sinfo->rx_bytes = le64_to_cpu(stats->rx_bytes);
}
if (qtnf_sta_stat_avail(tx_bytes, QLINK_STA_INFO_TX_BYTES)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES);
sinfo->tx_bytes = le64_to_cpu(stats->tx_bytes);
}
if (qtnf_sta_stat_avail(rx_bytes, QLINK_STA_INFO_RX_BYTES64)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BYTES64);
sinfo->rx_bytes = le64_to_cpu(stats->rx_bytes);
}
if (qtnf_sta_stat_avail(tx_bytes, QLINK_STA_INFO_TX_BYTES64)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64);
sinfo->tx_bytes = le64_to_cpu(stats->tx_bytes);
}
if (qtnf_sta_stat_avail(rx_packets, QLINK_STA_INFO_RX_PACKETS)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_PACKETS);
sinfo->rx_packets = le32_to_cpu(stats->rx_packets);
}
if (qtnf_sta_stat_avail(tx_packets, QLINK_STA_INFO_TX_PACKETS)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
sinfo->tx_packets = le32_to_cpu(stats->tx_packets);
}
if (qtnf_sta_stat_avail(rx_beacon, QLINK_STA_INFO_BEACON_RX)) {
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_BEACON_RX);
Annotation
- Immediate include surface: `linux/types.h`, `linux/skbuff.h`, `cfg80211.h`, `core.h`, `qlink.h`, `qlink_util.h`, `bus.h`, `commands.h`.
- Detected declarations: `function qtnf_cmd_check_reply_header`, `function qtnf_cmd_resp_result_decode`, `function qtnf_cmd_send_with_reply`, `function qtnf_cmd_send`, `function qtnf_cmd_tlv_ie_set_add`, `function qtnf_cmd_start_ap_can_fit`, `function qtnf_cmd_tlv_ie_ext_add`, `function qtnf_cmd_send_start_ap`, `function qtnf_cmd_send_stop_ap`, `function qtnf_cmd_send_register_mgmt`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.