From 3a99effd09f68fbe601233c0ac58c588303b93d4 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 30 Jun 2010 16:50:05 -0700 Subject: [PATCH] madeye: convert attribute id to host order before checking it Signed-off-by: Mike Heinz Signed-off-by: Sean Hefty --- drivers/infiniband/util/madeye/madeye.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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"); -- 2.41.0