Lines Matching refs:mad
109 const struct ib_mad *mad,
114 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
115 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
116 mad->mad_hdr.method == IB_MGMT_METHOD_SET) {
117 if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO) {
119 (struct ib_port_info *) ((struct ib_smp *) mad)->data;
141 if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PKEY_TABLE) {
151 struct ib_mad *mad)
153 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
154 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
155 mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP &&
156 mad->mad_hdr.attr_id == IB_SMP_ATTR_NODE_DESC) {
158 memcpy(((struct ib_smp *) mad)->data, dev->node_desc,
166 const struct ib_mad *mad)
168 int qpn = mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED;
187 memcpy(send_buf->mad, mad, sizeof *mad);