drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c- Extension
.c- Size
- 21025 bytes
- Lines
- 744
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../wifi.h../pci.h../base.h../stats.hreg.hdef.hphy.htrx.hled.hdm.hfw.h
Detected Declarations
function _rtl8723be_map_hwqueue_to_fwqueuefunction _rtl8723be_query_rxphystatusfunction _rtl8723be_translate_rx_signal_stufffunction _rtl8723be_insert_emcontentfunction rtl8723be_rx_query_descfunction rtl8723be_tx_fill_descfunction is_broadcast_ether_addrfunction rtl8723be_tx_fill_cmddescfunction rtl8723be_set_descfunction rtl8723be_get_descfunction rtl8723be_is_tx_desc_closedfunction rtl8723be_tx_polling
Annotated Snippet
switch (lan_idx) {
/* 46 53 73 95 201301231630 */
/* 46 53 77 99 201301241630 */
case 6:
rx_pwr_all = -34 - (2 * vga_idx);
break;
case 4:
rx_pwr_all = -14 - (2 * vga_idx);
break;
case 1:
rx_pwr_all = 6 - (2 * vga_idx);
break;
case 0:
rx_pwr_all = 16 - (2 * vga_idx);
break;
default:
break;
}
pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all);
if (pwdb_all > 100)
pwdb_all = 100;
pstatus->rx_pwdb_all = pwdb_all;
pstatus->bt_rx_rssi_percentage = pwdb_all;
pstatus->recvsignalpower = rx_pwr_all;
/* (3) Get Signal Quality (EVM) */
if (bpacket_match_bssid) {
u8 sq, sq_rpt;
if (pstatus->rx_pwdb_all > 40) {
sq = 100;
} else {
sq_rpt = p_phystrpt->cck_sig_qual_ofdm_pwdb_all;
if (sq_rpt > 64)
sq = 0;
else if (sq_rpt < 20)
sq = 100;
else
sq = ((64 - sq_rpt) * 100) / 44;
}
pstatus->signalquality = sq;
pstatus->rx_mimo_signalquality[0] = sq;
pstatus->rx_mimo_signalquality[1] = -1;
}
} else {
/* (1)Get RSSI for HT rate */
for (i = RF90_PATH_A; i < RF6052_MAX_PATH; i++) {
/* we will judge RF RX path now. */
if (rtlpriv->dm.rfpath_rxenable[i])
rf_rx_num++;
rx_pwr[i] = ((p_phystrpt->path_agc[i].gain & 0x3f) * 2)
- 110;
pstatus->rx_pwr[i] = rx_pwr[i];
/* Translate DBM to percentage. */
rssi = rtl_query_rxpwrpercentage(rx_pwr[i]);
total_rssi += rssi;
pstatus->rx_mimo_signalstrength[i] = (u8)rssi;
}
/* (2)PWDB, Average PWDB calculated by
* hardware (for rate adaptive)
*/
rx_pwr_all = ((p_phystrpt->cck_sig_qual_ofdm_pwdb_all >> 1) &
0x7f) - 110;
pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all);
pwdb_all_bt = pwdb_all;
pstatus->rx_pwdb_all = pwdb_all;
pstatus->bt_rx_rssi_percentage = pwdb_all_bt;
pstatus->rxpower = rx_pwr_all;
pstatus->recvsignalpower = rx_pwr_all;
/* (3)EVM of HT rate */
if (pstatus->rate >= DESC92C_RATEMCS8 &&
pstatus->rate <= DESC92C_RATEMCS15)
max_spatial_stream = 2;
else
max_spatial_stream = 1;
for (i = 0; i < max_spatial_stream; i++) {
evm = rtl_evm_db_to_percentage(
p_phystrpt->stream_rxevm[i]);
if (bpacket_match_bssid) {
/* Fill value in RFD, Get the first
* spatial stream only
Annotation
- Immediate include surface: `../wifi.h`, `../pci.h`, `../base.h`, `../stats.h`, `reg.h`, `def.h`, `phy.h`, `trx.h`.
- Detected declarations: `function _rtl8723be_map_hwqueue_to_fwqueue`, `function _rtl8723be_query_rxphystatus`, `function _rtl8723be_translate_rx_signal_stuff`, `function _rtl8723be_insert_emcontent`, `function rtl8723be_rx_query_desc`, `function rtl8723be_tx_fill_desc`, `function is_broadcast_ether_addr`, `function rtl8723be_tx_fill_cmddesc`, `function rtl8723be_set_desc`, `function rtl8723be_get_desc`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.