include/linux/ti_wilink_st.h
Source file repositories/reference/linux-study-clean/include/linux/ti_wilink_st.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ti_wilink_st.h- Extension
.h- Size
- 13791 bytes
- Lines
- 440
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/skbuff.h
Detected Declarations
struct st_proto_sstruct st_data_sstruct chip_versionstruct kim_data_sstruct bts_headerstruct bts_actionstruct bts_action_sendstruct bts_action_waitstruct bts_action_delaystruct bts_action_serialstruct hci_commandstruct fm_event_hdrstruct gps_event_hdrstruct ti_st_plat_dataenum proto_type
Annotated Snippet
struct st_proto_s {
enum proto_type type;
long (*recv) (void *, struct sk_buff *);
unsigned char (*match_packet) (const unsigned char *data);
void (*reg_complete_cb) (void *, int data);
long (*write) (struct sk_buff *skb);
void *priv_data;
unsigned char chnl_id;
unsigned short max_frame_size;
unsigned char hdr_len;
unsigned char offset_len_in_hdr;
unsigned char len_size;
unsigned char reserve;
};
extern long st_register(struct st_proto_s *);
extern long st_unregister(struct st_proto_s *);
/*
* header information used by st_core.c
*/
/* states of protocol list */
#define ST_NOTEMPTY 1
#define ST_EMPTY 0
/*
* possible st_states
*/
#define ST_INITIALIZING 1
#define ST_REG_IN_PROGRESS 2
#define ST_REG_PENDING 3
#define ST_WAITING_FOR_RESP 4
/**
* struct st_data_s - ST core internal structure
* @st_state: different states of ST like initializing, registration
* in progress, this is mainly used to return relevant err codes
* when protocol drivers are registering. It is also used to track
* the recv function, as in during fw download only HCI events
* can occur , where as during other times other events CH8, CH9
* can occur.
* @tty: tty provided by the TTY core for line disciplines.
* @tx_skb: If for some reason the tty's write returns lesser bytes written
* then to maintain the rest of data to be written on next instance.
* This needs to be protected, hence the lock inside wakeup func.
* @tx_state: if the data is being written onto the TTY and protocol driver
* wants to send more, queue up data and mark that there is
* more data to send.
* @list: the list of protocols registered, only MAX can exist, one protocol
* can register only once.
* @rx_state: states to be maintained inside st's tty receive
* @rx_count: count to be maintained inside st's tty receieve
* @rx_skb: the skb where all data for a protocol gets accumulated,
* since tty might not call receive when a complete event packet
* is received, the states, count and the skb needs to be maintained.
* @rx_chnl: the channel ID for which the data is getting accumalated for.
* @txq: the list of skbs which needs to be sent onto the TTY.
* @tx_waitq: if the chip is not in AWAKE state, the skbs needs to be queued
* up in here, PM(WAKEUP_IND) data needs to be sent and then the skbs
* from waitq can be moved onto the txq.
* Needs locking too.
* @lock: the lock to protect skbs, queues, and ST states.
* @protos_registered: count of the protocols registered, also when 0 the
* chip enable gpio can be toggled, and when it changes to 1 the fw
* needs to be downloaded to initialize chip side ST.
* @ll_state: the various PM states the chip can be, the states are notified
* to us, when the chip sends relevant PM packets(SLEEP_IND, WAKE_IND).
* @kim_data: reference to the parent encapsulating structure.
*
*/
struct st_data_s {
unsigned long st_state;
struct sk_buff *tx_skb;
#define ST_TX_SENDING 1
#define ST_TX_WAKEUP 2
unsigned long tx_state;
struct st_proto_s *list[ST_MAX_CHANNELS];
bool is_registered[ST_MAX_CHANNELS];
unsigned long rx_state;
unsigned long rx_count;
struct sk_buff *rx_skb;
unsigned char rx_chnl;
struct sk_buff_head txq, tx_waitq;
spinlock_t lock;
unsigned char protos_registered;
unsigned long ll_state;
void *kim_data;
Annotation
- Immediate include surface: `linux/skbuff.h`.
- Detected declarations: `struct st_proto_s`, `struct st_data_s`, `struct chip_version`, `struct kim_data_s`, `struct bts_header`, `struct bts_action`, `struct bts_action_send`, `struct bts_action_wait`, `struct bts_action_delay`, `struct bts_action_serial`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.