Lines Matching refs:nca

39 				  struct ncsi_cmd_arg *nca)  in ncsi_cmd_build_header()  argument
47 h->id = nca->id; in ncsi_cmd_build_header()
48 h->type = nca->type; in ncsi_cmd_build_header()
49 h->channel = NCSI_TO_CHANNEL(nca->package, in ncsi_cmd_build_header()
50 nca->channel); in ncsi_cmd_build_header()
51 h->length = htons(nca->payload); in ncsi_cmd_build_header()
57 sizeof(*h) + nca->payload); in ncsi_cmd_build_header()
59 ALIGN(nca->payload, 4)); in ncsi_cmd_build_header()
64 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_default() argument
69 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_default()
75 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_sp() argument
80 cmd->hw_arbitration = nca->bytes[0]; in ncsi_cmd_handler_sp()
81 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_sp()
87 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_dc() argument
92 cmd->ald = nca->bytes[0]; in ncsi_cmd_handler_dc()
93 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_dc()
99 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_rc() argument
104 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_rc()
110 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_ae() argument
115 cmd->mc_id = nca->bytes[0]; in ncsi_cmd_handler_ae()
116 cmd->mode = htonl(nca->dwords[1]); in ncsi_cmd_handler_ae()
117 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_ae()
123 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_sl() argument
128 cmd->mode = htonl(nca->dwords[0]); in ncsi_cmd_handler_sl()
129 cmd->oem_mode = htonl(nca->dwords[1]); in ncsi_cmd_handler_sl()
130 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_sl()
136 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_svf() argument
141 cmd->vlan = htons(nca->words[1]); in ncsi_cmd_handler_svf()
142 cmd->index = nca->bytes[6]; in ncsi_cmd_handler_svf()
143 cmd->enable = nca->bytes[7]; in ncsi_cmd_handler_svf()
144 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_svf()
150 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_ev() argument
155 cmd->mode = nca->bytes[3]; in ncsi_cmd_handler_ev()
156 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_ev()
162 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_sma() argument
169 cmd->mac[i] = nca->bytes[i]; in ncsi_cmd_handler_sma()
170 cmd->index = nca->bytes[6]; in ncsi_cmd_handler_sma()
171 cmd->at_e = nca->bytes[7]; in ncsi_cmd_handler_sma()
172 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_sma()
178 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_ebf() argument
183 cmd->mode = htonl(nca->dwords[0]); in ncsi_cmd_handler_ebf()
184 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_ebf()
190 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_egmf() argument
195 cmd->mode = htonl(nca->dwords[0]); in ncsi_cmd_handler_egmf()
196 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_egmf()
202 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_snfc() argument
207 cmd->mode = nca->bytes[0]; in ncsi_cmd_handler_snfc()
208 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_snfc()
214 struct ncsi_cmd_arg *nca) in ncsi_cmd_handler_oem() argument
226 payload = ALIGN(nca->payload, 4); in ncsi_cmd_handler_oem()
231 memcpy(&cmd->mfr_id, nca->data, nca->payload); in ncsi_cmd_handler_oem()
232 ncsi_cmd_build_header(&cmd->cmd.common, nca); in ncsi_cmd_handler_oem()
241 struct ncsi_cmd_arg *nca);
275 static struct ncsi_request *ncsi_alloc_command(struct ncsi_cmd_arg *nca) in ncsi_alloc_command() argument
277 struct ncsi_dev_priv *ndp = nca->ndp; in ncsi_alloc_command()
287 nr = ncsi_alloc_request(ndp, nca->req_flags); in ncsi_alloc_command()
298 payload = ALIGN(nca->payload, 4); in ncsi_alloc_command()
318 int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca) in ncsi_xmit_cmd() argument
327 if (nca->req_flags == NCSI_REQ_FLAG_NETLINK_DRIVEN) in ncsi_xmit_cmd()
330 type = nca->type; in ncsi_xmit_cmd()
345 netdev_err(nca->ndp->ndev.dev, in ncsi_xmit_cmd()
346 "Cannot send packet with type 0x%02x\n", nca->type); in ncsi_xmit_cmd()
356 nca->payload = nch->payload; in ncsi_xmit_cmd()
357 nr = ncsi_alloc_command(nca); in ncsi_xmit_cmd()
362 if (nca->req_flags == NCSI_REQ_FLAG_NETLINK_DRIVEN) { in ncsi_xmit_cmd()
363 nr->snd_seq = nca->info->snd_seq; in ncsi_xmit_cmd()
364 nr->snd_portid = nca->info->snd_portid; in ncsi_xmit_cmd()
365 nr->nlhdr = *nca->info->nlhdr; in ncsi_xmit_cmd()
369 nca->id = nr->id; in ncsi_xmit_cmd()
370 ret = nch->handler(nr->cmd, nca); in ncsi_xmit_cmd()
385 if (nca->ndp->gma_flag == 1) in ncsi_xmit_cmd()
386 memcpy(eh->h_source, nca->ndp->ndev.dev->dev_addr, ETH_ALEN); in ncsi_xmit_cmd()