drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c- Extension
.c- Size
- 20107 bytes
- Lines
- 645
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../wifi.h../usb.h../ps.h../base.hreg.hdef.hphy.hrf.hdm.hmac.htrx.h../rtl8192c/fw_common.h
Detected Declarations
function configvertoutepfunction configvernoutepfunction twooutepmappingfunction threeoutepmappingfunction oneoutepmappingfunction _out_ep_mappingfunction rtl8192cu_endpoint_mappingfunction rtl8192cu_mq_to_hwqfunction _rtl8192cu_mq_to_descqfunction rtl92cu_rx_query_descfunction _rtl_rx_processfunction rtl8192cu_rx_hdlfunction rtl8192c_tx_cleanupfunction _rtl_fill_usb_tx_descfunction _rtl_tx_desc_checksumfunction rtl92cu_tx_fill_descfunction rtl92cu_tx_fill_cmddesc
Annotated Snippet
if (!ischipn) {
err = -EINVAL;
goto err_out;
}
threeoutepmapping(hw, ischipn, ep_map);
break;
case 1:
oneoutepmapping(hw, ep_map);
break;
default:
err = -EINVAL;
break;
}
err_out:
return err;
}
/* endpoint mapping */
int rtl8192cu_endpoint_mapping(struct ieee80211_hw *hw)
{
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
int error = 0;
if (likely(IS_NORMAL_CHIP(rtlhal->version)))
error = configvernoutep(hw);
else
error = configvertoutep(hw);
if (error)
goto err_out;
error = _out_ep_mapping(hw);
if (error)
goto err_out;
err_out:
return error;
}
u16 rtl8192cu_mq_to_hwq(__le16 fc, u16 mac80211_queue_index)
{
u16 hw_queue_index;
if (unlikely(ieee80211_is_beacon(fc))) {
hw_queue_index = RTL_TXQ_BCN;
goto out;
}
if (ieee80211_is_mgmt(fc)) {
hw_queue_index = RTL_TXQ_MGT;
goto out;
}
switch (mac80211_queue_index) {
case 0:
hw_queue_index = RTL_TXQ_VO;
break;
case 1:
hw_queue_index = RTL_TXQ_VI;
break;
case 2:
hw_queue_index = RTL_TXQ_BE;
break;
case 3:
hw_queue_index = RTL_TXQ_BK;
break;
default:
hw_queue_index = RTL_TXQ_BE;
WARN_ONCE(true, "rtl8192cu: QSLT_BE queue, skb_queue:%d\n",
mac80211_queue_index);
break;
}
out:
return hw_queue_index;
}
static enum rtl_desc_qsel _rtl8192cu_mq_to_descq(struct ieee80211_hw *hw,
__le16 fc, u16 mac80211_queue_index)
{
enum rtl_desc_qsel qsel;
struct rtl_priv *rtlpriv = rtl_priv(hw);
if (unlikely(ieee80211_is_beacon(fc))) {
qsel = QSLT_BEACON;
goto out;
}
if (ieee80211_is_mgmt(fc)) {
qsel = QSLT_MGNT;
goto out;
}
switch (mac80211_queue_index) {
case 0: /* VO */
qsel = QSLT_VO;
rtl_dbg(rtlpriv, COMP_USB, DBG_DMESG,
Annotation
- Immediate include surface: `../wifi.h`, `../usb.h`, `../ps.h`, `../base.h`, `reg.h`, `def.h`, `phy.h`, `rf.h`.
- Detected declarations: `function configvertoutep`, `function configvernoutep`, `function twooutepmapping`, `function threeoutepmapping`, `function oneoutepmapping`, `function _out_ep_mapping`, `function rtl8192cu_endpoint_mapping`, `function rtl8192cu_mq_to_hwq`, `function _rtl8192cu_mq_to_descq`, `function rtl92cu_rx_query_desc`.
- 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.