]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
madeye: convert attribute id to host order before checking it util
authorSean Hefty <sean.hefty@intel.com>
Wed, 30 Jun 2010 23:50:05 +0000 (16:50 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 30 Jun 2010 23:50:05 +0000 (16:50 -0700)
Signed-off-by: Mike Heinz <michael.heinz@qlogic.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
drivers/infiniband/util/madeye/madeye.c

index a0c86b96c050cb6d4baa00fd7ed9979b580fb47b..1b4bb6478c9159417d361310b51cb19a1f1dec4e 100644 (file)
@@ -443,7 +443,7 @@ static void snoop_smi_handler(struct ib_mad_agent *mad_agent,
 
        if (!smp && hdr->mgmt_class != mgmt_class)
                return;
-       if (attr_id && hdr->attr_id != attr_id)
+       if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
                return;
 
        printk("Madeye:sent SMP\n");
@@ -455,7 +455,7 @@ static void recv_smi_handler(struct ib_mad_agent *mad_agent,
 {
        if (!smp && mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class != mgmt_class)
                return;
-       if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id)
+       if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id)
                return;
 
        printk("Madeye:recv SMP\n");
@@ -510,7 +510,7 @@ static void snoop_gsi_handler(struct ib_mad_agent *mad_agent,
 
        if (!gmp && hdr->mgmt_class != mgmt_class)
                return;
-       if (attr_id && hdr->attr_id != attr_id)
+       if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
                return;
 
        printk("Madeye:sent GMP\n");
@@ -524,7 +524,7 @@ static void recv_gsi_handler(struct ib_mad_agent *mad_agent,
 
        if (!gmp && hdr->mgmt_class != mgmt_class)
                return;
-       if (attr_id && hdr->attr_id != attr_id)
+       if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
                return;
 
        printk("Madeye:recv GMP\n");