Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 851d7b6b authored by Steve Wise's avatar Steve Wise Committed by Doug Ledford
Browse files

iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping



The IWCM uses ibdev.iwcm->ifname for registration with the iwarp
port map daemon.  But iw_cxgb4 did not initialize this field which
causes intermittent registration failures based on the contents of the
uninitialized memory.

Fixes: 170003c8 ("iw_cxgb4: remove port mapper related code")
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 42235f80
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -580,6 +580,8 @@ int c4iw_register_device(struct c4iw_dev *dev)
	dev->ibdev.iwcm->add_ref = c4iw_qp_add_ref;
	dev->ibdev.iwcm->rem_ref = c4iw_qp_rem_ref;
	dev->ibdev.iwcm->get_qp = c4iw_get_qp;
	memcpy(dev->ibdev.iwcm->ifname, dev->rdev.lldi.ports[0]->name,
	       sizeof(dev->ibdev.iwcm->ifname));

	ret = ib_register_device(&dev->ibdev, NULL);
	if (ret)