Lines Matching defs:dhd_bus
204 typedef struct dhd_bus { struct
205 dhd_pub_t *dhd;
207 bcmsdh_info_t *sdh; /* Handle for BCMSDH calls */
208 si_t *sih; /* Handle for SI calls */
209 char *vars; /* Variables (from CIS and/or other) */
210 uint varsz; /* Size of variables buffer */
211 uint32 sbaddr; /* Current SB window pointer (-1, invalid) */
213 sdpcmd_regs_t *regs; /* Registers for SDIO core */
214 uint sdpcmrev; /* SDIO core revision */
215 uint armrev; /* CPU core revision */
216 uint ramrev; /* SOCRAM core revision */
217 uint32 ramsize; /* Size of RAM in SOCRAM (bytes) */
218 uint32 orig_ramsize; /* Size of RAM in SOCRAM (bytes) */
219 uint32 srmemsize; /* Size of SRMEM */
221 uint32 bus; /* gSPI or SDIO bus */
222 uint32 hostintmask; /* Copy of Host Interrupt Mask */
223 uint32 intstatus; /* Intstatus bits (events) pending */
224 bool dpc_sched; /* Indicates DPC schedule (intrpt rcvd) */
225 bool fcstate; /* State of dongle flow-control */
227 uint16 cl_devid; /* cached devid for dhdsdio_probe_attach() */
228 char *fw_path; /* module_param: path to firmware image */
229 char *nv_path; /* module_param: path to nvram vars file */
230 const char *nvram_params; /* user specified nvram params. */
232 uint blocksize; /* Block size of SDIO transfers */
233 uint roundup; /* Max roundup limit */
235 struct pktq txq; /* Queue length used for flow-control */
236 uint8 flowcontrol; /* per prio flow control bitmask */
237 uint8 tx_seq; /* Transmit sequence number (next) */
238 uint8 tx_max; /* Maximum transmit sequence allowed */
240 uint8 hdrbuf[MAX_HDR_READ + DHD_SDALIGN];
241 uint8 *rxhdr; /* Header of current rx frame (in hdrbuf) */
242 uint16 nextlen; /* Next Read Len from last header */
243 uint8 rx_seq; /* Receive sequence number (expected) */
244 bool rxskip; /* Skip receive (awaiting NAK ACK) */
246 void *glomd; /* Packet containing glomming descriptor */
247 void *glom; /* Packet chain for glommed superframe */
248 uint glomerr; /* Glom packet read errors */
250 uint8 *rxbuf; /* Buffer for receiving control packets */
251 uint rxblen; /* Allocated length of rxbuf */
252 uint8 *rxctl; /* Aligned pointer into rxbuf */
253 uint8 *databuf; /* Buffer for receiving big glom packet */
254 uint8 *dataptr; /* Aligned pointer into databuf */
255 uint rxlen; /* Length of valid data in buffer */
257 uint8 sdpcm_ver; /* Bus protocol reported by dongle */
259 bool intr; /* Use interrupts */
260 bool poll; /* Use polling */
261 bool ipend; /* Device interrupt is pending */
262 bool intdis; /* Interrupts disabled by isr */
263 uint intrcount; /* Count of device interrupt callbacks */
264 uint lastintrs; /* Count as of last watchdog timer */
265 uint spurious; /* Count of spurious interrupts */
266 uint pollrate; /* Ticks between device polls */
267 uint polltick; /* Tick counter */
268 uint pollcnt; /* Count of active polls */
271 dhd_console_t console; /* Console output polling support */
272 uint console_addr; /* Console address from shared struct */
275 uint regfails; /* Count of R_REG/W_REG failures */
277 uint clkstate; /* State of sd and backplane clock(s) */
278 bool activity; /* Activity flag for clock down */
279 int32 idletime; /* Control for activity timeout */
280 int32 idlecount; /* Activity timeout counter */
281 int32 idleclock; /* How to set bus driver when idle */
282 int32 sd_divisor; /* Speed control to bus driver */
283 int32 sd_mode; /* Mode control to bus driver */
284 int32 sd_rxchain; /* If bcmsdh api accepts PKT chains */
285 bool use_rxchain; /* If dhd should use PKT chains */
286 bool sleeping; /* Is SDIO bus sleeping? */
287 uint rxflow_mode; /* Rx flow control mode */
288 bool rxflow; /* Is rx flow control on */
289 uint prev_rxlim_hit; /* Is prev rx limit exceeded (per dpc schedule) */
290 bool alp_only; /* Don't use HT clock (ALP only) */
292 bool usebufpool;
296 bool ext_loop;
297 uint8 loopid;
300 uint pktgen_freq; /* Ticks between bursts */
301 uint pktgen_count; /* Packets to send each burst */
302 uint pktgen_print; /* Bursts between count displays */
303 uint pktgen_total; /* Stop after this many */
304 uint pktgen_minlen; /* Minimum packet data len */
305 uint pktgen_maxlen; /* Maximum packet data len */
306 uint pktgen_mode; /* Configured mode: tx, rx, or echo */
307 uint pktgen_stop; /* Number of tx failures causing stop */
310 uint pktgen_tick; /* Tick counter for bursts */
311 uint pktgen_ptick; /* Burst counter for printing */
312 uint pktgen_sent; /* Number of test packets generated */
313 uint pktgen_rcvd; /* Number of test packets received */
314 uint pktgen_prev_time; /* Time at which previous stats where printed */
315 uint pktgen_prev_sent; /* Number of test packets generated when
318 uint pktgen_prev_rcvd; /* Number of test packets received when
321 uint pktgen_fail; /* Number of failed send attempts */
322 uint16 pktgen_len; /* Length of next packet to send */
325 uint16 pktgen_rcv_state; /* receive state */
326 uint pktgen_rcvd_rcvsession; /* test pkts rcvd per rcv session. */
330 uint tx_sderrs; /* Count of tx attempts with sd errors */
331 uint fcqueued; /* Tx packets that got queued */
332 uint rxrtx; /* Count of rtx requests (NAK to dongle) */
333 uint rx_toolong; /* Receive frames too long to receive */
334 uint rxc_errors; /* SDIO errors when reading control frames */
335 uint rx_hdrfail; /* SDIO errors on header reads */
336 uint rx_badhdr; /* Bad received headers (roosync?) */
337 uint rx_badseq; /* Mismatched rx sequence number */
338 uint fc_rcvd; /* Number of flow-control events received */
339 uint fc_xoff; /* Number which turned on flow-control */
340 uint fc_xon; /* Number which turned off flow-control */
341 uint rxglomfail; /* Failed deglom attempts */
342 uint rxglomframes; /* Number of glom frames (superframes) */
343 uint rxglompkts; /* Number of packets from glom frames */
344 uint f2rxhdrs; /* Number of header reads */
345 uint f2rxdata; /* Number of frame data reads */
346 uint f2txdata; /* Number of f2 frame writes */
347 uint f1regdata; /* Number of f1 register accesses */
349 uint8 *ctrl_frame_buf;
373 } dhd_bus_t; argument