Lines Matching defs:slot

73 					  int slot,
78 *meta = &(ring->meta[slot]);
80 desc = &(desc[slot]);
91 int slot;
96 slot = (int)(&(desc->dma32) - descbase);
97 B43_WARN_ON(!(slot >= 0 && slot < ring->nr_slots));
103 if (slot == ring->nr_slots - 1)
118 static void op32_poke_tx(struct b43_dmaring *ring, int slot)
121 (u32) (slot * sizeof(struct b43_dmadesc32)));
146 static void op32_set_current_rxslot(struct b43_dmaring *ring, int slot)
149 (u32) (slot * sizeof(struct b43_dmadesc32)));
165 int slot,
170 *meta = &(ring->meta[slot]);
172 desc = &(desc[slot]);
183 int slot;
188 slot = (int)(&(desc->dma64) - descbase);
189 B43_WARN_ON(!(slot >= 0 && slot < ring->nr_slots));
195 if (slot == ring->nr_slots - 1)
213 static void op64_poke_tx(struct b43_dmaring *ring, int slot)
216 (u32) (slot * sizeof(struct b43_dmadesc64)));
241 static void op64_set_current_rxslot(struct b43_dmaring *ring, int slot)
244 (u32) (slot * sizeof(struct b43_dmadesc64)));
262 static inline int next_slot(struct b43_dmaring *ring, int slot)
264 B43_WARN_ON(!(slot >= -1 && slot <= ring->nr_slots - 1));
265 if (slot == ring->nr_slots - 1)
267 return slot + 1;
270 static inline int prev_slot(struct b43_dmaring *ring, int slot)
272 B43_WARN_ON(!(slot >= 0 && slot <= ring->nr_slots - 1));
273 if (slot == 0)
275 return slot - 1;
299 /* Request a slot for usage. */
302 int slot;
308 slot = next_slot(ring, ring->current_slot);
309 ring->current_slot = slot;
314 return slot;
1136 static u16 generate_cookie(struct b43_dmaring *ring, int slot)
1141 * DMA controller ID and store the slot number
1149 B43_WARN_ON(slot & ~0x0FFF);
1150 cookie |= (u16)slot;
1155 /* Inspect a cookie and find out to which controller/slot it belongs. */
1157 struct b43_dmaring *parse_cookie(struct b43_wldev *dev, u16 cookie, int *slot)
1179 *slot = (cookie & 0x0FFF);
1180 if (unlikely(!ring || *slot < 0 || *slot >= ring->nr_slots)) {
1196 int slot, old_top_slot, old_used_slots;
1212 /* Get a slot for the header. */
1213 slot = request_slot(ring);
1214 desc = ops->idx2desc(ring, slot, &meta_hdr);
1217 header = &(ring->txhdr_cache[(slot / TX_SLOTS_PER_FRAME) * hdrsize]);
1218 cookie = generate_cookie(ring, slot);
1237 /* Get a slot for the payload. */
1238 slot = request_slot(ring);
1239 desc = ops->idx2desc(ring, slot, &meta);
1279 ops->poke_tx(ring, next_slot(ring, slot));
1422 int slot, firstused;
1427 ring = parse_cookie(dev, status->cookie, &slot);
1433 * Check if the slot deduced from the cookie really is the first
1434 * used slot. */
1440 if (unlikely(slot != firstused)) {
1444 if (slot == next_slot(ring, next_slot(ring, firstused))) {
1448 slot = firstused;
1453 "Skip on DMA ring %d slot %d.\n",
1454 ring->index, slot);
1465 ring->index, firstused, slot);
1474 B43_WARN_ON(slot < 0 || slot >= ring->nr_slots);
1476 ops->idx2desc(ring, slot, &meta);
1479 b43dbg(dev->wl, "Poisoned TX slot %d (first=%d) "
1481 slot, firstused, ring->index);
1506 "at slot %d (first=%d) on ring %d\n",
1507 slot, firstused, ring->index);
1545 "at slot %d (first=%d) on ring %d\n",
1546 slot, firstused, ring->index);
1559 slot = next_slot(ring, slot);
1582 static void dma_rx(struct b43_dmaring *ring, int *slot)
1593 desc = ops->idx2desc(ring, *slot, &meta);
1630 desc = ops->idx2desc(ring, *slot, &meta);
1635 *slot = next_slot(ring, *slot);
1690 int slot, current_slot;
1697 slot = ring->current_slot;
1698 for (; slot != current_slot; slot = next_slot(ring, slot)) {
1699 dma_rx(ring, &slot);
1703 ops->set_current_rxslot(ring, slot);
1704 ring->current_slot = slot;