Lines Matching refs:agent
686 int ib_mad_agent_security_setup(struct ib_mad_agent *agent, in ib_mad_agent_security_setup() argument
691 if (!rdma_protocol_ib(agent->device, agent->port_num)) in ib_mad_agent_security_setup()
694 INIT_LIST_HEAD(&agent->mad_agent_sec_list); in ib_mad_agent_security_setup()
696 ret = security_ib_alloc_security(&agent->security); in ib_mad_agent_security_setup()
704 ret = security_ib_endport_manage_subnet(agent->security, in ib_mad_agent_security_setup()
705 dev_name(&agent->device->dev), in ib_mad_agent_security_setup()
706 agent->port_num); in ib_mad_agent_security_setup()
710 WRITE_ONCE(agent->smp_allowed, true); in ib_mad_agent_security_setup()
711 list_add(&agent->mad_agent_sec_list, &mad_agent_list); in ib_mad_agent_security_setup()
717 security_ib_free_security(agent->security); in ib_mad_agent_security_setup()
721 void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent) in ib_mad_agent_security_cleanup() argument
723 if (!rdma_protocol_ib(agent->device, agent->port_num)) in ib_mad_agent_security_cleanup()
726 if (agent->qp->qp_type == IB_QPT_SMI) { in ib_mad_agent_security_cleanup()
728 list_del(&agent->mad_agent_sec_list); in ib_mad_agent_security_cleanup()
732 security_ib_free_security(agent->security); in ib_mad_agent_security_cleanup()
737 if (!rdma_protocol_ib(map->agent.device, map->agent.port_num)) in ib_mad_enforce_security()
740 if (map->agent.qp->qp_type == IB_QPT_SMI) { in ib_mad_enforce_security()
741 if (!READ_ONCE(map->agent.smp_allowed)) in ib_mad_enforce_security()
746 return ib_security_pkey_access(map->agent.device, in ib_mad_enforce_security()
747 map->agent.port_num, in ib_mad_enforce_security()
749 map->agent.security); in ib_mad_enforce_security()