Lines Matching refs:nkey

1722 	void *pkt, uint32 nkey, dmaaddr_t pa, uint32 len, uint8 dma,
1861 #define DHD_NATIVE_TO_PKTID_SAVE(dhd, map, pkt, nkey, pa, len, dir, dmah, secdma, pkttype) \ argument
1862 dhd_pktid_map_save((dhd), (map), (void *)(pkt), (nkey), (pa), (uint32)(len), \
2067 uint32 nkey; in dhd_pktid_map_init() local
2117 for (nkey = 1; nkey <= map_items; nkey++) { /* locker #0 is reserved */ in dhd_pktid_map_init()
2118 map->keys[nkey] = nkey; /* populate with unique keys */ in dhd_pktid_map_init()
2119 map->lockers[nkey].state = LOCKER_IS_FREE; in dhd_pktid_map_init()
2120 map->lockers[nkey].pkt = NULL; /* bzero: redundant */ in dhd_pktid_map_init()
2121 map->lockers[nkey].len = 0; in dhd_pktid_map_init()
2169 uint32 nkey; in dhd_pktid_map_reset() local
2183 for (nkey = 1; nkey <= map_items; nkey++) { in dhd_pktid_map_reset()
2184 if (map->lockers[nkey].state == LOCKER_IS_BUSY) { in dhd_pktid_map_reset()
2185 locker = &map->lockers[nkey]; in dhd_pktid_map_reset()
2193 DHD_PKTID_AUDIT(dhd, map, nkey, DHD_DUPLICATE_FREE); /* duplicate frees */ in dhd_pktid_map_reset()
2197 locker->pa, nkey, locker->len, in dhd_pktid_map_reset()
2215 DHD_PKTID_AUDIT(dhd, map, nkey, DHD_TEST_IS_FREE); in dhd_pktid_map_reset()
2218 map->keys[nkey] = nkey; /* populate with unique keys */ in dhd_pktid_map_reset()
2231 uint32 nkey; in dhd_pktid_map_reset_ioctl() local
2242 for (nkey = 1; nkey <= map_items; nkey++) { in dhd_pktid_map_reset_ioctl()
2243 if (map->lockers[nkey].state == LOCKER_IS_BUSY) { in dhd_pktid_map_reset_ioctl()
2247 DHD_PKTID_AUDIT(dhd, map, nkey, DHD_DUPLICATE_FREE); /* duplicate frees */ in dhd_pktid_map_reset_ioctl()
2250 locker = &map->lockers[nkey]; in dhd_pktid_map_reset_ioctl()
2261 DHD_PKTID_AUDIT(dhd, map, nkey, DHD_TEST_IS_FREE); in dhd_pktid_map_reset_ioctl()
2264 map->keys[nkey] = nkey; /* populate with unique keys */ in dhd_pktid_map_reset_ioctl()
2371 uint32 nkey; in dhd_pktid_map_reserve() local
2389 nkey = map->keys[map->avail]; /* fetch a free locker, pop stack */ in dhd_pktid_map_reserve()
2391 if ((map->avail > map->items) || (nkey > map->items)) { in dhd_pktid_map_reserve()
2395 __FUNCTION__, __LINE__, map->avail, nkey, in dhd_pktid_map_reserve()
2401 locker = &map->lockers[nkey]; /* save packet metadata in locker */ in dhd_pktid_map_reserve()
2409 ASSERT(nkey != DHD_PKTID_INVALID); in dhd_pktid_map_reserve()
2411 return nkey; /* return locker's numbered key */ in dhd_pktid_map_reserve()
2420 uint32 nkey, dmaaddr_t pa, uint32 len, uint8 dir, void *dmah, void *secdma, in dhd_pktid_map_save() argument
2432 if ((nkey == DHD_PKTID_INVALID) || (nkey > DHD_PKIDMAP_ITEMS(map->items))) { in dhd_pktid_map_save()
2434 __FUNCTION__, __LINE__, nkey, pkttype)); in dhd_pktid_map_save()
2448 locker = &map->lockers[nkey]; in dhd_pktid_map_save()
2463 DHD_PKTID_LOG(dhd, dhd->prot->pktid_dma_map, pa, nkey, len, pkttype); in dhd_pktid_map_save()
2477 uint32 nkey; in dhd_pktid_map_alloc() local
2479 nkey = dhd_pktid_map_reserve(dhd, handle, pkt, pkttype); in dhd_pktid_map_alloc()
2480 if (nkey != DHD_PKTID_INVALID) { in dhd_pktid_map_alloc()
2481 dhd_pktid_map_save(dhd, handle, pkt, nkey, pa, in dhd_pktid_map_alloc()
2485 return nkey; in dhd_pktid_map_alloc()
2495 dhd_pktid_map_free(dhd_pub_t *dhd, dhd_pktid_map_handle_t *handle, uint32 nkey, in dhd_pktid_map_free() argument
2511 if ((nkey == DHD_PKTID_INVALID) || (nkey > DHD_PKIDMAP_ITEMS(map->items))) { in dhd_pktid_map_free()
2513 __FUNCTION__, __LINE__, nkey, pkttype)); in dhd_pktid_map_free()
2527 locker = &map->lockers[nkey]; in dhd_pktid_map_free()
2530 DHD_PKTID_AUDIT(dhd, map, nkey, DHD_DUPLICATE_FREE); /* Audit duplicate FREE */ in dhd_pktid_map_free()
2536 __FUNCTION__, __LINE__, nkey)); in dhd_pktid_map_free()
2557 __FUNCTION__, __LINE__, nkey)); in dhd_pktid_map_free()
2582 map->keys[map->avail] = nkey; /* make this numbered key available */ in dhd_pktid_map_free()
2590 DHD_PKTID_AUDIT(dhd, map, nkey, DHD_TEST_IS_FREE); in dhd_pktid_map_free()
2593 DHD_PKTID_LOG(dhd, dhd->prot->pktid_dma_unmap, locker->pa, nkey, in dhd_pktid_map_free()
2787 #define DHD_NATIVE_TO_PKTID_SAVE(dhd, map, pkt, nkey, pa, len, dma_dir, dmah, secdma, pkttype) \ argument
2788 ({ BCM_REFERENCE(dhd); BCM_REFERENCE(nkey); BCM_REFERENCE(dma_dir); \