Lines Matching refs:chap_table

1587 	struct ql4_chap_table *chap_table;  in qla4xxx_get_chap()  local
1590 chap_table = dma_pool_alloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma); in qla4xxx_get_chap()
1591 if (chap_table == NULL) in qla4xxx_get_chap()
1595 memset(chap_table, 0, chap_size); in qla4xxx_get_chap()
1616 __le16_to_cpu(chap_table->cookie))); in qla4xxx_get_chap()
1618 if (__le16_to_cpu(chap_table->cookie) != CHAP_VALID_COOKIE) { in qla4xxx_get_chap()
1623 strlcpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN); in qla4xxx_get_chap()
1624 strlcpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN); in qla4xxx_get_chap()
1625 chap_table->cookie = __constant_cpu_to_le16(CHAP_VALID_COOKIE); in qla4xxx_get_chap()
1628 dma_pool_free(ha->chap_dma_pool, chap_table, chap_dma); in qla4xxx_get_chap()
1650 struct ql4_chap_table *chap_table; in qla4xxx_set_chap() local
1654 chap_table = dma_pool_alloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma); in qla4xxx_set_chap()
1655 if (chap_table == NULL) { in qla4xxx_set_chap()
1660 memset(chap_table, 0, sizeof(struct ql4_chap_table)); in qla4xxx_set_chap()
1662 chap_table->flags |= BIT_6; /* peer */ in qla4xxx_set_chap()
1664 chap_table->flags |= BIT_7; /* local */ in qla4xxx_set_chap()
1665 chap_table->secret_len = strlen(password); in qla4xxx_set_chap()
1666 strncpy(chap_table->secret, password, MAX_CHAP_SECRET_LEN - 1); in qla4xxx_set_chap()
1667 strncpy(chap_table->name, username, MAX_CHAP_NAME_LEN - 1); in qla4xxx_set_chap()
1668 chap_table->cookie = __constant_cpu_to_le16(CHAP_VALID_COOKIE); in qla4xxx_set_chap()
1671 chap_size = MAX_CHAP_ENTRIES_40XX * sizeof(*chap_table); in qla4xxx_set_chap()
1690 chap_table, sizeof(struct ql4_chap_table)); in qla4xxx_set_chap()
1692 dma_pool_free(ha->chap_dma_pool, chap_table, chap_dma); in qla4xxx_set_chap()
1705 struct ql4_chap_table *chap_table = NULL; in qla4xxx_get_uni_chap_at_index() local
1733 chap_table = (struct ql4_chap_table *)ha->chap_list + chap_index; in qla4xxx_get_uni_chap_at_index()
1734 if (chap_table->cookie != __constant_cpu_to_le16(CHAP_VALID_COOKIE)) { in qla4xxx_get_uni_chap_at_index()
1739 if (!(chap_table->flags & BIT_7)) { in qla4xxx_get_uni_chap_at_index()
1745 strlcpy(password, chap_table->secret, MAX_CHAP_SECRET_LEN); in qla4xxx_get_uni_chap_at_index()
1746 strlcpy(username, chap_table->name, MAX_CHAP_NAME_LEN); in qla4xxx_get_uni_chap_at_index()
1775 struct ql4_chap_table *chap_table; in qla4xxx_get_chap_index() local
1795 chap_table = (struct ql4_chap_table *)ha->chap_list + i; in qla4xxx_get_chap_index()
1796 if (chap_table->cookie != in qla4xxx_get_chap_index()
1803 if (chap_table->flags & BIT_7) in qla4xxx_get_chap_index()
1806 if (chap_table->flags & BIT_6) in qla4xxx_get_chap_index()
1809 if (!strncmp(chap_table->secret, password, in qla4xxx_get_chap_index()
1811 !strncmp(chap_table->name, username, in qla4xxx_get_chap_index()