drivers/net/wwan/t7xx/t7xx_port.h
Source file repositories/reference/linux-study-clean/drivers/net/wwan/t7xx/t7xx_port.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wwan/t7xx/t7xx_port.h- Extension
.h- Size
- 4378 bytes
- Lines
- 154
- 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.
- 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
linux/bits.hlinux/device.hlinux/mutex.hlinux/sched.hlinux/skbuff.hlinux/spinlock.hlinux/types.hlinux/wait.hlinux/wwan.ht7xx_hif_cldma.ht7xx_pci.h
Detected Declarations
struct t7xx_portstruct port_opsstruct t7xx_port_confstruct t7xx_portenum port_ch
Annotated Snippet
struct port_ops {
int (*init)(struct t7xx_port *port);
int (*recv_skb)(struct t7xx_port *port, struct sk_buff *skb);
void (*md_state_notify)(struct t7xx_port *port, unsigned int md_state);
void (*uninit)(struct t7xx_port *port);
int (*enable_chl)(struct t7xx_port *port);
int (*disable_chl)(struct t7xx_port *port);
};
struct t7xx_port_conf {
enum port_ch tx_ch;
enum port_ch rx_ch;
unsigned char txq_index;
unsigned char rxq_index;
unsigned char txq_exp_index;
unsigned char rxq_exp_index;
enum cldma_id path_id;
struct port_ops *ops;
char *name;
enum wwan_port_type port_type;
bool debug;
};
struct t7xx_port {
/* Members not initialized in definition */
const struct t7xx_port_conf *port_conf;
struct t7xx_pci_dev *t7xx_dev;
struct device *dev;
u16 seq_nums[2]; /* TX/RX sequence numbers */
atomic_t usage_cnt;
struct list_head entry;
struct list_head queue_entry;
/* TX and RX flows are asymmetric since ports are multiplexed on
* queues.
*
* TX: data blocks are sent directly to a queue. Each port
* does not maintain a TX list; instead, they only provide
* a wait_queue_head for blocking writes.
*
* RX: Each port uses a RX list to hold packets,
* allowing the modem to dispatch RX packet as quickly as possible.
*/
struct sk_buff_head rx_skb_list;
spinlock_t port_update_lock; /* Protects port configuration */
wait_queue_head_t rx_wq;
int rx_length_th;
bool chan_enable;
struct task_struct *thread;
union {
struct {
struct wwan_port *wwan_port;
} wwan;
struct {
struct rchan *relaych;
} log;
};
};
int t7xx_get_port_mtu(struct t7xx_port *port);
struct sk_buff *t7xx_port_alloc_skb(int payload);
struct sk_buff *t7xx_ctrl_alloc_skb(int payload);
int t7xx_port_enqueue_skb(struct t7xx_port *port, struct sk_buff *skb);
int t7xx_port_send_skb(struct t7xx_port *port, struct sk_buff *skb, unsigned int pkt_header,
unsigned int ex_msg);
int t7xx_port_send_raw_skb(struct t7xx_port *port, struct sk_buff *skb);
int t7xx_port_send_ctl_skb(struct t7xx_port *port, struct sk_buff *skb, unsigned int msg,
unsigned int ex_msg);
#endif /* __T7XX_PORT_H__ */
Annotation
- Immediate include surface: `linux/bits.h`, `linux/device.h`, `linux/mutex.h`, `linux/sched.h`, `linux/skbuff.h`, `linux/spinlock.h`, `linux/types.h`, `linux/wait.h`.
- Detected declarations: `struct t7xx_port`, `struct port_ops`, `struct t7xx_port_conf`, `struct t7xx_port`, `enum port_ch`.
- Atlas domain: Driver Families / drivers/net.
- 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.