Commit 7b4ef3b8 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk Committed by Adam Wujek

kernel/wr_nic: add default 802.1q priority mapping

Without this fix all 802.1q tagged frames are assigned to class 0
parent 2f43884c
......@@ -176,6 +176,7 @@ int wrn_ep_open(struct net_device *dev)
{
struct wrn_ep *ep = netdev_priv(dev);
unsigned long timerarg = (unsigned long)dev;
int prio, prio_map;
if (WR_IS_NODE) {
netif_carrier_on(dev);
......@@ -188,6 +189,14 @@ int wrn_ep_open(struct net_device *dev)
| EP_VCR0_PRIO_VAL_W(4), /* some mid priority */
&ep->ep_regs->VCR0);
/* Write default 802.1Q tag priority to traffic class mapping */
prio_map = 0;
for(prio=0; prio<8; ++prio) {
prio_map |= (0x7 & prio) << (prio*3);
}
writel(prio_map, &ep->ep_regs->TCAR);
/*
* enable RX timestamping (it has no impact on performance)
* and we need the RX OOB block to identify orginating endpoints
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment