From: Sean Hefty Date: Wed, 30 Jun 2010 23:50:05 +0000 (-0700) Subject: madeye: convert attribute id to host order before checking it X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Futil;p=~shefty%2Frdma-dev.git madeye: convert attribute id to host order before checking it Signed-off-by: Mike Heinz Signed-off-by: Sean Hefty --- diff --git a/drivers/infiniband/util/madeye/madeye.c b/drivers/infiniband/util/madeye/madeye.c index a0c86b96c05..1b4bb6478c9 100644 --- a/drivers/infiniband/util/madeye/madeye.c +++ b/drivers/infiniband/util/madeye/madeye.c @@ -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");