Lines Matching refs:l2
137 return &entry->bridge.l2; in mtk_foe_entry_l2()
140 return &entry->ipv6.l2; in mtk_foe_entry_l2()
142 return &entry->ipv4.l2; in mtk_foe_entry_l2()
163 struct mtk_foe_mac_info *l2; in mtk_foe_entry_prepare() local
204 l2 = &entry->bridge.l2; in mtk_foe_entry_prepare()
207 l2 = &entry->ipv6.l2; in mtk_foe_entry_prepare()
210 l2 = &entry->ipv4.l2; in mtk_foe_entry_prepare()
213 l2->dest_mac_hi = get_unaligned_be32(dest_mac); in mtk_foe_entry_prepare()
214 l2->dest_mac_lo = get_unaligned_be16(dest_mac + 4); in mtk_foe_entry_prepare()
215 l2->src_mac_hi = get_unaligned_be32(src_mac); in mtk_foe_entry_prepare()
216 l2->src_mac_lo = get_unaligned_be16(src_mac + 4); in mtk_foe_entry_prepare()
219 l2->etype = ETH_P_IPV6; in mtk_foe_entry_prepare()
221 l2->etype = ETH_P_IP; in mtk_foe_entry_prepare()
323 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_dsa() local
325 l2->etype = BIT(port); in mtk_foe_entry_set_dsa()
330 l2->etype |= BIT(8); in mtk_foe_entry_set_dsa()
340 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_vlan() local
346 l2->vlan1 = vid; in mtk_foe_entry_set_vlan()
350 l2->vlan1 = vid; in mtk_foe_entry_set_vlan()
351 l2->etype |= BIT(8); in mtk_foe_entry_set_vlan()
353 l2->vlan2 = vid; in mtk_foe_entry_set_vlan()
365 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_pppoe() local
369 l2->etype = ETH_P_PPP_SES; in mtk_foe_entry_set_pppoe()
372 l2->pppoe_id = sid; in mtk_foe_entry_set_pppoe()
380 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_wdma() local
387 l2->winfo = FIELD_PREP(MTK_FOE_WINFO_WCID, wcid) | in mtk_foe_entry_set_wdma()
394 l2->vlan2 = FIELD_PREP(MTK_FOE_VLAN2_WINFO_BSS, bss) | in mtk_foe_entry_set_wdma()
614 struct mtk_foe_mac_info *l2; in mtk_foe_entry_commit_subflow() local
634 l2 = mtk_foe_entry_l2(ppe->eth, &foe); in mtk_foe_entry_commit_subflow()
635 memcpy(l2, &entry->data.bridge.l2, sizeof(*l2)); in mtk_foe_entry_commit_subflow()
640 else if (type >= MTK_PPE_PKT_TYPE_IPV6_ROUTE_3T && l2->etype == ETH_P_IP) in mtk_foe_entry_commit_subflow()
641 l2->etype = ETH_P_IPV6; in mtk_foe_entry_commit_subflow()