Lines Matching refs:l2

187 		return &entry->bridge.l2;  in mtk_foe_entry_l2()
190 return &entry->ipv6.l2; in mtk_foe_entry_l2()
192 return &entry->ipv4.l2; in mtk_foe_entry_l2()
213 struct mtk_foe_mac_info *l2; in mtk_foe_entry_prepare() local
254 l2 = &entry->bridge.l2; in mtk_foe_entry_prepare()
257 l2 = &entry->ipv6.l2; in mtk_foe_entry_prepare()
260 l2 = &entry->ipv4.l2; in mtk_foe_entry_prepare()
263 l2->dest_mac_hi = get_unaligned_be32(dest_mac); in mtk_foe_entry_prepare()
264 l2->dest_mac_lo = get_unaligned_be16(dest_mac + 4); in mtk_foe_entry_prepare()
265 l2->src_mac_hi = get_unaligned_be32(src_mac); in mtk_foe_entry_prepare()
266 l2->src_mac_lo = get_unaligned_be16(src_mac + 4); in mtk_foe_entry_prepare()
269 l2->etype = ETH_P_IPV6; in mtk_foe_entry_prepare()
271 l2->etype = ETH_P_IP; in mtk_foe_entry_prepare()
373 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_dsa() local
375 l2->etype = BIT(port); in mtk_foe_entry_set_dsa()
380 l2->etype |= BIT(8); in mtk_foe_entry_set_dsa()
390 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_vlan() local
396 l2->vlan1 = vid; in mtk_foe_entry_set_vlan()
400 l2->vlan1 = vid; in mtk_foe_entry_set_vlan()
401 l2->etype |= BIT(8); in mtk_foe_entry_set_vlan()
403 l2->vlan2 = vid; in mtk_foe_entry_set_vlan()
415 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_pppoe() local
419 l2->etype = ETH_P_PPP_SES; in mtk_foe_entry_set_pppoe()
422 l2->pppoe_id = sid; in mtk_foe_entry_set_pppoe()
430 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry); in mtk_foe_entry_set_wdma() local
438 l2->w3info = FIELD_PREP(MTK_FOE_WINFO_WCID_V3, wcid) | in mtk_foe_entry_set_wdma()
445 l2->winfo = FIELD_PREP(MTK_FOE_WINFO_WCID, wcid) | in mtk_foe_entry_set_wdma()
453 l2->vlan2 = FIELD_PREP(MTK_FOE_VLAN2_WINFO_BSS, bss) | in mtk_foe_entry_set_wdma()
702 struct mtk_foe_mac_info *l2; in mtk_foe_entry_commit_subflow() local
722 l2 = mtk_foe_entry_l2(ppe->eth, &foe); in mtk_foe_entry_commit_subflow()
723 memcpy(l2, &entry->data.bridge.l2, sizeof(*l2)); in mtk_foe_entry_commit_subflow()
728 else if (type >= MTK_PPE_PKT_TYPE_IPV6_ROUTE_3T && l2->etype == ETH_P_IP) in mtk_foe_entry_commit_subflow()
729 l2->etype = ETH_P_IPV6; in mtk_foe_entry_commit_subflow()