Lines Matching refs:words

38 	u32 words[4];  in prestera_dsa_parse()  local
41 words[0] = ntohl(dsa_words[0]); in prestera_dsa_parse()
42 words[1] = ntohl(dsa_words[1]); in prestera_dsa_parse()
43 words[2] = ntohl(dsa_words[2]); in prestera_dsa_parse()
44 words[3] = ntohl(dsa_words[3]); in prestera_dsa_parse()
47 cmd = (enum prestera_dsa_cmd)FIELD_GET(PRESTERA_DSA_W0_CMD, words[0]); in prestera_dsa_parse()
53 if (FIELD_GET(PRESTERA_DSA_W0_EXT_BIT, words[0]) == 0) in prestera_dsa_parse()
55 if (FIELD_GET(PRESTERA_DSA_W1_EXT_BIT, words[1]) == 0) in prestera_dsa_parse()
57 if (FIELD_GET(PRESTERA_DSA_W2_EXT_BIT, words[2]) == 0) in prestera_dsa_parse()
60 field = FIELD_GET(PRESTERA_DSA_W3_VID, words[3]); in prestera_dsa_parse()
62 dsa->vlan.is_tagged = FIELD_GET(PRESTERA_DSA_W0_IS_TAGGED, words[0]); in prestera_dsa_parse()
63 dsa->vlan.cfi_bit = FIELD_GET(PRESTERA_DSA_W1_CFI_BIT, words[1]); in prestera_dsa_parse()
64 dsa->vlan.vpt = FIELD_GET(PRESTERA_DSA_W0_VPT, words[0]); in prestera_dsa_parse()
65 dsa->vlan.vid = FIELD_GET(PRESTERA_DSA_W0_VID, words[0]); in prestera_dsa_parse()
69 field = FIELD_GET(PRESTERA_DSA_W3_DEV_NUM, words[3]); in prestera_dsa_parse()
71 dsa->hw_dev_num = FIELD_GET(PRESTERA_DSA_W0_DEV_NUM, words[0]); in prestera_dsa_parse()
74 dsa->port_num = (FIELD_GET(PRESTERA_DSA_W0_PORT_NUM, words[0]) << 0) | in prestera_dsa_parse()
75 (FIELD_GET(PRESTERA_DSA_W1_PORT_NUM, words[1]) << 5) | in prestera_dsa_parse()
76 (FIELD_GET(PRESTERA_DSA_W2_PORT_NUM, words[2]) << 7); in prestera_dsa_parse()
78 dsa->cpu_code = FIELD_GET(PRESTERA_DSA_W1_MASK_CPU_CODE, words[1]); in prestera_dsa_parse()
87 u32 words[4] = { 0 }; in prestera_dsa_build() local
89 words[0] |= FIELD_PREP(PRESTERA_DSA_W0_CMD, PRESTERA_DSA_CMD_FROM_CPU); in prestera_dsa_build()
91 words[0] |= FIELD_PREP(PRESTERA_DSA_W0_DEV_NUM, dev_num); in prestera_dsa_build()
93 words[3] |= FIELD_PREP(PRESTERA_DSA_W3_DEV_NUM, dev_num); in prestera_dsa_build()
95 words[3] |= FIELD_PREP(PRESTERA_DSA_W3_DST_EPORT, dsa->port_num); in prestera_dsa_build()
97 words[0] |= FIELD_PREP(PRESTERA_DSA_W0_EXT_BIT, 1); in prestera_dsa_build()
98 words[1] |= FIELD_PREP(PRESTERA_DSA_W1_EXT_BIT, 1); in prestera_dsa_build()
99 words[2] |= FIELD_PREP(PRESTERA_DSA_W2_EXT_BIT, 1); in prestera_dsa_build()
101 dsa_words[0] = htonl(words[0]); in prestera_dsa_build()
102 dsa_words[1] = htonl(words[1]); in prestera_dsa_build()
103 dsa_words[2] = htonl(words[2]); in prestera_dsa_build()
104 dsa_words[3] = htonl(words[3]); in prestera_dsa_build()