Lines Matching full:nc
94 struct ncsi_channel *nc; in ncsi_rsp_handler_cis() local
98 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, &np, &nc); in ncsi_rsp_handler_cis()
99 if (!nc) { in ncsi_rsp_handler_cis()
104 nc = ncsi_add_channel(np, id); in ncsi_rsp_handler_cis()
107 return nc ? 0 : -ENODEV; in ncsi_rsp_handler_cis()
141 struct ncsi_channel *nc; in ncsi_rsp_handler_dp() local
152 NCSI_FOR_EACH_CHANNEL(np, nc) { in ncsi_rsp_handler_dp()
153 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_dp()
154 nc->state = NCSI_CHANNEL_INACTIVE; in ncsi_rsp_handler_dp()
155 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_dp()
165 struct ncsi_channel *nc; in ncsi_rsp_handler_ec() local
171 NULL, &nc); in ncsi_rsp_handler_ec()
172 if (!nc) in ncsi_rsp_handler_ec()
175 ncm = &nc->modes[NCSI_MODE_ENABLE]; in ncsi_rsp_handler_ec()
187 struct ncsi_channel *nc; in ncsi_rsp_handler_dc() local
198 NULL, &nc); in ncsi_rsp_handler_dc()
199 if (!nc) in ncsi_rsp_handler_dc()
202 ncm = &nc->modes[NCSI_MODE_ENABLE]; in ncsi_rsp_handler_dc()
214 struct ncsi_channel *nc; in ncsi_rsp_handler_rc() local
220 NULL, &nc); in ncsi_rsp_handler_rc()
221 if (!nc) in ncsi_rsp_handler_rc()
225 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_rc()
226 nc->state = NCSI_CHANNEL_INACTIVE; in ncsi_rsp_handler_rc()
227 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_rc()
236 struct ncsi_channel *nc; in ncsi_rsp_handler_ecnt() local
242 NULL, &nc); in ncsi_rsp_handler_ecnt()
243 if (!nc) in ncsi_rsp_handler_ecnt()
246 ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; in ncsi_rsp_handler_ecnt()
258 struct ncsi_channel *nc; in ncsi_rsp_handler_dcnt() local
264 NULL, &nc); in ncsi_rsp_handler_dcnt()
265 if (!nc) in ncsi_rsp_handler_dcnt()
268 ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; in ncsi_rsp_handler_dcnt()
281 struct ncsi_channel *nc; in ncsi_rsp_handler_ae() local
287 NULL, &nc); in ncsi_rsp_handler_ae()
288 if (!nc) in ncsi_rsp_handler_ae()
292 ncm = &nc->modes[NCSI_MODE_AEN]; in ncsi_rsp_handler_ae()
310 struct ncsi_channel *nc; in ncsi_rsp_handler_sl() local
316 NULL, &nc); in ncsi_rsp_handler_sl()
317 if (!nc) in ncsi_rsp_handler_sl()
321 ncm = &nc->modes[NCSI_MODE_LINK]; in ncsi_rsp_handler_sl()
332 struct ncsi_channel *nc; in ncsi_rsp_handler_gls() local
339 NULL, &nc); in ncsi_rsp_handler_gls()
340 if (!nc) in ncsi_rsp_handler_gls()
343 ncm = &nc->modes[NCSI_MODE_LINK]; in ncsi_rsp_handler_gls()
352 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gls()
353 nc->monitor.state = NCSI_CHANNEL_MONITOR_START; in ncsi_rsp_handler_gls()
354 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gls()
364 struct ncsi_channel *nc; in ncsi_rsp_handler_svf() local
372 NULL, &nc); in ncsi_rsp_handler_svf()
373 if (!nc) in ncsi_rsp_handler_svf()
377 ncf = &nc->vlan_filter; in ncsi_rsp_handler_svf()
382 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_svf()
391 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_svf()
401 struct ncsi_channel *nc; in ncsi_rsp_handler_ev() local
407 NULL, &nc); in ncsi_rsp_handler_ev()
408 if (!nc) in ncsi_rsp_handler_ev()
412 ncm = &nc->modes[NCSI_MODE_VLAN]; in ncsi_rsp_handler_ev()
428 struct ncsi_channel *nc; in ncsi_rsp_handler_dv() local
434 NULL, &nc); in ncsi_rsp_handler_dv()
435 if (!nc) in ncsi_rsp_handler_dv()
439 ncm = &nc->modes[NCSI_MODE_VLAN]; in ncsi_rsp_handler_dv()
453 struct ncsi_channel *nc; in ncsi_rsp_handler_sma() local
464 NULL, &nc); in ncsi_rsp_handler_sma()
465 if (!nc) in ncsi_rsp_handler_sma()
473 ncf = &nc->mac_filter; in ncsi_rsp_handler_sma()
481 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_sma()
489 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_sma()
499 struct ncsi_channel *nc; in ncsi_rsp_handler_ebf() local
504 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, NULL, &nc); in ncsi_rsp_handler_ebf()
505 if (!nc) in ncsi_rsp_handler_ebf()
509 ncm = &nc->modes[NCSI_MODE_BC]; in ncsi_rsp_handler_ebf()
525 struct ncsi_channel *nc; in ncsi_rsp_handler_dbf() local
530 NULL, &nc); in ncsi_rsp_handler_dbf()
531 if (!nc) in ncsi_rsp_handler_dbf()
535 ncm = &nc->modes[NCSI_MODE_BC]; in ncsi_rsp_handler_dbf()
551 struct ncsi_channel *nc; in ncsi_rsp_handler_egmf() local
557 NULL, &nc); in ncsi_rsp_handler_egmf()
558 if (!nc) in ncsi_rsp_handler_egmf()
562 ncm = &nc->modes[NCSI_MODE_MC]; in ncsi_rsp_handler_egmf()
578 struct ncsi_channel *nc; in ncsi_rsp_handler_dgmf() local
583 NULL, &nc); in ncsi_rsp_handler_dgmf()
584 if (!nc) in ncsi_rsp_handler_dgmf()
588 ncm = &nc->modes[NCSI_MODE_MC]; in ncsi_rsp_handler_dgmf()
604 struct ncsi_channel *nc; in ncsi_rsp_handler_snfc() local
610 NULL, &nc); in ncsi_rsp_handler_snfc()
611 if (!nc) in ncsi_rsp_handler_snfc()
615 ncm = &nc->modes[NCSI_MODE_FC]; in ncsi_rsp_handler_snfc()
753 struct ncsi_channel *nc; in ncsi_rsp_handler_gvi() local
760 NULL, &nc); in ncsi_rsp_handler_gvi()
761 if (!nc) in ncsi_rsp_handler_gvi()
771 ncv = &nc->version; in ncsi_rsp_handler_gvi()
790 struct ncsi_channel *nc; in ncsi_rsp_handler_gc() local
797 &np, &nc); in ncsi_rsp_handler_gc()
798 if (!nc) in ncsi_rsp_handler_gc()
802 nc->caps[NCSI_CAP_GENERIC].cap = ntohl(rsp->cap) & in ncsi_rsp_handler_gc()
804 nc->caps[NCSI_CAP_BC].cap = ntohl(rsp->bc_cap) & in ncsi_rsp_handler_gc()
806 nc->caps[NCSI_CAP_MC].cap = ntohl(rsp->mc_cap) & in ncsi_rsp_handler_gc()
808 nc->caps[NCSI_CAP_BUFFER].cap = ntohl(rsp->buf_cap); in ncsi_rsp_handler_gc()
809 nc->caps[NCSI_CAP_AEN].cap = ntohl(rsp->aen_cap) & in ncsi_rsp_handler_gc()
811 nc->caps[NCSI_CAP_VLAN].cap = rsp->vlan_mode & in ncsi_rsp_handler_gc()
815 nc->mac_filter.addrs = kzalloc(size, GFP_ATOMIC); in ncsi_rsp_handler_gc()
816 if (!nc->mac_filter.addrs) in ncsi_rsp_handler_gc()
818 nc->mac_filter.n_uc = rsp->uc_cnt; in ncsi_rsp_handler_gc()
819 nc->mac_filter.n_mc = rsp->mc_cnt; in ncsi_rsp_handler_gc()
820 nc->mac_filter.n_mixed = rsp->mixed_cnt; in ncsi_rsp_handler_gc()
822 nc->vlan_filter.vids = kcalloc(rsp->vlan_cnt, in ncsi_rsp_handler_gc()
823 sizeof(*nc->vlan_filter.vids), in ncsi_rsp_handler_gc()
825 if (!nc->vlan_filter.vids) in ncsi_rsp_handler_gc()
830 nc->vlan_filter.bitmap = U64_MAX; in ncsi_rsp_handler_gc()
831 nc->vlan_filter.n_vids = rsp->vlan_cnt; in ncsi_rsp_handler_gc()
843 struct ncsi_channel *nc; in ncsi_rsp_handler_gp() local
853 NULL, &nc); in ncsi_rsp_handler_gp()
854 if (!nc) in ncsi_rsp_handler_gp()
859 nc->modes[NCSI_MODE_BC].enable = 1; in ncsi_rsp_handler_gp()
860 nc->modes[NCSI_MODE_BC].data[0] = ntohl(rsp->bc_mode); in ncsi_rsp_handler_gp()
863 nc->modes[NCSI_MODE_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
865 nc->modes[NCSI_MODE_TX_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
867 nc->modes[NCSI_MODE_MC].enable = 1; in ncsi_rsp_handler_gp()
870 nc->modes[NCSI_MODE_LINK].enable = 1; in ncsi_rsp_handler_gp()
871 nc->modes[NCSI_MODE_LINK].data[0] = ntohl(rsp->link_mode); in ncsi_rsp_handler_gp()
872 nc->modes[NCSI_MODE_VLAN].enable = 1; in ncsi_rsp_handler_gp()
873 nc->modes[NCSI_MODE_VLAN].data[0] = rsp->vlan_mode; in ncsi_rsp_handler_gp()
874 nc->modes[NCSI_MODE_FC].enable = 1; in ncsi_rsp_handler_gp()
875 nc->modes[NCSI_MODE_FC].data[0] = rsp->fc_mode; in ncsi_rsp_handler_gp()
876 nc->modes[NCSI_MODE_AEN].enable = 1; in ncsi_rsp_handler_gp()
877 nc->modes[NCSI_MODE_AEN].data[0] = ntohl(rsp->aen_mode); in ncsi_rsp_handler_gp()
882 ncmf = &nc->mac_filter; in ncsi_rsp_handler_gp()
883 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
893 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
897 ncvf = &nc->vlan_filter; in ncsi_rsp_handler_gp()
899 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
908 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
917 struct ncsi_channel *nc; in ncsi_rsp_handler_gcps() local
923 NULL, &nc); in ncsi_rsp_handler_gcps()
924 if (!nc) in ncsi_rsp_handler_gcps()
928 ncs = &nc->stats; in ncsi_rsp_handler_gcps()
978 struct ncsi_channel *nc; in ncsi_rsp_handler_gns() local
984 NULL, &nc); in ncsi_rsp_handler_gns()
985 if (!nc) in ncsi_rsp_handler_gns()
989 ncs = &nc->stats; in ncsi_rsp_handler_gns()
1005 struct ncsi_channel *nc; in ncsi_rsp_handler_gnpts() local
1011 NULL, &nc); in ncsi_rsp_handler_gnpts()
1012 if (!nc) in ncsi_rsp_handler_gnpts()
1016 ncs = &nc->stats; in ncsi_rsp_handler_gnpts()
1074 struct ncsi_channel *nc; in ncsi_rsp_handler_netlink() local
1080 &np, &nc); in ncsi_rsp_handler_netlink()
1084 ret = ncsi_send_netlink_rsp(nr, np, nc); in ncsi_rsp_handler_netlink()