drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c- Extension
.c- Size
- 14164 bytes
- Lines
- 579
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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
drv_types.hrtl8723b_hal.h
Detected Declarations
function Copyrightfunction rtl8723_dequeue_writeportfunction rtl8723bs_xmit_buf_handlerfunction xmit_xmitframesfunction list_for_each_safefunction rtl8723bs_xmit_handlerfunction rtl8723bs_xmit_threadfunction rtl8723bs_mgnt_xmitfunction xmitframefunction rtl8723bs_hal_xmitframe_enqueuefunction rtl8723bs_init_xmit_privfunction rtl8723bs_free_xmit_priv
Annotated Snippet
if ((++n % 60) == 0) {
msleep(1);
/* yield(); */
}
}
pHalData->SdioTxOQTFreeSpace -= agg_num;
return true;
}
static s32 rtl8723_dequeue_writeport(struct adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
struct xmit_buf *pxmitbuf;
struct adapter *pri_padapter = padapter;
s32 ret = 0;
u8 PageIdx = 0;
u32 deviceId;
u8 bUpdatePageNum = false;
ret = ret || check_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
if (ret)
pxmitbuf = dequeue_pending_xmitbuf_under_survey(pxmitpriv);
else
pxmitbuf = dequeue_pending_xmitbuf(pxmitpriv);
if (!pxmitbuf)
return true;
deviceId = ffaddr2deviceId(pdvobjpriv, pxmitbuf->ff_hwaddr);
/* translate fifo addr to queue index */
switch (deviceId) {
case WLAN_TX_HIQ_DEVICE_ID:
PageIdx = HI_QUEUE_IDX;
break;
case WLAN_TX_MIQ_DEVICE_ID:
PageIdx = MID_QUEUE_IDX;
break;
case WLAN_TX_LOQ_DEVICE_ID:
PageIdx = LOW_QUEUE_IDX;
break;
}
query_free_page:
/* check if hardware tx fifo page is enough */
if (!rtw_hal_sdio_query_tx_freepage(pri_padapter, PageIdx, pxmitbuf->pg_num)) {
if (!bUpdatePageNum) {
/* Total page count is not available, so update current FIFO status */
HalQueryTxBufferStatus8723BSdio(padapter);
bUpdatePageNum = true;
goto query_free_page;
} else {
bUpdatePageNum = false;
enqueue_pending_xmitbuf_to_head(pxmitpriv, pxmitbuf);
return true;
}
}
if (
(padapter->bSurpriseRemoved) ||
(padapter->bDriverStopped)
)
goto free_xmitbuf;
if (rtw_sdio_wait_enough_TxOQT_space(padapter, pxmitbuf->agg_num) == false)
goto free_xmitbuf;
traffic_check_for_leave_lps(padapter, true, pxmitbuf->agg_num);
rtw_write_port(padapter, deviceId, pxmitbuf->len, (u8 *)pxmitbuf);
rtw_hal_sdio_update_tx_freepage(pri_padapter, PageIdx, pxmitbuf->pg_num);
free_xmitbuf:
/* rtw_free_xmitframe(pxmitpriv, pframe); */
/* pxmitbuf->priv_data = NULL; */
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
return _FAIL;
}
/*
* Description
Annotation
- Immediate include surface: `drv_types.h`, `rtl8723b_hal.h`.
- Detected declarations: `function Copyright`, `function rtl8723_dequeue_writeport`, `function rtl8723bs_xmit_buf_handler`, `function xmit_xmitframes`, `function list_for_each_safe`, `function rtl8723bs_xmit_handler`, `function rtl8723bs_xmit_thread`, `function rtl8723bs_mgnt_xmit`, `function xmitframe`, `function rtl8723bs_hal_xmitframe_enqueue`.
- Atlas domain: Driver Families / drivers/staging.
- 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.