Lines Matching full:nr
35 static int ncsi_validate_rsp_pkt(struct ncsi_request *nr, in ncsi_validate_rsp_pkt() argument
46 h = (struct ncsi_rsp_pkt_hdr *)skb_network_header(nr->rsp); in ncsi_validate_rsp_pkt()
49 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt()
54 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt()
62 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt()
80 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt()
89 static int ncsi_rsp_handler_cis(struct ncsi_request *nr) in ncsi_rsp_handler_cis() argument
92 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_cis()
97 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_cis()
110 static int ncsi_rsp_handler_sp(struct ncsi_request *nr) in ncsi_rsp_handler_sp() argument
113 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_sp()
120 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_sp()
136 static int ncsi_rsp_handler_dp(struct ncsi_request *nr) in ncsi_rsp_handler_dp() argument
139 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_dp()
145 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_dp()
161 static int ncsi_rsp_handler_ec(struct ncsi_request *nr) in ncsi_rsp_handler_ec() argument
164 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_ec()
169 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_ec()
183 static int ncsi_rsp_handler_dc(struct ncsi_request *nr) in ncsi_rsp_handler_dc() argument
186 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_dc()
191 ret = ncsi_validate_rsp_pkt(nr, 4); in ncsi_rsp_handler_dc()
196 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_dc()
210 static int ncsi_rsp_handler_rc(struct ncsi_request *nr) in ncsi_rsp_handler_rc() argument
213 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_rc()
218 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_rc()
232 static int ncsi_rsp_handler_ecnt(struct ncsi_request *nr) in ncsi_rsp_handler_ecnt() argument
235 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_ecnt()
240 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_ecnt()
254 static int ncsi_rsp_handler_dcnt(struct ncsi_request *nr) in ncsi_rsp_handler_dcnt() argument
257 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_dcnt()
262 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_dcnt()
276 static int ncsi_rsp_handler_ae(struct ncsi_request *nr) in ncsi_rsp_handler_ae() argument
280 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_ae()
285 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_ae()
297 cmd = (struct ncsi_cmd_ae_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_ae()
305 static int ncsi_rsp_handler_sl(struct ncsi_request *nr) in ncsi_rsp_handler_sl() argument
309 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_sl()
314 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_sl()
320 cmd = (struct ncsi_cmd_sl_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_sl()
328 static int ncsi_rsp_handler_gls(struct ncsi_request *nr) in ncsi_rsp_handler_gls() argument
331 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gls()
337 rsp = (struct ncsi_rsp_gls_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gls()
348 if (nr->flags & NCSI_REQ_FLAG_EVENT_DRIVEN) in ncsi_rsp_handler_gls()
359 static int ncsi_rsp_handler_svf(struct ncsi_request *nr) in ncsi_rsp_handler_svf() argument
363 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_svf()
370 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_svf()
376 cmd = (struct ncsi_cmd_svf_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_svf()
396 static int ncsi_rsp_handler_ev(struct ncsi_request *nr) in ncsi_rsp_handler_ev() argument
400 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_ev()
405 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_ev()
417 cmd = (struct ncsi_cmd_ev_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_ev()
424 static int ncsi_rsp_handler_dv(struct ncsi_request *nr) in ncsi_rsp_handler_dv() argument
427 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_dv()
432 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_dv()
448 static int ncsi_rsp_handler_sma(struct ncsi_request *nr) in ncsi_rsp_handler_sma() argument
452 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_sma()
462 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_sma()
471 cmd = (struct ncsi_cmd_sma_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_sma()
494 static int ncsi_rsp_handler_ebf(struct ncsi_request *nr) in ncsi_rsp_handler_ebf() argument
498 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_ebf()
503 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_ebf()
514 cmd = (struct ncsi_cmd_ebf_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_ebf()
521 static int ncsi_rsp_handler_dbf(struct ncsi_request *nr) in ncsi_rsp_handler_dbf() argument
524 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_dbf()
528 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_dbf()
546 static int ncsi_rsp_handler_egmf(struct ncsi_request *nr) in ncsi_rsp_handler_egmf() argument
550 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_egmf()
555 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_egmf()
567 cmd = (struct ncsi_cmd_egmf_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_egmf()
574 static int ncsi_rsp_handler_dgmf(struct ncsi_request *nr) in ncsi_rsp_handler_dgmf() argument
577 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_dgmf()
581 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_dgmf()
599 static int ncsi_rsp_handler_snfc(struct ncsi_request *nr) in ncsi_rsp_handler_snfc() argument
603 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_snfc()
608 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_snfc()
620 cmd = (struct ncsi_cmd_snfc_pkt *)skb_network_header(nr->cmd); in ncsi_rsp_handler_snfc()
628 static int ncsi_rsp_handler_oem_gma(struct ncsi_request *nr, int mfr_id) in ncsi_rsp_handler_oem_gma() argument
630 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_oem_gma()
638 rsp = (struct ncsi_rsp_oem_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_oem_gma()
668 static int ncsi_rsp_handler_oem_mlx(struct ncsi_request *nr) in ncsi_rsp_handler_oem_mlx() argument
674 rsp = (struct ncsi_rsp_oem_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_oem_mlx()
679 return ncsi_rsp_handler_oem_gma(nr, NCSI_OEM_MFR_MLX_ID); in ncsi_rsp_handler_oem_mlx()
684 static int ncsi_rsp_handler_oem_bcm(struct ncsi_request *nr) in ncsi_rsp_handler_oem_bcm() argument
690 rsp = (struct ncsi_rsp_oem_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_oem_bcm()
694 return ncsi_rsp_handler_oem_gma(nr, NCSI_OEM_MFR_BCM_ID); in ncsi_rsp_handler_oem_bcm()
699 static int ncsi_rsp_handler_oem_intel(struct ncsi_request *nr) in ncsi_rsp_handler_oem_intel() argument
705 rsp = (struct ncsi_rsp_oem_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_oem_intel()
709 return ncsi_rsp_handler_oem_gma(nr, NCSI_OEM_MFR_INTEL_ID); in ncsi_rsp_handler_oem_intel()
716 int (*handler)(struct ncsi_request *nr);
724 static int ncsi_rsp_handler_oem(struct ncsi_request *nr) in ncsi_rsp_handler_oem() argument
731 rsp = (struct ncsi_rsp_oem_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_oem()
747 netdev_err(nr->ndp->ndev.dev, "Received unrecognized OEM packet with MFR-ID (0x%x)\n", in ncsi_rsp_handler_oem()
753 return nrh->handler(nr); in ncsi_rsp_handler_oem()
756 static int ncsi_rsp_handler_gvi(struct ncsi_request *nr) in ncsi_rsp_handler_gvi() argument
759 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gvi()
765 rsp = (struct ncsi_rsp_gvi_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gvi()
793 static int ncsi_rsp_handler_gc(struct ncsi_request *nr) in ncsi_rsp_handler_gc() argument
796 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gc()
802 rsp = (struct ncsi_rsp_gc_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gc()
844 static int ncsi_rsp_handler_gp(struct ncsi_request *nr) in ncsi_rsp_handler_gp() argument
848 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gp()
858 rsp = (struct ncsi_rsp_gp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gp()
920 static int ncsi_rsp_handler_gcps(struct ncsi_request *nr) in ncsi_rsp_handler_gcps() argument
923 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gcps()
928 rsp = (struct ncsi_rsp_gcps_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gcps()
981 static int ncsi_rsp_handler_gns(struct ncsi_request *nr) in ncsi_rsp_handler_gns() argument
984 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gns()
989 rsp = (struct ncsi_rsp_gns_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gns()
1008 static int ncsi_rsp_handler_gnpts(struct ncsi_request *nr) in ncsi_rsp_handler_gnpts() argument
1011 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gnpts()
1016 rsp = (struct ncsi_rsp_gnpts_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gnpts()
1037 static int ncsi_rsp_handler_gps(struct ncsi_request *nr) in ncsi_rsp_handler_gps() argument
1040 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gps()
1044 rsp = (struct ncsi_rsp_gps_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gps()
1053 static int ncsi_rsp_handler_gpuuid(struct ncsi_request *nr) in ncsi_rsp_handler_gpuuid() argument
1056 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gpuuid()
1060 rsp = (struct ncsi_rsp_gpuuid_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gpuuid()
1071 static int ncsi_rsp_handler_pldm(struct ncsi_request *nr) in ncsi_rsp_handler_pldm() argument
1076 static int ncsi_rsp_handler_netlink(struct ncsi_request *nr) in ncsi_rsp_handler_netlink() argument
1078 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_netlink()
1085 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_netlink()
1091 ret = ncsi_send_netlink_rsp(nr, np, nc); in ncsi_rsp_handler_netlink()
1096 static int ncsi_rsp_handler_gmcma(struct ncsi_request *nr) in ncsi_rsp_handler_gmcma() argument
1098 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_gmcma()
1105 rsp = (struct ncsi_rsp_gmcma_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_gmcma()
1137 int (*handler)(struct ncsi_request *nr);
1180 struct ncsi_request *nr; in ncsi_rcv_rsp() local
1216 nr = &ndp->requests[hdr->id]; in ncsi_rcv_rsp()
1217 if (!nr->used) { in ncsi_rcv_rsp()
1222 nr->rsp = skb; in ncsi_rcv_rsp()
1223 if (!nr->enabled) { in ncsi_rcv_rsp()
1234 ret = ncsi_validate_rsp_pkt(nr, payload); in ncsi_rcv_rsp()
1240 if (nr->flags == NCSI_REQ_FLAG_NETLINK_DRIVEN) { in ncsi_rcv_rsp()
1245 nr->snd_seq, in ncsi_rcv_rsp()
1246 nr->snd_portid, in ncsi_rcv_rsp()
1247 &nr->nlhdr, in ncsi_rcv_rsp()
1254 ret = nrh->handler(nr); in ncsi_rcv_rsp()
1261 if (nr->flags == NCSI_REQ_FLAG_NETLINK_DRIVEN) { in ncsi_rcv_rsp()
1262 ret = ncsi_rsp_handler_netlink(nr); in ncsi_rcv_rsp()
1271 ncsi_free_request(nr); in ncsi_rcv_rsp()