drivers/net/wireless/realtek/rtlwifi/usb.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/usb.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/usb.h- Extension
.h- Size
- 3607 bytes
- Lines
- 143
- 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
linux/skbuff.h
Detected Declarations
struct rtl_ep_mapstruct _trx_infostruct rtl_usbstruct rtl_usb_privenum rtl_txqenum rtl_usb_statefunction _rtl_install_trx_info
Annotated Snippet
struct rtl_ep_map {
u32 ep_mapping[__RTL_TXQ_NUM];
};
struct _trx_info {
struct rtl_usb *rtlusb;
u32 ep_num;
};
static inline void _rtl_install_trx_info(struct rtl_usb *rtlusb,
struct sk_buff *skb,
u32 ep_num)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
info->rate_driver_data[0] = rtlusb;
info->rate_driver_data[1] = (void *)(__kernel_size_t)ep_num;
}
/* Add suspend/resume later */
enum rtl_usb_state {
USB_STATE_STOP = 0,
USB_STATE_START = 1,
};
#define IS_USB_STOP(rtlusb_ptr) (USB_STATE_STOP == (rtlusb_ptr)->state)
#define IS_USB_START(rtlusb_ptr) (USB_STATE_START == (rtlusb_ptr)->state)
#define SET_USB_STOP(rtlusb_ptr) \
do { \
(rtlusb_ptr)->state = USB_STATE_STOP; \
} while (0)
#define SET_USB_START(rtlusb_ptr) \
do { \
(rtlusb_ptr)->state = USB_STATE_START; \
} while (0)
struct rtl_usb {
struct usb_device *udev;
struct usb_interface *intf;
enum rtl_usb_state state;
/* Bcn control register setting */
u32 reg_bcn_ctrl_val;
/* for 88/92cu card disable */
u8 disablehwsm;
/*QOS & EDCA */
enum acm_method acm_method;
/* irq . HIMR,HIMR_EX */
u32 irq_mask[2];
bool irq_enabled;
u16 (*usb_mq_to_hwq)(__le16 fc, u16 mac80211_queue_index);
/* Tx */
u8 out_ep_nums ;
u8 out_eps[RTL_USB_MAX_BULKOUT_NUM];
u8 out_queue_sel;
struct rtl_ep_map ep_map;
u32 max_bulk_out_size;
u32 tx_submitted_urbs;
struct sk_buff_head tx_skb_queue[RTL_USB_MAX_EP_NUM];
struct usb_anchor tx_pending[RTL_USB_MAX_EP_NUM];
struct usb_anchor tx_submitted;
struct sk_buff *(*usb_tx_aggregate_hdl)(struct ieee80211_hw *,
struct sk_buff_head *);
int (*usb_tx_post_hdl)(struct ieee80211_hw *,
struct urb *, struct sk_buff *);
void (*usb_tx_cleanup)(struct ieee80211_hw *, struct sk_buff *);
/* Rx */
u8 in_ep_nums;
u32 in_ep; /* Bulk IN endpoint number */
u32 rx_max_size; /* Bulk IN max buffer size */
u32 rx_urb_num; /* How many Bulk INs are submitted to host. */
struct usb_anchor rx_submitted;
struct usb_anchor rx_cleanup_urbs;
struct tasklet_struct rx_work_tasklet;
struct sk_buff_head rx_queue;
void (*usb_rx_segregate_hdl)(struct ieee80211_hw *, struct sk_buff *,
struct sk_buff_head *);
void (*usb_rx_hdl)(struct ieee80211_hw *, struct sk_buff *);
};
struct rtl_usb_priv {
struct bt_coexist_info bt_coexist;
struct rtl_usb dev;
Annotation
- Immediate include surface: `linux/skbuff.h`.
- Detected declarations: `struct rtl_ep_map`, `struct _trx_info`, `struct rtl_usb`, `struct rtl_usb_priv`, `enum rtl_txq`, `enum rtl_usb_state`, `function _rtl_install_trx_info`.
- 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.