]> Pileus Git - ~andy/linux/blobdiff - drivers/infiniband/hw/ocrdma/ocrdma_ah.c
Merge tag 'pm+acpi-3.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafae...
[~andy/linux] / drivers / infiniband / hw / ocrdma / ocrdma_ah.c
index ee499d94225701780bed453abecc1a9ed6e98cff..34071143006ed17124fc15b7be8218b935319720 100644 (file)
@@ -49,7 +49,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah,
 
        ah->sgid_index = attr->grh.sgid_index;
 
-       vlan_tag = rdma_get_vlan_id(&attr->grh.dgid);
+       vlan_tag = attr->vlan_id;
        if (!vlan_tag || (vlan_tag > 0xFFF))
                vlan_tag = dev->pvid;
        if (vlan_tag && (vlan_tag < 0x1000)) {
@@ -64,7 +64,8 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah,
                eth_sz = sizeof(struct ocrdma_eth_basic);
        }
        memcpy(&eth.smac[0], &dev->nic_info.mac_addr[0], ETH_ALEN);
-       status = ocrdma_resolve_dgid(dev, &attr->grh.dgid, &eth.dmac[0]);
+       memcpy(&eth.dmac[0], attr->dmac, ETH_ALEN);
+       status = ocrdma_resolve_dmac(dev, attr, &eth.dmac[0]);
        if (status)
                return status;
        status = ocrdma_query_gid(&dev->ibdev, 1, attr->grh.sgid_index,
@@ -84,6 +85,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah,
        memcpy((u8 *)ah->av + eth_sz, &grh, sizeof(struct ocrdma_grh));
        if (vlan_enabled)
                ah->av->valid |= OCRDMA_AV_VLAN_VALID;
+       ah->av->valid = cpu_to_le32(ah->av->valid);
        return status;
 }